Here’s the markdown source for a simple slide show,
% Habits % John Doe % March 22, 2005 # In the morning ## Getting up - Turn off alarm - Get out of bed ## Breakfast - Eat eggs - Drink coffee # In the evening ## Dinner - Eat spaghetti - Drink wine ------------------ ![picture of spaghetti](images/spaghetti.jpg) ## Going to sleep - Get in bed - Count sheep
To produce the slide show, simply type
pandoc -t s5 -s habits.txt -o habits.html
pandoc -t slidy -s habits.txt -o habits.html
pandoc -t slideous -s habits.txt -o habits.html
pandoc -t dzslides -s habits.txt -o habits.html
for DZSlides, or
pandoc -t beamer habits.txt -o habits.pdf
With all HTML slide formats, the
option can be used to produce a single file that contains all of the
data necessary to display the slide show, including linked scripts,
stylesheets, images, and videos.
By default, the slide level is the highest
header level in the hierarchy that is followed immediately by
content, and not another header, somewhere in the document. In the
example above, level 1 headers are always followed by level 2
headers, which are followed by content, so 2 is the slide level.
This default can be overridden using the
The document is carved up into slides according to the following rules:
A horizontal rule always starts a new slide.
A header at the slide level always starts a new slide.
Headers below the slide level in the hierarchy create headers within a slide.
Headers above the slide level in the hierarchy create “title slides,” which just contain the section title and help to break the slide show into sections.
A title page is constructed automatically from the document’s title block, if present. (In the case of beamer, this can be disabled by commenting out some lines in the default template.)
These rules are designed to support many different styles of slide show. If you don’t care about structuring your slides into sections and subsections, you can just use level 1 headers for all each slide. (In that case, level 1 will be the slide level.) But you can also structure the slide show into sections, as in the example above.
For Slidy, Slideous and S5, the file produced by pandoc with the
-s/--standalone option embeds a link to
the relative path
s5/default (for S5) or
slideous (for Slideous), or at the Slidy
w3.org (for Slidy). (These paths can
be changed by setting the
--variable, above.) For
in the file by default.
By default, these writers produces lists that display “all
at once.” If you want your lists to display incrementally
(one item at a time), use the
-i option. If you
want a particular list to depart from the default (that is, to
display incrementally without the
-i option and
all at once with the
-i option), put it in a
> - Eat spaghetti > - Drink wine
In this way incremental and nonincremental lists can be mixed in a single document.
You can change the style of HTML slides by putting customized CSS
$DATADIR/s5/default (for S5),
$DATADIR/slidy (for Slidy), or
$DATADIR/slideous (for Slideous), where
$DATADIR is the user data directory (see
--data-dir, above). The originals may be found
in pandoc’s system data directory (generally
will look there for any files it does not find in the user data
For dzslides, the CSS is included in the HTML file itself, and may be modified there.
To style beamer slides, you can specify a beamer
“theme” or “colortheme” using the
pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf