@@ -290,7 +290,12 @@ blockToLaTeX :: PandocMonad m
290 => Block -- ^ Block to convert
290 => Block -- ^ Block to convert
291 -> LW m (Doc Text)
291 -> LW m (Doc Text)
292blockToLaTeX Null = return empty
292blockToLaTeX Null = return empty
293−blockToLaTeX (Div attr@(identifier,"block":_,_) (Header _ _ ils : bs)) = do
293+blockToLaTeX (Div attr@(identifier,"block":dclasses,_)
294+ (Header _ _ ils : bs)) = do
296+ | "example" `elem` dclasses = "exampleblock"
297+ | "alert" `elem` dclasses = "alertblock"
298+ | otherwise = "block"
294 ref <- toLabel identifier
299 ref <- toLabel identifier
295 let anchor = if T.null identifier
300 let anchor = if T.null identifier
296 then empty
301 then empty
@@ -298,8 +303,8 @@ blockToLaTeX (Div attr@(identifier,"block":_,_) (Header _ _ ils : bs)) = do
298 braces (literal ref) <> braces empty
303 braces (literal ref) <> braces empty
299 title' <- inlineListToLaTeX ils
304 title' <- inlineListToLaTeX ils
300 contents <- blockListToLaTeX bs
305 contents <- blockListToLaTeX bs
301− wrapDiv attr $ ("\\begin{block}" <> braces title' <> anchor) $$
306+ wrapDiv attr $ ("\\begin" <> braces blockname <> braces title' <> anchor) $$
302− contents $$ "\\end{block}"
307+ contents $$ "\\end" <> braces blockname
303blockToLaTeX (Div (identifier,"slide":dclasses,dkvs)
308blockToLaTeX (Div (identifier,"slide":dclasses,dkvs)
304 (Header _ (_,hclasses,hkvs) ils : bs)) = do
309 (Header _ (_,hclasses,hkvs) ils : bs)) = do
305 -- note: [fragile] is required or verbatim breaks
310 -- note: [fragile] is required or verbatim breaks