Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Half-width or text-wrapped figures? #65

Closed
mgajda opened this issue Sep 14, 2023 · 4 comments
Closed

Half-width or text-wrapped figures? #65

mgajda opened this issue Sep 14, 2023 · 4 comments

Comments

@mgajda
Copy link
Contributor

mgajda commented Sep 14, 2023

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.

@mgajda
Copy link
Contributor Author

mgajda commented Dec 2, 2023

A similar option for figure-less inline images would be useful.

Either of these just change headers/trailers in either LaTeX or HTML.

@mgajda
Copy link
Contributor Author

mgajda commented Dec 2, 2023

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.

mgajda added a commit to mgajda/pandoc-plot that referenced this issue Dec 3, 2023
@LaurentRDC
Copy link
Owner

pandoc-plot strictly generates a Pandoc Image block; the modification of this image block should be the domain of another Pandoc filter.

@mgajda
Copy link
Contributor Author

mgajda commented Feb 18, 2024

@LaurentRDC The problem with pandoc image block is that it needs to be generated differently for a wrapped figure, and for half-width figure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants