1
# Use of glossaries, extra indexes, epstopdf, and other images conversions
2
# Thanks to Herb Schulz
5
$pdflatex = 'pdflatex --shell-escape %O %S';
7
# Custom dependency for glossary/glossaries package
8
# if you make custom glossaries you may have to add items to the @cus_dep_list and corresponding sub-routines
9
add_cus_dep('glo', 'gls', 0, 'makeglo2gls');
11
system("makeindex -s $_[0].ist -t $_[0].glg -o $_[0].gls $_[0].glo");
13
# The glossaries package, with the [acronym] option, produces a .acn file when processed with (xe/pdf)latex and
14
# then makeindex to process the .acn into .acr and finally runs of (xe/pdf)latex to read in the .acr file. Unfortunately
15
# the glossary package does just the reverse; i.e. (xe/pdf)latex processing produces a .acr files and makeindex then
16
# is used to convert the .acr file to a .acn file which is then ... . This dependency assumes the glossaries package.
17
add_cus_dep('acn', 'acr', 0, 'makeacn2acr');
19
system("makeindex -s $_[0].ist -t $_[0].alg -o $_[0].acr $_[0].acn");
21
# for glossary package (Sigh...) --- they can co-exist!
22
add_cus_dep('acr', 'acn', 0, 'makeacr2acn');
24
system("makeindex -s $_[0].ist -t $_[0].alg -o $_[0].acn $_[0].acr");
26
# example of an added custom glossary type that is used in some of the glossary/glossaries example files:
27
# this is for the new glossary type command \newglossary[nlg]{notation}{not}{ntn}{Notation} from the glossaries package
28
# NOTE: the glossary package uses a very different command: the <in-ext> and <out-ext>
29
# are reversed in the calling sequence :-(
30
add_cus_dep('ntn', 'not', 0, 'makentn2not');
32
system("makeindex -s $_[0].ist -t $_[0].nlg -o $_[0].not $_[0].ntn");
34
# for the glossary package (Sigh...) --- they can co-exist!
35
add_cus_dep('not', 'ntn', 0, 'makenot2ntn');
37
system("makeindex -s $_[0].ist -t $_[0].nlg -o $_[0].ntn $_[0].not");
40
# dependencies for custom indexes using the index package
41
# examples for sample.tex for index package:
42
add_cus_dep('adx', 'and', 0, 'makeadx2and');
44
system("makeindex -o $_[0].and $_[0].adx");
46
add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
48
system("makeindex -o $_[0].nnd $_[0].ndx");
50
add_cus_dep('ldx', 'lnd', 0, 'makeldx2lnd');
52
system("makeindex -o $_[0].lnd $_[0].ldx");
55
# Custom dependency and function for nomencl package
56
add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
58
system("makeindex -s nomencl.ist -o $_[0].nls $_[0].nlo");
61
# Custom dependency and function(s) for epstopdf package
63
# FOR USERS OF epstopf v1.4 and before: should also work with v1.5 and later
64
# note: you may get extras runs if you use the .eps extension in the \includgraphics command
65
# deletes an outdated pdf-image, and triggers a pdflatex-run
66
add_cus_dep('eps', 'pdf', 0, 'cus_dep_delete_dest');
68
# FOR USERS OF epstopdf v1.5 and later only:
69
# load it as \usepackage[update,prepend]{epstopdf}
70
# detects an outdated pdf-image, and triggers a pdflatex-run
71
#add_cus_dep('eps', 'pdf', 0, 'cus_dep_require_primary_run');
73
# Custom dependecy to convert tif to png
74
add_cus_dep('tif', 'png', 0, 'maketif2png');
76
system("convert $_[0].tif $_[0].png");