I'm programmatically generating some formatted output that generates a cell in the form of a Cell[]
expression. For instance, the output might be
cell = Cell[TextData[{"Function ",
Cell[BoxData[FormBox[RowBox[{"f","(","x",")"}],
TraditionalForm]], FormatType->"TraditionalForm"]}],
"Subsection"];
(where $f(x)$ will actually be some complicated expression). How can I get the rendered Cell
expression displayed in the notebook temporarily during evaluation?
I can display it (permanently) in the notebook using CellPrint
:
I can display text temporarily using PrintTemporary
:
But combining them doesn't work, because PrintTemporary
assumes its argument is an expression to print rather than a box structure:
Adding DisplayForm
doesn't work; it seems DisplayForm
only works for boxes when not wrapped in a complete Cell
expression:
So I really need a CellPrintTemporary
function.
Comments
Post a Comment