-
Notifications
You must be signed in to change notification settings - Fork 396
Description
The html-math-method: webtex configuration in _extension.yml is not being applied. Math equations are output as $$..$$ (tex_math_dollars) instead of webtex image URLs.
Expected behavior
Per documentation:
"By default, Quarto renders LaTeX math within Docusaurus projects using WebTeX"
Expected output:
Actual behavior
Output:
$$e = mc^2$$Root cause
PR #7996 changed the docusaurus architecture:
Before:
writer: docusaurus_writer.lua # Custom writer honored all optionsAfter:
quarto-custom-format: docusaurus
filters:
- at: post-finalize
path: docusaurus_citeproc.luaThe docusaurus_citeproc.lua filter calls pandoc.write() with a hardcoded format string and only passes columns in options (added in PR #8365):
local cli_opts = { columns = PANDOC_WRITER_OPTIONS.columns }
local result_str = pandoc.write(result, 'markdown_strict+...+tex_math_dollars+...', cli_opts)The html-math-method and other writer options from _extension.yml are not forwarded.
Evidence
The test snapshot at tests/docs/smoke-all/2024/01/18/docusaurus/equations.mdx.snapshot (created Jan 2024) contains $$ syntax, not webtex URLs - indicating this was already broken when the test was created.
Related
- PR restore citation behavior to Docusaurus projects #7996 - Architectural change that removed custom writer
- PR pass writer options correctly for docusaurus-md #8365 - Partial fix for
columnsonly - Issue [Docusaurus] Table having many columns output from knitr with
df-print: kableseems broken (Quarto 1.4) #8332 - Table column wrapping (led to PR pass writer options correctly for docusaurus-md #8365)
Files
src/resources/extensions/quarto/docusaurus/_extension.yml(line 31:html-math-method: webtex)src/resources/extensions/quarto/docusaurus/docusaurus_citeproc.lua(line 13-14: pandoc.write call)
This was uncovered while trying to understand snapshot change at #13249
And probably math is not the only problem we missed.