git.iko.soy/typeable/pandoc
on master help sign in
Support all frame attributes in Beamer.
commit504bf3f8e79bd502f406264e2cc2794b129a26c0 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 15 Oct 2015, 15:11 (11 years ago) parent047cb32
2 files changed+13−4
README+8−2 src/Text/Pandoc/Writers/LaTeX.hs+5−2
README+8−2
@@ -64,6 +64,7 @@ Markdown can be expected to be lossy.
6464[XHTML]: http://www.w3.org/TR/xhtml1/
6565[LaTeX]: http://latex-project.org
6666[`beamer`]: https://ctan.org/pkg/beamer
67+[Beamer User's Guide]: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf
6768[ConTeXt]: http://pragma-ade.nl
6869[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
6970[DocBook]: http://docbook.org
@@ -3407,8 +3408,8 @@ To show the notes window, press `s` while viewing the presentation.
34073408Notes are not yet supported for other slide formats, but the notes
34083409will not appear on the slides themselves.
34093410
3410−Marking frames "fragile" in beamer
3411−----------------------------------
3411+Frame attributes in beamer
3412+--------------------------
34123413
34133414Sometimes it is necessary to add the LaTeX `[fragile]` option to
34143415a frame in beamer (for example, when using the `minted` environment).
@@ -3417,6 +3418,11 @@ introducing the slide:
34173418
34183419 # Fragile slide {.fragile}
34193420
3421+All of the other frame attributes described in Section 8.1 of
3422+the [Beamer User's Guide] may also be used: `allowdisplaybreaks`,
3423+`allowframebreaks`, `b`, `c`, `t`, `environment`, `label`, `plain`,
3424+`shrink`.
3425+
34203426EPUB Metadata
34213427=============
34223428
src/Text/Pandoc/Writers/LaTeX.hs+5−2
@@ -300,9 +300,12 @@ elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts)
300300 if writerListings opts
301301 then query hasCode elts
302302 else [])
303− let allowframebreaks = "allowframebreaks" `elem` classes
303+ let frameoptions = ["allowdisplaybreaks", "allowframebreaks",
304+ "b", "c", "t", "environment",
305+ "label", "plain", "shrink"]
304306 let optionslist = ["fragile" | fragile] ++
305− ["allowframebreaks" | allowframebreaks]
307+ [k | k <- classes, k `elem` frameoptions] ++
308+ [k ++ "=" ++ v | (k,v) <- kvs, k `elem` frameoptions]
306309 let options = if null optionslist
307310 then ""
308311 else "[" ++ intercalate "," optionslist ++ "]"