summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/example_rcfiles
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-28 21:25:12 +0000
committerKarl Berry <karl@freefriends.org>2019-05-28 21:25:12 +0000
commitb6cf0d5c43c7ae353e0dca25fa8ceb521d5ba236 (patch)
treed06d4d6bc394b09283d7de45479b574af5d9380c /Master/texmf-dist/doc/support/latexmk/example_rcfiles
parentff947adcf28811e9317f2e7da9ea71c5b31a3f8c (diff)
latexmk (28may19)
git-svn-id: svn://tug.org/texlive/trunk@51250 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/latexmk/example_rcfiles')
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/splitindex.latexmkrc29
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/splitindex.latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/splitindex.latexmkrc
new file mode 100644
index 00000000000..4509538dd7e
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/splitindex.latexmkrc
@@ -0,0 +1,29 @@
+$clean_ext .= " %R-*.ind %R-*.idx %R-*.ilg %R-*.ind";
+
+$makeindex = 'internal splitindex';
+
+sub splitindex {
+ # Use splitindex instead of makeindex.
+ # The splitindex programe starts from an .idx file, makes a set of
+ # other .idx files for separate indexes, and then runs makeindex to
+ # make corresponding .ind files.
+ # However, it is possible that the document uses the splitindex
+ # package, but in a way compatible with the standard methods
+ # compatible with makeindex, i.e., with a single index and with the
+ # use of the \printindex command.
+ # Then we need to invoke makeindex.
+ # In addition, latexmk assumes that makeindex or its replacement makes
+ # an .ind file from an .idx file, and latexmk gives an error if it
+ # doesn't exist, we need to make an .ind file.
+ # Both problems are solved by running makeindex and then splitindex.
+ # Note: errors are returned by makeindex and splitindex for things
+ # like a missing input file. No error is returned for lines in an
+ # input file that are in an incorrect format; they are simply
+ # ignored. So no problem is caused by lines in the .idx file
+ # that are generated by splitindex in a format incompatible with
+ # makeindex.
+ my $ret1 = system( "makeindex", $$Psource );
+ my $ret2 = system( "splitindex", $$Psource );
+ return $ret1 || $ret2;
+}
+