Skip to content

Handle floats and float placement #5

Description

@jdutant

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions