Markdown to lecture slides
slides
The slides
directory contains slides for my course "General Biology".
Modified from agoldst's repo.
Check example.md
for basic syntax. Then generate
PDF slides with
make example.slides.pdf
To generate PDF handouts, with
make example.notes.pdf
To force updating and make slide and note PDFs at once.
make example -B
make clean
to delete all intermediate files.
tikz
Graphics by tikz.
arara ch-21
materials
Video materials.
See list.md
for details.
articles
Markdown + Latex
Others
resize.sh
changes sizes and resolutions of pictures.
Tools needed
- TeXLive
- Fonts
- Fira:
brew cask install font-fira-sans font-fira-mono
- Hiragino Sans GB (冬青黑体简体中文)
- Source Han Serif SC (思源宋体)
- Fira:
Pandoc templates
slides/beamer.template.tex
is a customized pandoc template for
beamer.
Variables and control statements in pandoc templates
-
$---$
: variables. Can be provided with YAML document orpandoc -V key=value
.--- title: "21 基因的分子生物学" author: "王强" institute: "南京大学生命科学学院" date: \today{} ...
pandoc $< \ -t beamer \ --template beamer.template.tex \ --latex-engine xelatex \ --slide-level 2 \ -V fontsize=12pt \ -V bibliography=course.bib \ --toc \ -o $(basename $@).tex
-
$if(---)$ --- $else$ --- $endif$
: conditional branch statements.Inline.
$if(fontsize)$$fontsize$,$endif$
Standalone.
$if(listings)$ \usepackage{listings} $endif$
-
$for(---)$ --- $endfor$
: loop statements.$for(bibliography)$ \addbibresource{$bibliography$} $endfor$
-
$body$
contains all the contents ofinput.md
file after processed by Pandoc converter.