Document for Testing Some Basic and Some Challenging Constructs in DocOnce Slides

Hans Petter Langtangen [1, 2]

[1] Simula Research Laboratory
[2] University of Oslo

Mar 1, 2021


This is the first section

Figure and bullet list

Title with comma, and brackets: \( [a,b] \)

  • Here is a wave signal \( f(x-ct) \)
  • It moves with velocity \( c \)
  • But here it is just a figure





Slide with pop-ups in red and notes

(hpl 1: Comments are typeset as usual in DocOnce.)

Here we have a paragraph to pop up in red.
And a line more

One can also have ordinary notes. Over multiple lines.

A LaTeX document

\documentclass[11pt]{article}
\usepackage{fancyvrb}
\begin{document}

\title{Here goes the title...}
\author{John Doe \and
Jane Doe\footnote{\texttt{jane.doe@cyber.net}.}}
\date{\today}
\maketitle

Notice

LaTeX has a lot of backslashes.

\section{Heading}
bla-bla
\end{document}

An HTML document

<html><head></head><body bgcolor="red">
<title>Here goes the title...<title>
<h1>Section heading</h1>
</body>
</html>

Second section





Some math and computer code

A simple, mathematical formula where \( t\in [0,\pi] \):

 
$$ f(x,y,t) = e^{-xt}\sin\pi y $$

 

Bash demanded more of DocOnce than Python, so let's do Bash:

First, inline $? != 0, then comments with dollar variables (and minted style):

var=10
# $1, $2, ... are command-line args
if [ $? -eq 0 ]; then   # $? reflects success or not
  echo "Great!"
fi

Pop ups inside code blocks (for Beamer slides only)

def f(x):
    return 42 + x

def g(x):
    return f(42)

print(g(13))

Various admon blocks

Can use admons to simulate blocks:

Key PDE (with large title and math font):

 
$$ \frac{\partial u}{\partial t} = \nabla^2 u $$

 

Just some block with text and a conclusion that something is important. This one pops up after the rest of the slide.

Warning

Can use, e.g., a warning admon to have my own notes, preferably inside preprocess/mako if statements to turn notes on and off. This one is typeset in a small font and with the default title (Warning) since no title is specified.

deck.js: boilerplate.html CHANGELOG.md core extensions introduction jquery.min.js Makefile MIT-license.txt modernizr.custom.js README.md test themes deck.js/core: deck.core.css deck.core.js deck.core.scss print.css print.scss deck.js/extensions: codemirror deck.annotate.js goto menu navigation notes pointer presenterview scale status deck.js/extensions/codemirror: codemirror.js CONTRIBUTORS.txt deck.codemirror.css deck.codemirror.js deck.codemirror.scss introduction MIT-LICENSE.txt mode README.md themes VERSION.txt deck.js/extensions/codemirror/introduction: index.html introduction.css introduction.js introduction.scss modernizr.custom.js deck.js/extensions/codemirror/mode: clike clojure coffeescript css diff haskell htmlmixed javascript lua php plsql python r rst ruby scheme smalltalk sparql stex velocity xml xmlpure yaml deck.js/extensions/codemirror/mode/clike: clike.js index.html deck.js/extensions/codemirror/mode/clojure: clojure.js index.html deck.js/extensions/codemirror/mode/coffeescript: coffeescript.js index.html LICENSE deck.js/extensions/codemirror/mode/css: css.js index.html deck.js/extensions/codemirror/mode/diff: diff.css diff.js index.html deck.js/extensions/codemirror/mode/haskell: haskell.js index.html deck.js/extensions/codemirror/mode/htmlmixed: htmlmixed.js index.html deck.js/extensions/codemirror/mode/javascript: index.html javascript.js deck.js/extensions/codemirror/mode/lua: index.html lua.js deck.js/extensions/codemirror/mode/php: index.html php.js deck.js/extensions/codemirror/mode/plsql: index.html plsql.js deck.js/extensions/codemirror/mode/python: index.html LICENSE.txt python.js deck.js/extensions/codemirror/mode/r: index.html LICENSE r.js deck.js/extensions/codemirror/mode/rst: index.html rst.css rst.js deck.js/extensions/codemirror/mode/ruby: index.html LICENSE ruby.js deck.js/extensions/codemirror/mode/scheme: index.html scheme.js deck.js/extensions/codemirror/mode/smalltalk: index.html smalltalk.js deck.js/extensions/codemirror/mode/sparql: index.html sparql.js deck.js/extensions/codemirror/mode/stex: index.html stex.js deck.js/extensions/codemirror/mode/velocity: index.html velocity.js deck.js/extensions/codemirror/mode/xml: index.html xml.js deck.js/extensions/codemirror/mode/xmlpure: index.html xmlpure.js deck.js/extensions/codemirror/mode/yaml: index.html yaml.js deck.js/extensions/codemirror/themes: cobalt.css default.css elegant.css lesser-dark.css neat.css night.css deck.js/extensions/deck.annotate.js: bower.json deck.annotate.css deck.annotate.js example.png README.md deck.js/extensions/goto: deck.goto.css deck.goto.html deck.goto.js deck.goto.scss deck.js/extensions/menu: deck.menu.css deck.menu.js deck.menu.scss deck.js/extensions/navigation: deck.navigation.css deck.navigation.html deck.navigation.js deck.navigation.scss deck.js/extensions/notes: deck.notes.css deck.notes.js README.md deck.js/extensions/pointer: deck.pointer.css deck.pointer.js deck.js/extensions/presenterview: deck.presenterview.css deck.presenterview.html deck.presenterview.js iframe.html presenterwindow.js README.md TODO deck.js/extensions/scale: deck.scale.css deck.scale.js deck.scale.scss deck.js/extensions/status: deck.status.css deck.status.html deck.status.js deck.status.scss deck.js/introduction: index.html deck.js/test: fixtures index.html lib settings.js spec.core.js spec.goto.js spec.menu.js spec.navigation.js spec.scale.js spec.status.js deck.js/test/fixtures: empty.html nesteds.html standard.html deck.js/test/lib: jasmine.css jasmine-html.js jasmine-jquery.js jasmine.js deck.js/themes: images style transition deck.js/themes/images: cbc_footer.png cbc_symbol.png simula_footer.png simula_logo.png simula_symbol.png uio_footer.png uio_symbol.png deck.js/themes/style: beamer.css beamer.scss cbc.css mnml.css neon.css neon.scss _reset.scss sandstone.aurora.css sandstone.css sandstone.dark.css sandstone.default.css sandstone.firefox.css sandstone.light.css sandstone.mdn.css sandstone.nightly.css sandstone.scss swiss.css swiss.scss web-2.0.css web-2.0.scss deck.js/themes/transition: fade.css fade.scss horizontal-slide.css horizontal-slide.scss vertical-slide.css vertical-slide.scss