-
Notifications
You must be signed in to change notification settings - Fork 331
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
Inconsistent behaviour between html and pdf for lists with (@) #11836
Comments
I believe this is related to Pandoc behavior which will continue example list for the entire document. And with Quarto
The example_list feature of Pandoc will then have continuation, as they document: https://pandoc.org/MANUAL.html#extension-example_lists They don't document if an example list can be stopped and restarted 🤔 It seems the ending a list part https://pandoc.org/MANUAL.html#ending-a-list does not apply. @tarleb do you know ?
As of now, this would rather be html behavior not following the Pandoc default behavior. But probably starting at one chapter, or having a way to number the example by chapter in book could be good. I wonder what we could do through Lua to tweak this 🤔 It seems Pandoc does a special Treatment on OrderedList ❯ quarto pandoc -t native
# Preface {.unnumbered}
(@) one
(@) two
Some content
(@) one
(@) two
^Z
[ Header
1 ( "preface" , [ "unnumbered" ] , [] ) [ Str "Preface" ]
, OrderedList
( 1 , Example , TwoParens )
[ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
, Para [ Str "Some" , Space , Str "content" ]
, OrderedList
( 3 , Example , TwoParens )
[ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
] Changing the start number in I don't think so because, it seems this is equivalent to
So This needs thinking of what could be done, if something. Otherwise, maybe this is Pandoc feature request 🤷♂ for PDF book format. Or maybe .tex post processing to change
Not straighforward to have this feature but nice problem if someone wants to search for a possible workaround using Lua or else. 🤷 |
And regarding
I don't know if it is better to keep the difference between HTML and PDF here, or try to "fix" which would mean be sure that HTML does have continuation like. Other thought: Example list in Pandoc exist also as a way to reference some Example content easily. Quarto has its own Cross Reference feature for which you can have numbered Example that can be crossreferenced So maybe |
Thanks for having such a detailed look at it!! I'll ask in the pandoc repo, it might be similar to jgm/pandoc#5709 For my document, I worked around it with some reshuffling of the text and the references you provided (thanks once more) I also found this related Q&A and link it here just for reference: #7496 |
Bug description
For a book, the numbering for lists when using
(@)
is not consistent over various formats. Forhtml
it will always start at zero for each new file (chapter) but inpdf
it continuous for the entire document.I would prefer the
html
behaviour forpdf
but an option likecontinuous-numbering
would be perfect.Steps to reproduce
You can reproduce the example with the following files:
index.qmd
# Index (@) one (@) two
file.qmd
# First Chapter (@) one (@) two
_quarto.yml
Expected behavior
pdf
andhtml
have the same numbering, i.e. in the indexand in the first chapter
To generate the
pdf
I useActual behavior
The
pdf
has the numbering (over multiple pages)and in the first chapter
Your environment
Ubuntu 24.04
Quarto > 1.6.40 (tested also with latest build on github)
Quarto check output
quarto check Quarto 1.6.40 [✓] 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.6.40 Path: /tmp/quartobug/.venv/lib/python3.12/site-packages/quarto_cli/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/quartobug/.venv/bin/python 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: