DocOnce can generate two types of slides: HTML5+CSS3 type of slides to be presented through a web browser, and classical LaTeX Beamer slides. A comprehensive demo shows the range of possibile layouts.
The following specific types of output is supported:
Basically, DocOnce slides are ordinary DocOnce text with !split
inserted before each slide. Nevertheless, contents of slide differ
considerably from ordinary running text. Some guidelines on
the elements within each slide are necessary to produce effective
slide sets:
=) for dividing a presentation into parts.
There can be text of figure(s) after the heading to illustrate
the part.=).!split and a new heading is enough to make a new
slide).pop environment to pop up list items or blocks
one by one.slidecell environment (see below) to create
a grid of slide cells (makes it easy to move figures and
bullet lists or text around).width parameter for HTML,
frac parameter for LaTeX Beamer) so they become effective
on the slide.Here is a typical title page:
TITLE: On Something Interesting
AUTHOR: O. Nordmann at Seg. Fault Ltd. & D. Bug Inc.
AUTHOR: John Doe Email: john.doe@mail.com at Progress Ltd.
AUTHOR: Chan Siu Ming at Progress Ltd & Moon University
DATE: today
FIGURE: [fig/logo, width=300 frac=0.3]
Parts of the presentation are divided by section headings. Here
we also add some keywords in a bullet list on the left and a
figure on the right. The !bslidecell XY f command starts the
definition of a cell in a grid of cells in the slide. The XY
part defines the coordinates of the cell, 00 is upper left,
01 is upper right. The f parameter specifies the fraction
of the width occupied by this column of cells (can be left out,
which results in columns of equal widths).
!split
======= Problem setting and methods =======
# Short title: Problem
!bslidecell 00 0.4
* Scope
* Focus
* Approach
!eslidecell
!bslidecell 01 0.6
FIGURE: [fig/method, width=600 frac=0.7]
!eslidecell
The # Short title: ... line can be used to define a short
title for slide formats with navigation (where long titles are
inappropriate), e.g., Beamer PDF slides.
Bullet lists are typeset as usual in DocOnce:
!split
===== Methods =====
* Slow:
* Pick-and-choose
* Foxtrot
* Fast:
* Quickstep
* MMST
* PQR
Some prefer the bullet list or other contents of the slide to
appear in a frame or Beamer block (potentially with shadows in
some Beamer styles). This design is enabled by putting the
contents inside the block environment:
!split
===== Methods =====
!bblock Methods are slow or fast:
* Slow:
* Pick-and-choose
* Foxtrot
* Fast:
* Quickstep
* MMST
* PQR
!eblock
The block title is optional.
One can easily pop up one item at a time using !bpop and !epop:
!split
===== Methods =====
!bblock Methods are slow or fast:
!bpop
* Slow:
* Pick-and-choose
* Foxtrot
* Fast:
* Quickstep
* MMST
* PQR
!epop
!eblock
Standard DocOnce elements and formatting work in slides too:
!split
===== Key formulas =====
!bt
\[ a = b \]
!et
FIGURE: [fig/a_eq_b, width=500 frac=0.4]
MOVIE: [mov/animate_a_eq_b]
Here is another example on math and code:
!split
===== Example =====
!bblock Problem:
Solve $ax+b=0$.
!eblock
!bblock Solution:
$x=-b/a$
!eblock
!bblock Implementation:
!bc pypro
import sys
a = float(sys.argv[1])
b = float(sys.argv[2])
x = -b/a
print x
!ec
!eblock
Not yet written...
Just a very preliminary sketch of commands:
Terminal> doconce format html myslides \
--pygments_html_style=native --keep_pygments_html_bg
Terminal> doconce slides_html myslides reveal \
--html_slide_theme=darkgray
doconce subst) might be needed.
Four themes come with DocOnce: X_Y, where X is blue or red
(the main color of the slides) and Y is plain
for simple layout and
shadow
for shadowed boxes and more visual structure in the slides.
The !bpop and !epop directives have the following effect in
Beamer slides:
!bpop comes right before the beginning of a list, each list
item is popped up, one at a time.!bpop
pops up all at once.The cycle is
doconce format pdflatex mydoc for producing mydoc.p.texdoconce ptex2tex or ptex2tex for translating mydoc.p.tex to mydoc.texdoconce slides_beamer mydoc.tex to produce a Beamer version mydoc.texmydoc.tex