Reported to WRI. CASE:4250134

Update: Thanks for the smaller example by Chip Hurst in comment, it seems it comes down to this simpler example

 TeXForm[Root[1 + 2 # + #^5 &, 1]]

Which gives in V 12 the following


With messages in console

 TeXForm::unspt: TeXForm of TemplateSlotSequence[1,] is not supported.
 TeXForm::unspt: TeXForm of -0.486389 is not supported.

Which compiles to in Latex as

Mathematica graphics

While in Version 11.3, same input gives

 \text{Root}\left[\text{$\#$1}^5+2 \text{$\#$1}+1\&,1\right]

With no warning messages. which compiles to

Mathematica graphics

So it seems Latex output in 11.3 would have been better to keep as is.

Original question

I am seeing some TeXForm errors or new messages in the console in V12 which do not show in V 11.3.

What do these errors mean when calling TeXForm on a result returned from DSolve in version 12? No such errors come out in 11.3

Mathematica graphics

ode = -2 x^3 + Log[x] - y[x] + 2 x y'[x] + x^2 y''[x] + x^3 y'''[x] == 0;
sol = DSolve[ode, y[x], x];

Mathematica graphics

Is this a bug? Or just warning message? Is there a way around it? The full Latex expression is too long to show.

btw, I am able to compile the latex generated in Tex Live. So I am not sure what these messages mean. The first part of the output compiles to

Mathematica graphics

The rest goes over the edge of page since it is too long.

  • 1
    $\begingroup$ Seems that TeXForm isn't playing nicely with Root objects. For example try TeXForm[Root[1 + 2# + #^5&, 1]]. $\endgroup$
    – Greg Hurst
    Apr 22, 2019 at 11:51
  • $\begingroup$ What do you want the TeXForm of a Root object to be? $\endgroup$
    – Carl Woll
    Apr 22, 2019 at 14:52
  • $\begingroup$ @CarlWoll may be if it was kept as it worked in version 11.3 would be OK. $\endgroup$
    – Nasser
    Apr 22, 2019 at 15:37
  • $\begingroup$ Root objects are new in 12, but it looks like they were not implemented in TeXForm. Have you reported this to support? $\endgroup$
    – ktm
    Apr 22, 2019 at 16:14
  • 1
    $\begingroup$ Root objects are not new, nor have they changed, as a language feature, in V12. All that has changed is how they are displayed. So the information on the reference page is quite correct $\endgroup$ Apr 23, 2019 at 7:06

2 Answers 2


Assuming you never want to try to create TeX of the new numerical approximations output, you could do:

Convert`TeX`ExpressionToTeX[expr_, o___?OptionQ] /; !TrueQ@$TeX := Block[
    {$TeX=True, BoxForm`UseApproximations=False},


Root[#^3 + # + 1&, 2] //TeXForm


If desired, a more targeted version that only affects Root object is also possible.


Here's a better fix, which is essentially the one I made to our nightly development version:

   System`Convert`CommonDump`boxes  //. {
      InterpretationBox[TemplateBox[_,"NumericalApproximation",___],System`Convert`CommonDump`x_,___] :> 

This version will work not just with TeXForm but also with $\TeX$-Export and the various other ways $\TeX$ can be generated.

  • 1
    $\begingroup$ TeXForm is really overdue for a big update. I hope you are considering it for 12.1. $\endgroup$
    – Szabolcs
    Apr 28, 2019 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.