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

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.

reveal.js: bower.json CONTRIBUTING.md css Gruntfile.js index.html js lib LICENSE package.json plugin README.md test reveal.js/css: images print reveal.css reveal.scss theme reveal.js/css/images: cbc_footer.png cbc_symbol.png simula_footer.png simula_logo.png simula_symbol.png uio_footer.png uio_symbol.png reveal.js/css/print: paper.css pdf.css reveal.js/css/theme: beige.css beigesmall.css black.css blood.css cbc.css darkgray.css default.css league.css moon.css night.css README.md serif.css simple.css simula.css sky.css solarized.css source template white.css reveal.js/css/theme/source: beige.scss beigesmall.scss black.scss blood.scss cbc.scss darkgray.scss default.scss league.scss moon.scss night.scss serif.scss simple.scss simula.scss sky.scss solarized.scss white.scss reveal.js/css/theme/template: mixins.scss settings.scss theme.scss reveal.js/js: reveal.js reveal.js/lib: css font js reveal.js/lib/css: zenburn.css reveal.js/lib/font: league-gothic source-sans-pro reveal.js/lib/font/league-gothic: league-gothic.css league-gothic.eot league-gothic.ttf league-gothic.woff LICENSE reveal.js/lib/font/source-sans-pro: LICENSE source-sans-pro.css source-sans-pro-italic.eot source-sans-pro-italic.ttf source-sans-pro-italic.woff source-sans-pro-regular.eot source-sans-pro-regular.ttf source-sans-pro-regular.woff source-sans-pro-semibold.eot source-sans-pro-semibolditalic.eot source-sans-pro-semibolditalic.ttf source-sans-pro-semibolditalic.woff source-sans-pro-semibold.ttf source-sans-pro-semibold.woff reveal.js/lib/js: classList.js head.min.js html5shiv.js reveal.js/plugin: highlight leap markdown math multiplex notes notes-server print-pdf remotes search zoom-js reveal.js/plugin/highlight: highlight.js reveal.js/plugin/leap: leap.js reveal.js/plugin/markdown: example.html example.md markdown.js marked.js reveal.js/plugin/math: math.js reveal.js/plugin/multiplex: client.js index.js master.js reveal.js/plugin/notes: notes.html notes.js reveal.js/plugin/notes-server: client.js index.js notes.html reveal.js/plugin/print-pdf: print-pdf.js reveal.js/plugin/remotes: remotes.js reveal.js/plugin/search: search.js reveal.js/plugin/zoom-js: zoom.js reveal.js/test: examples qunit-1.12.0.css qunit-1.12.0.js test.html test.js test-markdown-element-attributes.html test-markdown-element-attributes.js test-markdown.html test-markdown.js test-markdown-slide-attributes.html test-markdown-slide-attributes.js test-pdf.html test-pdf.js reveal.js/test/examples: assets barebones.html embedded-media.html math.html slide-backgrounds.html slide-transitions.html reveal.js/test/examples/assets: image1.png image2.png