TildePublishingUnlimited/ebook-storybook/compile

10 lines
706 B
Bash
Executable File

#!/bin/bash
#This assumes you have some latex framework such as miktex or mactex or somesuch that uses xelatex as well as pandoc to convert markdown to latex
find . -iname *.md -exec ./md2tex.sh {} \;
latexmk -c
latexmk -pdf -e '$pdflatex=q/xelatex %O %S/' ebook.tex
#latexmk -pdf -e '$pdflatex=q/xelatex %O %S/' -outdir=outputs ebook.tex
# the -outdir option sets $outdir as well as $auxdir to be the outputs directory, except in miktex...so this will put auxiliary files in the output directory.
# the contents of the outputs directory can be safely deleted, as they will be generated each time this script is run.
#latexmk -pdf -e '$pdflatex=q/xelatex %O %S/' -outdir=outputs -auxdir=auxfiles ebook.tex