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

Figure embedding variants #67

Closed
wants to merge 3 commits into from
Closed

Conversation

mgajda
Copy link
Contributor

@mgajda mgajda commented Dec 3, 2023

I have added mode="..." parameter per figure block:

  • mode="floating" is default mode as before
  • mode="column" creates minipage environment with a width of a single line, for narrow figures in multi-column mode (LaTeX only)
  • mode="inline" strips the figure and caption to make the figure inline (all modes)
  • mode="wrapped" uses wrapfig environment to wrap text around figure (LaTeX only)

@LaurentRDC
Copy link
Owner

I consider these new features to be out-of-scope. pandoc-plot transforms code blocks into image blocks; further formatting of image blocks should be done in another filter.

It is especially telling that two of the four options above are latex-only

@mgajda
Copy link
Contributor Author

mgajda commented Dec 11, 2023

  1. Initially LaTeX-only, since wrapping figures in HTML seems more difficult.
  2. The problem with doing it in another filter is that it would depend on exact output format of pandoc-plot. That would make resulting code fragile.
  3. If we want to only produce image blocks, then at least we should support inline option that strips the figure headers and produces an inline image.

@LaurentRDC
Copy link
Owner

This PR add functionality which is strictly out-of-scope.

it would depend on exact output format of pandoc-plot

All Pandoc filters share the exact same output format -- a JSON stream with a very specific structure.

@LaurentRDC LaurentRDC closed this Dec 12, 2023
@mgajda
Copy link
Contributor Author

mgajda commented Feb 18, 2024

Since I do not feel like writing another plugin that parses pandoc-plot image block and reformats it in different way, I will maintain this branch in my own repo.

Unless there appears another filter that offers the functionality.

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

Successfully merging this pull request may close these issues.

2 participants