# Multiple TeXForm returns just single output

I have several expressions for which I need the LaTex output. If I put them one after another with TeXForm, only the last one is shown (see picture).

This is different to for example "TraditionalForm" behavior which prints all three inputs. Am I missing something or the behavior of TeXForm and TraditionalForm (or actually any other *Form) is simply different? I can circumvent it by appending \\Print after \\TeXForm, but it is not always desired (namely, having each output in a different cell allows to refer to that as %number; either form can be saved to a variable, but it would be best if the behaviour was the same for both cases).

• This happens with version 10: Which version are you using? Mar 1 '17 at 9:45
• 11.0.1, but this existed for as long as I remember.
– user37523
Mar 1 '17 at 13:36
• Mar 9 '17 at 21:50
• Indeed the issue almost certainly has the same root cause. Especially given Szabolcs answer
– user37523
Mar 10 '17 at 13:41
• Did you ask Wolfram about this? If yes, what did they say? Is it by design or a bug? Jan 24 '18 at 11:18

This is just a long comment.

I see the same behaviour in several versions between 9.0–11.0.

Looking at what is actually being sent to the FE with LinkSnooper, we see that the kernel does send all results back, however, the front end only displays the last one. Based on a few experiments, it seems that:

• When the result is sent as a ReturnExpressionPacket (i.e. it comes as boxes: StandardForm, TraditionalForm, FullForm, etc.) or ReturnTextPacket (OutputForm), then all results are displayed.
• When the result is sent as ReturnInputFormPacket (InputForm, TeXForm, CForm, etc.), then only the last result is displayed.

I would report this behaviour to Wolfram Support.

As a workaround you can do this (which I think is a better approach anyway):

TeXForm /@ {Sqrt[1 + x^2 + x^4], Sqrt[1 + x^2 + x^5], Sqrt[1 + x^2 + x^6]}


Another workaround is to tack on an "invisible" wrapper such as SequenceForm:

Sqrt[1 + x^2 + x^4] //TeXForm //Defer
Sqrt[1 + x^2 + x^5] //TeXForm //SequenceForm
Sqrt[1 + x^2 + x^6] //TeXForm //HoldForm


$\sqrt{x^4+x^2+1}$

$\sqrt{x^5+x^2+1}$

$\sqrt{x^6+x^2+1}$