junior-sheer/_extensions/quarto-journals/acm/shortcodes.lua
Carl Colglazier fc929dbfed Init
2024-01-31 17:08:47 -06:00

17 lines
640 B
Lua

--[[
This file defines the shortcodes that your extension will make available
https://quarto.org/docs/authoring/shortcodes.html#custom-shortcodes
Quarto exports utils function that can be used in all filters. See
https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/pandoc/datadir/init.lua#L1522-L1576
]]--
-- Example shortcode that provides a nicely formatted 'LaTeX' string
function latex()
if quarto.doc.is_format("pdf") then
return pandoc.RawBlock('tex', '{\\LaTeX}')
elseif quarto.doc.is_format("html") then
return pandoc.Math('InlineMath', "\\LaTeX")
else
return pandoc.Span('LaTeX')
end
end