0
$\begingroup$

How might I display parts of(or basically summarizing) one Notebook from parts of several other Notebooks?

This isn't a strict question question but more of a general/wiki question of how to organize one Notebook such that is summarizes other Notebooks.

Here is my current picture of how such a system might work and posted code below.

enter image description here

$\endgroup$

2 Answers 2

1
$\begingroup$

This partially satisfies the original picture. Minimize,File,Load and Refresh all work respectfully.

CellList /: MakeBoxes[CellList[list_], form_] := If[
   Length[list] > 0,
   GridBox[Map[{#} &, list]],
   ""
   ];

createFrame[] := DynamicModule[{file, cells, x, display, list, size},
   display = True;
   cells = {};
   x = HoldForm[SelectionMove[nb, All, Notebook]];
   size = 85;
   list = {
     ButtonBar[{
       "[-]" :> (
         display = ! display;
         ),
       "File" :> (
         file = SystemDialogInput["FileOpen"]
         ),
       "Load" :> (
         DialogInput[DialogNotebook[{
             InputField[Dynamic@x],
             Button["Update",
              nb = NotebookOpen[file, Visible -> False];
              ReleaseHold[x];

              cells = 
               Replace[NotebookRead[nb], Cell[x___] :> {Cell[x]}, {0}];
              NotebookClose[nb];
              DialogReturn[x]]
             }]];
         ),
       "Refresh" :> (
         nb = NotebookOpen[file, Visible -> False];
         ReleaseHold[x];
         cells = 
          Replace[NotebookRead[nb], Cell[x___] :> {Cell[x]}, {0}];
         NotebookClose[nb];
         )
       }, Method -> "Queued"]
     };
   Dynamic@Column[If[display === True,
      Append[list,
       Pane[
        CellList[cells]
        , ImageSize -> Dynamic@size, Scrollbars -> True]
       ],
      list
      ]]
   ];
Grid[{{
   createFrame[]
   }}]
$\endgroup$
1
$\begingroup$

It is not quite clear to me, what you have in mind and for which purpose. I have a solution for displaying a part of a notebook (the same or another) using a button as follows:

Button["Show it", CreateDocument[
  Notebook[{
    Cell["some explanatory text:", "Text", FontSize -> 20],

    Cell[BoxData[
      ToBoxes[Row[{TraditionalForm[
          Style["\[CapitalPhi]", 30, Italic]], 
         TraditionalForm[Style[" = ", 30, Italic]], 
         TraditionalForm[
          Style[(\[Phi] \[Tau]^2 \[Nu]^3 \[Omega] \[Theta][
             1 - \[Nu] \[Omega]])/(\[Tau]^2 \[Nu]^2 + 
             2 \[Delta] \[Nu] \[Tau] + \[Omega]^2)^2, Italic, 
           20]]}]]], TextAlignment -> Center, 
     ShowStringCharacters -> False]

               },
   Cell["some more explanatory text:", "Text", FontSize -> 20],

   WindowTitle -> "An expression", WindowSize -> {500, 300}, 
   ShowCellBracket -> False
              ]
                                                           ],

 ImageSize -> Automatic, Background -> Brown, 
 BaseStyle -> {"GenericButton", Bold}]

This creates a button, which you then copy-paste into a line of the text of your current notebook. Upon pressing it you bring up a notebook that you need to show. Hope it helps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.