Tag Info

New answers tagged

3

It seems to me that using MakeBoxes in this case is overkill. How about this simpler definition? supressVariable[f_Symbol] := Format[f[t, x], TraditionalForm] := Interpretation[f, f[t, x]] SetAttributes[supressVariable, Listable] supressVariable[{v, ρ, p, f}]; This doesn't encounter the issue you faced, because the symbol f is passed directly to ...


3

InterpretationBox holds its arguments (it has HoldAllComplete). You must evaluate ToBoxes[f] outside of this head, easily accomplished with Function as follows: supressVariable[f_Symbol] := f /: MakeBoxes[f[t, x], TraditionalForm] := InterpretationBox[#, f[t, x]] & @ ToBoxes[f]


2

Pardon me if this is unjustifiably curt but I don't see how this problem is different from many others that result from placing Dynamic too deep within an expression. Move the Dynamic to the outside and the element in question updates just fine: on = True; Row@{Checkbox@Dynamic@on, Spacer@10, ExpressionCell[ Dynamic@RawBoxes@ RowBox@{"Block", ...


2

The last three locals are actually String, i.e. "\"local\"" at the box level. The fourth from the end, however, should be due to lacking of syntax highlight at the FrontEnd. For this problem, I guess you'll have to force the FrontEnd re-render the ExpressionCell after each update of the on. Usually this can be done by changing an option of the cell (like ...



Top 50 recent answers are included