$$ \newcommand{\beqa}{\begin{eqnarray}} \newcommand{\eeqa}{\end{eqnarray}} \newcommand{\ep}{\thinspace . } \newcommand{\uvec}{\vec u} \newcommand{\Q}{\pmb{Q}} $$

 

 

 

Overview

Slide Types

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:

Syntax

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:

Slide Elements

Title page

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 Page

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.

Standard bullet list page

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

Equations, movies, figures

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

HTML5 Slides

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

Potential Problems

LaTeX Beamer Slides

Themes

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.

Pop of list items and blocks

The !bpop and !epop directives have the following effect in Beamer slides:

Compilation

The cycle is