summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-01-27 14:07:16 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2022-01-27 14:07:51 -0800
commit7fbce82f2f7b69e88b23cf138ea6cd3a86786b91 (patch)
tree546507564ce6140727df541838ee9ea631b65556
parent4fa042f8472bd841f8a995d9aadc825b820afe07 (diff)
LaTeX writer: allow arbitrary frameoptions to be passed...
to a beamer frame, using the frameoptions attribute. Updated manual. See #7869.
-rw-r--r--MANUAL.txt25
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs3
2 files changed, 18 insertions, 10 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index 6b688f8c1..4a4df01c5 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -5987,13 +5987,10 @@ To style beamer slides, you can specify a `theme`, `colortheme`,
Note that heading attributes will turn into slide attributes
(on a `<div>` or `<section>`) in HTML slide formats, allowing you
-to style individual slides. In beamer, the only heading attribute
-that affects slides is the `allowframebreaks` class, which sets the
-`allowframebreaks` option, causing multiple slides to be created
-if the content overfills the frame. This is recommended especially for
-bibliographies:
-
- # References {.allowframebreaks}
+to style individual slides. In beamer, a number of heading
+classes and attributes are recognized as frame options and
+will be passed through as options to the frame: see
+[Frame attributes in beamer], below.
## Speaker notes
@@ -6077,8 +6074,18 @@ introducing the slide:
All of the other frame attributes described in Section 8.1 of
the [Beamer User's Guide] may also be used: `allowdisplaybreaks`,
-`allowframebreaks`, `b`, `c`, `t`, `environment`, `label`, `plain`,
-`shrink`, `standout`, `noframenumbering`.
+`allowframebreaks`, `b`, `c`, `s`, `t`, `environment`, `label`, `plain`,
+`shrink`, `standout`, `noframenumbering`, `squeeze`.
+`allowframebreaks` is recommended especially for bibliographies, as
+it allows multiple slides to be created if the content overfills the
+frame:
+
+ # References {.allowframebreaks}
+
+In addition, the `frameoptions` attribute may be used to
+pass arbitrary frame options to a beamer slide:
+
+ # Heading {frameoptions="squeeze,shrink,customoption=foobar"}
## Background in reveal.js, beamer, and pptx
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 8c8bd50de..3756b8b75 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -291,7 +291,8 @@ blockToLaTeX (Div (identifier,"slide":dclasses,dkvs)
, isNothing (lookup "fragile" kvs)
, "fragile" `notElem` classes] ++
[k | k <- classes, k `elem` frameoptions] ++
- [k <> "=" <> v | (k,v) <- kvs, k `elem` frameoptions]
+ [k <> "=" <> v | (k,v) <- kvs, k `elem` frameoptions] ++
+ [v | ("frameoptions", v) <- kvs]
let options = if null optionslist
then empty
else brackets (literal (T.intercalate "," optionslist))