Skip to content

Commit 0dc5437

Browse files
committed
Enable :stem: latexmath if math is encountered
1 parent 59ab1c2 commit 0dc5437

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/resources/filters/quarto-post/render-asciidoc.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,16 @@ function renderAsciidoc()
1212
return {}
1313
end
1414

15+
local hasMath = false
16+
1517
return {
18+
Meta = function(meta)
19+
meta['asciidoc-stem'] = 'latexmath'
20+
return meta
21+
end,
22+
Math = function(el)
23+
hasMath = true;
24+
end,
1625
Cite = function(el)
1726
-- If quarto is going to be processing the cites, go ahead and convert
1827
-- them to a native cite

src/resources/formats/asciidoc/pandoc/template.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ $endif$
2121
$if(asciidoc-doctype)$
2222
:doctype: $asciidoc-doctype$
2323
$endif$
24+
$if(asciidoc-stem)$
25+
:stem: $asciidoc-stem$
26+
$endif$
2427

2528
$endif$
2629
$if(abstract)$

0 commit comments

Comments
 (0)