# Issue with table captions

I have been writing my thesis in LaTeX and has always managed to fix any issues that arose but I just can't go anywhere with this one... :s.

Basically any table that I have in my document has the same issue. Their cpation is messed up, it says "Table X:" then inserts a line break before inserting the caption... I could not find in my style sheet.

Here is a typical example, both the code and the result as a picture...

\begin{table}[!h]\small \centering{}
\begin{tabulary}{1\textwidth}{C C C C C}
& \multicolumn{4}{c}{$\gamma$-criterion}\\
& {1 mm / 0.5 \%} & {1 mm / 1 \%} & {2 mm / 0.5 \%} & {2 mm / 0.1 \%}\\
\hline \hline
Field & \multicolumn{4}{c}{Passing rate \%}\\
\hline
Spine sarcoma & 93.7 & 92.9 & 94.9 & 96.9\\
Pericardia and lung sarcoma & 93.6 & 92.7 & 95.2 & 97.3\\
Head \& neck field 1 & 94.4 & 93.3 & 95.1 & 97.0\\
Head \& neck field 2 & 94.0 & 92.9 & 94.2 & 96.7\\
\end{tabulary}
\caption{3D $\gamma$-analyses results between GMC's water dose recomputation and the original QA dose computations. Numerous gamma criteria were used.}
\label{GMCtab2}
\end{table}


Result:

• Welcome to TeX.SX! This most likely has to do with your choice of document class and packages. Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Paul Gessler Aug 23 '14 at 19:37
• If I add some minimal instructions to make your sample code compilable, I do not get a line break between the float's number and the colon. This strongly suggests that somewhere in either your preamble or in one of the captions you load, there's an instruction that either inserts the unwanted line break directly or loads a package (such as caption) that provides an easy interface for inserting such a line break. Summing up: Please augment your code snippet into a compilable MWE that generates the problem behavior you're looking to avoid. – Mico Aug 23 '14 at 21:33
• By the way \centering does not take an argument so the {} is useless. – cfr Aug 23 '14 at 22:06
• In case you find the answer useful, you should consider accepting it. – Svend Tveskæg Aug 25 '14 at 3:04

Here is how I would typeset the table:

\documentclass{article}

\usepackage[
margin = 3cm % avoids overfull \hbox' warning
]{geometry}
\usepackage[
tableposition = top, % correct spacing between table and caption
width = 0.76\textwidth % relative width of the caption
]{caption}
\usepackage{booktabs} % horizontal lines in table
\usepackage{siunitx} % SI units

\begin{document}

\begin{table}
\centering
\small
\caption{3D $\gamma$-analyses results between GMC's water dose recomputation and
the original QA dose computations. Numerous gamma criteria were used.}
\label{GMCtable2}
\begin{tabular}{l *{4}{S[table-format = 2.1]}}
\toprule
& \multicolumn{4}{c}{$\gamma$-criterion}\\[1ex]
& \SI{1}{\mm}/\SI{0.5}{\percent}
& \SI{1}{\mm}/\SI{1}{\percent}
& \SI{2}{\mm}/\SI{0.5}{\percent}
& \SI{1}{\mm}/\SI{0.1}{\percent}\\
\midrule
Field
& \multicolumn{4}{c}{Passing rate (\si{\percent})}\\[1ex]
Spine sarcoma               & 93.7 & 92.9 & 94.9 & 96.9\\
Pericardia and lung sarcoma & 93.6 & 92.7 & 95.2 & 97.3\\
Head \& neck field~1        & 94.4 & 93.3 & 95.1 & 97.0\\
Head \& neck field~2        & 94.0 & 92.9 & 94.2 & 96.7\\
\bottomrule
\end{tabular}
\end{table}
This is table~\ref{GMCtable2}.

\end{document}
`