[Tex/LaTex] Theorem environment – centered line

amsmathhorizontal alignmenttheorems

\begin{theorem}
Let apples be fruits and let tomatos be a veg. Then the following is true:
\centerline{apples are veg}
\end{theorem}

I just read that one shouldn't use centerline because it's TeX and not LaTeX. The article says one should use {\centering ... }.

I now wonder if there's a more appropriate command for a centered line within a theorem environment?

Best Answer

\centerline is defined by the LaTeX kernel, but not documented in the manual. It has its uses, but is better left for special applications.

In this case the reason why it shouldn't be used is because it produces something like a big character as wide as the line width, making it difficult to justify the text.

The best solution, in my opinion, would be

\begin{theorem}
Let apples be fruits and let tomatos be a veg. Then the following is true:
\begin{center}
apples are veg
\end{center}
\end{theorem}

that provides also a vertical separation. In case this is not desired,

\begin{theorem}
Let apples be fruits and let tomatos be a veg. Then the following is true:
{\centering apples are veg\par}
\end{theorem}

might be used (don't forget the \par) or also, if you are bold,

\begin{theorem}
Let apples be fruits and let tomatos be a veg. Then the following is true:

\centerline{apples are veg}
\end{theorem}

(don't forget the blank line).

Caveat Using \centerline might be tricky as by itself it doesn't start a paragraph.

Related Question