summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/example_rcfiles
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-01-02 21:32:25 +0000
committerKarl Berry <karl@freefriends.org>2015-01-02 21:32:25 +0000
commit90d985dd123974027ec2b4e7da30f744b803b6bd (patch)
tree35ca2b4654185ad8a3dba4e3d3b8c68a64121f5e /Master/texmf-dist/doc/support/latexmk/example_rcfiles
parentb943cdf8beb44268e9ec30be3b91415d06a3609d (diff)
latexmk (2jan15)
git-svn-id: svn://tug.org/texlive/trunk@35947 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/Sweave_latexmkrc57
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/TeX4ht-latexmkrc33
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc16
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/nomenclature_latexmkrc10
4 files changed, 109 insertions, 7 deletions
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/TeX4ht-latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/TeX4ht-latexmkrc
new file mode 100644
index 00000000000..de486d8d8be
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/TeX4ht-latexmkrc
@@ -0,0 +1,33 @@
+# Sometime in the future, latexmk will directly support the use of
+# TeX4ht to obtain html from tex. Meanwhile, here is how to use
+# latexmk with TeX4ht. There is a script htlatex supplied by the
+# TeX4ht package: It simply runs latex a fixed number of times and
+# then the programs tex4ht and t4ht. To use latexmk to get optimal
+# processing use the following instructions (under UNIX-like operating
+# systems, e.g., OS-X and linux):
+#
+# 1. Put the scripts htlatexonly and myhtlatex2 somewhere in the PATH
+# for executables (and make sure they have excutable permissions
+# set).
+# 2. Set up an initialization file for latexmk like this one.
+#
+# 3. To process file.tex to make file.html, run
+#
+# myhtlatex2 file
+#
+
+# Since these instructions use scripts that are UNIX shell scripts,
+# the instructions work as written for UNIX-like operating
+# systems. Users of other operating systems will have to adjust them
+# and modify the scripts suitably.
+
+
+warn "latexmkrc for htlatex\n";
+
+$dvi_mode = 1;
+$pdf_mode = 0;
+$quote_filenames = 0;
+$latex = 'htlatexonly %S';
+
+$clean_ext .= ' 4ct 4tc idv lg tmp xref';
+$clean_full_ext .= ' css html';
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 5bcfeb0fdfd..c1b3e13d4fc 100644
--- a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
@@ -1,3 +1,6 @@
+# N.B. ===> (3, 4 Mar 2014) This file contains a correction relative to
+# the previous version
+
# This shows how to use mpost, as used by the feynmp package.
# The feynmp package writes files with extension .mp, e.g., foo.mp,
# and these are to be converted by mpost to make postscript files,
@@ -5,7 +8,7 @@
#
# A more complicated custom dependency is needed than normal, because:
# if the output directory ($out_dir) or the auxiliary directory
-# ($out_dir) is set, mpost doesn't put its output in the correct
+# ($aux_dir) is set, mpost doesn't put its output in the correct
# place.
add_cus_dep( 'mp', '1', 0, 'mpost' );
@@ -15,12 +18,11 @@ sub mpost {
my $file = $_[0];
my ($name, $path) = fileparse( $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 '.\\') && ($path ne './') ) {
- foreach ( "$name.1", "$name.log" ) { move $_, $aux_dir; }
- }
+ # 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):
+ move "$name.1", $path;
+ move "$name.log", $aux_dir;
return $return;
}
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/nomenclature_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/nomenclature_latexmkrc
new file mode 100644
index 00000000000..e16ee40f869
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/nomenclature_latexmkrc
@@ -0,0 +1,10 @@
+# This shows how to use the nomencl package for making a nomenclature
+# with latexmk.
+# (See http://www.ctan.org/tex-archive/macros/latex/contrib/nomencl
+# for information on the nomencl package.)
+
+
+add_cus_dep("nlo", "nls", 0, "nlo2nls");
+sub nlo2nls {
+ system("makeindex $_[0].nlo -s nomencl.ist -o $_[0].nls -t $_[0].nlg");
+}