Skip to content

Instantly share code, notes, and snippets.

@neelsmith
Last active August 27, 2017 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neelsmith/68ba803fe2ac8f20dcf3f42ef24a3052 to your computer and use it in GitHub Desktop.
Save neelsmith/68ba803fe2ac8f20dcf3f42ef24a3052 to your computer and use it in GitHub Desktop.
Create pdf slide shows with pandoc and beamer
#!/bin/sh
#
# beam.sh: make a pdf slide show using pandoc and beamer.
#
# usage: beam.sh SLIDES THEME
#
# REQUIREMENTS
#
# xelatex
#
# USAGE
#
# usage: rjs SLIDES THEME
#
# SLIDES is the base name of a markdown source file assumed
# to end in .md.
# THEME is the name of a beamer theme. See the default list at
# https://hartwork.org/beamer-theme-matrix/
#
# The resulting html file is named SLIDES-THEME.html so you can
# easily experiment with multiple stylings of the same md source.
export PANDOC=`which pandoc`
if [ $# -eq 2 ]
then
$PANDOC -t beamer $1.md -V theme:$2 -o $1-$2.pdf --latex-engine=xelatex
else
echo "Usage: beam.sh SLIDES THEME"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment