aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-31 11:07:39 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-31 11:07:39 -0700
commit2a81ff324523e992e73b68db24b080182465431c (patch)
treeb57673342d0fb5c518ae2625fbb04041b4d9559a /src/Text/Pandoc
parent556c6c2c6ded6da4e8fd28e5f57fb55df8625373 (diff)
downloadpandoc-2a81ff324523e992e73b68db24b080182465431c.tar.gz
LaTeX/Beamer writer: support "blocks" inside columns and other Divs.
Example: ``` <div class="columns"> <div class="column" width="40%"> - Item </div> <div class="column" width="60%"> - Item </div> </div> ``` Closes #4016.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index ab1e90b3b..976450dcd 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -371,6 +371,10 @@ toSlides bs = do
concat `fmap` mapM (elementToBeamer slideLevel) (hierarchicalize bs')
elementToBeamer :: PandocMonad m => Int -> Element -> LW m [Block]
+elementToBeamer _slideLevel (Blk (Div attr bs)) = do
+ -- make sure we support "blocks" inside divs
+ bs' <- concat `fmap` mapM (elementToBeamer 0) (hierarchicalize bs)
+ return [Div attr bs']
elementToBeamer _slideLevel (Blk b) = return [b]
elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts)
| lvl > slideLevel = do