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:
Root cause
PR #7996 changed the docusaurus architecture:
Before:
writer: docusaurus_writer.lua # Custom writer honored all options
After:
quarto-custom-format: docusaurus
filters:
- at: post-finalize
path: docusaurus_citeproc.lua
The 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
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.
The
html-math-method: webtexconfiguration in_extension.ymlis not being applied. Math equations are output as$$..$$(tex_math_dollars) instead of webtex image URLs.Expected behavior
Per documentation:
Expected output:
Actual behavior
Output:
Root cause
PR #7996 changed the docusaurus architecture:
Before:
After:
The
docusaurus_citeproc.luafilter callspandoc.write()with a hardcoded format string and only passescolumnsin options (added in PR #8365):The
html-math-methodand other writer options from_extension.ymlare 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
columnsonlydf-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.