Native Numbering for Cross-Refs in DOCX #2464
Replies: 3 comments 8 replies
-
Note that Pandoc has partially solved this natively ( Note I also posted this idea previously but it disappeared when I searched and I resubmitted, see #2335 for the first post... |
Beta Was this translation helpful? Give feedback.
-
Hi, In jgm/pandoc#7392 the pandoc extension How can I select that in quarto? I tried:
but didn't succeed. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
AFAIK Pandoc's native numbering is probably incompatible with Quarto's cross-referencing, or at least I have no idea how these two could play together. I am hoping the Pandoc code can inform an update to Quarto's cross-referencing lua filters. In the meantime to get LOF or LOT you can use the Word tools to search for the caption styles for figures and tables to make the LOF. e.g. This will fail if you are using Quarto's multipart figures or tables (where each part of a figure gets added, then the whole figure legend too) and you'll need some manual tweaking... |
Beta Was this translation helpful? Give feedback.
-
At present, Quarto uses plain text for cross-referenced output to DOCX. DOCX does support native cross-ref numbering, and the ideal situation would be for Quarto cross references to generate native numbers. This has been requested for other cross-ref filters before:
pandoc-crossref
doesn't generate native figure numbers, I made an issue for this but the developer does not want to add output-specific code: lierdakil/pandoc-crossref#299 - another crossref plugin has a similar request and a bit more progress: tomduck/pandoc-fignos#34I recently found this has been solved by an rmarkdown project: https://github.com/davidgohel/officedown — they apparently create native numbers and also therefore support list of figures/tables. I think this would improve the Quarto goal of supporting as many features cross-format as possible... They offer some other nice features like supporting table and list styles (I'm not an rmarkdown user so haven't tested it). Surely this R code can help inspire a Lua filter solution?
DOCX, unfortunately, remains a dominant format for many scientific journal submissions, and also the common format working with many colleagues who aren't code nerds or don't understand what markdown is...
Beta Was this translation helpful? Give feedback.
All reactions