Skip to content

Commit

Permalink
Make raw content marked beamer work in beamer output.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jan 10, 2019
1 parent dfd1796 commit 24a0d61
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -693,12 +693,14 @@ 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
report $ BlockNotRendered b
return empty
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
blockToLaTeX (BulletList lst) = do
incremental <- gets stIncremental
Expand Down Expand Up @@ -1189,14 +1191,16 @@ 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
setEmptyLine False
return $ text str
| otherwise = do
report $ InlineNotRendered il
return empty
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
else do
report $ InlineNotRendered il
return empty
inlineToLaTeX LineBreak = do
emptyLine <- gets stEmptyLine
setEmptyLine True
Expand Down

0 comments on commit 24a0d61

Please sign in to comment.