2

When using the floatrow package to layout figures with the caption to the side, I get a overfull \hbox errors.

Overfull \hbox (3.33331pt too wide) in paragraph at lines 23--23

If I set \FBwidth-1 on each \ffigbox the error goes away. Hackish?

I have many figures that will be done this way, what is the proper way to do the \subfloatrow so this doesn't happen?

output

\documentclass[draft]{article}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{lipsum}
\usepackage{calc}
\begin{document}

\lipsum[1]

\begin{figure}
  \thisfloatsetup{valign=t,heightadjust=all}
  \fcapside[0.7\textwidth]{\fboxsep-1pt%
    \begin{subfloatrow}[3]
      \ffigbox[\FBwidth]{\caption[]{}\label{fig:test15a}}{\includegraphics[width=\hsize]{sample1}}%
      \ffigbox[\FBwidth]{\caption[]{}\label{fig:test15b}}{\includegraphics[width=\hsize]{sample2}}%
      \ffigbox[\FBwidth]{\caption[]{}\label{fig:test15b}}{\includegraphics[width=\hsize]{sample3}}%
    \end{subfloatrow}
  }{
    \caption{Horizontal sub-figures, top aligned}%
    \label{fig:test15}%
  }
\end{figure}

\end{document}

1 Answer 1

5

You missed one %

   \begin{subfloatrow}[3]%<<<<<<<<<<<<<<<<<
4
  • I thought that spurious spaces were not taken into account in such situations. Why does it happen here?
    – cjorssen
    Apr 10, 2013 at 19:28
  • @cjorssen 3.33331pt too wide is just TeX way of saying missing % at end of line So I could have answered without looking at the code:-). TeX is designed to typeset text and space between words is significant. There isn't really (despite for example latex3 conventions) a separate programming layer in TeX, It's always trying to typeset something and spaces are significant unless the macros arrange to ignore them. Apr 10, 2013 at 19:31
  • Good to know. I'm going to inspect every occurrences of \begin{subfloatrow} in files. Thanks for pointing this.
    – cjorssen
    Apr 10, 2013 at 19:34
  • @cjorssen might be simpler to suggest to the package maintainer he adds \ignorespaces Apr 10, 2013 at 19:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .