Use latexmk in Makefile.
This commit is contained in:
9
.latexmkrc
Normal file
9
.latexmkrc
Normal 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;
|
||||||
|
}
|
||||||
12
Makefile
12
Makefile
@@ -1,13 +1,11 @@
|
|||||||
FILE := main
|
FILE := main
|
||||||
OUT := build
|
OUT := build
|
||||||
|
|
||||||
all:
|
latexmk:
|
||||||
mkdir -p $(OUT)
|
# Also see .latexmkrc
|
||||||
pdflatex -output-directory $(OUT) $(FILE)
|
latexmk -outdir=$(OUT) -pdf $(FILE)
|
||||||
biber $(OUT)/$(FILE)
|
|
||||||
cd $(OUT) && makeglossaries $(FILE)
|
|
||||||
pdflatex -output-directory $(OUT) $(FILE)
|
|
||||||
pdflatex -output-directory $(OUT) $(FILE)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OUT)
|
rm -rf $(OUT)
|
||||||
|
|
||||||
|
.PHONY: latexmk clean
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Comments & contributions welcome!
|
|||||||
* Download the TUM logo from [here][mytum-logo-tum] and save it to `logos/tum.pdf`.
|
* 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`.
|
* 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.
|
* 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`.
|
* Look for `TODO` comments in the provided files. Start at `main.tex`.
|
||||||
|
|
||||||
For additional hints, have a look at [the wiki][wiki].
|
For additional hints, have a look at [the wiki][wiki].
|
||||||
|
|||||||
Reference in New Issue
Block a user