Building a cell that renders a TraditionalForm[HoldForm[...]] label (a Manipulate Item label showing a vector/fraction such as {Cos[\[Phi]] Sin[\[Theta]], ...} or {Cos[\[Theta]/2], \[ExponentialE]^(\[ImaginaryI] \[Phi]) Sin[\[Theta]/2]}) emits Syntax::sntx: Invalid syntax in or before "{cos(----...)}" (3x for a cell with two such labels).
Cause
captureCellRun (MarkdownToNotebook.wl ~lines 849-889) runs the cell and captures output. Somewhere in the output-capture / reparse path the TraditionalForm label is typeset to its ASCII form ({cos(----)}, the ---- being a fraction bar) and then reparsed as WL, which is invalid syntax -> Syntax::sntx.
Impact
Benign for the artifact: the built .nb is correct (labels render as proper FractionBox/SuperscriptBox, no sntx text or ASCII art in the notebook body). But it violates the no-messages-during-build bar and spams 3 warnings per rebuild.
Repro
QIS-book ch02 Manipulate cell (BlochSpherePlot with theta/phi controls and two Item[Row[{..., TraditionalForm[HoldForm[{...}]]}]] labels). Deleting the Manipulate block makes the messages vanish; the two TraditionalForm labels are the source.
Suggested direction
In the output-capture path, avoid reparsing a TraditionalForm-rendered display label as WL input (treat already-typeset FormBox/TraditionalForm output as boxes, not as code to reparse). Found while cleaning ch02 (#57/#58 context).
Building a cell that renders a
TraditionalForm[HoldForm[...]]label (aManipulateItemlabel showing a vector/fraction such as{Cos[\[Phi]] Sin[\[Theta]], ...}or{Cos[\[Theta]/2], \[ExponentialE]^(\[ImaginaryI] \[Phi]) Sin[\[Theta]/2]}) emitsSyntax::sntx: Invalid syntax in or before "{cos(----...)}"(3x for a cell with two such labels).Cause
captureCellRun(MarkdownToNotebook.wl ~lines 849-889) runs the cell and captures output. Somewhere in the output-capture / reparse path the TraditionalForm label is typeset to its ASCII form ({cos(----)}, the----being a fraction bar) and then reparsed as WL, which is invalid syntax ->Syntax::sntx.Impact
Benign for the artifact: the built
.nbis correct (labels render as properFractionBox/SuperscriptBox, nosntxtext or ASCII art in the notebook body). But it violates the no-messages-during-build bar and spams 3 warnings per rebuild.Repro
QIS-book ch02 Manipulate cell (BlochSpherePlot with theta/phi controls and two
Item[Row[{..., TraditionalForm[HoldForm[{...}]]}]]labels). Deleting the Manipulate block makes the messages vanish; the two TraditionalForm labels are the source.Suggested direction
In the output-capture path, avoid reparsing a TraditionalForm-rendered display label as WL input (treat already-typeset FormBox/TraditionalForm output as boxes, not as code to reparse). Found while cleaning ch02 (#57/#58 context).