6

I have got some very simple table; something of the sort:

\begin{table}
\centering
\begin{tabular}{|c|c|c|}
    \hline 
    1 & 2 \\ \hline
    3 & 4 \\ \hline
\end{tabular}
\caption{This is a table description that should be on top of the table.}
\end{table}

I am trying to produce a table with the caption on top, but I have one handicap: the style sheet does not allow the use of the float or floatrow package. This proves quite complicated, cause I can't use the solutions provided here and here. But apparently it can be done, as I've seen publications that manage it. What's their secret?

  • 7
    Doesn't it work to place \caption{...} before \begin{tabular}...? – clemens Aug 30 '13 at 14:58
  • Hmm, I had no things could sometimes be so simple in LaTeX. :-) – Jelle Aug 30 '13 at 15:07
  • 2
    @cgnieder an answer? :) – cmhughes Aug 30 '13 at 15:13
9

Placing \caption{...} before the tabular environment works (unless perhaps you're using some non-common document class):

\documentclass{article}

\begin{document}
\begin{table}
\centering
\caption{This is a table description that should be on top of the table.}
\begin{tabular}{|c|c|c|}
    \hline 
    1 & 2 \\ \hline
    3 & 4 \\ \hline
\end{tabular}
\end{table}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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