class: center, middle # Document for Testing Some Basic and Some Challenging Constructs in DocOnce Slides ### **Hans Petter Langtangen** at Simula Research Laboratory and University of Oslo ### Jan 10, 2022 Made with DocOnce --- # 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 .center[
] --- ## 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
Here goes the title...
Section heading
``` --- # Second section .center[
] --- ## 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): ```shell 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) ```python 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 $$ *None* Just some block with text and a conclusion that something is important. This one pops up after the rest of the slide. 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.