Repository navigation
Commit 5bf4366
authored
Fix HTML equation numbers lost with --mathml or --math-method (#15358)
* Keep HTML equation numbers when the math method comes from a CLI flag
Crossref equation numbering picks \tag{n} for MathJax and KaTeX and
\qquad(n) for every other method, reading the html-math-method filter
param. That param came from the Pandoc defaults only, so a method chosen
on the command line never reached the filter. On Bootstrap HTML the
defaults say mathjax, so --mathml, --math-method=mathml and
--math-method=plain got \tag{1}, which those methods drop: the equation
number disappeared from the output.
The param now comes from resolveHtmlMathMethod when a flag chose the
method, as the KaTeX post-processor, the template patch and llms.md
output already do. Without a flag it keeps the defaults value, so the
default webtex URL Quarto fills in is unchanged. The flag is not written
into the defaults or format.pandoc: the template patch relies on telling
a flag apart from html-math-method.
One visible change: --katex or --mathjax on HTML without Bootstrap now
numbers with \tag{1} instead of \qquad(1), as Bootstrap HTML already does.
* Add changelog entry for equation numbers with CLI math flags1 parent 8779794 commit 5bf4366
3 files changed
Lines changed: 26 additions & 1 deletion
File tree
- news
- src/command/render
- tests/smoke/render
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
608 | 609 | | |
609 | 610 | | |
610 | 611 | | |
611 | | - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
612 | 618 | | |
613 | 619 | | |
614 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments