summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/example_rcfiles
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-08-13 22:39:23 +0000
committerKarl Berry <karl@freefriends.org>2012-08-13 22:39:23 +0000
commitdd8cdebd361b58d83e12316d2f533932bfea8ae9 (patch)
tree11a978aa1fb1f695e65f5dc061ec47bfd2b7ebf9 /Master/texmf-dist/doc/support/latexmk/example_rcfiles
parent76059477a647c6a71185af77492f38133e92280a (diff)
latexmk (13aug12)
git-svn-id: svn://tug.org/texlive/trunk@27392 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/README13
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/asymptote_latexmkrc2
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/glossary_latexmkrc12
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc6
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc84
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/sagetex_latexmkrc4
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/sweave_latexmkrc57
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/xelatex_latexmkrc3
8 files changed, 127 insertions, 54 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README
index 3d67f54d6c0..816526efd8a 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/README
@@ -20,3 +20,16 @@ NOTES:
examples. (The file Latexmk321jTeXShop.zip is the one you want.)
It shows how to use glossaries, epstopdf, pdftricks and pst-pdf.
+4. I have generally arranged for filenames to be quoted on command
+ lines, e.g.,
+
+ system( "makeindex -o \"$_[0].lnd\" \"$_[0].ldx\"" );
+
+ In many cases the quotes may be omitted, as in
+
+ system( "makeindex -o $_[0].lnd $_[0].ldx" );
+
+ But it is preferable to leave the quotes in, since they provide
+ safety against special characters in filenames. The double quotes
+ appear not to cause problems in all situations that I have tried.
+
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/asymptote_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/asymptote_latexmkrc
index 77a0078c9d2..53e2aa4a786 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/asymptote_latexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/asymptote_latexmkrc
@@ -21,7 +21,7 @@
# The following lines are taken from the documentation for V. 2.03 of
# asymptote:
-sub asy {return system("asy '$_[0]'");}
+sub asy {return system("asy \"$_[0]\"");}
add_cus_dep("asy","eps",0,"asy");
add_cus_dep("asy","pdf",0,"asy");
add_cus_dep("asy","tex",0,"asy");
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/glossary_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/glossary_latexmkrc
index be9f8d7343d..f43b345abd1 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/glossary_latexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/glossary_latexmkrc
@@ -10,18 +10,18 @@
# 1. For glossaries using glossary package
-add_cus_dep('glo', 'gls', 0, 'makeglo2gls');
+add_cus_dep( 'glo', 'gls', 0, 'makeglo2gls' );
sub makeglo2gls {
- system("makeindex -s '$_[0]'.ist -t '$_[0]'.glg -o '$_[0]'.gls '$_[0]'.glo");
+ system("makeindex -s \"$_[0].ist\" -t \"$_[0].glg\" -o \"$_[0].gls\" \"$_[0].glo\"" );
}
# 2. For acronyms using glossary package:
-add_cus_dep('acr', 'acn', 0, 'makeacr2acn');
+add_cus_dep( 'acr', 'acn', 0, 'makeacr2acn' );
sub makeacr2acn {
- system("makeindex -s '$_[0]'.ist -t '$_[0]'.alg -o '$_[0]'.acn '$_[0]'.acr");
+ system( "makeindex -s \"$_[0].ist\" -t \"$_[0].alg\" -o \"$_[0].acn\" \"$_[0].acr\"" );
}
@@ -31,8 +31,8 @@ sub makeacr2acn {
# 4. If you use the glossaries package and have the makeglossaries
# script installed, then you can do something simpler:
- add_cus_dep('glo', 'gls', 0, 'makeglossaries');
+ add_cus_dep( 'glo', 'gls', 0, 'makeglossaries' );
sub makeglossaries {
- system("makeglossaries $_[0]");
+ system( "makeglossaries \"$_[0]\"" );
}
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
index d77cdc41c13..5bcfeb0fdfd 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
@@ -8,17 +8,17 @@
# ($out_dir) is set, mpost doesn't put its output in the correct
# place.
-add_cus_dep('mp', '1', 0, 'mpost');
+add_cus_dep( 'mp', '1', 0, 'mpost' );
sub mpost {
my $file = $_[0];
my ($name, $path) = fileparse( $file );
- my $return = system "mpost $file";
+ my $return = system "mpost \"$file\"";
# Fix the problem that mpost puts its output and log files
# in the current directory, not in the auxiliary directory
# (which is often the same as the output directory):
- if ( ($path ne '') && ($path ne '.\') ) {
+ if ( ($path ne '') && ($path ne '.\\') && ($path ne './') ) {
foreach ( "$name.1", "$name.log" ) { move $_, $aux_dir; }
}
return $return;
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc
index df5dfd5d81e..6f43e982ec6 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/pdflatexmkrc
@@ -6,72 +6,72 @@ $pdflatex = 'pdflatex --shell-escape %O %S';
# Custom dependency for glossary/glossaries package
# if you make custom glossaries you may have to add items to the @cus_dep_list and corresponding sub-routines
-add_cus_dep('glo', 'gls', 0, 'makeglo2gls');
- sub makeglo2gls {
- system("makeindex -s $_[0].ist -t $_[0].glg -o $_[0].gls $_[0].glo");
- }
+add_cus_dep( 'glo', 'gls', 0, 'makeglo2gls' );
+sub makeglo2gls {
+ system( "makeindex -s \"$_[0].ist\" -t \"$_[0].glg\" -o \"$_[0].gls\" \"$_[0].glo\"" );
+}
# The glossaries package, with the [acronym] option, produces a .acn file when processed with (xe/pdf)latex and
# then makeindex to process the .acn into .acr and finally runs of (xe/pdf)latex to read in the .acr file. Unfortunately
# the glossary package does just the reverse; i.e. (xe/pdf)latex processing produces a .acr files and makeindex then
# is used to convert the .acr file to a .acn file which is then ... . This dependency assumes the glossaries package.
-add_cus_dep('acn', 'acr', 0, 'makeacn2acr');
- sub makeacn2acr {
- system("makeindex -s $_[0].ist -t $_[0].alg -o $_[0].acr $_[0].acn");
- }
+add_cus_dep( 'acn', 'acr', 0, 'makeacn2acr' );
+sub makeacn2acr {
+ system( "makeindex -s \"$_[0].ist\" -t \"$_[0].alg\" -o \"$_[0].acr\" \"$_[0].acn\"" );
+}
# for glossary package (Sigh...) --- they can co-exist!
-add_cus_dep('acr', 'acn', 0, 'makeacr2acn');
- sub makeacr2acn {
- system("makeindex -s $_[0].ist -t $_[0].alg -o $_[0].acn $_[0].acr");
- }
+add_cus_dep( 'acr', 'acn', 0, 'makeacr2acn' );
+sub makeacr2acn {
+ system( "makeindex -s \"$_[0].ist\" -t \"$_[0].alg\" -o \"$_[0].acn\" \"$_[0].acr\"" );
+}
# example of an added custom glossary type that is used in some of the glossary/glossaries example files:
# this is for the new glossary type command \newglossary[nlg]{notation}{not}{ntn}{Notation} from the glossaries package
# NOTE: the glossary package uses a very different command: the <in-ext> and <out-ext>
# are reversed in the calling sequence :-(
-add_cus_dep('ntn', 'not', 0, 'makentn2not');
- sub makentn2not {
- system("makeindex -s $_[0].ist -t $_[0].nlg -o $_[0].not $_[0].ntn");
- }
+add_cus_dep( 'ntn', 'not', 0, 'makentn2not' );
+sub makentn2not {
+ system("makeindex -s \"$_[0].ist\" -t \"$_[0].nlg\" -o \"$_[0].not\" \"$_[0].ntn\"" );
+}
# for the glossary package (Sigh...) --- they can co-exist!
-add_cus_dep('not', 'ntn', 0, 'makenot2ntn');
- sub makenot2ntn {
- system("makeindex -s $_[0].ist -t $_[0].nlg -o $_[0].ntn $_[0].not");
- }
+add_cus_dep( 'not', 'ntn', 0, 'makenot2ntn' );
+sub makenot2ntn {
+ system("makeindex -s \"$_[0].ist\" -t \"$_[0].nlg\" -o \"$_[0].ntn\" \"$_[0].not\"" );
+}
# dependencies for custom indexes using the index package
# examples for sample.tex for index package:
- add_cus_dep('adx', 'and', 0, 'makeadx2and');
- sub makeadx2and {
- system("makeindex -o $_[0].and $_[0].adx");
- }
- add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
- sub makendx2nnd {
- system("makeindex -o $_[0].nnd $_[0].ndx");
- }
- add_cus_dep('ldx', 'lnd', 0, 'makeldx2lnd');
- sub makeldx2lnd {
- system("makeindex -o $_[0].lnd $_[0].ldx");
- }
+ add_cus_dep( 'adx', 'and', 0, 'makeadx2and' );
+sub makeadx2and {
+ system( "makeindex -o \"$_[0].and\" \"$_[0].adx\"" );
+}
+add_cus_dep( 'ndx', 'nnd', 0, 'makendx2nnd' );
+sub makendx2nnd {
+ system( "makeindex -o \"$_[0].nnd\" \"$_[0].ndx\"" );
+}
+add_cus_dep( 'ldx', 'lnd', 0, 'makeldx2lnd' );
+sub makeldx2lnd {
+ system( "makeindex -o \"$_[0].lnd\" \"$_[0].ldx\"" );
+}
# Custom dependency and function for nomencl package
-add_cus_dep('nlo', 'nls', 0, 'makenlo2nls');
- sub makenlo2nls {
- system("makeindex -s nomencl.ist -o $_[0].nls $_[0].nlo");
- }
+add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
+sub makenlo2nls {
+ system( "makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"" );
+}
# Custom dependency and function(s) for epstopdf package
# FOR USERS OF epstopf v1.4 and before: should also work with v1.5 and later
# note: you may get extras runs if you use the .eps extension in the \includgraphics command
# deletes an outdated pdf-image, and triggers a pdflatex-run
-add_cus_dep('eps', 'pdf', 0, 'cus_dep_delete_dest');
+add_cus_dep( 'eps', 'pdf', 0, 'cus_dep_delete_dest' );
# FOR USERS OF epstopdf v1.5 and later only:
# load it as \usepackage[update,prepend]{epstopdf}
# detects an outdated pdf-image, and triggers a pdflatex-run
-#add_cus_dep('eps', 'pdf', 0, 'cus_dep_require_primary_run');
+#add_cus_dep( 'eps', 'pdf', 0, 'cus_dep_require_primary_run' );
# Custom dependecy to convert tif to png
-add_cus_dep('tif', 'png', 0, 'maketif2png');
- sub maketif2png {
- system("convert $_[0].tif $_[0].png");
- }
+add_cus_dep( 'tif', 'png', 0, 'maketif2png' );
+sub maketif2png {
+ system( "convert \"$_[0].tif\" \"$_[0].png\"" );
+}
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sagetex_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sagetex_latexmkrc
index 67e97595f27..d185ac56d94 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sagetex_latexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sagetex_latexmkrc
@@ -14,8 +14,8 @@
# changed.
-add_cus_dep('sage', 'sout', 0, 'makesout');
+add_cus_dep( 'sage', 'sout', 0, 'makesout' );
$hash_calc_ignore_pattern{'sage'} = '^( _st_.goboom|print .SageT)';
sub makesout {
- system("sage '$_[0].sage'");
+ system( "sage \"$_[0].sage\"" );
} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sweave_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sweave_latexmkrc
new file mode 100644
index 00000000000..19f046be6be
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/sweave_latexmkrc
@@ -0,0 +1,57 @@
+# This is to allow the use of Sweave with latexmk, and in addition to
+# make synctex work properly with it.
+# SEE THE IMPORTANT NOTES below.
+#
+# Sweave (http://www.stat.uni-muenchen.de/~leisch/Sweave/) is a tool
+# that allows to embed the R code for complete data analyses in latex
+# documents. The user edits a file with an extension like .Rnw, and
+# the .tex file is generated from this.
+#
+# Four problems are solved by the code below:
+# 1. Generate the .tex file automatically.
+# 2. Arrange not to re-run unmodified chunks of R code. (A pure
+# optimization.)
+# 3. Fix the execution environment for (pdf)latex.
+# 4. Deal with synctex: If the user wants to use synctex
+# (www.tug.org/TUGboat/tb29-3/tb93laurens.pdf) to synchronize the
+# pdf file with the source file, by default synctex does the
+# synchronization with the generated .tex file, not the original
+# source file. Postprocessing of the .synctex.gz file is necessary
+# to fix this.
+#
+# The following version was worked out and tested by a user (thanks
+# to Brian Beitzel) on MSWindows. It will need at least one change to
+# work on UNIX-like operating systems (which include Linux and OS-X).
+
+# N.B. ===> IMPORTANT NOTES <===
+#
+# 1. The patchDVI package for R needs to be installed from R-Forge, as
+# follows:
+#
+# install.packages("patchDVI", repos="http://R-Forge.R-project.org")
+#
+# 2. In all Sweave (.Rnw) documents, the following lines must be included:
+#
+# \usepackage{Sweave}
+# \SweaveOpts{concordance=TRUE}
+
+
+# Fix the pdflatex command to run Sweave first, and to postprocess the
+# .synctex.gz file:
+# !!!!! THIS IS THE VERSION FOR MS-WINDOWS, with && as a command
+# separator
+$pdflatex = "cmd /c "
+ . "Rscript -e \"library(cacheSweave); setCacheDir(getwd()); "
+ . "Sweave('%S', driver=cacheSweaveDriver)\""
+ . " && R CMD pdflatex -interaction=nonstopmode -synctex=1 %O %B.tex"
+ . " && Rscript -e "
+ . "\"library('patchDVI');patchSynctex('%B.synctex.gz')\"";
+#
+# !!!TO FIX THIS FOR Linux/OS-X/UNIX, try uncommenting the following:
+# (this version hasn't been tested).
+#$pdflatex = "Rscript -e \"library(cacheSweave); setCacheDir(getwd()); "
+# . "Sweave('%S', driver=cacheSweaveDriver)\""
+# . " ; R CMD pdflatex -interaction=nonstopmode -synctex=1 %O %B.tex"
+# . " ; Rscript -e "
+# . "\"library('patchDVI');patchSynctex('%B.synctex.gz')\"";
+
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/xelatex_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/xelatex_latexmkrc
index c9f3a7fc8bd..896c7c5e310 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/xelatex_latexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/xelatex_latexmkrc
@@ -2,6 +2,9 @@
# with latexmk. Xelatex uses Unicode and "supporting modern font
# technologies such as OpenType or Apple Advanced Typography.
#
+# WARNING: latexmk.pl is changing, and plans to have internal
+# support for xelatex.
+#
# Since xelatex only produces pdf files, it is a replacement for
# pdflatex. To make it your default typesetting engine within latexmk
# you will not only need to set the $pdflatex variable to require the