columns icon indicating copy to clipboard operation
columns copied to clipboard

Handle floats and float placement

Open jdutant opened this issue 3 years ago • 0 comments

Possibly a job for a separate filter. From Bastien Dumont (https://groups.google.com/g/pandoc-discuss/c/JxV3nF_igdw):

I noticed one problem though: LaTeX always places on top of the page full-width figures in a multicolumn environment. It means that the stream will be broken after the figure, as this document will show:

\documentclass{article}
\usepackage{multicol}
\usepackage{lipsum}

\begin{document}

\begin{multicols}{2}
\lipsum[1-7]
\end{multicols}

\begin{figure}
\begin{quote}
\lipsum[8]
\end{quote}
\end{figure}

\begin{multicols}{2}
\lipsum[1-7]
\end{multicols}

\end{document}

If you only want to make all figures span the entire width in a two-column layout, you can simply add this in the metadata block of your document (without changing anything in the command-line):

header-includes: |
  \renewenvironment{figure}{\begin{figure*}}{\end{figure*}}

However, the limitation regarding the figures' placement will still apply.

jdutant avatar Mar 26 '21 15:03 jdutant