applied_numerics_uulm/make_latex.sh

25 lines
476 B
Bash
Executable File

#!/bin/bash
if [ ! -f "$1" ]; then
echo "File $1 not found!"
echo "Usage: make_latex.sh <markdown-file>"
exit
fi
echo "Generating LaTeX file..."
echo "\documentclass[a4paper, 11pt]{article}
\usepackage[hybrid]{markdown}
\begin{document}
\markdownInput{$1}
\end{document}" > file.tex
echo "Installing packages..."
tlmgr install markdown
echo "Building PDF..."
pdflatex -synctex=1 -interaction=nonstopmode --shell-escape file.tex
echo "Done."
okular file.pdf