[comp.text] A LaTeX Problem

forrest@ux1.lbl.gov (Jon Forrest) (11/16/88)

I'd be grateful if someone could help me figure out why the
following LaTeX file results in a "Something's wrong" message
after the \end{center} statement. Taking out the center
environment all together eliminates this problem.

(If it matters, this is a test of a required format. Tables must
contain a centered title that must also appear in the list of tables.)

\documentstyle{book}
\begin{document}
\begin{table}
\begin{center}
\caption{This is a caption}
\end{center}
\begin{verbatim}
XX YY ZZ
\end{verbatim}
\end{table}
\end{document}

My eternal thanks,

Jon Forrest		Lawrence Berkeley Lab., 486-4991
forrest@lbl.gov			(internet)
ucbvax!lbl-csam!ux1!forrest	(uucp)
FORREST@LBL			(bitnet)

grunwald@m.cs.uiuc.edu (11/16/88)

re: problem with ``something is wrong''

Move the \caption out of the \center environment. The caption is normally
centered anyway, so it's going to do what you want.