Bug introduced in 9.0 and persisting through 11.3 or later
Confirmed, as bug, by WRI: [CASE:3059683]
I'm trying to export to $\TeX$ a Message
cell.
For example, after evaluating Sin[a,b]
, Sin::argx
message is printed. When I try to export cell containing this message to $\TeX$:
ExportString[
Cell[
BoxData @ RowBox[{
StyleBox[RowBox[{"Sin", "::", "argx"}], "MessageName"],
RowBox[{":", " "}],
"\<\"\[NoBreak]\\!\\(Sin\\)\[NoBreak] called with \[NoBreak]\\!\\(2\\)\[NoBreak] arguments; 1 argument is expected. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/argx\\\", ButtonNote -> \\\"Sin::argx\\\"]\\)\"\>"
}],
"Message",
"MSG"
],
"TeX"
]
all I get is bunch of $RecursionLimit::reclim
and $IterationLimit::itlim
errors.
This happens in versions 9 and 10. In version 8 I get correct result.
Minimal non-working example is usage of System`Convert`TeXFormDump`maketex
with string containing some special boxes:
System`Convert`TeXFormDump`maketex["\"\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\"]\\)\""]
It also results in $RecursionLimit::reclim
and $IterationLimit::itlim
errors and unusable result.
How can a message cell be exported to $\TeX$?
TeXForm["\!\(\*TemplateBox[{\"x\",\"y\"},\n\"Superscript\"]\)"]
$\endgroup$