feat: added make_latex script
This commit is contained in:
parent
490038be32
commit
53d11c7bc3
25
make_latex.sh
Executable file
25
make_latex.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user