Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\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?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

\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.

share|improve this answer
add comment

although it's not the obvious way to think of this, since you're using amsmath you could treat this as an unnumbered display:

\[ \text{apples are veg} \]

or

\begin{equation*}
 \text{apples are veg}
\end{equation*}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.