It looks bad in my paper if a caption is wider than the table underneath it. How can I make them both align?
Right now my code looks like:
\begin{table}[th!] \caption{Reference temperature blah blah} \centering \begin{tabular}{llll} ... \end{tabular} \end{table}
If all your figures have the same width, you can set the option \captionsetup{width=<len>} globally.
Add to your preamble \usepackage{caption} \captionsetup[table]{singlelinecheck=false} . Otherwise, you can center the table adding \centering just after \begin{table} (probably this way it looks better inside a document).
You can add the required space by using the \vspace .
Actually there is a more legal way to do this using captions package option width
.
For global effect
\usepackage[width=.75\textwidth]{caption}
For local effect only in current environment:
\usepackage{caption} \captionsetup{width=.75\textwidth}
More info in caption package doc:
https://www.ctan.org/pkg/caption?lang=en
http://mirrors.ctan.org/macros/latex/contrib/caption/caption-eng.pdf (direct link to PDF subject to change)
I've had success by putting my caption in a parbox:
\parbox{5cm}{\caption{Lorem ipsum dolor sit amet...}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With