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

Feature request: one row of subfigures side-by-side #381

Closed
hhirtz opened this issue Mar 17, 2023 · 2 comments
Closed

Feature request: one row of subfigures side-by-side #381

hhirtz opened this issue Mar 17, 2023 · 2 comments

Comments

@hhirtz
Copy link

hhirtz commented Mar 17, 2023

Continuation of #60, the syntax for side-by-side subfigures only works when there are more than one row.

This works:

# Figures

<div id="fig:latex">
![cool caption](/tmp/LaTeX_logo.svg.png){#fig:logo1 width=40%}
![cooler caption](/tmp/LaTeX_logo.svg.png){#fig:logo2 width=40%}

![cool caption](/tmp/LaTeX_logo.svg.png){#fig:logo3 width=40%}
![cooler caption](/tmp/LaTeX_logo.svg.png){#fig:logo4 width=40%}

Copies of the LaTeX logo
</div>

Those logos are different I swear. Especially [@fig:logo1] and [@fig:logo2].

screen-20230317151723

But this doesn't (I only deleted the second row of images, notice how the refs are now broken):

# Figures

<div id="fig:latex">
![cool caption](/tmp/LaTeX_logo.svg.png){#fig:logo1 width=40%}
![cooler caption](/tmp/LaTeX_logo.svg.png){#fig:logo2 width=40%}

Copies of the LaTeX logo
</div>

Those logos are different I swear. Especially [@fig:logo1] and [@fig:logo2].

screen-20230317151738

The workaround I use now is to insert no-op latex $\text{}$ as a second paragraph, although it seems a HTML comment <!-- hack --> does the trick too:

# Figures

<div id="fig:latex">
![cool caption](/tmp/LaTeX_logo.svg.png){#fig:logo1 width=40%}
![cooler caption](/tmp/LaTeX_logo.svg.png){#fig:logo2 width=40%}

$\text{}$

Copies of the LaTeX logo
</div>

Those logos are different I swear. Especially [@fig:logo1] and [@fig:logo2].

screen-20230317151757

Here's the command I'm using to convert from markdown to pdf:

pandoc --filter pandoc-crossref --citeproc test.md -o test.pdf

I'm using pandoc v3.1 and pandoc-crossref v0.3.15.1a.

@hhirtz hhirtz changed the title One row of subfigures side-by-side Feature request: one row of subfigures side-by-side Mar 17, 2023
lierdakil added a commit that referenced this issue Mar 19, 2023
@lierdakil
Copy link
Owner

Hi! Thanks for the report! You've actually stumbled upon a bug introduced when updating to pandoc 3.0 format. I've pushed a commit that should fix this to master. I'll try to push out a release in a bit. If you need it ASAP, you could grab artefacts from https://github.com/lierdakil/pandoc-crossref/actions/runs/4460009114 once that's done (should be within the next hour or so)

@hhirtz
Copy link
Author

hhirtz commented Mar 20, 2023

Thank you very much! Works like a charm with v0.3.15.2

@hhirtz hhirtz closed this as completed Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants