### LaTeX makefile updated

###### Fri 29 March 2019

My default LaTeX makefile evolved. Here is an update:

The makefile looks like:

```
LATEX=pdflatex
BIBTEX=bibtex
BIB=
RERUN='(There is undefined reference|Rerun to get (cross-references|the bars) right)'
%.pdf:%.tex
${LATEX} $<
@if [ -e $*.bbl ]; then ${BIBTEX} $* && ${LATEX} $< && ${LATEX} $< ; fi
@if egrep -q $(RERUN) $*.log ; then ${LATEX} $< ; fi
%.aux %.log: %.tex
${LATEX} $<
while grep -e 'Rerun to get' -e 'run LaTeX again' *.log ; do ${LATEX} $< ; done
%.idx %.toc: %.tex
${LATEX} $<
%.bbl %.blg: %.aux $(BIB)
bibtex $< && ${LATEX} $*.tex
%.ind: %.idx
makeindex $< && ${LATEX} $*.tex
indent: *tex
for i in *.tex; do latexindent -w -y="defaultIndent:' '" $$i ; done
clean:
rm -fv *.log *.aux *.dvi *.toc *.lot *.lof *.snm *.nav *.out *.tns *.bak?
```

The main evolutions is the indent target to autoindent *.tex file.

Category: tools Tagged: GNU LaTeX Makefile Writing how to tools