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

Apr 15, 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.

/