Skip to content

Instantly share code, notes, and snippets.

@nylander
Created October 30, 2025 12:41
Show Gist options
  • Save nylander/7734509296173f0bae538a13fb8134f8 to your computer and use it in GitHub Desktop.
Save nylander/7734509296173f0bae538a13fb8134f8 to your computer and use it in GitHub Desktop.
Markdown to beamer presentation in PDF using pandoc
#!/bin/bash
# Convert Markdown to PDF (beamer) using pandoc
# Last modified: mån sep 07, 2020 03:05
# Johan Nylander
for f in "$@"
do
echo -n "Converting $f ..."
g=${f%.md}.pdf
pandoc \
--pdf-engine=xelatex \
-f markdown-implicit_figures \
--highlight-style zenburn \
--to=beamer \
--output="$g" \
"$f"
if [ -e "$g" ]; then
echo " to beamer ${g}"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment