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<a\leq
-1 \\
 x\leq \frac{1}{3} (4 a-4)\lor x\geq \frac{1}{3} (4
 a+4) & -1<a\leq 1 \\
 x\leq 4 a-4\lor x\geq \frac{1}{3} (4 a+4) & 1<a<2 \\
\text{True} & a\geq 2
 \end{cases}

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

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

enter image description here

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<a\leq -1 \\
x\leq \frac{1}{3} (4 a-4)\lor x\geq \frac{1}{3} (4 a+4) & -1<a\leq 1 \\
x\leq 4 a-4\lor x\geq \frac{1}{3} (4 a+4) & 1<a<2 \\
\text{True} & a\geq 2 \\
\end{array}
\\
\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<a\leq -1 \\ x\leq \frac{1}{3} (4 a-4)\lor x\geq \frac{1}{3} (4 a+4) & -1<a\leq 1 \\ x\leq 4 a-4\lor x\geq \frac{1}{3} (4 a+4) & 1<a<2 \\ \text{True} & a\geq 2 \\ \end{array} \\ \end{array}$$

Which is not so good.

So what cause the difference?

wuyudi

Posted 2020-01-31T10:57:54.707

Reputation: 4 517

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

No answers