Skip to content

Commit

Permalink
LaTeX writer: allow arbitrary frameoptions to be passed...
Browse files Browse the repository at this point in the history
to a beamer frame, using the frameoptions attribute.
Updated manual.

See #7869.
  • Loading branch information
jgm committed Jan 27, 2022
1 parent 4fa042f commit 7fbce82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
25 changes: 16 additions & 9 deletions MANUAL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7fbce82

Please sign in to comment.