title | author | lang | papersize | geometry | shownotes | colorlinks | reference-section-title | footer | slidenumbers | subtitle | showslides | logo | titlegraphic | theme | footer-style | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pandoc-lecturenotes |
|
en-US |
a4 |
margin=2.5cm |
true |
true |
Bibliography |
`Use *emphasis* and ~~other~~ text styles if you like`
|
true |
Generating lectures and notes from a single document |
true |
graphics/logo.png |
graphics/image1.jpg |
Fira, 3 |
Here we reproduce most of the examples from the Deckset documentation. When using the deckset-slides.lua
filter, the content of slides is not simply output verbatim, but it is parsed and reserialized by Pandoc. The examples thus serve to verify
- that Deckset’s features can be used on slides and
- that they are reasonably reproduced on embedded slides.
Note that the goal is not that embedded slides look like Deckset would format them; this would be pointless. The goal is rather that they are embedded in a way that is useful. There are obviously a few limitations; some things simply cannot be reproduced in static media.
::: slide
:::
::: slide
:::
::: slide
:::
::: slide
:::
::: slide
:::
::: slide
:::
::: slide
- Start each bullet point
- with a dash to create
- an unordered list :::
::: slide
- Start each item with
- a number followed by a dot
- to create an ordered list :::
::: slide
- You can create nested lists
- by indenting
- each item with
- 4 spaces
- It's that simple :::
::: slide
Use single asterisks around text to emphasise it.
Or use double asterisks for a strong emphasis style. :::
::: slide
Alternatively, you can also use underscores to emphasize:
Wrap text in single underscores to emphasize it. Or use double underscores for the alternative strong emphasis style. :::
::: slide
Combining underscores with asterisks lets us mix and match the emphasis styles. Play with it — some themes have additional style options for those combinations:
- Style 1
- Style 2
- Style 3 :::
::: slide
:::
Deckset uses <sup>…</sup>
and <sub>…</sub>
for superscripts and subscripts; this is passed through to slides, but not translated when the slides are embedded. We recommend to use Pandoc notation (^…^
and ~…~
) instead.
::: slide
Strikethrough- Superscript (Pandoc: Super^script^)
- Subscript (Pandoc: Sub
script) Inline code
:::
One of the main benefits of using Pandoc is that we can use real bibliographic references; see the section on bibliographic references below.
To make sure that blockquotes are rendered correctly, make sure there is a “hard line break” before the attribution by ending the previous line with two or more spaces.
::: slide
The best way to predict the future is to invent it
-- Alan Kay :::
::: slide
You can also use a quote together with paragraph text or other elements on the slide:
The best way to predict the future is to invent it
-- Alan Kay
Prefix the author of the quote with --
, or leave it out if it's anonymous.
:::
::: slide
In case you're looking for something, you could use Google or Wikipedia.
Links will be clickable in exported PDFs as well! :::
In addition to HTML syntax, we also support (and prefer) an ID attribute on the slide div, for example:
::: {.slide #link-target}
Anchors are exported to Deckset, LaTeX, and ms.
::: slide
Define an anchor on the slide you want to link to using standard HTML syntax:
<a name="link-target"/>
Then you can link to this slide easily. :::
::: slide
Use GitHub style fenced code blocks to specify the language.
$.ajax({
url: "/api/getWeather",
data: {
zipcode: 97201
},
success: function( data ) {
$( "#weather-temp" ).html( "" + data + " degrees" );
}
});
:::
We support [.code-highlight: …]
but prefer attributes on the slide div. This is not translated to LaTeX and ms.
::: slide
To put the focus on specific lines of your code block, use the following command:
[.code-highlight: 2]
[.code-highlight: 2]
$.ajax({
url: "/api/getWeather",
data: {
zipcode: 97201
},
success: function( data ) {
$( "#weather-temp" ).html( "" + data + " degrees" );
}
});
:::
::: slide
You can also highlight a range of lines:
[.code-highlight: 2, 6-8]
$.ajax({
url: "/api/getWeather",
data: {
zipcode: 97201
},
success: function( data ) {
$( "#weather-temp" ).html( "" + data + " degrees" );
}
});
:::
This is not translated to LaTeX and ms.
::: slide
When presenting, you can step through multiple highlights incrementally. Place as many [.code-highlight]
commands above a code block in the order you would like the lines of code to be highlighted when presenting.
[.code-highlight: none] [.code-highlight: 2] [.code-highlight: 6-8] [.code-highlight: all]
$.ajax({
url: "/api/getWeather",
data: {
zipcode: 97201
},
success: function( data ) {
$( "#weather-temp" ).html( "" + data + " degrees" );
}
});
:::
Automatic scaling is not supported in LaTeX or ms.
::: slide
Don’t worry if your code is slightly too long. Deckset scales code blocks to fit automatically.
def establish_connection(spec = nil)
spec ||= DEFAULT_ENV.call.to_sym
resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new configurations
spec = resolver.spec(spec)
unless respond_to?(spec.adapter_method)
raise AdapterNotFound, "database configuration specifies nonexistent #{spec.config[:adapter]} adapter"
end
remove_connection
connection_handler.establish_connection self, spec
end
:::
::: slide
Use code within normal text by enclosing it in backticks.
For example: func map<A, B>(x: A?, f: A -> B) -> B?
:::
::: slide
Cells are separated by pipes |
.
Table headers are separated from the table body with a line of three dashes ---
.
Header 1 | Header 2 | Header 3 |
---|---|---|
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | Cell 5 | Cell 6 |
::: |
::: slide
Text Alignment: With :---:
and ---:
you can center or right align the cell content.
Header 1 | Header 2 | Header 3 |
---|---|---|
Cell | Cell | Cell |
Cell | Cell | Cell |
::: |
::: slide
Easily include mathematical formulas by enclosing TeX commands in $$
delimiters. Deckset uses MathJax to translate TeX commands into beautiful vector graphics.
$$ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) $$ :::
::: slide
You can also include Formulas in paragraph text. Deckset takes care of adjusting the font size and color to match the surrounding text, for example:
The slope
There is no “autoscaling” in LaTeX or ms; TeX and eqn will do whatever they do in such cases.
::: slide
Don’t worry if your equations get really complex. Deckset will scale them down to fit onto the slide.
$$
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots =
\prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
\quad\quad \text{for
This works in Deckset but isn’t currently converted to LaTeX or ms, even thought it should be easy to do (i.e., outputting the corresponding Unicode code point).
::: slide
Deckset supports Slack style emojis, e.g.: :sunny:
:umbrella:
:sunflower:
:cat:
:smile:
Deckset supports emojis! ☔ 🌻 🐱 😄 👍
Please refer to this Emoji Reference Markdown file to see which emoji are supported in Deckset. There are a few favourites that aren’t part of Unicode yet, so we cannot support them. :::
To globally enable or disable slide numbers and to set a footer on slides, use the following metadata keys (e.g., in the YAML header):
slidenumbers
(true
orfalse
)footer
To include formatting in the footer, use the following approach to ensure it gets through Pandoc:
footer: |
`Use *emphasis* and ~~other~~ text styles if you like`
If you want to disable footers or slide numbers on individual slides, you can do so by using per slide commands (see below).
All these settings are ignored for embedded slides.
You can have footnotes on slides and in the notes, but since this is really one document, no duplicate identifiers are allowed (the number to be displayed is chosen by Deckset or the formatter anyway). The footnote text does not need to be on the slide, but can be anywhere.
::: slide
Footnotes are a breeze, for example:
Most of the time, you should adhere to the APA citation style1.
Note that footnote references have to be unique in the markdown file. This means, that you can also reference footnotes from any slide, no matter where they are defined.
:::
Named references with spaces are not supported by Pandoc, but they are not useful anyway, as we have real citations. You can use named references as long as they do not contain spaces, tabs, or newlines.
::: slide
Instead of just numbers, you can also name your footnote references[^Wiles, 1995].
[^Wiles, 1995]: Modular elliptic curves and Fermat's Last Theorem. Annals of Mathematics 141 (3): 443–551.
:::
The deckset-slides.lua
filter converts soft line breaks into hard ones to enable the behavior shown on the next slide. The embed-slides.lua
filter does not do this. Both filters support <br>
.
::: slide
In paragraph text, Deckset respects when you start a new line.
This can come in handy in situations where you need more control over how text is broken up into multiple lines. :::
::: slide
You can use the HTML tag <br>
to insert line breaks in elements that cannot contain regular new lines, such as headings or footers.
:::
As for the other global options described above, the autoscale
option goes into the metadata instead. It does not have an effect on embedded slides.
::: slide
At times you have to fit more content onto one slide than the default font sizes allow for.
Deckset comes with an option to auto-scale paragraph text, lists, and other body content down to fit onto the slide. To enable this behavior put
autoscale: true
on the first line of your markdown file. :::
Converting this to LaTeX or ms would be a major effort. Instead, columns are rendered vertically.
::: slide
In order to layout your content in columns, use the [.column]
command to start a new column.
[.column]
[.column]
:::
Column widths are automatically generated using the available space divided evenly by the number of columns specified.
You can add as many columns as you like, but the more you add, the smaller the available width will be.
Combine Columns with Auto-Scaling to automatically scale down the text size to fit on the side.
Full Background Image
Fit Background Image
Multiple Background Images. Deckset doesn’t require that each image is a separate paragraph, but this is the same issue as with multiple per-slide commands—so, for Pandoc, insert a newline between them.
Also, this does not easily convert to LaTeX or ms—this is essentially the same problem as with multiple columns.
None of the following features are converted to LaTeX or ms.
Setting text on images applies a filter to the image to make the text more readable. :::
:::
Use the filtered
keyword to apply the theme's filter to an image that isn't filtered by default.
:::
:::
Split slides are to some extent rendered in LaTeX.
Combine left
or right
with the fit
keyword or a percentage to adjust the image scaling.
:::
Combine Text and Images
::: slide
::: slide
Custom scaling could perhaps be converted to LaTeX and ms, but it’s not clear to me what the scaling refers to. It’s currently not handled.
::: slide
Image grids would be very hard to convert to LaTeX and ms; we would first need to identify arrangements that are treated as image grids by Deckset and then work out an equivalent arrangement. This is currently not handled.
::: slide
One problem, however, is that not all images may fit onto the page. A workaround for LaTeX output is to add a Pandoc size attribute, which is removed by the Deckset filter, e.g.:
::: slide
# Image Grids (test for LaTeX output)
![inline fill](graphics/image2.jpg){width=30%}![inline fill](graphics/image3.jpg){width=30%}
![inline fill](graphics/image1.jpg){width=30%}
:::
Audio, video and all images with Web links are replaced with a placeholder in LaTeX and ms output.
::: slide
::: slide
You can also use URL parameters like ?t=30s
to specify a start time for the clip.
:::
Use the same layout modifiers as with images to control the positioning of videos.
left
andright
fit
andfill
- Percentage sizing, e.g.
50%
hide
to hide the video. Audio will play regardless. :::
Control video playback by using one of those directives:
autoplay
loop
mute
:::
Audio is replaced with a placeholder in LaTeX and ms output.
::: slide
To add audio files to your presentation, add them to your Markdown like so:
Your operating system’s file type icon will be used as a visual representation of the audio file. :::
Use the same layout modifiers as with images to control the positioning of audio file icons.
left
andright
fit
andfill
- Percentage sizing, e.g.
25%
hide
to hide the visual representation. Audio will play regardless.
Control audio playback by using one of those directives:
autoplay
loop
mute
Deckset turns every paragraph that starts with a ^
into presenter notes and doesn’t show this text on the slides.
You’ll see these notes on the presenter display (with two screens connected) or by using the rehearsal mode.
To preview your presenter notes in the main application window, you can turn them on by selecting Toggle Presenter Notes
from the View
menu.
To start another presenter note paragraph, prefix it with a caret again. Deckset will automatically scale the notes down to fit onto the presenter display in case you have a lot of text.
Example:
::: slide
^ This is a presenter note. :::
Presenter notes are not shown for embedded slides.
To customize the style of presenter notes, in both Presenter and Rehearsal modes and in exported documents, you may use the presenter-notes
command like so:
presenter-notes: text-scale(2), alignment(left|right|center), Helvetica
You may also use this command on a single slide, like so:
[.presenter-notes: text-scale(2), alignment(left|right|center), Helvetica]
::: {.slide presenter-notes="text-scale(2), alignment(right), Helvetica Bold"} This slide has a customized presenter note.
^ This is a presenter note. :::
A title slide is automatically generated by the deckset-slides.lua
filter using information from the metadata (title, subtitle, date, author); if the scholarly-metadata.lua
filter is used, affiliations and e-mail addresses are also added.
You can specify an image file name in the metadata option logo
to insert the following code above the text (here for the file name graphics/logo.png
); the image will be displayed in the top left side of the title slide:
![left 100% inline](graphics/logo.png)
You can specify an image file name in the metadata option titlegraphic
to insert the following code above the text (here for the file name graphics/image1.jpg
); this will appear as background image of the title slide:
![](graphics/image1.jpg)
Both options can be used together.
Footer, slide numbers and slide count are turned off for the title slide.
The deckset-slides.lua
filter converts spans with the class alert to Deckset-style combined emphasis (currently _**…**_
). According to the Deckset documentation, “some themes have additional style options for those combinations.” Thus, depending on the theme, alerted text may or may not be actually highlighted.
::: slide
It is the argument of this book that not only are these conflicts still not resolved, but [they remain fundamentally unresolvable]{.alert}.
(Depending on the theme, the passage “they remain fundamentally unresolvable” may or may not be highlighted.) :::
::: slide
It is the argument of this book that not only are these conflicts still not resolved, but [they remain fundamentally unresolvable]{.alert}.
(Depending on the theme, the passage “they remain fundamentally unresolvable” may or may not be highlighted.) :::
As already mentioned above, you can specify global configuration commands for Deckset as metadata options, e.g.,
theme: Fira, 3
slidenumbers: true
Instead of using Deckset’s per-slide commands such as [.slidenumbers=false]
, you can specify them as attributes of the slide
block, e.g.:
::: {.slide slidenumbers=false footer="A different footer"}
::: {.slide slidenumbers=false footer="A different footer"} This slide has a different footer and no slide number. :::
This also applies to the custom theming options (see the Deckset documentation, for example:
::: {.slide background-color=#FF0000}
A slide with a red background
:::
::: {.slide background-color=#FF0000}
:::
All of these options are ignored for embedded slides.
With citeproc, you can use bibliographic references on the slides and in the notes. When generating Deckset slides, add the deckset-post-citeproc.lua
filter after the --citeproc
option. The bibliography on the slides will list only those references that appear on slides. For example, the following quotation from @Klaus1966a is not on a slide, so the reference will not appear in the bibliography:
::: {lang=de}
Die Maschine ist zwar nur das anorganische Produkt des Menschen, eine Form der Rückwirkung des Menschen auf die anorganische Natur, gleichzeitig ist sie damit aber auch ein Stück seiner umgestalteten Umwelt und insofern ein Bestandteil der menschlichen Welt. Der Mensch paßt sich seiner Umgebung an. Aber er paßt seine Umgebung zugleich auch bewußt seinen menschlichen Bedürfnissen an. Dieses Verhalten unterscheidet den Menschen wesentlich vom Tier, das seine Umwelt nur zufällig und unbewußt umgestaltet. Zwischen Mensch und Maschine besteht ein wechselseitiger Anpassungsprozeß, bei dem der Mensch grundsätzlich und im ganzen gesehen die primäre Rolle spielt; er spielt diese Rolle jedoch nicht in jeder Beziehung. Zwar schafft er die Maschine, um seine eigenen Unzulänglichkeiten im Kampf mit der Natur zu überwinden oder zum Teil auszugleichen, die relativen Unvollkommenheiten der von ihm geschaffenen Mittel muß er aber seinerseits wieder mit spezifisch menschlichen Mitteln kompensieren. Einmal geschaffen, unterwirft sich daher die Maschine, von der technischen Seite her gesehen, in gewisser Hinsicht auch den Menschen. [@Klaus1966a, 119] :::
On the other hand, the references on the following slides will be listed on the bibliography slide:
::: slide
:::: {lang=fr}
Aujourd’hui l’abstraction n’est plus celle de la carte, du double, du miroir ou du concept. La simulation n’est plus celle d’un territoire, d’un être référentiel, d'une substance. Elle est la génération par les modèles d'un réel sans origine ni réalité : hyperréel.
-- @Baudrillard1981 [10] :::: :::
The list of references is left-aligned and uses an em-dash as bullet to make sure it works even for fancy themes. The bullet can be customized using the bibliography-bullet
metadata option.
The autoscale
option is set for the bibliography slide, but if there are too many references, it will probably become unreadable. The bibliography is currently limited to a single slide.
For notes, the bibliography section lists all references that appear either in the notes or in the embedded slides.
::: slide
@Klaus1961 coins the term [Geräteentfremdung]{lang=de}. :::
The title for the bibliography can be controlled using the reference-section-title
metadata option, as usual.
Deckset does not support attributes, so the filter strips them off. This can be used to control the size of images for embedded slides (which are automatically scaled by Deckset).
::: slide
{width=30%}{width=30%}
{width=30%}
:::
When generating LaTeX output, embedded slides are wrapped in an embed-slide
environment, which is by default defined as a new tcolorbox environment using \newtcolorbox
. It can be customized by redefining this environment using \renewtcolorbox
.
Slide headers are wrapped in a \slideheader
macro with two arguments, the header level and the content. This allows the user to customize the appearance by redefining the macro in header-Includes
. For example:
header-includes: |
```{=latex}
\renewcommand{\slideheader}[2]{%
\textsc{%
\ifcase#1\relax
\or\Large%
\or\large%
\or\bfseries%
\fi%
#2}
}
```
A slide with the class presentation
will not appear in the notes:
::: {.slide .presentation}
Presentation only
:::
The classes presentation
and lecturenotes
can also be added to individual images (e.g., decorative backgrounds) and code blocks to prevent their inclusion in the lecture notes or the slides, respectively:
::: slide
![](graphics/image1.jpg){.presentation}
:::: {lang=de}
> Die Philosophen haben die Welt nur verschieden interpretirt; es kommt aber darauf an,
> sie zu verändern.
-- Karl Marx
::::
:::
:::: {lang=de}
Die Philosophen haben die Welt nur verschieden interpretirt; es kommt aber darauf an, sie zu verändern.
-- Karl Marx :::: :::
If the metadata option showslides
is false, all slides will be excluded from the notes.
-
image1.jpg
: Photo by Gabriel Garcia Marengo on Unsplash. -
image2.jpg
: Photo by Mark de Jong on Unsplash -
image3.jpg
: Photo by Nolan Krattinger on Unsplash -
video1.mp4
: Davidmoerike, CC BY-SA 3.0, via Wikimedia Commons