From 98a791bcc156df953b64c7ec2e85e7d6b9f1e1ec Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 25 Feb 2016 22:37:12 +0000 Subject: latexmk (25feb16) git-svn-id: svn://tug.org/texlive/trunk@39860 c570f23f-e606-0410-a88d-b1316a301751 --- .../latexmk/example_rcfiles/texinfo-latexmkrc | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Master/texmf-dist/doc/support/latexmk/example_rcfiles/texinfo-latexmkrc (limited to 'Master/texmf-dist/doc/support/latexmk/example_rcfiles/texinfo-latexmkrc') diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/texinfo-latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/texinfo-latexmkrc new file mode 100644 index 00000000000..3a21a3c15db --- /dev/null +++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/texinfo-latexmkrc @@ -0,0 +1,76 @@ +# Modifications 2015 Sep 9-10, John Collins +# Copyright 2014 Vincent Belaïche + +# With the settings here, latexmk can be used to process texinfo files +# (typical extension .texi) to pdf files, including the making of +# indices. This version uses a newly documented internal routine +# of latexmk. + +###!!!!!!!!! NOTE THAT THE NAMES OF THE INDEX FILES ARE POSSIBLY +### SUBJECT TO CHANGE IN FUTURE VERSIONS OF texinfo. +### The configuration provided by this file was valid in +### September 2015. (The file texinfo.tex had version +### 2015-07-01.07.) + +$quote_filenames = 1; +$pdflatex = 'internal mylatex %R %Z pdftex %O %S'; +$latex = 'internal mylatex %R %Z etex %O %S'; + +sub mylatex { + my $root = shift; + my $dir_string = shift; + my $ret = system @_; + for my $ext (split " ",$texinfo_indices){ + my $idx = $dir_string.$root.'.'.$ext; + my $ind = $idx.'s'; + if ( (-e $idx) && (-s $idx) ) { + # Only make dependency on the ind-like file + # if the idx-like file both exists and is of + # non-zero length. The test on the length is + # needed because current versions of texindex + # produce no output file if the input file is + # of zero length. + rdb_ensure_file( $rule, $ind ); + } + } + return $ret; +} + +# Please add needed other extensions if there are other user defined indices +$texinfo_indices = 'ky fn cp vr tp pg'; + +$clean_ext .= ' ' . $texinfo_indices; +$clean_full_ext .= ' pdf toc aux'; + +for my $ext (split " ",$texinfo_indices){ + my $index_ext = $ext . 's'; + add_cus_dep( $ext, $index_ext, 1, $ext . '_texindex'); + add_input_ext('pdflatex', $index_ext); + add_input_ext('latex', $index_ext); + $clean_ext .= " $index_ext"; +} + +sub ky_texindex +{ + system( "texindex \"$_[0].ky\"" ); +} +sub fn_texindex +{ + system( "texindex \"$_[0].fn\"" ); +} +sub cp_texindex +{ + system( "texindex \"$_[0].cp\"" ); +} +sub vr_texindex +{ + system( "texindex \"$_[0].vr\"" ); +} +sub tp_texindex +{ + system( "texindex \"$_[0].tp\"" ); +} +sub pg_texindex +{ + system( "texindex \"$_[0].pg\"" ); +} -- cgit v1.2.3