summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/man/man1/latexmk.117
-rw-r--r--Master/texmf-dist/doc/man/man1/latexmk.man1.pdfbin213929 -> 214715 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexmk/CHANGES9
-rw-r--r--Master/texmf-dist/doc/support/latexmk/INSTALL2
-rw-r--r--Master/texmf-dist/doc/support/latexmk/README18
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.pdfbin192124 -> 192210 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.txt1592
-rwxr-xr-xMaster/texmf-dist/scripts/latexmk/latexmk.pl209
8 files changed, 938 insertions, 909 deletions
diff --git a/Master/texmf-dist/doc/man/man1/latexmk.1 b/Master/texmf-dist/doc/man/man1/latexmk.1
index 98264b7aa9f..a1224937092 100644
--- a/Master/texmf-dist/doc/man/man1/latexmk.1
+++ b/Master/texmf-dist/doc/man/man1/latexmk.1
@@ -1,4 +1,4 @@
-.TH LATEXMK 1 "13 September 2020" ""
+.TH LATEXMK 1 "29 September 2020" ""
.SH NAME
latexmk \- generate LaTeX document
.SH SYNOPSIS
@@ -276,6 +276,11 @@ This property can also be configured by setting the \fI$bibtex_use\fR
variable to 1.5 in a configuration file.
.TP
+.B -bibtexfudge, -bibtexfudge-
+Turn on/off the change-directory fudge needed for old versions (pre-2019)
+of bibtex. See documentation of \fI$bibtex_fudge\fR for details.
+
+.TP
.B -bm <message>
A banner message to print diagonally across each page when converting
the dvi file to postscript. The message must be a single argument on
@@ -746,6 +751,11 @@ an already-running previewer.
Never run bibtex or biber. Equivalent to the \fB-bibtex-\fR option.
.TP
+.B -nobibtexfudge
+Turn off the change-directory fudge needed for old versions (pre-2019)
+of bibtex. See documentation of \fI$bibtex_fudge\fR for details.
+
+.TP
.B -norc
Turn off the automatic reading of initialization (rc) files.
@@ -3868,8 +3878,9 @@ suggestions that contributed to version 3, and Herbert Schulz.
e-mail addresses are not written in their standard form to avoid being
harvested too easily.)
.SH AUTHOR
-Current version, by John Collins (username jcc8 at node psu.edu).
-(Version 4.70a).
+Current version, by John Collins
+(Version 4.70b).
+Report bugs etc to his e-mail (jcc8 at psu.edu).
Released version can be obtained from CTAN:
<http://www.ctan.org/pkg/latexmk/>, and from the
diff --git a/Master/texmf-dist/doc/man/man1/latexmk.man1.pdf b/Master/texmf-dist/doc/man/man1/latexmk.man1.pdf
index 15ba2e728ae..49118f3adec 100644
--- a/Master/texmf-dist/doc/man/man1/latexmk.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/latexmk.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexmk/CHANGES b/Master/texmf-dist/doc/support/latexmk/CHANGES
index ac91892ccb9..018ff33c5c4 100644
--- a/Master/texmf-dist/doc/support/latexmk/CHANGES
+++ b/Master/texmf-dist/doc/support/latexmk/CHANGES
@@ -735,3 +735,12 @@ From v. 4.69a to 4.70a
Small bug corrections, and changes to some diagnostic messages.
Documentation corrections.
+From v. 4.70a to 4.70b
+ Fix problems when rearranging rules to deal with change of output file of
+ *latex engine (e.g., .pdf to .dvi).
+ Fix problem with the new default not to do the change of directory for
+ bibtex. Use of full path names for output-directory or tex file no
+ longer causes a bibtex error.
+ Add options -bibfudge, -bibfudge-, -nobibfudge.
+
+
diff --git a/Master/texmf-dist/doc/support/latexmk/INSTALL b/Master/texmf-dist/doc/support/latexmk/INSTALL
index 33acea5cb17..1e1d6d79c2b 100644
--- a/Master/texmf-dist/doc/support/latexmk/INSTALL
+++ b/Master/texmf-dist/doc/support/latexmk/INSTALL
@@ -1,6 +1,6 @@
INSTALLING latexmk
==================
- (Version 4.70a, 13 September 2020)
+ (Version 4.70b, 29 September 2020)
John Collins
Physics Department
diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README
index 414814d1835..89124040c5a 100644
--- a/Master/texmf-dist/doc/support/latexmk/README
+++ b/Master/texmf-dist/doc/support/latexmk/README
@@ -1,4 +1,4 @@
-Latexmk, version 4.70a, 13 September 2020
+Latexmk, version 4.70b, 29 September 2020
-----------------------------------------
Latexmk completely automates the process of generating a LaTeX
@@ -87,8 +87,7 @@ NOTES:-
John Collins
---------------------------- "latexmk -h" ----------------------------
------- TO STDOUT from JCC's latexmkrc
-Latexmk 4.70a: Automatic LaTeX document generation routine
+Latexmk 4.70b: Automatic LaTeX document generation routine
Usage: latexmk [latexmk_options] [filename ...]
@@ -101,6 +100,8 @@ Usage: latexmk [latexmk_options] [filename ...]
-bibtex-cond - use bibtex when needed, but only if the bib file exists
-bibtex-cond1 - use bibtex when needed, but only if the bib file exists;
on cleanup delete bbl file only if bib file exists
+ -bibfudge - use change-directory fudge needed for old bibtexs
+ -bibfudge- - don't use change-directory fudge needed for old bibtexs
-bm <message> - Print message across the page when converting to postscript
-bi <intensity> - Set contrast or intensity of banner
-bs <scale> - Set scale for banner
@@ -141,11 +142,11 @@ Usage: latexmk [latexmk_options] [filename ...]
-l- - turn off -l
-latex=<program> - set program used for latex.
(replace '<program>' by the program name)
- -latexoption=<option> - add the given option to the (pdf)latex command
+ -latexoption=<option> - add the given option to the *latex command
-logfilewarninglist or -logfilewarnings
- give list of warnings after run of (pdf)latex
+ give list of warnings after run of *latex
-logfilewarninglist- or -logfilewarnings-
- do not give list of warnings after run of (pdf)latex
+ do not give list of warnings after run of *latex
-lualatex - use lualatex for processing files to pdf
and turn dvi/ps modes off
-M - Show list of dependent files after processing
@@ -158,6 +159,7 @@ Usage: latexmk [latexmk_options] [filename ...]
-new-viewer - in -pvc mode, always start a new viewer
-new-viewer- - in -pvc mode, start a new viewer only if needed
-nobibtex - never use bibtex
+ -nobibfudge - don't use change-directory fudge needed for old bibtexs
-nodependents - Do not show list of dependent files after processing
-norc - omit automatic reading of system, user and project rc files
-output-directory=dir or -outdir=dir
@@ -197,9 +199,9 @@ Usage: latexmk [latexmk_options] [filename ...]
-r <file> - Read custom RC file
(N.B. This file could override options specified earlier
on the command line.)
- -recorder - Use -recorder option for (pdf)latex
+ -recorder - Use -recorder option for *latex
(to give list of input and output files)
- -recorder- - Do not use -recorder option for (pdf)latex
+ -recorder- - Do not use -recorder option for *latex
-rules - Show list of rules after processing
-rules- - Do not show list of rules after processing
-showextraoptions - Show other allowed options that are simply passed
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
index 8d7107f7a2a..c7bfe298673 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.txt b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
index cb25edab853..ee48cdb3d1c 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.txt
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
@@ -61,7 +61,7 @@ DESCRIPTION
- 13 September 2020 1
+ 29 September 2020 1
@@ -127,7 +127,7 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
- 13 September 2020 2
+ 29 September 2020 2
@@ -193,7 +193,7 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
- 13 September 2020 3
+ 29 September 2020 3
@@ -259,7 +259,7 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
- 13 September 2020 4
+ 29 September 2020 4
@@ -312,26 +312,32 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
variable to 1.5 in a configuration file.
+ -bibtexfudge, -bibtexfudge-
+ Turn on/off the change-directory fudge needed for old versions
+ (pre-2019) of bibtex. See documentation of $bibtex_fudge for
+ details.
+
+
-bm <message>
A banner message to print diagonally across each page when con-
verting the dvi file to postscript. The message must be a sin-
- gle argument on the command line so be careful with quoting spa-
- ces and such.
+ gle argument on the command line so be careful with quoting
- Note that if the -bm option is specified, the -ps option is as-
- sumed.
+ 29 September 2020 5
- 13 September 2020 5
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ spaces and such.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ Note that if the -bm option is specified, the -ps option is as-
+ sumed.
-bi <intensity>
@@ -383,15 +389,9 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
deleted.
- -C Clean up (remove) all regeneratable files generated by latex and
- bibtex or biber. This is the same as the -c option with the ad-
- dition of dvi, postscript and pdf files, and those specified in
- the $clean_full_ext configuration variable.
-
-
- 13 September 2020 6
+ 29 September 2020 6
@@ -400,6 +400,11 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
+ -C Clean up (remove) all regeneratable files generated by latex and
+ bibtex or biber. This is the same as the -c option with the ad-
+ dition of dvi, postscript and pdf files, and those specified in
+ the $clean_full_ext configuration variable.
+
This cleanup is instead of a regular make. See the -gg option
if you want to do a cleanup than a make.
@@ -449,15 +454,10 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tion, before doing the other actions requested.
- -d Set draft mode. This prints the banner message "DRAFT" across
- your page when converting the dvi file to postscript. Size and
- intensity can be modified with the -bs and -bi options. The -bm
- option will override this option as this is really just a short
- way of specifying:
- 13 September 2020 7
+ 29 September 2020 7
@@ -466,6 +466,12 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
+ -d Set draft mode. This prints the banner message "DRAFT" across
+ your page when converting the dvi file to postscript. Size and
+ intensity can be modified with the -bs and -bi options. The -bm
+ option will override this option as this is really just a short
+ way of specifying:
+
latexmk -bm DRAFT
Note that if the -d option is specified, the -ps option is as-
@@ -513,17 +519,11 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
pendent files after processing.
- -dF Dvi file filtering. The argument to this option is a filter
- which will generate a filtered dvi file with the extension
- ".dviF". All extra processing (e.g. conversion to postscript,
- preview, printing) will then be performed on this filtered dvi
- file.
+ -dF
- Example usage: To use dviselect to select only the even pages of
-
- 13 September 2020 8
+ 29 September 2020 8
@@ -532,6 +532,13 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
+ Dvi file filtering. The argument to this option is a filter
+ which will generate a filtered dvi file with the extension
+ ".dviF". All extra processing (e.g. conversion to postscript,
+ preview, printing) will then be performed on this filtered dvi
+ file.
+
+ Example usage: To use dviselect to select only the even pages of
the dvi file:
latexmk -dF "dviselect even" foo.tex
@@ -579,24 +586,24 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
cial. (In this example, the q/.../ construct is a Perl idiom
equivalent to using single quotes. This avoids the complica-
tions of getting a quote character inside an already quoted
- string in a way that is independent of both the shell and the
- operating-system.)
- The above command line will NOT work under MS-Windows with
- cmd.exe or command.com or 4nt.exe. For MS-Windows with these
- command shells you could use
+ 29 September 2020 9
- 13 September 2020 9
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ string in a way that is independent of both the shell and the
+ operating-system.)
+ The above command line will NOT work under MS-Windows with
+ cmd.exe or command.com or 4nt.exe. For MS-Windows with these
+ command shells you could use
latexmk -e "$latex=q/latex %O -shell-escape %S/" file.tex
@@ -645,25 +652,25 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-C had been given, and then do a regular make.
- -h, -help
- Print help information.
- -jobname=STRING
- Set the basename of output files(s) to STRING, instead of the
- default, which is the basename of the specified TeX file. (At
+ 29 September 2020 10
- 13 September 2020 10
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -h, -help
+ Print help information.
+ -jobname=STRING
+ Set the basename of output files(s) to STRING, instead of the
+ default, which is the basename of the specified TeX file. (At
present, STRING should not contain spaces.)
This is like the same option for current implementations of the
@@ -712,23 +719,23 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-latex="COMMAND" option.
- -latex="COMMAND"
- This sets the string specifying the command to run latex, and is
- typically used to add desired options. Since the string nor-
- mally contains spaces, it should be quoted, e.g.,
- latexmk -latex="latex --shell-escape %O %S" foo.tex
+ 29 September 2020 11
- 13 September 2020 11
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -latex="COMMAND"
+ This sets the string specifying the command to run latex, and is
+ typically used to add desired options. Since the string nor-
+ mally contains spaces, it should be quoted, e.g.,
+ latexmk -latex="latex --shell-escape %O %S" foo.tex
The specification of the contents of the string are the same as
for the $latex configuration variable. Depending on your oper-
@@ -776,24 +783,25 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-lualatex="COMMAND"
This sets the string specifying the command to run lualatex. It
- behaves like the -pdflatex option, but sets the variable $luala-
- tex.
+ behaves like the -pdflatex option, but sets the variable
- Note: This option when provided with the COMMAND argument only
- sets the command for invoking lualatex; it does not turn on the
- use of lualatex. That is done by other options or in an initial-
- ization file.
+ 29 September 2020 12
- 13 September 2020 12
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ $lualatex.
+
+ Note: This option when provided with the COMMAND argument only
+ sets the command for invoking lualatex; it does not turn on the
+ use of lualatex. That is done by other options or in an initial-
+ ization file.
-M Show list of dependent files after processing. This is equiva-
@@ -842,26 +850,26 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
view the generated file. By default, latexmk will, in continu-
ous-preview mode, test for a previously running previewer for
the same file and not start a new one if a previous previewer is
- running. However, its test sometimes fails (notably if there is
- an already-running previewer that is viewing a file of the same
- name as the current file, but in a different directory). This
- option turns off the default behavior.
- -new-viewer-
- The inverse of the -new-viewer option. It puts latexmk in its
+ 29 September 2020 13
- 13 September 2020 13
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ running. However, its test sometimes fails (notably if there is
+ an already-running previewer that is viewing a file of the same
+ name as the current file, but in a different directory). This
+ option turns off the default behavior.
+ -new-viewer-
+ The inverse of the -new-viewer option. It puts latexmk in its
normal behavior that in preview-continuous mode it checks for an
already-running previewer.
@@ -870,6 +878,12 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Never run bibtex or biber. Equivalent to the -bibtex- option.
+ -nobibtexfudge
+ Turn off the change-directory fudge needed for old versions
+ (pre-2019) of bibtex. See documentation of $bibtex_fudge for
+ details.
+
+
-norc Turn off the automatic reading of initialization (rc) files.
N.B. Normally the initialization files are read and obeyed, and
@@ -902,6 +916,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
to be printed, and you can configure this in a start up file (by
setting the $print_type variable).
+
+
+
+ 29 September 2020 14
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
However, printing is enabled by default only under UNIX/Linux
systems, where the default is to use the lpr command and only on
postscript files. In general, the correct behavior for printing
@@ -916,18 +942,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
turns them off.
-
-
-
- 13 September 2020 14
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-pdf Generate pdf version of document using pdflatex. (If you wish
to use lualatex or xelatex, you can use whichever of the options
-pdflua, -pdfxe, -lualatex or -xelatex applies.) To configure
@@ -969,6 +983,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
overridden if some other option requires the generation of a pdf
file.)
+
+
+ 29 September 2020 15
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
If after all options have been processed, pdf generation is
still turned off, then generation of a dvi file will be turned
on, and then the program used to compiled a document will be la-
@@ -984,16 +1009,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
the -pdflatex="COMMAND" option.
-
- 13 September 2020 15
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-pdflatex="COMMAND"
This sets the string specifying the command to run pdflatex, and
is typically used to add desired options. Since the string nor-
@@ -1032,33 +1047,33 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
be executed before inputting source file. This only works if
the command for invoking the relevant *latex is suitably config-
ured. See the documentation of the variable $pre_tex_code, and
- the substitution strings %P and %U for more details. This op-
- tion works by setting the variable $pre_tex_code.
+ the substitution strings %P and %U for more details. This
- See also the -usepretex option.
- An example:
- latexmk -pretex='\AtBeginDocument{Message\par}' -usepretex
- foo.tex
+ 29 September 2020 16
- But this is better written
- latexmk -usepretex='\AtBeginDocument{Message\par}' foo.tex
- If you already have a suitable command configured, you only need
+LATEXMK(1) General Commands Manual LATEXMK(1)
- 13 September 2020 16
+ option works by setting the variable $pre_tex_code.
+ See also the -usepretex option.
+ An example:
+ latexmk -pretex='\AtBeginDocument{Message\par}' -usepretex
+ foo.tex
+ But this is better written
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ latexmk -usepretex='\AtBeginDocument{Message\par}' foo.tex
+ If you already have a suitable command configured, you only need
latexmk -pretex='\AtBeginDocument{Message\par}' foo.tex
@@ -1100,6 +1115,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
version of perl and the operating system on your computer.
+
+
+ 29 September 2020 17
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
-pv Run file previewer. If the -view option is used, this will se-
lect the kind of file to be previewed (.dvi, .ps or .pdf). Oth-
erwise the viewer views the "highest" kind of file selected, by
@@ -1114,18 +1140,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-pvc Run a file previewer and continually update the .dvi, .ps,
and/or .pdf files whenever changes are made to source files (see
-
-
-
- 13 September 2020 17
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
the Description above). Which of these files is generated and
which is viewed is governed by the other options, and is the
same as for the -pv option. The preview-continuous option -pvc
@@ -1167,6 +1181,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-pvc- Turn off -pvc.
+
+
+ 29 September 2020 18
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
-pvctimeout
Do timeout in pvc mode after period of inactivity, which is 30
min. by default. Inactivity means a period when latexmk has de-
@@ -1182,16 +1207,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Set period of inactivity in minutes for pvc timeout.
-
- 13 September 2020 18
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-quiet Same as -silent
@@ -1232,32 +1247,31 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
configuration variable.
- -recorder-
- Do not supply the -recorder option with *latex.
-
- -rules Show a list of latemk's rules and dependencies after processing.
+ 29 September 2020 19
- -rules-
- Do not show a list of latexmk's rules and dependencies after
- processing. (This is the default.)
- -showextraoptions
- Show the list of extra *latex options that latexmk recognizes,
+LATEXMK(1) General Commands Manual LATEXMK(1)
- 13 September 2020 19
+ -recorder-
+ Do not supply the -recorder option with *latex.
+ -rules Show a list of latemk's rules and dependencies after processing.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -rules-
+ Do not show a list of latexmk's rules and dependencies after
+ processing. (This is the default.)
+ -showextraoptions
+ Show the list of extra *latex options that latexmk recognizes,
but that it simply passes through to the programs *latex when
they are run. These options are (currently) a combination of
those allowed by the TeXLive and MiKTeX implementations. (If a
@@ -1298,6 +1312,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
itself generates.
To change the options used to make the commands run silently,
+
+
+
+ 29 September 2020 20
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
you need to configure latexmk with changed values of its config-
uration variables, the relevant ones being $bib-
tex_silent_switch, $biber_silent_switch, $dvipdf_silent_switch,
@@ -1312,18 +1338,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The result is that $latex = 'latex %O %S', and similarly for
$pdflatex, $lualatex, and $xelatex. (The option -no-pdf needed
-
-
-
- 13 September 2020 20
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
for $xelatex is provided automatically, given that %O appears in
the definition.)
@@ -1364,30 +1378,31 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Sets the command lines for latex, etc, so that they use the code
that is defined by the variable $pre_tex_code or that is set by
the option -pretex=CODE to execute the specified TeX code before
- the source file is read. This option overrides any previous
- definition of the command lines.
- The result is that $latex = 'latex %O %P', and similarly for
- $pdflatex, $lualatex, and $xelatex. (The option -no-pdf needed
- for $xelatex is provided automatically, given that %O appears in
- the definition.)
- -usepretex=CODE
- Equivalent to -pretex=CODE -usepretex. Example
+ 29 September 2020 21
- latexmk -usepretex='\AtBeginDocument{Message\par}' foo.tex
- 13 September 2020 21
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ the source file is read. This option overrides any previous
+ definition of the command lines.
+ The result is that $latex = 'latex %O %P', and similarly for
+ $pdflatex, $lualatex, and $xelatex. (The option -no-pdf needed
+ for $xelatex is provided automatically, given that %O appears in
+ the definition.)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -usepretex=CODE
+ Equivalent to -pretex=CODE -usepretex. Example
+
+ latexmk -usepretex='\AtBeginDocument{Message\par}' foo.tex
-v, -version
@@ -1430,6 +1445,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This option is equivalent to using the following set of options
+
+
+ 29 September 2020 22
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
-pdfxe -dvi- -ps-
[Note: Note that the method of implementation of this option,
@@ -1445,17 +1471,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This sets the string specifying the command to run xelatex. It
sets the variable $xelatex.
-
-
- 13 September 2020 22
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
Warning: It is important to ensure that the -no-pdf is used when
xelatex is invoked, since latexmk expects xelatex to produce an
.xdv file, not a .pdf file. If you provide %O in the command
@@ -1495,38 +1510,38 @@ EXAMPLES
file thesis.tex and any files it
uses. After any changes rerun latex
the appropriate number of times and
- remake the postscript file. If latex
- encounters an error, latexmk will
- keep running, watching for
- source file changes.
- % latexmk -c # remove .aux, .log, .bbl, .blg, .dvi,
- .pdf, .ps & .bbl files
+ 29 September 2020 23
-DEALING WITH ERRORS, PROBLEMS, ETC
- Some possibilities:
- a. If you get a strange error, do look carefully at the output that is
- on the screen and in log files. While there is much that is
- 13 September 2020 23
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ remake the postscript file. If latex
+ encounters an error, latexmk will
+ keep running, watching for
+ source file changes.
+ % latexmk -c # remove .aux, .log, .bbl, .blg, .dvi,
+ .pdf, .ps & .bbl files
-LATEXMK(1) General Commands Manual LATEXMK(1)
+DEALING WITH ERRORS, PROBLEMS, ETC
+ Some possibilities:
- notoriously verbose in the output of latex (and that is added to by la-
- texmk), the verbosity is there for a reason: to enable the user to di-
- agnose problems. Latexmk does repeat some messages at the end of a run
- that it thinks would otherwise be easy to miss in the middle of other
- output.
+ a. If you get a strange error, do look carefully at the output that is
+ on the screen and in log files. While there is much that is notori-
+ ously verbose in the output of latex (and that is added to by latexmk),
+ the verbosity is there for a reason: to enable the user to diagnose
+ problems. Latexmk does repeat some messages at the end of a run that
+ it thinks would otherwise be easy to miss in the middle of other out-
+ put.
b. Generally, remember that latexmk does its work by running other pro-
grams. Your first priority in dealing with errors should be to examine
@@ -1562,6 +1577,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
the change.) One solution is just to put the following somewhere in
the LaTeX part of the document:
+
+
+ 29 September 2020 24
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
\typeout{(bar.baz)}
This puts a line in the log file that latexmk will treat as implying
@@ -1577,17 +1603,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
i. Ask a question at tex.stackexchange.com.
-
-
- 13 September 2020 24
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
j. Or ask me (the author of latexmk). My e-mail is at the end of this
documentation.
@@ -1627,6 +1642,18 @@ ALLOWING FOR CHANGE OF OUTPUT FILE TYPE
put=0 in the preamble of the document.
Another example is where the document uses graphics file of the .pdf,
+
+
+
+ 29 September 2020 25
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
.jpg, and png types. With the default setting for the graphicx pack-
age, these can be processed in compilation to .pdf but not with compi-
lation to .dvi. In this case, it is useful to insert \pdfoutput=1 in
@@ -1642,18 +1669,6 @@ ALLOWING FOR CHANGE OF OUTPUT FILE TYPE
to a non-zero value as it is by default. If this variable is zero, a
mismatch of filetypes in the compilation results in an erro.
-
-
-
- 13 September 2020 25
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
The second condition for latexmk to be able to handle a change of out-
put type is that no explicit requests for .dvi or .ps output files are
made. Explicit requests are by the -dvi and -ps, -print=dvi,
@@ -1693,6 +1708,18 @@ CONFIGURATION/INITIALIZATION (RC) FILES
"/usr/local/share/latexmk/LatexMk",
"/usr/local/lib/latexmk/LatexMk".
On a MS-Windows system it looks for "C:\latexmk\LatexMk".
+
+
+
+ 29 September 2020 26
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
On a cygwin system (i.e., a MS-Windows system in which Perl is that
of cygwin), latexmk reads the first it finds of
"/cygdrive/c/latexmk/LatexMk",
@@ -1708,18 +1735,6 @@ CONFIGURATION/INITIALIZATION (RC) FILES
2) The user's RC file, if it exists. This can be in one of two places.
The traditional one is ".latexmkrc" in the user's home directory. The
-
-
-
- 13 September 2020 26
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
other possibility is "latexmk/latexmkrc" in the user's XDG configura-
tion home directory. The actual file read is the first of "$XDG_CON-
FIG_HOME/latexmk/latexmkrc" or "$HOME/.latexmkrc" which exists. (See
@@ -1760,6 +1775,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
later options on the command line. There is also the -e option, which
allows initialization code to be specified in latexmk's command line.
+
+
+ 29 September 2020 27
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
For possible examples of code for in an RC file, see the directory ex-
ample_rcfiles in the distribution of latexmk (e.g., at http://mir-
ror.ctan.org/support/latexmk/example_rcfiles).
@@ -1774,18 +1800,6 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES
$bibtex = 'bibtex %O %S';
-
-
-
- 13 September 2020 27
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
for the setting of a string variable,
$preview_mode = 1;
@@ -1826,31 +1840,31 @@ FORMAT OF COMMAND SPECIFICATIONS
Placeholders: Supposed you wanted latexmk to use the command elatex in
place of the regular latex command, and suppose moreover that you
wanted to give it the option "--shell-escape". You could do this by
- the following setting:
- $latex = 'elatex --shell-escape %O %S';
- The two items starting with the % character are placeholders. These
- are substituted by appropriate values before the command is run. Thus
- %S will be replaced by the source file that elatex will be applied to,
- and %O will be replaced by any options that latexmk has decided to use
- for this command. (E.g., if you used the -silent option in the invoca-
- tion of latexmk, it results in the replacement of %O by "-interac-
- tion=batchmode".)
- The available placeholders are:
+ 29 September 2020 28
- 13 September 2020 28
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ the following setting:
+ $latex = 'elatex --shell-escape %O %S';
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ The two items starting with the % character are placeholders. These
+ are substituted by appropriate values before the command is run. Thus
+ %S will be replaced by the source file that elatex will be applied to,
+ and %O will be replaced by any options that latexmk has decided to use
+ for this command. (E.g., if you used the -silent option in the invoca-
+ tion of latexmk, it results in the replacement of %O by "-interac-
+ tion=batchmode".)
+ The available placeholders are:
%A basename of the main tex file. Unlike %R, this is unaffected by
the setting of a jobname by the -jobname option or the $jobname
@@ -1892,6 +1906,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
%Y Name of directory for auxiliary output files (see the configura-
tion variable $aux_dir). A directory separation character ('/')
+
+
+
+ 29 September 2020 29
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
is appended if $aux_dir is non-empty and does not end in a suit-
able character, with suitable characters being those appropriate
to UNIX and MS-Windows, i.e., ':', '/' and '\'. Note that if
@@ -1906,18 +1932,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
UNIX and MS-Windows, i.e., ':', '/' and '\'.
If for some reason you need a literal % character in your string not
-
-
-
- 13 September 2020 29
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
subject to the above rules, use "%%".
Appropriate quoting will be applied to the filename substitutions, so
@@ -1958,6 +1972,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
string, that is equivalent to having just one. (4) Under cygwin, some
complications happen, since cygwin amounts to a complicated merging of
UNIX and MS-Windows. See the source code for how I've handled the
+
+
+
+ 29 September 2020 30
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
problem.
Command names containing spaces: Under MS-Windows it is common that the
@@ -1973,17 +1999,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
traPDF.exe" %O %S';
-
-
- 13 September 2020 30
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
(Note about the above example: Under MS-Windows forward slashes are
equivalent to backslashes in a filename under almost all circumstances,
provided that the filename is inside double quotes. It is easier to
@@ -2023,6 +2038,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Options to commands: Setting the name of a command can be used not only
for changing the name of the command called, but also to add options to
command. Suppose you want latexmk to use latex with source specials
+
+
+
+ 29 September 2020 31
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
enabled. Then you might use the following line in an initialization
file:
@@ -2038,18 +2065,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
return system 'latex', @args;
}
-
-
-
- 13 September 2020 31
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
For some of the more exotic possibilities that then become available,
see the section "ADVANCED CONFIGURATION: Some extra resources and ad-
vanced tricks". Also see some of the examples in the directory exam-
@@ -2088,34 +2103,34 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
- In this section are specified the variables whose values can be ad-
- justed to configure latexmk. (See the earlier section "Configura-
- tion/Initialization (rc) Files" for the files where the configurations
- are done.)
+ In this section are specified the variables whose values can be
- Default values are indicated in brackets. Note that for variables that
- are boolean in character, concerning whether latexmk does or does not
- behave in a certain way, a non-zero value, normally 1, indicates true,
- i.e., the behavior occurs, while a zero value indicates a false value,
- i.e., the behavior does not occur.
- $allow_switch [1]
+ 29 September 2020 32
- This controls what happens when the output extension of latex,
- pdflatex, lualatex or xelatex differs from what is expected.
- 13 September 2020 32
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ adjusted to configure latexmk. (See the earlier section "Configura-
+ tion/Initialization (rc) Files" for the files where the configurations
+ are done.)
+ Default values are indicated in brackets. Note that for variables that
+ are boolean in character, concerning whether latexmk does or does not
+ behave in a certain way, a non-zero value, normally 1, indicates true,
+ i.e., the behavior occurs, while a zero value indicates a false value,
+ i.e., the behavior does not occur.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ $allow_switch [1]
+ This controls what happens when the output extension of latex,
+ pdflatex, lualatex or xelatex differs from what is expected.
(The possible extensions are .dvi, .pdf, .xdv.) This can happen
with the use of the \pdfoutput macro in a document compiled un-
der latex or pdflatex, or with the use of the \outputmode macro
@@ -2155,6 +2170,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
in the <...> and (...) constructions. Otherwise, only do the
analysis when fls file doesn't exist or is out of date.
+
+
+
+ 29 September 2020 33
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
Under normal circumstances, the data in the fls file is reli-
able, and the test of the log file gets lots of false positives;
usually $analyze_input_log_always is best set to zero. But the
@@ -2172,16 +2199,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
the default is to set $analyze_input_log_always to 1.
-
- 13 September 2020 33
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$auto_rc_use [1]
Whether to automatically read the standard initialization (rc)
files, which are the system RC file, the user's RC file, and the
@@ -2219,6 +2236,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Note that if $banner is nonzero, the $postscript_mode is assumed
and the postscript file is always generated, even if it is newer
+
+
+
+ 29 September 2020 34
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
than the dvi file.
$banner_intensity [0.95]
@@ -2236,18 +2265,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
will be printed. Experimentation is necessary to get the right
scale for your message, as a rule of thumb the scale should be
about equal to 1100 divided by the number of characters in the
-
-
-
- 13 September 2020 34
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
message. The Default is just right for 5 character messages.
This is equivalent to the -bs option.
@@ -2285,6 +2302,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Switch(es) for the biber processing program when silent mode is
on.
+
+
+
+ 29 September 2020 35
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$bibtex ["bibtex %O %S"]
The BibTeX processing program.
@@ -2301,20 +2330,8 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$bibtex_use [1]
Under what conditions to run bibtex or biber. When latexmk dis-
covers from the log file that one (or more) bibtex/biber-gener-
- ated bibliographies are used, it can run bibtex or biber
-
-
-
- 13 September 2020 35
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- whenever it appears necessary to regenerate the bbl file(s) from
+ ated bibliographies are used, it can run bibtex or biber when-
+ ever it appears necessary to regenerate the bbl file(s) from
their source bib database file(s). But sometimes, the bib
file(s) are not available (e.g., for a document obtained from an
external archive), but the bbl files are provided. In that case
@@ -2351,6 +2368,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
generated. It will also include files made from these first
generation generated files.
+
+
+
+ 29 September 2020 36
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
This operation is somewhat dangerous, and can have unintended
consequences, since the files to be deleted are determined from
a file created by *latex, which can contain erroneous informa-
@@ -2368,18 +2397,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
specified by the $clean_ext, $clean_full_ext and @generated_exts
variables.)
-
-
-
- 13 September 2020 36
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
This variable is equivalent to specifying one of the -c or -C
options. But there should be no need to set this variable from
an RC file.
@@ -2417,6 +2434,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
You can arrange to remove both the files and the directory by
setting
+
+
+
+ 29 September 2020 37
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$clean_ext = "pythontex-files-%R pythontex-files-%R";
See also the variable @generated_exts.
@@ -2435,17 +2464,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$compiling_cmd [""], $failure_cmd [""], $warning_cmd [""], $success_cmd
[""]
-
-
- 13 September 2020 37
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
These variables specify commands that are executed at certain
points of compilations. One motivation for their existance is
to allow very useful convenient visual indications of compila-
@@ -2482,6 +2500,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
These assume that the program xdotool is installed, that the
previewer is using an X-Window system for display, and that the
title of the window contains the name of the displayed file, as
+
+
+
+ 29 September 2020 38
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
it normally does. When the commands are executed, the place-
holder string %D is replaced by the name of the destination
file, which is the previewed file. The above commands result in
@@ -2501,17 +2531,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
be invoked. (See the section "Format of Command Specifications"
for how to do this.)
-
-
- 13 September 2020 38
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
Naturally, the above settings that invoke the xdotool program
are only applicable when the X-Window system is used for the
relevant window(s). For other cases, you will have to find what
@@ -2547,6 +2566,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
specified on the latexmk command line. 2. Wildcards are allowed
in @default_excluded_files.
+
+
+
+ 29 September 2020 39
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
@default_files [("*.tex")]
Default list of files to be processed.
@@ -2566,18 +2597,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
@default_files = ("paper_current");
-
-
-
- 13 September 2020 39
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
@default_files = ("paper1", "paper2.tex");
@default_files = ("*.tex", "*.dtx");
@@ -2614,6 +2633,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
*latex programs. This variable is set by the -cd and -cd- op-
tions on latexmk's command line.
+
+
+ 29 September 2020 40
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$dvi_filter [empty]
The dvi file filter to be run on the newly produced dvi file be-
fore other processing. Equivalent to specifying the -dF option.
@@ -2632,18 +2662,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The command to invoke a dvi-previewer. [Under MS-Windows the
default is "start"; then latexmk arranges to use the MS-Windows
start program, which will cause to be run whatever command the
-
-
-
- 13 September 2020 40
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
system has associated with .dvi files.]
Important note: Normally you will want to have a previewer run
@@ -2680,6 +2698,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
N.B. The standard dvipdf program runs silently, so adding the
silent switch has no effect, but is actually innocuous. But if
an alternative program is used, e.g., dvipdfmx, then the silent
+
+
+
+ 29 September 2020 41
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
switch has an effect. The default setting is correct for
dvipdfm and dvipdfmx.
@@ -2697,19 +2727,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Switch(es) for dvips program when pdf file is to be generated
from .ps file.
-
-
-
-
- 13 September 2020 41
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$dvips_silent_switch ["-q"]
Switch(es) for dvips program when silent mode is on.
@@ -2748,6 +2765,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$failure_cmd [undefined]
See the documentation for $compiling_cmd.
+
+
+ 29 September 2020 42
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$fdb_ext ["fdb_latexmk"]
The extension of the file which latexmk generates to contain a
database of information on source files. You will not normally
@@ -2764,18 +2792,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
planation.
In almost all situations, latexmk does not need to use the time
-
-
-
- 13 September 2020 42
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
stamps of the files it works with. However, there are a couple
of situations when it needs to know whether a certain file was
created in the current run of a program (e.g., *latex) or is a
@@ -2814,6 +2830,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
it normally indicates that at least one of the systems is mis-
configured. The variable $filetime_offset_report_threshold
specifies the smallest size of the difference (or offset) in
+
+
+
+ 29 September 2020 43
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
seconds between the times of the local and remote system beyond
which the offset is reported. This is reported at the point in
the latexmk's progress that it measures the offset. The report
@@ -2831,17 +2859,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
during a LaTeX run and that are read in by LaTeX in later runs,
either directly or indirectly.
-
-
- 13 September 2020 43
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
This list specifies files known to be generated by *latex. It
is used in two ways: (a) The specified files are deleted in a
cleanup operation (with the -c, -C, -CA, -g and -gg options),
@@ -2879,6 +2896,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The general rule latexmk uses for determining when an extra run
of some program is needed is that one of the source files has
changed. But consider for example a latex package that causes
+
+
+
+ 29 September 2020 44
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
an encapsulated postscript file (an "eps" file) to be made that
is to be read in on the next run. The file contains a comment
line giving its creation date and time. On the next run the
@@ -2895,24 +2924,12 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This creates a rule for files with extension .eps about lines to
ignore. The left-hand side is a Perl idiom for setting an item
in a hash. Note that the file extension is specified without a
- period. The value, on the right-hand side, is a string
-
-
-
- 13 September 2020 44
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- containing a regular expresssion. (See documentation on Perl
- for how they are to be specified in general.) This particular
- regular expression specifies that lines beginning with "%%Cre-
- ationDate: " are to be ignored in deciding whether a file of the
- given extension .eps has changed.
+ period. The value, on the right-hand side, is a string contain-
+ ing a regular expresssion. (See documentation on Perl for how
+ they are to be specified in general.) This particular regular
+ expression specifies that lines beginning with "%%CreationDate:
+ " are to be ignored in deciding whether a file of the given ex-
+ tension .eps has changed.
There is only one regular expression available for each exten-
sion. If you need more one pattern to specify lines to ignore,
@@ -2944,8 +2961,20 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
not contain spaces.)
The placeholder '%A' is permitted. This will be substituted by
- the basename of the TeX file. The primary purpose is when a va-
- riety of tex files are to be processed, and you want to use a
+ the basename of the TeX file. The primary purpose is when a
+
+
+
+ 29 September 2020 45
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ variety of tex files are to be processed, and you want to use a
different jobname for each but one that is distinct for each.
Thus if you wanted to compare compilations of a set of files on
different operating systems, with distinct filenames for all the
@@ -2962,18 +2991,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
latexmk -pdf *.tex
both files will be compiled. The .aux, .log, and .pdf files
-
-
-
- 13 September 2020 45
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
will have basenames test1-MSWin32 ante test2-MSWin32 on a MS-
Windows system, test1-darwin and test2-darwin on an OS-X system,
and a variety of similar cases on linux systems.
@@ -3012,6 +3029,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
visible in latexmk's screen output about invocations of kpse-
which.
+
+
+ 29 September 2020 46
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$landscape_mode [0]
If nonzero, run in landscape mode, using the landscape mode pre-
viewers and dvi to postscript converters. Equivalent to the -l
@@ -3029,17 +3057,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tex, and $xelatex, see the section "Advanced Configuration".
-
-
- 13 September 2020 46
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
%latex_input_extensions
This variable specifies the extensions tried by latexmk when it
finds that a LaTeX run resulted in an error that a file has not
@@ -3077,6 +3094,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Switch(es) for the LaTeX processing program when silent mode is
on.
+
+
+
+ 29 September 2020 47
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
If you use MikTeX, you may prefer the results if you configure
the options to include -c-style-errors, e.g., by the following
line in an initialization file
@@ -3095,17 +3124,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
-
-
- 13 September 2020 47
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
If gsview is installed in a different directory, you will need
to make the appropriate change. Note the combination of single
and double quotes around the name. The single quotes specify
@@ -3141,6 +3159,19 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tex, and $xelatex, see the section "Advanced Configuration".
+
+
+
+
+ 29 September 2020 48
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
%lualatex_input_extensions
This variable specifies the extensions tried by latexmk when it
finds that a lualatex run resulted in an error that a file has
@@ -3161,17 +3192,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Switch(es) for the lualatex program (specified in the variable
$lualatex) when silent mode is on.
-
-
- 13 September 2020 48
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
See details of the $latex_silent_switch for other information
that equally applies to $lualatex_silent_switch.
@@ -3206,6 +3226,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
For almost all programs and for almost all filenames under MS-
Windows, both "\" and "/" are acceptable as the directory sepa-
rator character, provided at least that filenames are properly
+
+
+
+ 29 September 2020 49
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
quoted. But it is possible that programs exist that only accept
"\" on the command line, since that is the standard directory
separator for MS-Windows. So for safety latexmk makes the sub-
@@ -3226,18 +3258,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
viously running previewer on the same file, and if one is run-
ning will not start a new one. If $new_viewer_always is non-
zero, this check will be skipped, and latexmk will behave as if
-
-
-
- 13 September 2020 49
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
no viewer is running.
$out_dir [""]
@@ -3271,8 +3291,20 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
and you need to use makeindex or bibtex, then you need to dis-
able the security measures (and assume any risks). One way of
doing this is to temporarily set an operating system environment
- variable openout_any to "a" (as in "all"), to override the de-
- fault "paranoid" setting.
+ variable openout_any to "a" (as in "all"), to override the
+
+
+
+ 29 September 2020 50
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ default "paranoid" setting.
$pdf_mode [0]
If zero, do NOT generate a pdf version of the document. If
@@ -3292,18 +3324,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
made. In $pdf_mode=3, it is ensured that a .dvi file is also
made. But this may be overridden by the document.
-
-
-
- 13 September 2020 50
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$pdflatex ["pdflatex %O %S"]
Specifies the command line for the LaTeX processing program in a
version that makes a pdf file instead of a dvi file.
@@ -3338,6 +3358,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
See details of the %latex_input_extensions for other information
that equally applies to %pdflatex_input_extensions.
+
+
+
+ 29 September 2020 51
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$pdflatex_silent_switch ["-interaction=batchmode"]
Switch(es) for the pdflatex program (specified in the variable
$pdflatex) when silent mode is on.
@@ -3359,17 +3391,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
file. By default, for pdf files this association is to OS-X's
preview, which is quite satisfactory.
-
-
- 13 September 2020 51
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
WARNING: Problem under MS-Windows: if acroread is used as the
pdf previewer, and it is actually viewing a pdf file, the pdf
file cannot be updated. Thus makes acroread a bad choice of
@@ -3404,6 +3425,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Note that acroread under MS-Windows (but not UNIX) locks the pdf
file, so the default value is then 3.
+
+
+ 29 September 2020 52
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
Arranging to use a command to get a previewer explicitly updated
requires three variables to be set. For example:
@@ -3424,18 +3456,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
variable $pdf_update_method. The default value is the one ap-
propriate for gv on a UNIX system.
-
-
-
- 13 September 2020 52
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$pid_position[1 under UNIX, -1 under MS-Windows]
The variable $pid_position is used to specify which word in
lines of the output from $pscmd corresponds to the process ID.
@@ -3471,6 +3491,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ 29 September 2020 53
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$preview_continuous_mode [0]
If nonzero, run a previewer to view the document, and continue
running latexmk to keep .dvi up-to-date. Equivalent to the -pvc
@@ -3489,19 +3520,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
mended not to be set from an RC file, otherwise you could waste
lots of paper.
-
-
-
-
- 13 September 2020 53
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$print_type = ["auto"]
Type of file to printout: possibilities are "auto", "dvi",
"none", "pdf", or "ps". See the option -print= for the meaning
@@ -3538,6 +3556,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Note that gv could be used with the -watch option updates its
display whenever the postscript file changes, whereas ghostview
+
+
+
+ 29 September 2020 54
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
does not. However, different versions of gv have slightly dif-
ferent ways of writing this option. You can configure this
variable appropriately.
@@ -3557,17 +3587,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
in yourself, whenever it is needed.
-
-
- 13 September 2020 54
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$ps_previewer_landscape ["start gv -swap %O %S", but start %O %S under
MS-Windows]
The command to invoke a ps-previewer in landscape mode.
@@ -3604,6 +3623,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The period of inactivity, in minutes, after which pvc mode times
out. This is used if $pvc_timeout is nonzero.
+
+
+ 29 September 2020 55
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$pvc_view_file_via_temporary [1]
The same as $always_view_file_via_temporary, except that it only
applies in preview-continuous mode (-pvc option).
@@ -3623,17 +3653,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
correctly treated by the operating system in passing arguments
to programs.)
-
-
- 13 September 2020 55
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$recorder [1]
Whether to use the -recorder option to (latex Use of this option
results in a file of extension .fls containing a list of the
@@ -3669,6 +3688,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
output or aux directories.]
The default under MSWin and Cygwin is ';' and under UNIX-like
+
+
+
+ 29 September 2020 56
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
operating systems (including Linux and OS-X) is ':'. Normally
the defaults give correct behavior. But there can be difficul-
ties if your operating system is of one kind, but some of your
@@ -3688,18 +3719,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
silent mode isn't also set), and this is useful to locate unde-
fined citations and references without searching through the
much more verbose log file or the screen output of *latex. But
-
-
-
- 13 September 2020 56
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
the summary can also be excessively annoying. The default is
not to give these warnings. The command line options -si-
lence_logfile_warning_list and -silence_logfile_warning_list-
@@ -3734,6 +3753,19 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$success_cmd [undefined]
See the documentation for $compiling_cmd.
+
+
+
+
+ 29 September 2020 57
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$tmpdir [See below for default]
Directory to store temporary files that latexmk may generate
while running.
@@ -3754,18 +3786,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
gram.
Note that once a missing file has been made, no further calls to
-
-
-
- 13 September 2020 57
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
make will be made on a subsequent run of latexmk to update the
file. Handling this problem is the job of a suitably defined
Makefile. See the section "USING latexmk WITH make" for how to
@@ -3800,6 +3820,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The default behavior is normally satisfactory in the usual edit-
compile-edit cycle. But, for example, latexmk can also be used
+
+
+
+ 29 September 2020 58
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
as part of a build process for some bigger project, e.g., for
creating documentation in the build of a software application.
Then it is often sensible to treat citation and reference warn-
@@ -3821,17 +3853,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
that one or more of the commands isn't set.)
-
-
- 13 September 2020 58
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$xdvipdfmx ["xdvipdfmx -E -o %D %O %S"]
The program to make a pdf file from an xdv file (used in con-
@@ -3865,6 +3886,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
not been found, and the file is given without an extension.
This typically happens when LaTeX commands of the form \in-
put{file} or \includegraphics{figure}, when the relevant source
+
+
+
+ 29 September 2020 59
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
file does not exist.
In this situation, latexmk searches for custom dependencies to
@@ -3885,19 +3918,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-
-
- 13 September 2020 59
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
CUSTOM DEPENDENCIES
In any RC file a set of custom dependencies can be set up to convert a
file with one extension to a file with another. An example use of this
@@ -3932,6 +3952,18 @@ CUSTOM DEPENDENCIES
must: If non-zero, the file from which we are converting must exist,
if it doesn't exist latexmk will give an error message and exit
unless the -f option is specified. If must is zero and the file
+
+
+
+ 29 September 2020 60
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
we are converting from doesn't exist, then no action is taken.
Generally, the appropriate value of must is zero.
@@ -3954,16 +3986,6 @@ CUSTOM DEPENDENCIES
tom dependencies to be sent to the screen output.
-
- 13 September 2020 60
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
How custom dependencies are used:
An instance of a custom dependency rule is created whenever latexmk de-
tects that a run of *latex needs to read a file, like a graphics file,
@@ -3996,6 +4018,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Note for advanced usage: The operating system's environment variable
TEXINPUTS can be used to specify a search path for finding files by la-
tex etc. Correspondingly, when a missing file is reported, latexmk
+
+
+
+ 29 September 2020 61
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
looks in the directories specified in TEXINPUTS as well as in the cur-
rent directory, to find a source file from which an instance of a cus-
tom dependency can be used to make the missing file.
@@ -4017,20 +4051,8 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The first line adds a custom dependency that converts a file with ex-
tension "fig", as created by the xfig program, to an encapsulated post-
- script file, with extension "eps". The remaining lines define a
-
-
-
- 13 September 2020 61
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- subroutine that carries out the conversion. If a rule for converting
+ script file, with extension "eps". The remaining lines define a sub-
+ routine that carries out the conversion. If a rule for converting
"fig" to "eps" files already exists (e.g., from a previously read-in
initialization file), the latexmk will delete this rule before making
the new one.
@@ -4062,6 +4084,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
}
Note 1: In the command lines given in the system commands in the above
+
+
+
+ 29 September 2020 62
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
examples, double quotes have been inserted around the file names (im-
plemented by '\"' in the Perl language). They immunize the running of
the program against special characters in filenames. Very often these
@@ -4084,18 +4118,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Note 3: The subroutines implementing custom dependencies in the exam-
ples given just have a single line invoking an external program.
That's the usual situation. But since the subroutines are in the Perl
-
-
-
- 13 September 2020 62
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
language, you can implement much more complicated processing if you
need it.
@@ -4127,13 +4149,25 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
file. This method has been available since very old versions of la-
texmk, and many examples can be found, e.g., on the web.
- However in later versions of latexmk the internal structure of the im-
- plementation of its "rules" for the steps of processing, including cus-
- tom dependencies, became much more powerful. The function implementing
- a custom dependency is executed within a special context where a number
- of extra variables and subroutines are defined. Publicly documented
- ones, intended to be long-term stable, are listed below, under the
- heading "Variables and subroutines for processing a rule".
+ However in later versions of latexmk the internal structure of the
+
+
+
+ 29 September 2020 63
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ implementation of its "rules" for the steps of processing, including
+ custom dependencies, became much more powerful. The function imple-
+ menting a custom dependency is executed within a special context where
+ a number of extra variables and subroutines are defined. Publicly doc-
+ umented ones, intended to be long-term stable, are listed below, under
+ the heading "Variables and subroutines for processing a rule".
Examples of their use is given in the following examples, concerning
multiple index files and glossaries.
@@ -4150,18 +4184,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
follows:
add_cus_dep( 'ndx', 'nnd', 0, 'ndx2nnd' );
-
-
-
- 13 September 2020 63
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
sub ndx2nnd {
return system( "makeindex -o \"$_[0].nnd\" \"$_[0].ndx\"" );
}
@@ -4194,6 +4216,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
push @generated_exts, 'ndx', 'nnd', 'adx', 'and';
This last example uses the command specification in $makeindex, and so
+
+
+
+ 29 September 2020 64
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
any customization you have made for the standard index also applies to
your extra indexes.
@@ -4215,24 +4249,12 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Old Method of Defining Custom Dependencies:
In much older versions of latexmk, the only method of defining custom
- dependencies was to directly manipulate the table of custom
-
-
-
- 13 September 2020 64
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- dependencies. This is contained in the @cus_dep_list array. It is an
- array of strings, and each string in the array has four items in it,
- each separated by a space, the from-extension, the to-extension, the
- "must" item, and the name of the subroutine for the custom dependency.
- These were all defined above.
+ dependencies was to directly manipulate the table of custom dependen-
+ cies. This is contained in the @cus_dep_list array. It is an array of
+ strings, and each string in the array has four items in it, each sepa-
+ rated by a space, the from-extension, the to-extension, the "must"
+ item, and the name of the subroutine for the custom dependency. These
+ were all defined above.
An example of the old method of defining custom dependencies is as fol-
lows. It is the code in an RC file to ensure automatic conversion of
@@ -4259,8 +4281,20 @@ ADVANCED CONFIGURATION: Some extra resources and advanced tricks
See also the section DEALING WITH ERRORS, PROBLEMS, ETC. See also the
examples in the directory example_rcfiles in the latexmk distributions.
- Even if none of the examples apply to your case, they may give you use-
- ful ideas
+ Even if none of the examples apply to your case, they may give you
+
+
+
+ 29 September 2020 65
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ useful ideas
Utility subroutines
@@ -4283,17 +4317,6 @@ ADVANCED CONFIGURATION: Some extra resources and advanced tricks
to mean that *latex search for files in the specified directory
and in all subdirectories.)
-
-
- 13 September 2020 65
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
Technically ensure_path works by setting Perl's variable
$ENV{var}, where var is the name of the target variable. The
changed value is then passed as an environment variable to any
@@ -4324,6 +4347,19 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This gives the name of the primary source file. Note the double
dollar signs.
+
+
+
+
+ 29 September 2020 66
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$$Pdest
This gives the name of the main output file if any. Note the
double dollar signs.
@@ -4348,18 +4384,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This subroutine removes one or more files from the dependency
list for the given rule.
-
-
-
- 13 September 2020 66
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
rdb_list_source( $rule )
This subroutine returns the list of source files (i.e., the de-
pendency list) for the given rule.
@@ -4390,6 +4414,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
pattern, you can use one of the following subroutines, std_tex_cmds,
alt_tex_cmds, and set_tex_cmds.
+
+
+
+ 29 September 2020 67
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
They work as follows
&std_tex_cmds;
@@ -4413,19 +4449,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
set_tex_cmds( '--interaction=batchmode %O %S' );
-
-
-
-
- 13 September 2020 67
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
Advanced configuration: Using latexmk with make
This section is targeted only at advanced users who use the make pro-
gram for complex projects, as for software development, with the depen-
@@ -4456,9 +4479,21 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
could be quite complicated, for example if some of the source files for
a LaTeX document are generated by the project's software.
- In this section, I give a couple of examples of how latexmk can be use-
- fully invoked from a Makefile. The examples use specific features of
- current versions of GNU make, which is the default on both linux and
+ In this section, I give a couple of examples of how latexmk can be
+
+
+
+ 29 September 2020 68
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ usefully invoked from a Makefile. The examples use specific features
+ of current versions of GNU make, which is the default on both linux and
OS-X systems. They may need modifications for other versions of make.
The simplest method is simply to delegate all the relevant tasks to la-
@@ -4480,18 +4515,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The above example has a pattern rule for making a .pdf file from a .tex
file, and it is defined to use latexmk in the obvious way. There is a
-
-
-
- 13 September 2020 68
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
conventional default target named "all", with a prerequisite of
try.pdf. So when make is invoked, by default it makes try.pdf. The
only complication is that there may be many source files beyond
@@ -4523,6 +4546,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
mkdir $@
%.pdf : %.tex
if [ ! -e $(DEPS_DIR) ]; then mkdir $(DEPS_DIR); fi
+
+
+
+ 29 September 2020 69
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$(LATEXMK) -pdf -dvi- -ps- -deps-out=$(DEPS_DIR)/$@P $<
%.pdf : %.fig
fig2dev -Lpdf $< $@
@@ -4546,18 +4581,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tion, which improves its detection of files generated during a run of
pdflatex; such files should not be in the dependency list. The -e op-
tions are used to turn off all custom dependencies, and to document
-
-
-
- 13 September 2020 69
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
this. Instead the -use-make is used to delegate the making of missing
files to make itself.
@@ -4589,6 +4612,18 @@ BUGS
manual update (reopen); it views postscript and pdf. Gsview under MS-
Windows works for both postscript and pdf, but only reads the updated
file when its screen is refreshed. Acroread under UNIX/Linux views
+
+
+
+ 29 September 2020 70
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
pdf, but the file needs to be closed and reopened to view an updated
version. Under MS-Windows, acroread locks its input file and so the
pdf file cannot be updated. (Remedy: configure latexmk to use suma-
@@ -4602,8 +4637,8 @@ THANKS TO
dard form to avoid being harvested too easily.)
AUTHOR
- Current version, by John Collins (username jcc8 at node psu.edu).
- (Version 4.70a).
+ Current version, by John Collins (Version 4.70b). Report bugs etc to
+ his e-mail (jcc8 at psu.edu).
Released version can be obtained from CTAN:
<http://www.ctan.org/pkg/latexmk/>, and from the author's website
@@ -4615,41 +4650,6 @@ AUTHOR
- 13 September 2020 70
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -4681,6 +4681,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
- 13 September 2020 71
+ 29 September 2020 71
diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl
index 0f5c35988f5..a05e938f912 100755
--- a/Master/texmf-dist/scripts/latexmk/latexmk.pl
+++ b/Master/texmf-dist/scripts/latexmk/latexmk.pl
@@ -36,7 +36,7 @@ use warnings;
## ?? Issues with clean-up
## List of aux files deleted is those read, not those generated.
-## Other files are generated by (pdf)latex; should they be deleted?
+## Other files are generated by *latex; should they be deleted?
## (I have hooks for this).
@@ -162,6 +162,12 @@ use warnings;
##
## 12 Jan 2012 STILL NEED TO DOCUMENT some items below
##
+## 29 Sep 2020 John Collins V. 4.70b.
+## Correct switch_output.
+## Try to ensure bibtex isn't given absolute pathname, when aux_dir
+## is under current directory. (Otherwise bibtex isn't allowed
+## to write a bbl file under default TeXLive settings.)
+## Add options -bibfudge, -bibfudge-, -nobibfudge.
## 13 Sep 2020 John Collins V. 4.70a. Updates in comments about bibtex.
## 28 Aug 2020 John Collins Correct $biber and $bibtex to use %S not %B
## 24 Aug 2020 John Collins Make sure bibtex/biber rules when created for
@@ -296,7 +302,6 @@ use warnings;
##
##-----------------------------------------------------------------------
-
## Explicit exit codes:
## 10 = bad command line arguments
## 11 = file specified on command line not found
@@ -308,8 +313,8 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.70a';
-$version_details = "$My_name, John Collins, 13 September 2020";
+$version_num = '4.70b';
+$version_details = "$My_name, John Collins, 29 September 2020";
use Config;
use File::Basename;
@@ -506,7 +511,7 @@ foreach ( 'dvi', 'dviF', 'ps', 'psF', 'pdf', 'synctex.gz', 'xdv' ) {
# Information about options to latex and pdflatex that latexmk will simply
-# pass through to (pdf)latex
+# pass through to *latex
# Option without arg. maps to itself.
# Option with arg. maps the option part to the full specification
# e.g., -kpathsea-debug => -kpathsea-debug=NUMBER
@@ -611,7 +616,7 @@ foreach (
" called or a %& line.",
#####
- # Options passed to (pdf)latex that have special processing by latexmk,
+ # Options passed to *latex that have special processing by latexmk,
# so they are commented out here.
#-jobname=STRING set the job name to STRING
#-aux-directory=dir Set the directory dir to which auxiliary files are written
@@ -619,7 +624,7 @@ foreach (
#-quiet
#-recorder enable filename recorder
#
- # Options with different processing by latexmk than (pdf)latex
+ # Options with different processing by latexmk than *latex
#-help
#-version
#
@@ -1219,9 +1224,9 @@ $jobname = ''; # Jobname: as with current tex, etc indicates
# useful when a jobname is used and latexmk is
# invoked on multiple files.
$out_dir = ''; # Directory for output files.
- # Cf. --output-directory of current (pdf)latex
+ # Cf. --output-directory of current *latex
$aux_dir = ''; # Directory for aux files (log, aux, etc).
- # Cf. --aux-directory of current (pdf)latex in MiKTeX.
+ # Cf. --aux-directory of current *latex in MiKTeX.
## default flag settings.
@@ -1253,14 +1258,14 @@ $analyze_input_log_always = 1; # Always analyze .log for input files in the
# $analyze_input_log_always to 1.
# The following two arrays contain lists of extensions (without
-# period) for files that are read in during a (pdf)LaTeX run but that
+# period) for files that are read in during a *LaTeX run but that
# are generated automatically from the previous run, as opposed to
# being user generated files (directly or indirectly from a custom
# dependency). These files get two kinds of special treatment:
# 1. In clean up, where depending on the kind of clean up, some
# or all of these generated files are deleted.
# (Note that special treatment is given to aux files.)
-# 2. In analyzing the results of a run of (pdf)LaTeX, to
+# 2. In analyzing the results of a run of *LaTeX, to
# determine if another run is needed. With an error free run,
# a rerun should be provoked by a change in any source file,
# whether a user file or a generated file. But with a run
@@ -1313,7 +1318,7 @@ $cleanup_fdb = 0; # No removal of file for latexmk's file-database
$cleanup_only = 0; # When doing cleanup, do not go on to making files
$cleanup_includes_generated = 0;
# Determines whether cleanup deletes files generated by
- # (pdf)latex (found from \openout lines in log file).
+ # *latex (found from \openout lines in log file).
# It's more than that. BUG
$cleanup_includes_cusdep_generated = 0;
# Determines whether cleanup deletes files generated by
@@ -1581,7 +1586,7 @@ $allow_switch = 1; # Allow switch of rule structure to accommodate
# not a generated file (e.g., aux). This
# kind of out-of-dateness should provoke a
# rerun whether or not there was an error
- # during a run of (pdf)LaTeX. Normally,
+ # during a run of *LaTeX. Normally,
# if there is an error, one should wait
# for the user to correct the error. But
# it is possible the error condition is
@@ -1781,13 +1786,15 @@ $bad_options = 0;
while ($_ = $ARGV[0])
{
# Make -- and - equivalent at beginning of option,
- # but save original for possible use in (pdf)latex command line
+ # but save original for possible use in *latex command line
$original = $_;
s/^--/-/;
shift;
if ( /^-aux-directory=(.*)$/ || /^-auxdir=(.*)$/ ) {
$aux_dir = $1;
}
+ elsif (/^-bibfudge$/) { $bibtex_fudge = 1; }
+ elsif (/^-bibfudge-$/) { $bibtex_fudge = 0; }
elsif (/^-bibtex$/) { $bibtex_use = 2; }
elsif (/^-bibtex-$/) { $bibtex_use = 0; }
elsif (/^-nobibtex$/) { $bibtex_use = 0; }
@@ -1866,6 +1873,7 @@ while ($_ = $ARGV[0])
$auto_rc_use = 0;
# N.B. This has already been obeyed.
}
+ elsif (/^-nobibfudge$/) { $bibtex_fudge = 0; }
elsif ( /^-output-directory=(.*)$/ ||/^-outdir=(.*)$/ ) {
$out_dir = $1;
}
@@ -1929,16 +1937,16 @@ while ($_ = $ARGV[0])
elsif (/^-norules$/ || /^-rules-$/ ) { $rules_list = 0; }
elsif (/^-showextraoptions$/) {
print "List of extra latex and pdflatex options recognized by $my_name.\n",
- "These are passed as is to (pdf)latex. They may not be recognized by\n",
- "particular versions of (pdf)latex. This list is a combination of those\n",
+ "These are passed as is to *latex. They may not be recognized by\n",
+ "particular versions of *latex. This list is a combination of those\n",
"for TeXLive and MikTeX.\n",
"\n",
"Note that in addition to the options in this list, there are several\n",
- "options known to the (pdf)latex programs that are also recognized by\n",
+ "options known to the *latex programs that are also recognized by\n",
"latexmk and trigger special behavior by latexmk. Since these options\n",
"appear in the main list given by running 'latexmk --help', they do not\n",
"appear in the following list\n",
- "NOTE ALSO: Not all of these options are supported by all versions of (pdf)latex.\n",
+ "NOTE ALSO: Not all of these options are supported by all versions of *latex.\n",
"\n";
foreach $option ( sort( keys %allowed_latex_options, keys %allowed_latex_options_with_arg ) ) {
if (exists $allowed_latex_options{$option} ) { print " $allowed_latex_options{$option}\n"; }
@@ -2239,7 +2247,7 @@ if ( $recorder ) {
add_option( "-recorder", \$latex, \$pdflatex, \$lualatex, \$xelatex );
}
-# If the output and/or aux directories are specified, fix the (pdf)latex
+# If the output and/or aux directories are specified, fix the *latex
# commands to use them.
# N.B. We'll ensure that the directories actually exist only after a
# possible cd to the document directory, since the directories can be
@@ -2579,8 +2587,8 @@ foreach $filename ( @file_list )
local %dependents = (); # Maps files to status. Not used here.
local @bbl_files = (); # Not used here.
local %idx_files = (); # Maps idx_file to (ind_file, base). Not used here.
- local %conversions = (); # (pdf)latex-performed conversions. Not used here.
- # Maps output file created and read by (pdf)latex
+ local %conversions = (); # *latex-performed conversions. Not used here.
+ # Maps output file created and read by *latex
# to source file of conversion.
local $primary_out = ''; # Actual output file (dvi or pdf). Not used here.
local $fls_file_analyzed = 0;
@@ -2826,7 +2834,7 @@ if ($failure_count > 0) {
if ( $where_log == 2 ) {
warn "$My_name: You requested aux_dir '$aux_dir_requested',\n".
- " but '$aux_dir' was used by the (pdf)latex engine.\n".
+ " but '$aux_dir' was used by the *latex engine.\n".
" That indicates a configuration error.\n";
if ( ($tex_distribution !~ /^MiKTeX/i) && ($aux_dir_requested ne $out_dir_requested) ) {
warn " Probably you set different aux and out directories,\n".
@@ -2836,7 +2844,6 @@ if ( $where_log == 2 ) {
}
-
# end MAIN PROGRAM
#############################################################
#############################################################
@@ -3239,7 +3246,7 @@ sub one_from_main_rule_cache {
warn "$My_name: Possible bug:\n",
" In linking rules I already set from_rules_main{$$Pdest} to '$old_rule'\n",
" But now I want to set it to '$rule'\n";
-#???? traceback();
+# traceback( "================================\nFrom one_from_main_rule_cache" );
}
}
$from_rules_main{$$Pdest} = $rule;
@@ -3258,7 +3265,7 @@ sub one_from_rule_cache {
# OK
}
elsif ( exists $from_rules_main{$_} && ( $from_rules_main{$_} ne $rule ) ) {
- warn "$My_name: Possible problem:\n",
+ warn "$My_name: Possible bug:\n",
" In linking rules, I already set from_rules_main{$_}\n".
" to '$from_rules_main{$_}'\n",
" But now I also have a different rule '$rule' that also made the file.\n";
@@ -3279,7 +3286,7 @@ sub one_from_rule_cache {
warn "$My_name: Possible bug:\n",
" In linking rules I already set from_rules{$_} to '$old_rule'\n",
" But now I want to set it to '$rule'\n";
-#???? traceback();
+# traceback( "================================\nFrom one_from__rule_cache" );
}
}
$from_rules{$_} = $rule;
@@ -3292,7 +3299,7 @@ sub set_trivial_aux_fdb {
# 1. Write aux file EXACTLY as would be written if the tex file
# had no cross references, etc. I.e., a minimal .aux file.
# 2. Write a corresponding fdb file
- # 3. Provoke a run of (pdf)latex (actually of all primaries).
+ # 3. Provoke a run of *latex (actually of all primaries).
local *aux_file;
open( aux_file, '>', $aux_main )
@@ -3679,13 +3686,13 @@ CHANGE:
# There will be files changed during the run that are irrelevant.
# We need to wait for the user to change the files.
- # So set the GENERATED files from (pdf)latex as up-to-date:
+ # So set the GENERATED files from *latex as up-to-date:
rdb_for_some( [keys %current_primaries], \&rdb_update_gen_files );
# And don't watch for changes for post_primary rules (ps and pdf
- # from dvi, etc haven't been run after an error in (pdf)latex, so
+ # from dvi, etc haven't been run after an error in *latex, so
# are out-of-date by filetime criterion, but they should not be run
- # until after another (pdf)latex run:
+ # until after another *latex run:
foreach (@post_primary) { delete $rules_to_watch{$_}; }
$failure_msg =~ s/\s*$//; #Remove trailing space
@@ -3918,8 +3925,9 @@ sub die_trace {
#************************************************************
sub traceback {
- # Call: &traceback
- # or traceback( message, )
+ # Call: traceback()
+ # or traceback( message )
+ # NOT &traceback!!!
my $msg = shift;
if ($msg) { warn "$msg\n"; }
warn "Traceback:\n";
@@ -3990,6 +3998,8 @@ sub print_help
" -bibtex-cond - use bibtex when needed, but only if the bib file exists\n",
" -bibtex-cond1 - use bibtex when needed, but only if the bib file exists;\n",
" on cleanup delete bbl file only if bib file exists\n",
+ " -bibfudge - use change-directory fudge needed for old bibtexs\n",
+ " -bibfudge- - don't use change-directory fudge needed for old bibtexs\n",
" -bm <message> - Print message across the page when converting to postscript\n",
" -bi <intensity> - Set contrast or intensity of banner\n",
" -bs <scale> - Set scale for banner\n",
@@ -4030,11 +4040,11 @@ sub print_help
" -l- - turn off -l\n",
" -latex=<program> - set program used for latex.\n",
" (replace '<program>' by the program name)\n",
- " -latexoption=<option> - add the given option to the (pdf)latex command\n",
+ " -latexoption=<option> - add the given option to the *latex command\n",
" -logfilewarninglist or -logfilewarnings \n",
- " give list of warnings after run of (pdf)latex\n",
+ " give list of warnings after run of *latex\n",
" -logfilewarninglist- or -logfilewarnings- \n",
- " do not give list of warnings after run of (pdf)latex\n",
+ " do not give list of warnings after run of *latex\n",
" -lualatex - use lualatex for processing files to pdf\n",
" and turn dvi/ps modes off\n",
" -M - Show list of dependent files after processing\n",
@@ -4047,6 +4057,7 @@ sub print_help
" -new-viewer - in -pvc mode, always start a new viewer\n",
" -new-viewer- - in -pvc mode, start a new viewer only if needed\n",
" -nobibtex - never use bibtex\n",
+ " -nobibfudge - don't use change-directory fudge needed for old bibtexs\n",
" -nodependents - Do not show list of dependent files after processing\n",
" -norc - omit automatic reading of system, user and project rc files\n",
" -output-directory=dir or -outdir=dir\n",
@@ -4086,9 +4097,9 @@ sub print_help
" -r <file> - Read custom RC file\n",
" (N.B. This file could override options specified earlier\n",
" on the command line.)\n",
- " -recorder - Use -recorder option for (pdf)latex\n",
+ " -recorder - Use -recorder option for *latex\n",
" (to give list of input and output files)\n",
- " -recorder- - Do not use -recorder option for (pdf)latex\n",
+ " -recorder- - Do not use -recorder option for *latex\n",
" -rules - Show list of rules after processing\n",
" -rules- - Do not show list of rules after processing\n",
" -showextraoptions - Show other allowed options that are simply passed\n",
@@ -4230,7 +4241,7 @@ sub check_biber_log {
}
elsif ( /> ERROR - .*\.bcf is malformed/ ) {
# Special treatment: Malformed .bcf file commonly results from error
- # in (pdf)latex run. This error must be ignored.
+ # in *latex run. This error must be ignored.
$control_file_malformed = 1;
}
else {
@@ -4381,7 +4392,7 @@ sub check_bibtex_log {
# 3: could not open .blg file.
# 10: only error is missing \citation commands or a missing aux file
# (which would normally be corrected after a later run of
- # (pdf)latex).
+ # *latex).
my $base = $_[0];
my $blg_name = "$base.blg";
@@ -4416,7 +4427,7 @@ sub check_bibtex_log {
if ( $#missing_aux > -1 ) {
# Need to make the missing files.
warn "$My_name: One or more aux files is missing for bibtex. I'll try\n",
- " to get (pdf)latex to remake them.\n";
+ " to get *latex to remake them.\n";
rdb_for_some( [keys %current_primaries], sub{ $$Pout_of_date = 1; } );
}
#print "Bibtex errors = $error_count, missing aux files and citations = $missing\n";
@@ -4425,7 +4436,7 @@ sub check_bibtex_log {
# If the only error is a missing citation line, that should only
# count as a warning.
# Also a missing aux file should be innocuous; it will be created on
- # next run of (pdf)latex. ?? HAVE I HANDLED THAT CORRECTLY?
+ # next run of *latex. ?? HAVE I HANDLED THAT CORRECTLY?
# But have to deal with the problem that bibtex gives a non-zero
# exit code. So leave things as they are so that the user gets
# a better diagnostic ??????????????????????????
@@ -4549,7 +4560,7 @@ sub parse_log {
# Treat the following specially, since they have special rules
# @bbl_files to list of .bbl files.
# %idx_files to map from .idx files to .ind files.
-# %generated_log: keys give set of files written by (pdf)latex (e.g., aux, idx)
+# %generated_log: keys give set of files written by *latex (e.g., aux, idx)
# as determined by \openout = ... lines in log file.
# @missing_subdirs = list of needed subdirectories of aux_dir
# These are needed for writing aux_files when an included file is in
@@ -4890,7 +4901,7 @@ LINE:
}
# Typically, there is trailing space, not part of filename:
$idx_file =~ s/\s*$//;
- # When (pdf)latex is run with an -output-directory
+ # When *latex is run with an -output-directory
# or an -aux_directory, the file name does not contain
# the output path; fix this, after removing quotes:
$idx_file = normalize_force_directory( $aux_dir1, $idx_file );
@@ -4917,16 +4928,10 @@ LINE:
next LINE;
}
elsif ( /^No file (.*?\.bbl)./ ) {
- my $bbl_file = clean_filename($1);
+ my $bbl_file = normalize_force_directory( $aux_dir1, $1);
my $aux_file = $bbl_file;
$aux_file =~ s/\.bbl$/\.aux/;
- # When aux dir used (may equal out dir), name of missing file fails
- # to have correct directory. If corresponding aux file exists,
- # with name prefixed by aux dir, then apply prefix to bbl_file.
- if (-e $aux_dir1 . $aux_file) {
- $bbl_file = $aux_dir1 . $bbl_file;
- }
- warn "$My_name: Non-existent bbl file '$bbl_file'\n $_\n";
+ warn "$My_name: Non-existent bbl file '$bbl_file in line'\n $_\n";
$dependents{$bbl_file} = 0;
push @bbl_files, $bbl_file;
next LINE;
@@ -4961,7 +4966,7 @@ LINE:
# First line of message from includegraphics/x
# But this does NOT include full path information
# (if exact match is not found and a non-trivial
- # kpsearch was done by (pdf)latex).
+ # kpsearch was done by *latex).
# But the source-file information is in the fls file,
# if we are using it.
$dependents{normalize_clean_filename($1, @pwd_log)} = 1;
@@ -5313,8 +5318,8 @@ CANDIDATE_PAIR:
print "Dependents:\n";
foreach (@dependents) {
print " '$_' ";
- if ( $dependents{$_} == 6 ) { print " written by (pdf)latex";}
- if ( $dependents{$_} == 7 ) { print " converted by (pdf)latex";}
+ if ( $dependents{$_} == 6 ) { print " written by *latex";}
+ if ( $dependents{$_} == 7 ) { print " converted by *latex";}
print "\n";
}
if ($not_found > 0) {
@@ -5388,7 +5393,7 @@ sub find_set_log {
$$Plast_result = 2;
$where_log = 0;
$failure_msg
- = "(Pdf)LaTeX didn't generate the expected log file '$log_name'\n";
+ = "*LaTeX didn't generate the expected log file '$log_name'\n";
}
if ($where_log > 1) {
warn "$My_name: Changed aux_dir from '$aux_dir_requested' to '$aux_dir'\n".
@@ -5414,12 +5419,12 @@ sub parse_fls {
# I'll update it from the fls file later
# Currently I don't use this, but it would be useful to use
# this when testing prefix for cwd in a filename, by
- # giving (pdf)latex's best view of the cwd. Note that the
+ # giving *latex's best view of the cwd. Note that the
# value given by the cwd() function may be mangled, e.g., by cygwin
# compared with native MSWin32.
#
# Two relevant forms of cwd exist: The system one, which we can find, and
- # the one reported by (pdf)latex in the fls file. It will be
+ # the one reported by *latex in the fls file. It will be
# useful to remove leading part of cwd in filenames --- see the
# comments in sub rdb_set_latex_deps. Given the possible multiplicity
# of representations of cwd, the one reported in the fls file should
@@ -6044,7 +6049,7 @@ sub rdb_read_set_rule {
}
else {
warn " ===== CHANGING output type from '$newext' to '$oldext' in '$rule'\n";
- my $switch_error = switch_output( $oldext, $newext );
+ my $switch_error = switch_output( $rule, $oldext, $newext );
if ($switch_error) {
warn " I could not accommodate the changed output extension.\n",
" That is either because the configuration does not allow it\n",
@@ -6114,7 +6119,7 @@ sub rdb_write {
#************************************************************
sub rdb_set_latex_deps {
- # Assume rule context.
+ # Assume primary rule context.
# This is intended to be applied only for a primary (LaTeX-like) rule.
# Set its dependents etc, using information from log, aux, and fls files.
# Use fls file only if $recorder is set, and the fls file was generated
@@ -6127,7 +6132,7 @@ sub rdb_set_latex_deps {
# of the difficulties that do arise, between, on the one hand,
# the filenames specified on latexmk's and the cwd found by
# latexmk from the system, and, on the other hand, the filenames
- # and their components reported by (pdf)latex in the fls and log
+ # and their components reported by *latex in the fls and log
# files:
# 1. Whether the separator of path components is / or \ in
# MSWin.
@@ -6161,7 +6166,7 @@ sub rdb_set_latex_deps {
# command line depends on whether the command line is
# executed by a CLI, and by which CLI. (E.g., cmd.exe,
# v. sh v. tcsh, etc.)
- # 10. Whether such a filename for the filename on (pdf)latex's
+ # 10. Whether such a filename for the filename on *latex's
# file agrees with the one on the command line.
# The above questions have arisen from actual experiences and
# tests.
@@ -6196,7 +6201,7 @@ sub rdb_set_latex_deps {
# current directory, it will be important to preferentially use
# a determination of the current directory from the file being
# processed. In the fls file, there is normally a PWD line. In
- # the log file, if (pdf)latex is started with a filename instead
+ # the log file, if *latex is started with a filename instead
# of a command-executing first line, then this can be determined
# from the first few lines of the log file -- see parse_log.
# This gives a more reliable determination of the relevant path
@@ -6241,12 +6246,12 @@ sub rdb_set_latex_deps {
# after being written (so are not true
# source files.
local $primary_out = $$Pdest; # output file (dvi or pdf)
- local %conversions = (); # (pdf)latex-performed conversions.
- # Maps output file created and read by (pdf)latex
+ local %conversions = (); # *latex-performed conversions.
+ # Maps output file created and read by *latex
# to source file of conversion.
local @missing_subdirs = (); # Missing subdirectories in aux_dir
- local $pwd_latex = undef; # Cwd as reported in fls file by (pdf)latex
+ local $pwd_latex = undef; # Cwd as reported in fls file by *latex
local %created_rules = (); # Maps files to rules existing or created to
# make them. Use to avoid misunderstood
@@ -6265,7 +6270,7 @@ sub rdb_set_latex_deps {
if ( /^eps pdf / ) { $epspdf_cusdep = 1; last; }
}
- # Analyze fls file first. It tells us the working directory as seen by (pdf)latex
+ # Analyze fls file first. It tells us the working directory as seen by *latex
# But we'll use the results later, so that they take priority over the findings
# from the log file.
local $fls_file_analyzed = 0;
@@ -6354,7 +6359,7 @@ sub rdb_set_latex_deps {
# source file.
my $base = $1;
if ( (-e $conv_source) && (-e $conv) && ( $conv_source eq "$base.eps" ) ) {
- # $conv isn't a real source of (pdf)latex
+ # $conv isn't a real source of *latex
rdb_remove_files( $rule, $conv );
delete $dependents{$conv};
if ($epspdf_cusdep) {
@@ -6374,7 +6379,7 @@ sub rdb_set_latex_deps {
# no content, or because of a missing input file. Since a
# missing input file might be correctable by a run of some
# other program whose running is provoked AFTER a run of
- # (pdf)latex, we'll set a diagnostic and leave it to the
+ # *latex, we'll set a diagnostic and leave it to the
# rdb_make to handle after all circular dependencies are
# resolved.
# 2. The output file might be of a different kind than expected
@@ -6398,7 +6403,7 @@ sub rdb_set_latex_deps {
" is not one I know about. I cannot handle this\n";
}
else {
- my $switch_error = switch_output( $actual_ext, $intended_ext );
+ my $switch_error = switch_output( $rule, $actual_ext, $intended_ext );
if ( $switch_error ) {
warn " I could not accommodate the changed output extension\n",
" (either because the configuration does not allow it\n",
@@ -6553,14 +6558,14 @@ NEW_SOURCE:
rdb_ensure_file( $rule, $new_source, undef, 1 );
}
elsif ( $dependents{$new_source} == 7 ) {
- # File was result of conversion by (pdf)latex.
+ # File was result of conversion by *latex.
my $cnv_source = $conversions{$new_source};
rdb_ensure_file( $rule, $new_source );
# if ($cnv_source && ($cnv_source !~ /\"/ ) ) {
if ($cnv_source ) {
# Conversion from $cnv_source to $new_source
# implies that effectively $cnv_source is a source
- # of the (pdf)latex run.
+ # of the *latex run.
rdb_ensure_file( $rule, $cnv_source );
}
# Flag that changes of the generated file during a run
@@ -6636,20 +6641,23 @@ NEW_SOURCE:
#************************************************************
sub switch_output {
- # Assume rule context for primary rule
+ # Usage: switch_output( primary_rule, actual_ext, intended_ext )
+ # Rearrange rules to deal with changed extension of output file of
+ # the specified primary rule (one of *latex).
# Return 0 on success, non-zero error code on failure
- my ( $actual_ext, $intended_ext ) = @_;
- if ( $actual_ext eq $intended_ext) { return 0; }
+ my ( $rule, $actual_ext, $intended_ext ) = @_;
+ if ( $actual_ext eq $intended_ext ) { return 0; }
if ( ! $can_switch ) { return 1; }
- if ( $intended_ext eq '.dvi' ) {
- rdb_deactivate_derequest( 'dvipdf', 'pspdf' );
- }
- elsif ( $intended_ext eq '.xdv' ) {
- rdb_deactivate_derequest( 'xdvipdfmx' );
+ if (! defined $possible_primaries{$rule} ) {
+ warn "$My_name: BUG: subroutine switch_output called with non-primary rule '$rule'\n";
+ return 1;
}
- else { }
+
+ rdb_deactivate_derequest( 'dvipdf', 'pspdf', 'xdvipdfmx', keys %possible_primaries );
+
+ rdb_activate_request( $rule );
if ( $actual_ext eq '.dvi' ) {
rdb_activate_request( 'dvipdf' );
@@ -6687,7 +6695,7 @@ sub switch_output {
sub test_gen_file {
# Usage: test_gen_file( filename )
- # Tests whether the file was generated during a run of (pdf)latex.
+ # Tests whether the file was generated during a run of *latex.
# Assumes context for primary rule.
# Two kinds of test are used:
# a. From %generated_log, which works after the log file has been parsed,
@@ -6970,11 +6978,11 @@ DEP:
# Put file in rule, without a from_rule, but
# set its state as non-existent, to correspond
# to file's state before the file was made
- # This ensures a rerun of (pdf)latex is provoked.
+ # This ensures a rerun of *latex is provoked.
rdb_ensure_file( $rule, $new_dest, undef, 1 );
push @new_sources, $new_dest;
push @deletions, [$rule, $file];
- # Flag need for a new run of (pdf)latex despite
+ # Flag need for a new run of *latex despite
# the error due to a missing file.
$$Pout_of_date_user = 1;
return;
@@ -7158,12 +7166,12 @@ sub rdb_make {
# situation is an example of a generic situation where certain
# rules must be obeyed in order to obtain proper results:
# 1. A/the latex source file contains specifications for
- # certain postprocessing operations. Standard (pdf)latex
+ # certain postprocessing operations. Standard *latex
# already has this, for indexing and bibliography.
# 2. In the case in point that caused me trouble, the
# specification was for musical tunes that were contained
# in external source files not directly input to
- # (pdf)latex. But in the original version, there was a
+ # *latex. But in the original version, there was a
# style file (abc.sty) that caused latex itself to call
# abcm2ps to make .eps files for each tune that were to be
# read in on the next run of latex.
@@ -7214,7 +7222,7 @@ sub rdb_make {
# 5. (Note that these assumptions could be violated, e.g., if
# $dvips is arranged not only to do the basic dvips
# command, but also to extract information from the ps file
- # and feed it back to an input file for (pdf)latex.)
+ # and feed it back to an input file for *latex.)
# 6. Nevertheless, the overall algorithm should allow
# circularities. Then the general criterion of stability
# of source files covers the general case, and also
@@ -7246,7 +7254,7 @@ sub rdb_make {
# c. Any time that a pre-primary or primary rule is
# applied, loop back to the beginning of step b. This
# ensures that bibtex etc are applied before rerunning
- # (pdf)latex, and also covers changing source files, and
+ # *latex, and also covers changing source files, and
# gives priority to quick pre-primary rules for changing
# source files against slow reruns of latex.
# d. Then apply post-primary rules in order, but not
@@ -7361,7 +7369,7 @@ sub rdb_make {
if ($#primary_warning_summary > -1) {
# N.B. $mult_defined, $bad_reference, $bad_character, $bad_citation also available here.
- show_array( "$My_name: Summary of warnings from last run of (pdf)latex:",
+ show_array( "$My_name: Summary of warnings from last run of *latex:",
@primary_warning_summary );
}
if (! $silent) {
@@ -7481,7 +7489,7 @@ sub rdb_make1 {
# rather than because of a failure on a previous run.
# (We could do better with a flag in fdb file.)
# But after the first pass, the situation is different.
- # For a primary rule (pdf)latex, the lack of a destination file
+ # For a primary rule *latex, the lack of a destination file
# could result from there being zero content due to a missing
# essential input file. The input file could be generated
# by a program to be run later (e.g., a cusdep or bibtex),
@@ -7490,14 +7498,14 @@ sub rdb_make1 {
# For a custom dependency, the rule may be obsolete, and
# if the source file does not exist also, we should simply
# not run the rule, but not set an error condition.
- # Any error will arise at the (pdf)latex level due to a
+ # Any error will arise at the *latex level due to a
# missing source file at that level.
if ( $$Psource && (! -e $$Psource)
&& ( ( $$Pcmd_type ne 'primary') )
) {
# Main source file doesn't exist, and rule is NOT primary.
# No action, since a run is pointless. Primary is different:
- # file might be found elsewhere (by kpsearch from (pdf)latex),
+ # file might be found elsewhere (by kpsearch from *latex),
# while non-existence of main source file is a clear error.
}
elsif ( $$Pcmd_type eq 'delegated' ) {
@@ -7590,7 +7598,7 @@ sub rdb_make1 {
$$Pout_of_date = 0;
}
elsif ($$Pcmd_type eq 'primary' ) {
- # For a primary rule, i.e., (pdf)latex, not to produce the
+ # For a primary rule, i.e., *latex, not to produce the
# expected output file may not be an error condition.
# Diagnostics were handled in parsing the log file.
# Special action in main loop in rdb_make
@@ -7791,7 +7799,7 @@ sub rdb_run1 {
else {
warn "$My_name: Either a bug OR a configuration error:\n",
" No command provided for '$rule'\n";
- &traceback();
+ traceback();
$return = -1;
$$Plast_result = 2;
$$Plast_message = "Bug or configuration error; incorrect command type";
@@ -7850,7 +7858,7 @@ sub rdb_run1 {
" I'll ignore error, and delete any bbl file.\n";
}
# Malformed bcf file is a downstream consequence, normally,
- # of an error in (pdf)latex run. So this is not an error
+ # of an error in *latex run. So this is not an error
# condition in biber itself.
# Current version of biber deletes bbl file.
# Older versions (pre-2016) made an incorrect bbl file, which
@@ -7864,7 +7872,7 @@ sub rdb_run1 {
# in malformed bcf file situation under -pvc.
# since on each check for change in ANY file, pvc finds changed file
# Need to restrict pvc reruns to case of changed USER files
-# # To give good properties for (pdf)latex rule, it is best
+# # To give good properties for *latex rule, it is best
# # to have a valid bbl file that exists:
# create_empty_file( $$Pdest );
# $return = 0;
@@ -8074,10 +8082,10 @@ sub rdb_primary_run {
&find_set_log;
if ($recorder) {
- # Handle problem that some version of (pdf)latex give fls files
+ # Handle problem that some version of *latex give fls files
# of name latex.fls or pdflatex.fls instead of $root_filename.fls.
# Also that setting of -output-directory -aux-directory is not
- # respected by (pdf)latex, at least in some versions.
+ # respected by *latex, at least in some versions.
my $std_fls_file = $fls_name;
my @other_fls_names = ( );
if ( $rule =~ /^pdflatex/ ) {
@@ -8140,13 +8148,13 @@ sub rdb_primary_run {
# ???? Is the following needed?
if ($return_latex && $$Pout_of_date_user) {
- print "Error in (pdf)LaTeX, but change of user file(s), ",
+ print "Error in *LaTeX, but change of user file(s), ",
"so ignore error & provoke rerun\n"
if (! $silent);
$return = 0;
}
if ($return_latex && ($missing_dirs ne 'none') ) {
- print "Error in (pdf)LaTeX, but needed subdirectories in output directory\n",
+ print "Error in *LaTeX, but needed subdirectories in output directory\n",
" were missing and successfully created, so try again.\n"
if (! $silent);
$return = 0;
@@ -9282,7 +9290,6 @@ sub get_checksum_md5 {
my $md5 = Digest::MD5->new;
my $ignore_pattern = undef;
-#&traceback;
#warn "======= GETTING MD5: $source\n";
if ( -d $source ) {
# We won't use checksum for directory
@@ -9580,7 +9587,7 @@ sub set_input_ext {
# Set list of extension(s) (specified without a leading period)
# for the given rule ('latex', 'pdflatex', etc).
# These extensions are used when an input
- # file without an extension is found by (pdf)latex, as in
+ # file without an extension is found by *latex, as in
# \input{file} or \includegraphics{figure}. When latexmk searches
# custom dependencies to make the missing file, it will assume that
# the file has one of the specified extensions.