2
$\begingroup$

This question already has an answer here:

Bug introduced in 10.0 or earlier and persisting through 11.3


Consider a String expression with a TemplateBox superscript:

expr = "\!\(\*TemplateBox[{\"base\",\"super\"},\n\"Superscript\"]\)"

In Mathematica 10.1 this produces errors when TeXForm is applied:

TeXForm[expr]

\$RecursionLimit::reclim2: Recursion depth of 4096 exceeded during evaluation of Message[Message::msgl,Hold[{\$RecursionLimit::reclim2,\$RecursionLimit::reclim2,$RecursionLimit::reclim2,General::stop}]]. >>

\$RecursionLimit::reclim2: Recursion depth of 4096 exceeded during evaluation of {\$RecursionLimit::reclim2}. >>

\$RecursionLimit::reclim2: Recursion depth of 4096 exceeded during evaluation of {OutputStream[Name: stdout Unique ID: 1]}. >>

General::stop: Further output of \$RecursionLimit::reclim2 will be suppressed during this calculation. >>

How can this be patched?


A related question, but not dealing with Strings:

$\endgroup$

marked as duplicate by Mr.Wizard Apr 10 at 10:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Reproduced in the latest version. Did you report to WRI already? $\endgroup$ – Szabolcs Apr 10 at 7:34
  • $\begingroup$ @Szabolcs Thanks. No, I did not; feel free to do it yourself if you are so inclined. $\endgroup$ – Mr.Wizard Apr 10 at 8:05
  • $\begingroup$ @Szabolcs I found a duplicate. $\endgroup$ – Mr.Wizard Apr 10 at 10:33