quarto-dev / quarto-dev/quarto-cli
Use `\tag{}` info for eq cross referencing in the HTML book output
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
In writing papers one sometimes needs to give an equation a special name, using the \tag{} command. A minimal example is as follows:
$$
a \ge b \tag{IC}
$${#eq-ic}
[Equation (-@eq-ic)] is nice.
The generated HTML book output made two 'mistakes'
- it uses both (1) and (IC) as equation tags
- More importantly, it uses 1 rather than IC for cross referencing.
Meanwhile, the PDF output is normal:
I wish to achieve the same output as in the PDF output. Is there any workaround?
I am using quarto 0.3.18 (I also have pandoc 2.17.0.1 installed, not sure whether this matters). Currently I work around by defining Pandoc metadata eq.ic: IC and then Equation {{< meta eq.ic >}}. It works well for me, both HTML and PDF. But I hope there is a more direct way to do this.
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
Reproduce the minimal equation example in an HTML book and compare its equation tag and cross-reference with the PDF output. Trace how the HTML output handles the LaTeX \tag{IC} and the equation label eq-ic; done means the HTML shows only (IC) and the cross-reference uses IC rather than 1.
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
- 35/100