quarto-dev / quarto-dev/quarto-cli
Duplicate margin citations in PDF
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When I use citation-location: margin and cite the same paper two times in the text, then
- for HTML it will only appear once in the margin, and both occurrences in the text are linked to the item in the margin. This is quite nice!
- for PDF two separate items are created in the margin.
I think it would be nice (and more consistent) if the PDF would also always link the first item, rather than creating a new one. (Or alternatively, if the user had control over what they prefer.)
HTML:
PDF:
Steps to reproduce
See https://github.com/davidpomerenke/quarto-bugs/tree/main/citations.
Expected behavior
Only one citation item in the margin, which is linked by all citation occurrences in the text.
Actual behavior
A citation item for every single citation occurrence in the text.
Your environment
- IDE: latest VSCode
- OS: MacOS Ventura 13.4.1 (c)
Quarto check output
> quarto check
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.433
Path: /Applications/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.10 (Conda)
Path: /opt/homebrew/Caskroom/miniconda/base/bin/python3
Jupyter: 5.2.0
Kernels: ir, python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
knitr: 1.39
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by rendering the citation example at https://github.com/davidpomerenke/quarto-bugs/tree/main/citations with citation-location: margin for HTML and PDF, then compare how repeated citations are handled. Trace the PDF citation rendering entry point and add coverage for repeated citations; done means one margin item is created and all text occurrences link to it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100