## difference between right click and "copy as LaTeX" and directly using TeXForm

6

2

Piecewise[{{True, a <= -2},
{x <= (1/3)*(-4 + 4*a) || x >= 4 + 4*a,
Inequality[-2, Less, a, LessEqual, -1]},
{x <= (1/3)*(-4 + 4*a) || x >= (1/3)*(4 + 4*a),
Inequality[-1, Less, a, LessEqual, 1]},
{x <= -4 + 4*a || x >= (1/3)*(4 + 4*a),
1 < a < 2}, {True, a >= 2}}, 0]


if directly using //TeXForm ,it will give out

$$\begin{cases} \text{True} & a\leq -2 \\ x\leq \frac{1}{3} (4 a-4)\lor x\geq 4 a+4 & -2


$$\begin{cases} \text{True} & a\leq -2 \\ x\leq \frac{1}{3} (4 a-4)\lor x\geq 4 a+4 & -2

which is correct. But if I do this(select-> right clicking-> copy as-> LaTeX)

it will return

$$\begin{array}{cc} \{ & \begin{array}{cc} \text{True} & a\leq -2 \\ x\leq \frac{1}{3} (4 a-4)\lor x\geq 4 a+4 & -2
\\
\end{array}


$$\begin{array}{cc} \{ & \begin{array}{cc} \text{True} & a\leq -2 \\ x\leq \frac{1}{3} (4 a-4)\lor x\geq 4 a+4 & -2

Which is not so good.

So what cause the difference?

1Probably one uses the actual expression, the other uses the box form. I would let Wolfram know, even if it's not a bug. – Szabolcs – 2020-01-31T12:46:46.730

Incidentally, I just ran into this too. Notice how the ${$ is too small here.

– Szabolcs – 2020-02-02T20:07:27.833