template structure

This commit is contained in:
jsz4n
2024-04-21 18:55:28 +02:00
parent a329decc86
commit c67dc87e02
10 changed files with 1002 additions and 0 deletions

326
html/slides.html Normal file
View File

@@ -0,0 +1,326 @@
<!DOCTYPE html>
<html lang="fr-FR">
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="author" content="Jeremie SUZAN">
<title>Another simple slideshow</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="https://unpkg.com/reveal.js@5.0.0/dist/reset.css">
<link rel="stylesheet" href="https://unpkg.com/reveal.js@5.0.0/dist/reveal.css">
<style>
.reveal .sourceCode { /* see #7635 */
overflow: visible;
}
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ background-color: #f8f8f8; }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ef2929; } /* Alert */
code span.an { color: #8f5902; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #204a87; } /* Attribute */
code span.bn { color: #0000cf; } /* BaseN */
code span.cf { color: #204a87; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4e9a06; } /* Char */
code span.cn { color: #8f5902; } /* Constant */
code span.co { color: #8f5902; font-style: italic; } /* Comment */
code span.cv { color: #8f5902; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #8f5902; font-weight: bold; font-style: italic; } /* Documentation */
code span.dt { color: #204a87; } /* DataType */
code span.dv { color: #0000cf; } /* DecVal */
code span.er { color: #a40000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #0000cf; } /* Float */
code span.fu { color: #204a87; font-weight: bold; } /* Function */
code span.im { } /* Import */
code span.in { color: #8f5902; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #204a87; font-weight: bold; } /* Keyword */
code span.op { color: #ce5c00; font-weight: bold; } /* Operator */
code span.ot { color: #8f5902; } /* Other */
code span.pp { color: #8f5902; font-style: italic; } /* Preprocessor */
code span.sc { color: #ce5c00; font-weight: bold; } /* SpecialChar */
code span.ss { color: #4e9a06; } /* SpecialString */
code span.st { color: #4e9a06; } /* String */
code span.va { color: #000000; } /* Variable */
code span.vs { color: #4e9a06; } /* VerbatimString */
code span.wa { color: #8f5902; font-weight: bold; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="https://unpkg.com/reveal.js@5.0.0/dist/theme/sky.css" id="theme">
</head>
<body>
<div class="reveal">
<div class="slides">
<section id="title-slide">
<h1 class="title">Another simple slideshow</h1>
<p class="author">Jeremie SUZAN</p>
</section>
<section id="outline" class="title-slide slide level1">
<h1>Outline</h1>
<ol type="1">
<li>Some examples</li>
<li>Some code</li>
</ol>
</section>
<section id="some-example" class="title-slide slide level1">
<h1>Some example</h1>
<ul>
<li>I have made</li>
<li>this simple</li>
<li>bullet point list</li>
</ul>
</section>
<section id="some-code" class="title-slide slide level1">
<h1>Some code</h1>
<div class="sourceCode" id="cb1"><pre
class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> this</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> i <span class="kw">in</span> <span class="bu">range</span>(<span class="dv">10</span>):</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;Hello world&quot;</span>)</span></code></pre></div>
</section>
</div>
</div>
<script src="https://unpkg.com/reveal.js@5.0.0/dist/reveal.js"></script>
<!-- reveal.js plugins -->
<script src="https://unpkg.com/reveal.js@5.0.0/plugin/notes/notes.js"></script>
<script src="https://unpkg.com/reveal.js@5.0.0/plugin/search/search.js"></script>
<script src="https://unpkg.com/reveal.js@5.0.0/plugin/zoom/zoom.js"></script>
<script src="https://unpkg.com/reveal.js@5.0.0/plugin/math/math.js"></script>
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
// Display controls in the bottom right corner
controls: true,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: true,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'bottom-right',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: false,
// 'all', 'print', or 'speaker'
showSlideNumber: 'all',
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: true,
// Start with 1 for the hash rather than 0
hashOneBasedIndex: false,
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: true,
// Push each slide change to the browser history
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: false,
// Vertical centering of slides
center: true,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// see https://revealjs.com/vertical-slides/#navigation-mode
navigationMode: 'default',
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: true,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if it should be possible to pause the presentation (blackout)
pause: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autoplaying embedded media (null/true/false)
autoPlayMedia: null,
// Global override for preloading lazy-loaded iframes (null/true/false)
preloadIframes: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: null,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: null,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// The display mode that will be used to show slides
display: 'block',
// Hide cursor if inactive
hideInactiveCursor: true,
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,
// Opens links in an iframe preview overlay
previewLinks: false,
// Transition style (none/fade/slide/convex/concave/zoom)
transition: 'slide',
// Transition speed (default/fast/slow)
transitionSpeed: 'default',
// Transition style for full page slide backgrounds
// (none/fade/slide/convex/concave/zoom)
backgroundTransition: 'fade',
// Number of slides away from the current that are visible
viewDistance: 3,
// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: 2,
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 1824,
height: 1026,
// Factor of the display size that should remain empty around the content
margin: 2.0e-2,
maxScale: 0.85,
math: {
mathjax: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js',
config: 'TeX-AMS_HTML-full',
tex2jax: {
inlineMath: [['\\(','\\)']],
displayMath: [['\\[','\\]']],
balanceBraces: true,
processEscapes: false,
processRefs: true,
processEnvironments: true,
preview: 'TeX',
skipTags: ['script','noscript','style','textarea','pre','code'],
ignoreClass: 'tex2jax_ignore',
processClass: 'tex2jax_process'
},
},
// reveal.js plugins
plugins: [
RevealMath,
RevealNotes,
RevealSearch,
RevealZoom
]
});
</script>
</body>
</html>

8
scripts/slides_to_html.sh Executable file
View File

@@ -0,0 +1,8 @@
#! /usr/bin/env bash
HIGHLIGHT_STYLE=tango
SLIDE_LEVEL=2
my_header=$(<./templates/html_header.md)
headEscapedForSed=${my_header//$'\n'/\\$'\n'}
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" slides.md | pandoc -s --mathjax -t revealjs -o html/slides.html --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -V revealjs-url=https://unpkg.com/reveal.js@5.0.0 --template=./templates/template.revealjs

8
scripts/slides_to_pdf.sh Executable file
View File

@@ -0,0 +1,8 @@
#! /usr/bin/env bash
HIGHLIGHT_STYLE=tango
SLIDE_LEVEL=2
my_header=$(<./templates/pdf_header.md)
headEscapedForSed=${my_header//$'\n'/\\$'\n'}
sed -e "s|SLIDEHEAD|$headEscapedForSed|g" slides.md | pandoc -t beamer -o slides.pdf --slide-level=$SLIDE_LEVEL --highlight-style=$HIGHLIGHT_STYLE -H ./templates/code-style.tex

35
slides.md Normal file
View File

@@ -0,0 +1,35 @@
---
title: "Another simple slideshow"
author: Jeremie SUZAN
date: ""
lang: fr-FR
toc: false
toc-depth: 2
toc-title: Outline
fontsize: 10pt
weight: 10
linestretch: 1.0
section-titles: true
SLIDEHEAD
---
# Outline
1. Some examples
2. Some code
# Some example
- I have made
- this simple
- bullet point list
# Some code
```python
import this
for i in range(10):
print("Hello world")
```

2
templates/code-style.tex Normal file
View File

@@ -0,0 +1,2 @@
%\renewenvironment{Shaded} {\begin{snugshade}\footnotesize} {\end{snugshade}}
\renewenvironment{Shaded} {\begin{snugshade}\scriptsize} {\end{snugshade}}

6
templates/html_header.md Normal file
View File

@@ -0,0 +1,6 @@
theme: sky
width: 1824
height: 1026
maxScale: 0.85
margin: 0.02
progress: true

5
templates/pdf_header.md Normal file
View File

@@ -0,0 +1,5 @@
theme: Hannover
colortheme: rose
linkstyle: underlined
listings: true
fonttheme: professionalfonts

268
templates/template.beamer Normal file
View File

@@ -0,0 +1,268 @@
\documentclass[$if(aspectratio)$aspectratio=$aspectratio$,$endif$$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamertemplate{section in toc}[sections numbered]
\setbeamercolor{caption name}{fg=normal text.fg}
\setbeamercolor{section in toc}{fg=white}
\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
\newcommand{\colA}[1]{\begin{columns}[t]\begin{column}{#1}}
\newcommand{\colB}[1]{\end{column}\begin{column}{#1}}
\newcommand{\colEnd}{\end{column}\end{columns}}
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$
\usepackage{lmodern}
$endif$
\usepackage{tikz}
\usepackage{pgfplots}
\newcommand\commit[2]{\node[commit] (#1) {}; \node[clabel] at (#1) {\texttt{#1}: #2};}
\newcommand\ghost[1]{\coordinate (#1);}
\newcommand\connect[2]{\path (#1) to[out=90,in=-90] (#2);}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\setbeamertemplate{footline}{\hspace{125mm}\insertframenumber\vspace{1mm}\hspace{10mm}}
%\setbeamertemplate{frame footer}{\tiny{$for(author)$$author$$sep$ \and $endfor$}}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc}
$if(euro)$
\usepackage{eurosym}
$endif$
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
$if(euro)$
\newcommand{\euro}{€}
$endif$
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$
$if(sansfont)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
$endif$
$if(monofont)$
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
$endif$
$if(mathfont)$
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
$endif$
$if(CJKmainfont)$
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
$endif$
\fi
$if(theme)$
\usetheme{$theme$}
$endif$
\setbeamertemplate{enumerate items}[default]
$if(colortheme)$
\usecolortheme{$colortheme$}
$endif$
$if(fonttheme)$
\usefonttheme{$fonttheme$}
$endif$
$if(mainfont)$
\usefonttheme{serif} % use mainfont rather than sansfont for slide text
$endif$
$if(innertheme)$
\useinnertheme{$innertheme$}
$endif$
$if(outertheme)$
\useoutertheme{$outertheme$}
$endif$
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
$if(lang)$
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\else
\usepackage{polyglossia}
\setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
$for(polyglossia-otherlangs)$
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
$endfor$
\fi
$endif$
\newif\ifbibliography
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$
$if(biblatex)$
\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
$endif$
$if(listings)$
\usepackage{listings}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(tables)$
\usepackage{longtable,booktabs}
\usepackage{caption}
% These lines are needed to make table captions work with longtable:
\makeatletter
\def\fnum@table{\tablename~\thetable}
\makeatother
$endif$
$if(graphics)$
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
$endif$
% Prevent slide breaks in the middle of a paragraph:
\widowpenalties 1 10000
\raggedbottom
$if(section-titles)$
\AtBeginPart{
\let\insertpartnumber\relax
\let\partname\relax
\frame{\partpage}
}
\AtBeginSection{
\ifbibliography
\else
\let\insertsectionnumber\relax
\let\sectionname\relax
\frame{\sectionpage}
\fi
}
\AtBeginSubsection{
\let\insertsubsectionnumber\relax
\let\subsectionname\relax
\frame{\subsectionpage}
}
$endif$
$if(links-as-notes)$
% Make links footnotes instead of hotlinks:
\renewcommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
$if(strikeout)$
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
$if(numbersections)$
\setcounter{secnumdepth}{5}
$else$
\setcounter{secnumdepth}{0}
$endif$
$if(dir)$
\ifxetex
% load bidi as late as possible as it modifies e.g. graphicx
$if(latex-dir-rtl)$
\usepackage[RTLdocument]{bidi}
$else$
\usepackage{bidi}
$endif$
\fi
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\TeXXeTstate=1
\newcommand{\RL}[1]{\beginR #1\endR}
\newcommand{\LR}[1]{\beginL #1\endL}
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
$endif$
$for(header-includes)$
$header-includes$
$endfor$
$if(title)$
\title{$title$}
$endif$
$if(subtitle)$
\subtitle{$subtitle$}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
$endif$
$if(institute)$
\institute{$for(institute)$$institute$$sep$ \and $endfor$}
$endif$
\date{$date$}
\begin{document}
$if(title)$
\frame{\titlepage}
$endif$
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
$if(toc-title)$
\begin{frame}{$toc-title$}
$else$
\begin{frame}{Outline}
$endif$
\tableofcontents[hideallsubsections]
\end{frame}
$endif$
$body$
$if(natbib)$
$if(bibliography)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{$biblio-title$}
$else$
\renewcommand\refname{$biblio-title$}
$endif$
$endif$
\begin{frame}[allowframebreaks]{$biblio-title$}
\bibliographytrue
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
\end{frame}
$endif$
$endif$
$if(biblatex)$
\begin{frame}[allowframebreaks]{$biblio-title$}
\bibliographytrue
\printbibliography[heading=none]
\end{frame}
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}

324
templates/template.revealjs Normal file
View File

@@ -0,0 +1,324 @@
<!DOCTYPE html>
<html$if(lang)$ lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
$for(author-meta)$
<meta name="author" content="$author-meta$">
$endfor$
$if(date-meta)$
<meta name="dcterms.date" content="$date-meta$">
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="$revealjs-url$/dist/reset.css">
<link rel="stylesheet" href="$revealjs-url$/dist/reveal.css">
<style>
.reveal .sourceCode { /* see #7635 */
overflow: visible;
}
$styles.html()$
</style>
$if(theme)$
<link rel="stylesheet" href="$revealjs-url$/dist/theme/$theme$.css" id="theme">
$else$
<link rel="stylesheet" href="$revealjs-url$/dist/theme/black.css" id="theme">
$endif$
$for(css)$
<link rel="stylesheet" href="$css$"/>
$endfor$
$if(math)$
$math$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
$for(include-before)$
$include-before$
$endfor$
<div class="reveal">
<div class="slides">
$if(title)$
<section id="$idprefix$title-slide"$for(title-slide-attributes/pairs)$ $it.key$="$it.value$"$endfor$>
<h1 class="title">$title$</h1>
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$
$for(author)$
<p class="author">$author$</p>
$endfor$
$for(institute)$
<p class="institute">$institute$</p>
$endfor$
$if(date)$
<p class="date">$date$</p>
$endif$
$if(logo)$
<img src="$logo$"></img>
$endif$
</section>
$endif$
$if(toc)$
<section id="$idprefix$TOC">
<nav role="doc-toc">
$if(toc-title)$
<h2 id="$idprefix$toc-title">$toc-title$</h2>
$endif$
$table-of-contents$
</nav>
</section>
$endif$
$body$
</div>
</div>
<script src="$revealjs-url$/dist/reveal.js"></script>
<!-- reveal.js plugins -->
<script src="$revealjs-url$/plugin/notes/notes.js"></script>
<script src="$revealjs-url$/plugin/search/search.js"></script>
<script src="$revealjs-url$/plugin/zoom/zoom.js"></script>
$if(mathjax)$
<script src="$revealjs-url$/plugin/math/math.js"></script>
$endif$
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
// Display controls in the bottom right corner
controls: $controls$,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: $controlsTutorial$,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: '$controlsLayout$',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: '$controlsBackArrows$',
// Display a presentation progress bar
progress: $progress$,
// Display the page number of the current slide
slideNumber: $slideNumber$,
// 'all', 'print', or 'speaker'
showSlideNumber: '$showSlideNumber$',
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: $hash$,
// Start with 1 for the hash rather than 0
hashOneBasedIndex: $hashOneBasedIndex$,
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: $respondToHashChanges$,
// Push each slide change to the browser history
history: $history$,
// Enable keyboard shortcuts for navigation
keyboard: $keyboard$,
// Enable the slide overview mode
overview: $overview$,
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: $disableLayout$,
// Vertical centering of slides
center: $center$,
// Enables touch navigation on devices with touch input
touch: $touch$,
// Loop the presentation
loop: $loop$,
// Change the presentation direction to be RTL
rtl: $rtl$,
// see https://revealjs.com/vertical-slides/#navigation-mode
navigationMode: '$navigationMode$',
// Randomizes the order of slides each time the presentation loads
shuffle: $shuffle$,
// Turns fragments on and off globally
fragments: $fragments$,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: $fragmentInURL$,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: $embedded$,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: $help$,
// Flags if it should be possible to pause the presentation (blackout)
pause: $pause$,
// Flags if speaker notes should be visible to all viewers
showNotes: $showNotes$,
// Global override for autoplaying embedded media (null/true/false)
autoPlayMedia: $autoPlayMedia$,
// Global override for preloading lazy-loaded iframes (null/true/false)
preloadIframes: $preloadIframes$,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: $autoSlide$,
// Stop auto-sliding after user input
autoSlideStoppable: $autoSlideStoppable$,
// Use this method for navigation when auto-sliding
autoSlideMethod: $autoSlideMethod$,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: $defaultTiming$,
// Enable slide navigation via mouse wheel
mouseWheel: $mouseWheel$,
// The display mode that will be used to show slides
display: '$display$',
// Hide cursor if inactive
hideInactiveCursor: $hideInactiveCursor$,
// Time before the cursor is hidden (in ms)
hideCursorTime: $hideCursorTime$,
// Opens links in an iframe preview overlay
previewLinks: $previewLinks$,
// Transition style (none/fade/slide/convex/concave/zoom)
transition: '$transition$',
// Transition speed (default/fast/slow)
transitionSpeed: '$transitionSpeed$',
// Transition style for full page slide backgrounds
// (none/fade/slide/convex/concave/zoom)
backgroundTransition: '$backgroundTransition$',
// Number of slides away from the current that are visible
viewDistance: $viewDistance$,
// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: $mobileViewDistance$,
$if(parallaxBackgroundImage)$
// Parallax background image
parallaxBackgroundImage: '$parallaxBackgroundImage/nowrap$', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
$else$
$if(background-image)$
// Parallax background image
parallaxBackgroundImage: '$background-image/nowrap$', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
$endif$
$endif$
$if(parallaxBackgroundSize)$
// Parallax background size
parallaxBackgroundSize: '$parallaxBackgroundSize/nowrap$', // CSS syntax, e.g. "2100px 900px"
$endif$
$if(parallaxBackgroundHorizontal)$
// Amount to move parallax background (horizontal and vertical) on slide change
// Number, e.g. 100
parallaxBackgroundHorizontal: $parallaxBackgroundHorizontal/nowrap$,
$endif$
$if(parallaxBackgroundVertical)$
parallaxBackgroundVertical: $parallaxBackgroundVertical/nowrap$,
$endif$
$if(width)$
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: $width$,
$endif$
$if(height)$
height: $height$,
$endif$
$if(margin)$
// Factor of the display size that should remain empty around the content
margin: $margin$,
$endif$
$if(minScale)$
// Bounds for smallest/largest possible scale to apply to content
minScale: $minScale$,
$endif$
$if(maxScale)$
maxScale: $maxScale$,
$endif$
$if(mathjax)$
math: {
mathjax: '$mathjaxurl$',
config: 'TeX-AMS_HTML-full',
tex2jax: {
inlineMath: [['\\(','\\)']],
displayMath: [['\\[','\\]']],
balanceBraces: true,
processEscapes: false,
processRefs: true,
processEnvironments: true,
preview: 'TeX',
skipTags: ['script','noscript','style','textarea','pre','code'],
ignoreClass: 'tex2jax_ignore',
processClass: 'tex2jax_process'
},
},
$endif$
// reveal.js plugins
plugins: [
$if(mathjax)$
RevealMath,
$endif$
RevealNotes,
RevealSearch,
RevealZoom
]
});
</script>
$for(include-after)$
$include-after$
$endfor$
</body>
</html>

20
watch_compile.sh Executable file
View File

@@ -0,0 +1,20 @@
#! /usr/bin/env bash
script=./scripts/slides_to_pdf.sh
case $1 in
pdf)
script=./scripts/slides_to_pdf.sh
;;
html)
script=./scripts/slides_to_pdf.sh
;;
esac
echo using $script
$script
while [ 1 -eq 1 ]
do
inotifywait ./slides.md
$script
done