Skip to content

Commit dfa371c

Browse files
committed
lua - inlines needs to be wrapped in Plain before being converted to latex
1 parent e4a8898 commit dfa371c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/resources/filters/crossref/meta.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ function crossrefMetaInject()
66
return {
77
Meta = function(meta)
88
local function as_latex(inlines)
9-
return trim(pandoc.write(pandoc.Pandoc(inlines), "latex"))
9+
local toConvert = inlines
10+
if isInlineEl(inlines) then
11+
toConvert = pandoc.Plain(inlines)
12+
end
13+
return trim(pandoc.write(pandoc.Pandoc(toConvert)))
1014
end
1115
metaInjectLatex(meta, function(inject)
1216

0 commit comments

Comments
 (0)