feat: added make_latex script

This commit is contained in:
Yandrik 2022-04-28 20:00:36 +02:00
parent 490038be32
commit 53d11c7bc3

25
make_latex.sh Executable file
View File

@ -0,0 +1,25 @@
#!/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