Graphics, Figures & TablesCaption in subfigures split

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
-Niels
Posts: 5
Joined: Thu Jun 19, 2008 2:03 pm

Caption in subfigures split

Post by -Niels »

When I try to use the subfigure command, the specific caption to the subfigure is split. It seems that the caption can't be more than 3 signs. My code is as follows:

Code: Select all

\begin{figure}[h!tp]
\centering
\subfigure[Søjledimensioner i mm]{\label{fig:stat_sojl}}{\includegraphics[width=0.15\textwidth]{sojle.eps}}
\subfigure[Bjælkedimensioner]{\label{fig:stat_bjalk}}{\includegraphics[width=0.15\textwidth]{bjalke.eps}}
\caption{Bjælke og søjledimensioner}
\label{fig:bjalksojl}
\end{figure}
Can anyone spot the problem, or has anyone encountered this problem themselves, so that they have the solution?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Caption in subfigures split

Post by Bozack »

There is a problem with the place you put your label - it shouldn't be in a {} for itself - that's not how subfigure takes the label. Instead try using the code

Code: Select all

\begin{figure}[h!tp]
\centering
\subfigure[Søjledimensioner i mm\label{fig:stat_sojl}]{\includegraphics[width=0.15\textwidth]{sojle.eps}}
\subfigure[Bjælkedimensioner\label{fig:stat_bjalk}]{\includegraphics[width=0.15\textwidth]{bjalke.eps}}
\caption{Bjælke og søjledimensioner}
\label{fig:bjalksojl}
\end{figure}
it should work.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Post Reply