diff --git a/make_latex.sh b/make_latex.sh new file mode 100755 index 0000000..4276c8a --- /dev/null +++ b/make_latex.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +if [ ! -f "$1" ]; then + echo "File $1 not found!" + echo "Usage: make_latex.sh " + 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 \ No newline at end of file