recipe-book/render.sh
2024-08-26 11:16:41 -05:00

22 lines
892 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
# these are so that later it can be edited through the web on gitea and automagically recompile without having to run anything on the webserver manually.
#git fetch --all
#git reset --hard origin/master
pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname=Recipes main.tex
echo
echo -_-_-_-_-_-_-_-_- Final run -_-_-_-_-_-_-_-_-
echo
pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname=Recipes main.tex
echo
echo -_-_-_-_-_-_-_-_- Booklet -_-_-_-_-_-_-_-_-
echo
# https://github.com/jenom/pdfbook2
pdfbook2 --no-crop --top-margin=5 --bottom-margin=5 --outer-margin=0 --inner-margin=0 --short-edge --paper=letterpaper Recipes.pdf
rm *.aux *.out *.log *.toc
mv -v Recipes.pdf /home/david/fileshare/LaTeX/Recipes
mv -v Recipes-book.pdf /home/david/fileshare/LaTeX/Recipes/Recipes-booklet.pdf