-
Notifications
You must be signed in to change notification settings - Fork 343
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 numbering for multiple figures not as subfigures #12167
Comments
@kandolfp as you are using an old pre-release, could you upgrade to use the latest pre-release? |
Result stays the same, just a change in the version for the New output of
I also tried with |
Thanks for the report. There's definitely something not working as well as it should be. Just so that we're all clear, I'll note that the way you're trying to create figures doesn't quite match our documentation on the page. We document creating referenceable subfigures, and not referenceable top-level figures. The code in the docs is:
Importantly, it has With all that said, I agree that the way Quarto is handling your code today is not ideal. The code needs to distinguish between all of the different possible permutations of crossref, figures, subfigures, multiple figures, and layouts. It's unfortunately very finicky and prone to regressions, so I can't give you a good estimate of when we'll fix it. In the meantime, you could try a workaround with the fenced div syntax.
I've verified that the above example works in |
Thanks for having a look and the workaround. I highly appreciate it and also the very quick response time of all of you!
Fair enough, I somewhat merged the two examples from the docs and I did not interpret the statement about the labels as if and only if :). Maybe I should also explain why I cam up with this and why I tried without using I am working on several lecture notes in the book class. When I create a |
FYI, this use of layout with one single label and multiple "top-level" figures never worked in Quarto (at least from 1.0.38). |
I think it's a bug. It might be a hard one to fix because of the reasons I described, but at the very least we should be emitting warnings or error messages. |
Bug description
The referencing for figures that are not subfigures but multiple figures defined via a single computation is not working as expected. The label always points to the last figure and extending the label with
-1
,-2
as for subfigures is not working.Steps to reproduce
Actual behavior
I run:
The label with no extension references the second figure, the two other labels do not exist.
Expected behavior
I expected a table with different labels. The first is ambiguous and (in my opinion) should not provide a result. The second and third line should reference the two figures.
If I do the same with html as output both figures have
<div id="fig-test"
Your environment
Quarto check output
quarto check Quarto 1.7.3 [✓] Checking environment information... Quarto cache location: ~/.cache/quarto [✓] Checking versions of quarto binary dependencies... Pandoc version 3.4.0: OK Dart Sass version 1.70.0: OK Deno version 1.46.3: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.7.3 Path: /tmp/quartodebug/.venv/lib/python3.12/site-packages/quarto_cli/quarto-1.7.3/bin [✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed) [✓] Checking LaTeX....................OK Using: Installation From Path Path: /usr/bin Version: 2023 [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.12.3 Path: /tmp/quartodebug/.venv/bin/python3 Jupyter: 5.7.2 Kernels: python3 [✓] Checking Jupyter engine render....OK [✓] Checking R installation...........(None) Unable to locate an installed version of R. Install R from https://cloud.r-project.org/
The text was updated successfully, but these errors were encountered: