16
\documentclass[letterpaper,12pt]{article}

\begin{document}

\begin{table}
\caption{Test test test test test}
\begin{tabular}{c c c c}
\hline\noalign{\smallskip}
$V_{a}$ & $B$ & $r$ & $e/m$\\
(V) & (T) & (m) & (C/kg)\\
\hline\noalign{\smallskip}
1 $\pm$ 1 & 2.04 $\pm$ 0.04 & 2.36 $\pm$ 0.1 & 1 $\pm$ 1\\
\hline\noalign{\smallskip}
\end{tabular}
\end{table}

\end{document}

I'd like to keep the formating of the table above how it is. It is the caption that I'd like to change. I don't like how it seems to be hanging off the right side of the table. I think the caption should be aligned with the left side of the table. How would I do this?

ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
mbigras
  • 395
  • 1
  • 2
  • 8

1 Answers1

14

Use the caption package und use the singlelinecheck=false option.

\documentclass{article}

\usepackage[
singlelinecheck=false % <-- important
]{caption}

\begin{document}

\begin{table}
\caption{Test test test test test}
\begin{tabular}{c c c c}
\hline\noalign{\smallskip}
$V_{a}$ & $B$ & $r$ & $e/m$\\
(V) & (T) & (m) & (C/kg)\\
\hline\noalign{\smallskip}
1 $\pm$ 1 & 2.04 $\pm$ 0.04 & 2.36 $\pm$ 0.1 & 1 $\pm$ 1\\
\hline\noalign{\smallskip}
\end{tabular}
\end{table}

\end{document}

Explanation from the package documentation:

The standard LATEX document classes (article, report, and book) automatically center a caption if it fits in one single line:

enter image description here

David Carlisle
  • 757,742