-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
Labels
enhancementNew feature or requestNew feature or requestluaIssues related to the lua codebase, filter chain, etcIssues related to the lua codebase, filter chain, etcmathany issue related to math support in specific formatsany issue related to math support in specific formats
Milestone
Description
Lua filters can change the content of math fomulas, except for formulas with labels when rendering to PDF.
This can be worked around by running the Lua filter before the quarto filters, so maybe it's not a bug? But it's a bit confusing that the behavior changes depending on the format and label vs no label...
Here's an MWE, tested with quarto 0.9.58: create a.qmd with
---
filters:
- filter.lua
---
$$x=1$$ {#eq-x}
and filter.lua with
function Math(el)
el.text = 'y'
return el
end
The filter simply replaces all math formulas with y.
Running quarto render a.qmd gives the expected HTML output: the formula is "y".
However quarto render a.qmd --to pdf makes a PDF with the original equation "x=1".
It does work if the label is removed, i.e. if the document contains $$x=1$$ instead of $$x=1$$ {#eq-x} then the PDF shows "y".
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestluaIssues related to the lua codebase, filter chain, etcIssues related to the lua codebase, filter chain, etcmathany issue related to math support in specific formatsany issue related to math support in specific formats