The table below provides the information needed to formulate my question: how can I gather a selected number of tagged output cells and variables in a new notebook?
I have two notebooks nb1
and nb2
. These notebooks have tagged input cells
uniquely named such as tc11
and tc21
in nb1
; similarly, tc41
and tc53
in nb2
. In the 3rd column of the table, I give two sample lists of the output cells
that I want to gather in a new Notebook (newNB
). For example, {tc11, tc46}
and {tc31, tc53, tc46}
are the lists that I like to bring into newNB
.
In nb1
and nb2
, I also have variables to be brought into newNB
. Examples of variable lists include {var11, var22}
and {var21, var12}
.
I like to have a Mathematica
function such as:
gatherF[lstNB_, lstOUT_, lstVAR_]:=
with three arguments: list of notebooks (lstNB
), list of tagged output cells (lstOUT
), and list of variables (lstVAR
).
Note that tagged output cells inherit tagged input cells, meaning that input and output cells have the same name. I only want the tagged output cells, not input cells.
x=y+3
where I callx
as a variable. In my real case, a tagged cell includes aManipulate[...]
and I want to get the output from theManipulate
. Whereas a variable is defined out of theManipulate
. $\endgroup$x
but I wantx
variable to be active in the new notebook so that I can use it in other calculations. $\endgroup$