Use latexmk in Makefile.

This commit is contained in:
Florian Walch
2014-06-14 13:40:04 +02:00
parent 166f2c4470
commit 26b193324c
3 changed files with 15 additions and 8 deletions

9
.latexmkrc Normal file
View File

@@ -0,0 +1,9 @@
# From https://tex.stackexchange.com/questions/58963/latexmk-with-makeglossaries-and-auxdir-and-outdir#59098
add_cus_dep('glo', 'gls', 0, 'makeglossaries');
sub makeglossaries {
my ($base_name, $path) = fileparse($_[0]);
pushd $path;
my $return = system "makeglossaries $base_name";
popd;
return $return;
}

View File

@@ -1,13 +1,11 @@
FILE := main
OUT := build
all:
mkdir -p $(OUT)
pdflatex -output-directory $(OUT) $(FILE)
biber $(OUT)/$(FILE)
cd $(OUT) && makeglossaries $(FILE)
pdflatex -output-directory $(OUT) $(FILE)
pdflatex -output-directory $(OUT) $(FILE)
latexmk:
# Also see .latexmkrc
latexmk -outdir=$(OUT) -pdf $(FILE)
clean:
rm -rf $(OUT)
.PHONY: latexmk clean

View File

@@ -14,7 +14,7 @@ Comments & contributions welcome!
* Download the TUM logo from [here][mytum-logo-tum] and save it to `logos/tum.pdf`.
* Download your faculty's logo from [here][mytum-logo-faculty] and save it to `logos/faculty.pdf`.
* Some logos might not be cropped; execute the `crop-logos` script to do that for you.
* Configure your latex editor to use `pdflatex`, `biber` for bibliography, and `makeglossaries` for glossary generation. Set `main.tex` as the master document. Alternatively, you can use the provided makefile to create a PDF in the `build` directory.
* Configure your latex editor to use `pdflatex`, `biber` for bibliography, and `makeglossaries` for glossary generation. Set `main.tex` as the master document. Alternatively, you can use the provided makefile to create a PDF in the `build` directory (requires `latexmk`).
* Look for `TODO` comments in the provided files. Start at `main.tex`.
For additional hints, have a look at [the wiki][wiki].