3

This is what I wrote in the editor:

\begin{array}{c}
{\scriptsize mx-3x=2(2-x) \par
First: }
\end{array}
\begin{array}{c}
{\scriptsize mx-3x=2(2-x) \newline
First: }
\end{array}

It doesn't work in the way I expected, I am using the web editor by the way.https://www.latexlive.com/

3
  • use \\ to get a newline
    – Stephen
    Dec 6, 2023 at 6:47
  • you can not use size change commands like \scriptsize in math mode Dec 6, 2023 at 7:26
  • Off-topic: \scriptsize is a text-mode command. Since an array environment must occur in math mode, I think you should be writing \scriptstyle, not \scriptsize.
    – Mico
    Dec 6, 2023 at 7:26

1 Answer 1

3

Inside an array you should use \\ to get into a new row. A c column can't contain line breaks, because it's in horizontal mode only (but you could nest something that is multi-line, for instance another array, doesn't make much sense here).

But \\ is in another group, you would get an error if you just switched out your \newline for \\ (because you opened a group earlier).

So you should just put a \scriptsize into the second row as well (no need to put an explicit group around it, the cells form them for you). And as per @Mico's comment: \scriptstyle is probably what you want.

\begin{array}{c}
  \scriptstyle mx-3x=2(2-x) \\
  \mbox{\scriptsize First:}
\end{array}

Also to get a correct "First" appearance (that's text, not F*i*r*s*t), you should wrap it in \mbox or \text.

1
  • 2
    @Mico I was already editing the answer (roughly 10 seconds after I posted it), but then got sidetracked and didn't hit the save button... :P
    – Skillmon
    Dec 6, 2023 at 8:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .