File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/resources/filters/quarto-pre Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ function callout()
6969 return calloutDocx (div )
7070 elseif _quarto .format .isEpubOutput () or _quarto .format .isRevealJsOutput () then
7171 return epubCallout (div )
72+ elseif _quarto .format .isJatsOutput () then
73+ return jatsCallout (div )
7274 else
7375 return simpleCallout (div )
7476 end
@@ -704,6 +706,19 @@ function epubCallout(div)
704706 return pandoc .Div ({calloutBody }, pandoc .Attr (div .attr .identifier , attributes ))
705707end
706708
709+ function jatsCallout (div )
710+ local icon , type , contents = resolveCalloutContents (div , true )
711+
712+ local boxedStart = ' <boxed-text>'
713+ if div .attr .identifier and div .attr .identifier ~= ' ' then
714+ boxedStart = " <boxed-text id='" .. div .attr .identifier .. " '>"
715+ end
716+
717+ contents :insert (1 , pandoc .RawBlock (' jats' , boxedStart ))
718+ contents :insert (pandoc .RawBlock (' jats' , ' </boxed-text>' ))
719+ return pandoc .Div (contents )
720+ end
721+
707722function simpleCallout (div )
708723 local icon , type , contents = resolveCalloutContents (div , true )
709724 local callout = pandoc .BlockQuote (contents )
You can’t perform that action at this time.
0 commit comments