3

I'm using the llncs document class and try to get two figures side-by-side. I found a solution, but I get a hbox underflow if my captions have a bad length. Here is a minimal example:

\documentclass{llncs}

\begin{document}

\begin{figure}
\begin{minipage}[t]{0.4\linewidth}
\caption{Fragwrdige Zusammengehrigkeit bei sehr grosen Clustern}% Underfull \hbox (badness 10000) in paragraph at lines
\end{minipage}%
\begin{minipage}[t]{0.4\linewidth}
\caption{Text}
\end{minipage}
\end{figure}

\end{document}

The PDF output seems to by OK, so I could ignore this warning. But I wonder if there is a correct solution for this problem. Any ideas?

  • 1
    adding \usepackage[german]{babel} allows latex to break the words using German rules which brings the badness down to 1803 – David Carlisle Feb 11 '13 at 12:48
  • So there is no way to fix this completely? – Marco Neumann Feb 11 '13 at 16:41
2

Adding \usepackage[german]{babel} allows latex to break the words using German rules which brings the badness down to 1803.

Once the badness is below 10000 (= infinity) it's not really an error just a warning that it's a difficult paragraph. If there isn't a particular reason for wanting .4\linewidth You can adjust the space a bit, .45 appears to work, although there is no setting that can guarantee good linebreaks in all cases, especially in languages where the word length is typically large. I also added \hfill so the two minipages are flush either edge of the page.

enter image description here

\documentclass{llncs}
\usepackage[german]{babel}
\begin{document}

\begin{figure}
\begin{minipage}[t]{0.45\linewidth}
\caption{Fragwrdige Zusammengehrigkeit bei sehr grosen Clustern}% Underfull \hbox (badness 10000) in paragraph at lines
\end{minipage}%
\begin{minipage}[t]{0.45\linewidth}
\caption{Text}
\end{minipage}

\noindent X\dotfill X
\end{figure}

\end{document}

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.