Replies: 1 comment 1 reply
-
I think there is also other option like Subfig package (https://www.ctan.org/pkg/subfig). We use that in rmarkdown when doing multiple figure. Example in: https://bookdown.org/yihui/rmarkdown-cookbook/latex-subfigure.html About nested output, at some point, minipage package needs to be used to organize sub figures correctly. \begin{figure}
\begin{minipage}[t]{0.50\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{plot1.png}
}
\caption{plot 1}
}
\end{minipage}%
%
\begin{minipage}[t]{0.50\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{plot1.png}
}
\caption{plot 1 again}
}
\end{minipage}%
\newline
\begin{minipage}[t]{1.00\linewidth}
{\centering
\raisebox{-\height}{
\includegraphics{plot1.png}
}
\caption{Plot 1 again as I have only this one}
}
\end{minipage}%
\end{figure} or like this using subfloat with main caption \begin{figure}
\subfloat[A plot]{\label{fig11}%
\begin{minipage}[t]{0.50\linewidth}
\raisebox{-\height}{
{\centering
\includegraphics{plot1.png}
}
}\end{minipage}%
}
%
\subfloat[Another plot]{\label{fig12}%
\begin{minipage}[t]{0.50\linewidth}
\raisebox{-\height}{
{\centering
\includegraphics{plot1.png}
}
}\end{minipage}%
}
\caption{\label{fig1}Some plots}
\end{figure} Does that help ? I am not sure if I understood correctly where we are at currently . 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm repeating this in a different thread to encourage discussion.
There exist the packages
caption
andsubcaption
that enable subfiguresClick to expand example
The
caption
package plays well with latex's default classes(book, report, article) andbeamer
andthesis
.But is not installed in the default ubuntu package. It is on ubuntu on this package.
One idea would be to include figure support as an extension, in this way you would only get sub figure support when you require it (but would still need the
texlive-extra
package installed.Custom floats
The previous
figure
andsubfigure
seem to specifically represent images.It's also possible to define custom floats, but again it is important to note that those can't be nested.
About nesting
Ideally we would like to have something like:
Unfortunately LaTeX doesn't allow this in most cases. So I see two alternatives:
We limit nesting in the output: We set a limit to some N. But later latex
versions may change in behavior requiring a pandoc update.
We produce arbitrarily nested output. That, although semantically correct,
isn't valid LaTeX.
Beta Was this translation helpful? Give feedback.
All reactions