1

I have to use subfig instead of subcaption because the style I have to use redefines the look of captions and I can't change that. Given this constraint, how do I use multicol to make multiple-columns subfloats?

The problem is that this doesn't work:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[caption=false]{subfig}
\usepackage{multicol}

\begin{document}

\begin{figure}
\subfloat[inner caption]{
  \begin{multicols}{2}
  \end{multicols}
}
\caption{outer caption}
\end{figure}
\end{document}

since it results in

 ! LaTeX Error: Something's wrong--perhaps a missing \item.

(BTW, "something's wrong" is the stupidest error message I've ever seen...)

My ultimate goal is to put two bussproof proof trees side-by-side, and then more, wider proof trees in single column below it; all in the same single subfloat.

1
  • @Zarko: Two pictures next to each other on one line, then a third picture in a second line, and these three together should share one sub-caption; then more pictures with a second shared sub-caption; then some more, and so on. And then the whole thing would also have its own caption.
    – Cactus
    Jul 30 '16 at 10:24
1

What about using minipage inside the subfigure?

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[caption=false]{subfig}
\usepackage{multicol}
\usepackage{lipsum}

\begin{document}

\begin{figure}
\subfloat[inner caption]{
\begin{minipage}{\textwidth}
  \begin{multicols}{2}
  \lipsum[1]
  \end{multicols}
\end{minipage}
}

\subfloat[inner caption2]{
\begin{minipage}{\textwidth}
  \begin{multicols}{2}
  \lipsum[2]
  \end{multicols}
\end{minipage}
}
\caption{outer caption}
\end{figure}
\end{document}

output

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.