Make raw content marked beamer work in beamer output.

See pandoc/lua-filters#40.
This commit is contained in:
John MacFarlane 2019-01-10 12:00:34 -08:00
parent dfd1796cf2
commit 24a0d613a8

View file

@ -693,10 +693,12 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
| not (null classes) && isJust (writerHighlightStyle opts)
-> highlightedCodeBlock
| otherwise -> rawCodeBlock
blockToLaTeX b@(RawBlock f x)
| f == Format "latex" || f == Format "tex"
= return $ text x
| otherwise = do
blockToLaTeX b@(RawBlock f x) = do
beamer <- gets stBeamer
if (f == Format "latex" || f == Format "tex" ||
(f == Format "beamer" && beamer))
then return $ text x
else do
report $ BlockNotRendered b
return empty
blockToLaTeX (BulletList []) = return empty -- otherwise latex error
@ -1189,12 +1191,14 @@ inlineToLaTeX (Math InlineMath str) = do
inlineToLaTeX (Math DisplayMath str) = do
setEmptyLine False
return $ "\\[" <> text (handleMathComment str) <> "\\]"
inlineToLaTeX il@(RawInline f str)
| f == Format "latex" || f == Format "tex"
= do
inlineToLaTeX il@(RawInline f str) = do
beamer <- gets stBeamer
if (f == Format "latex" || f == Format "tex" ||
(f == Format "beamer" && beamer))
then do
setEmptyLine False
return $ text str
| otherwise = do
else do
report $ InlineNotRendered il
return empty
inlineToLaTeX LineBreak = do