# LaTeX malfunction

Discussion in 'Feedback and Suggestions' started by Georacer, Jan 27, 2011.

1. ### Georacer Thread Starter Moderator

Nov 25, 2009
5,151
1,266
I tried to post the following set of equations today in LaTeX. I traditionally use Enter to separate long arguments without inserting a New Line character (\\).
So here is what I wrote:
$
\left\ \begin{array}{c}
\frac{dX1}{dt}=X2\\
\frac{dX2}{dt}=U
\end{array} \right} \Leftrightarrow\\
\left\ \begin{array}{c}
\frac{dX1}{dt}=0*X1+1*X2+0*U\\
\frac{dX2}{dt}=0*X1+0*X2+1*U
\end{array} \right} \Leftrightarrow\\

\left[ \begin{array}{c} \dot{X1} \\ \dot{X2}\\ \end{array} \right] =
\left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot
\left[ \begin{array}{c} X1 \\ X2 \end{array} \right] +
\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U \Leftrightarrow\\
\dot{X}= \left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot X+
\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U
$

Clearly the new lines are scr3w3d, so I re-wrote it to this:
$
\left\ \begin{array}{c}
\frac{dX1}{dt}=X2\\
\frac{dX2}{dt}=U
\end{array} \right} \Leftrightarrow\\
\left\ \begin{array}{c}
\frac{dX1}{dt}=0*X1+1*X2+0*U\\
\frac{dX2}{dt}=0*X1+0*X2+1*U
\end{array} \right} \Leftrightarrow\\

\left[ \begin{array}{c} \dot{X1} \\ \dot{X2}\\ \end{array} \right] =\left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot \left[ \begin{array}{c} X1 \\ X2 \end{array} \right] +\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U \Leftrightarrow\\
\dot{X}= \left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot X+ \left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U
$

This doesn't have Enters in the problematic spots.

Does anyone know if this is a bug in the LaTeX compiler of the site or if it's something else?

Apr 5, 2008
16,431
2,696
Hello,

Can you give the text used to create the latex statements in the [plain] ... [/plain] tags.
Then the text is not converted, so we can see how the latex is typed.

Bertus

3. ### Georacer Thread Starter Moderator

Nov 25, 2009
5,151
1,266
I though you would see it though the Quote option, but I 'll post it if you want:

First Image:

$$\left\ \begin{array}{c} \frac{dX1}{dt}=X2\\ \frac{dX2}{dt}=U \end{array} \right} \Leftrightarrow\\ \left\ \begin{array}{c} \frac{dX1}{dt}=0*X1+1*X2+0*U\\ \frac{dX2}{dt}=0*X1+0*X2+1*U \end{array} \right} \Leftrightarrow\\ \left[ \begin{array}{c} \dot{X1} \\ \dot{X2}\\ \end{array} \right] = \left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot \left[ \begin{array}{c} X1 \\ X2 \end{array} \right] + \left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U \Leftrightarrow\\ \dot{X}= \left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot X+ \left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U$$

and this is the second:

$$\left\ \begin{array}{c} \frac{dX1}{dt}=X2\\ \frac{dX2}{dt}=U \end{array} \right} \Leftrightarrow\\ \left\ \begin{array}{c} \frac{dX1}{dt}=0*X1+1*X2+0*U\\ \frac{dX2}{dt}=0*X1+0*X2+1*U \end{array} \right} \Leftrightarrow\\ \left[ \begin{array}{c} \dot{X1} \\ \dot{X2}\\ \end{array} \right] =\left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot \left[ \begin{array}{c} X1 \\ X2 \end{array} \right] +\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U \Leftrightarrow\\ \dot{X}= \left[ \begin{array}{c} 0 & 1 \\ 0 & 0 \end{array} \right] \cdot X+ \left[ \begin{array}{c} 0 \\ 1 \end{array} \right] \cdot U$$

4. ### thatoneguy AAC Fanatic!

Feb 19, 2009
6,357
719
The \\ is an escape character, which tells the TeX compiler to ignore the next character, typically CR/LF.

The \\ is often used to add commands in a column without having to scroll left and right, each one after the \\ is a continuation of the prior line. Using them in the middle of the line may be confusing the editor.

If you only add a space after the \\, it ignores the space

5. ### Georacer Thread Starter Moderator

Nov 25, 2009
5,151
1,266
From my experience using the LaTeX editor in this site, the \\ character is used by the system for the new line operation and not for line continuation.
Do you know any other character for the newline?
Spaces are ignored anyway by the compiler, unless you write '\ ' to declare them explicitly.