Closed mgajda closed 9 months ago
A similar option for figure-less inline images would be useful.
Either of these just change headers/trailers in either LaTeX or HTML.
For half-width figures, we may use the following:
\begin{minipage}{\columnwidth}
\includegraphics[width=\linewidth,height=0.28\textheight]{...}
\caption{ ... }
\label{...}
\end{minipage}
For text-wrapped figure, we need the following (see https://www.overleaf.com/learn/latex/Wrapping_text_around_figures):
\begin{wrapfigure}[lineheight]{position}{width}
...
\end{wrapfigure}
And add this to header-includes
list:
\usepackage{wrapfig}
For inline images, we just dispense with \begin{figure}
and \end{figure}
.
One could make mutually exclusive options style=wrapfigure
, style=inline
, style=figure
, and style=table
.
pandoc-plot
strictly generates a Pandoc Image block; the modification of this image block should be the domain of another Pandoc filter.
@LaurentRDC The problem with pandoc
image block is that it needs to be generated differently for a wrapped figure, and for half-width figure.
It would be nice to add an option to select the environment that changes the figures into half-width or text-wrapped.
Now it may be only achieved by using a generic re-definition of environment, as far as I know.