Created
April 24, 2015 12:09
-
-
Save Sciss/9fd5ac76d9b60c7d1bd3 to your computer and use it in GitHub Desktop.
Make a clean build via pdflatex, including biblatex and nomenclature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo ":::: CLEAN BUILD OF $1 ::::" | |
cd "$(dirname "$0")" # go into directory of script | |
rm -f ${1}.toc | |
rm -f ${1}.run.xml | |
rm -f ${1}.out | |
rm -f ${1}.nlo | |
rm -f ${1}.log | |
rm -f ${1}.bcf | |
rm -f ${1}.aux | |
rm -f ${1}.nls | |
rm -f ${1}.ilg | |
rm -f ${1}.idx | |
rm -f ${1}.blg | |
rm -f ${1}.bbl | |
pdflatex ${1}.tex > /dev/null | |
if [ -e "${1}.bcf" ] | |
then | |
biber -q $1 | |
fi | |
if [ -e "${1}.nlo" ] | |
then | |
makeindex -q ${1}.nlo -s nomencl.ist -o ${1}.nls | |
fi | |
pdflatex ${1}.tex > /dev/null | |
pdflatex ${1}.tex > /dev/null | |
# cf. https://tex.stackexchange.com/questions/27878 | |
pdflatex -shell-escape -interaction=nonstopmode -file-line-error "${1}.tex" | grep -i ".*:[0-9]*:.*\|warning" | |
# xdg-open ${1}.pdf |
Oh gosh, this must be some old script; I think I used it for my PhD thesis, since it also builds bibliography, index, and nomenclature. Or do you mean, how to run it? It should work on Linux or Mac from the terminal. Like ./mkpdf.sh my-document
when my-document.tex
is the main latex document. Assuming a normal tex distribution (TexLive) is installed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where do you run this code?