summaryrefslogtreecommitdiff
path: root/support/latexmk/latexmk.txt
diff options
context:
space:
mode:
Diffstat (limited to 'support/latexmk/latexmk.txt')
-rw-r--r--support/latexmk/latexmk.txt2924
1 files changed, 1528 insertions, 1396 deletions
diff --git a/support/latexmk/latexmk.txt b/support/latexmk/latexmk.txt
index 385fe1d21b..f1ed870507 100644
--- a/support/latexmk/latexmk.txt
+++ b/support/latexmk/latexmk.txt
@@ -61,7 +61,7 @@ DESCRIPTION
- 17 March 2022 1
+ 18 November 2022 1
@@ -127,7 +127,7 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
- 17 March 2022 2
+ 18 November 2022 2
@@ -193,7 +193,7 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
- 17 March 2022 3
+ 18 November 2022 3
@@ -204,9 +204,9 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-auxdir=FOO or -aux-directory=FOO
Sets the directory for auxiliary output files of *latex (.aux,
- .log etc). This achieves its effect by the -aux-directory op-
- tion of *latex, which currently is only implemented on the MiK-
- TeX version of *latex.
+ .log etc). See the description of the $aux_dir variable, the
+ -emulate-aux-dir, and the $emulate_aux variables for some com-
+ plications in using this option with the TeX Live distribution.
See also the -outdir/-output-directory options, and the
$aux_dir, $out_dir, and $search_path_separator configuration
@@ -243,23 +243,23 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-bibtex-cond
- When the source file uses bbl file(s) for the bibliography, run
- bibtex or biber as needed to regenerate the bbl files, but only
- if the relevant bib file(s) exist. Thus when the bib files are
- not available, bibtex or biber is not run, thereby avoiding
- overwriting of the bbl file(s). Also, always treat .bbl files
- as precious, i.e., do not delete them in a cleanup operation.
-
- This is the default setting. It can also be configured by set-
+ When the source file uses a bbl file for the bibliography and
+ bibtex is used to generate the bibliography, run bibtex as
+ needed to regenerate the bbl files only if the relevant bib
+ file(s) exist. Thus when the bib file(s) are not available,
+ bibtex is not run, thereby avoiding overwriting of the bbl file.
+ Also, always treat .bbl files as precious, i.e., do not delete
+ them in a cleanup operation.
+
+ This is the default setting. It can also be configured by set-
ting the $bibtex_use variable to 1 in a configuration file.
- The reason for using this setting is that sometimes a .bbl file
- is available containing the bibliography for a document, but the
- .bib file is not available. An example would be for a
+ The reason for using this setting is first to allow automatic
+ switching between the use and non-use of bibtex depending on the
- 17 March 2022 4
+ 18 November 2022 4
@@ -268,64 +268,64 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
- scientific journal where authors submit .tex and .bbl files, but
- not the original .bib file. In that case, running bibtex or
- biber would not work, and the .bbl file should be treated as a
- user source file, and not as a file that can be regenerated on
- demand.
+ existence or not of a bib file. In addition, when submitting
+ articles to a scientific journal, it is common to submit only
+ .tex and .bbl files (plus graphics files), but not a .bib file.
+ Hence it is often useful to treat .bbl files as true source
+ files, that should be preserved under a clean up operation.
- (Note that it is possible for latexmk to decide that the bib
- file does not exist, even though the bib file does exist and
- bibtex or biber finds it. The problem is that the bib file may
- not be in the current directory but in some search path; the
- places latexmk and bibtex or biber cause to be searched need not
- be identical. On modern installations of TeX and related pro-
- grams this problem should not arise, since latexmk uses the
- kpsewhich program to do the search, and kpsewhich should use the
- same search path as bibtex and biber. If this problem arises,
- use the -bibtex option when invoking latexmk.)
+ This property can also be configured by setting the $bibtex_use
+ variable to 1 in a configuration file.
- Note that this value does not work properly if the document uses
- biber instead of bibtex. (There's a long story why not.)
+ Note that when biber is used, and a bib file doesn't exist, this
+ option does not currently prevent biber from being run. See the
+ documentation on $bibtex_use for more details. However, a bbl
+ file is treated as precious.
-bibtex-cond1
The same as -bibtex-cond except that .bbl files are only treated
as precious if one or more bibfiles fails to exist.
- Thus if all the bib files exist, bibtex or biber is run to gen-
- erate .bbl files as needed, and then it is appropriate to delete
- the bbl files in a cleanup operation since they can be re-gener-
- ated.
+ Thus if all the bib files exist, bibtex is run to generate .bbl
+ files as needed, and then it is appropriate to delete the bbl
+ files in a cleanup operation since they can be re-generated.
- This property can also be configured by setting the $bibtex_use
+ This property can also be configured by setting the $bibtex_use
variable to 1.5 in a configuration file.
+ Note that when biber is used, and a bib file doesn't exist, this
+ option does not currently prevent biber from being run. See the
+ documentation on $bibtex_use for more details.
+
-bibtexfudge or -bibfudge
- Turn on the change-directory fudge for bibtex. See documenta-
+ Turn on the change-directory fudge for bibtex. See documenta-
tion of $bibtex_fudge for details.
-bibtexfudge- or -bibfudge-
- Turn off the change-directory fudge for bibtex. See documenta-
+ Turn off the change-directory fudge for bibtex. See documenta-
tion 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-
+ 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.
- Note that if the -bm option is specified, the -ps option is as-
+ Note that if the -bm option is specified, the -ps option is as-
sumed.
+ -bi <intensity>
+ How dark to print the banner message. A decimal number between
+ 0 and 1. 0 is black and 1 is white. The default is 0.95, which
- 17 March 2022 5
+ 18 November 2022 5
@@ -334,17 +334,14 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
- -bi <intensity>
- How dark to print the banner message. A decimal number between
- 0 and 1. 0 is black and 1 is white. The default is 0.95, which
is OK unless your toner cartridge is getting low.
-bs <scale>
- A decimal number that specifies how large the banner message
- 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
+ A decimal number that specifies how large the banner message
+ 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
message. The default is 220.0 which is just right for 5 charac-
ter messages.
@@ -356,139 +353,140 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-c Clean up (remove) all regeneratable files generated by latex and
bibtex or biber except dvi, postscript and pdf. These files are
- a combination of log files, aux files, latexmk's database file
- of source file information, and those with extensions specified
- in the @generated_exts configuration variable. In addition,
+ a combination of log files, aux files, latexmk's database file
+ of source file information, and those with extensions specified
+ in the @generated_exts configuration variable. In addition,
files specified by the $clean_ext and @generated_exts configura-
tion variables are removed.
- This cleanup is instead of a regular make. See the -gg option
+ This cleanup is instead of a regular make. See the -gg option
if you want to do a cleanup followed by a make.
- Treatment of .bbl files: If $bibtex_use is set to 0 or 1, bbl
- files are always treated as non-regeneratable. If $bibtex_use
+ Treatment of .bbl files: If $bibtex_use is set to 0 or 1, bbl
+ files are always treated as non-regeneratable. If $bibtex_use
is set to 1.5, bbl files are counted as non-regeneratable condi-
- tionally: If the bib file exists, then bbl files are regenerat-
- able, and are deleted in a clean up. But if $bibtex_use is 1.5
- and a bib file doesn't exist, then the bbl files are treated as
+ tionally: If the bib file exists, then bbl files are regenerat-
+ able, and are deleted in a clean up. But if $bibtex_use is 1.5
+ and a bib file doesn't exist, then the bbl files are treated as
non-regeneratable and hence are not deleted.
- In contrast, if $bibtex_use is set to 2, bbl files are always
+ In contrast, if $bibtex_use is set to 2, bbl files are always
treated as regeneratable, and are deleted in a cleanup.
- Treatment of files generated by custom dependencies: If
- $cleanup_includes_cusdep_generated is nonzero, regeneratable
- files are considered as including those generated by custom de-
- pendencies and are also deleted. Otherwise these files are not
+ Treatment of files generated by custom dependencies: If
+ $cleanup_includes_cusdep_generated is nonzero, regeneratable
+ files are considered as including those generated by custom de-
+ pendencies and are also deleted. Otherwise these files are not
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
+ 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 followed by a make.
- 17 March 2022 6
+ 18 November 2022 6
-LATEXMK(1) General Commands Manual LATEXMK(1)
+LATEXMK(1) General Commands Manual LATEXMK(1)
- This cleanup is instead of a regular make. See the -gg option
- if you want to do a cleanup followed by a make.
- See the -c option for the specification of whether or not .bbl
+ See the -c option for the specification of whether or not .bbl
files are treated as non-regeneratable or regeneratable.
- If $cleanup_includes_cusdep_generated is nonzero, regeneratable
- files are considered as including those generated by custom de-
- pendencies and are also deleted. Otherwise these files are not
+ If $cleanup_includes_cusdep_generated is nonzero, regeneratable
+ files are considered as including those generated by custom de-
+ pendencies and are also deleted. Otherwise these files are not
deleted.
- -CA (Obsolete). Now equivalent to the -C option. See that option
+ -CA (Obsolete). Now equivalent to the -C option. See that option
for details.
- -cd Change to the directory containing the main source file before
- processing it. Then all the generated files (.aux, .log, .dvi,
+ -cd Change to the directory containing the main source file before
+ processing it. Then all the generated files (.aux, .log, .dvi,
.pdf, etc) will be relative to the source file.
- This option is particularly useful when latexmk is invoked from
- a GUI configured to invoke latexmk with a full pathname for the
+ This option is particularly useful when latexmk is invoked from
+ a GUI configured to invoke latexmk with a full pathname for the
source file.
- This option works by setting the $do_cd configuration variable
- to one; you can set that variable if you want to configure la-
+ This option works by setting the $do_cd configuration variable
+ to one; you can set that variable if you want to configure la-
texmk to have the effect of the -cd option without specifying it
on the command line. See the documentation for that variable.
- -cd- Do NOT change to the directory containing the main source file
+ -cd- Do NOT change to the directory containing the main source file
before processing it. Then all the generated files (.aux, .log,
- .dvi, .pdf, etc) will be relative to the current directory
+ .dvi, .pdf, etc) will be relative to the current directory
rather than the source file.
- This is the default behavior and corresponds to the behavior of
+ This is the default behavior and corresponds to the behavior of
the *latex programs. However, it is not desirable behavior when
- latexmk is invoked by a GUI configured to invoke latexmk with a
+ latexmk is invoked by a GUI configured to invoke latexmk with a
full pathname for the source file. See the -cd option.
- This option works by setting the $do_cd configuration variable
- to zero. See the documentation for that variable for more in-
+ This option works by setting the $do_cd configuration variable
+ to zero. See the documentation for that variable for more in-
formation.
- -CF Remove the file containing the database of source file informa-
+ -CF Remove the file containing the database of source file informa-
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
+ -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
+ option will override this option as this is really just a short
way of specifying:
+ latexmk -bm DRAFT
- 17 March 2022 7
+ 18 November 2022 7
-LATEXMK(1) General Commands Manual LATEXMK(1)
- latexmk -bm DRAFT
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
- Note that if the -d option is specified, the -ps option is as-
+ Note that if the -d option is specified, the -ps option is as-
sumed.
-deps Show a list of dependent files after processing. This is in the
- form of a dependency list of the form used by the make program,
+ form of a dependency list of the form used by the make program,
and it is therefore suitable for use in a Makefile. It gives an
overall view of the files without listing intermediate files, as
well as latexmk can determine them.
- By default the list of dependent files is sent to stdout (i.e.,
- normally to the screen unless you've redirected latexmk's out-
+ By default the list of dependent files is sent to stdout (i.e.,
+ normally to the screen unless you've redirected latexmk's out-
put). But you can set the filename where the list is sent by the
-deps-out= option.
- See the section "USING latexmk WITH make" for an example of how
+ See the section "USING latexmk WITH make" for an example of how
to use a dependency list with make.
- Users familiar with GNU automake and gcc will find that the
- -deps option is very similar in its purpose and results to the
- -M option to gcc. (In fact, latexmk also has options -M, -MF,
+ Users familiar with GNU automake and gcc will find that the
+ -deps option is very similar in its purpose and results to the
+ -M option to gcc. (In fact, latexmk also has options -M, -MF,
and -MP options that behave like those of gcc.)
@@ -496,7 +494,7 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Equivalent to -deps.
- -deps- Do not show a list of dependent files after processing. (This
+ -deps- Do not show a list of dependent files after processing. (This
is the default.)
@@ -505,57 +503,62 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-deps-out=FILENAME
- Set the filename to which the list of dependent files is writ-
- ten. If the FILENAME argument is omitted or set to "-", then
+ Set the filename to which the list of dependent files is writ-
+ ten. If the FILENAME argument is omitted or set to "-", then
the output is sent to stdout.
- Use of this option also turns on the output of the list of de-
+ Use of this option also turns on the output of the list of de-
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
+ -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.
Example usage: To use dviselect to select only the even pages of
+ the dvi file:
- 17 March 2022 8
+ 18 November 2022 8
-LATEXMK(1) General Commands Manual LATEXMK(1)
+LATEXMK(1) General Commands Manual LATEXMK(1)
- the dvi file:
latexmk -dF "dviselect even" foo.tex
-diagnostics
- Print detailed diagnostics during a run. This may help for de-
- bugging problems or to understand latexmk's behavior in diffi-
+ Print detailed diagnostics during a run. This may help for de-
+ bugging problems or to understand latexmk's behavior in diffi-
cult situations.
-dir-report
- For each .tex file processed, list the settings for aux and out
- directories, after they have been normalized from the settings
- specified during initialization. See the description of the
+ For each .tex file processed, list the settings for aux and out
+ directories, after they have been normalized from the settings
+ specified during initialization. See the description of the
variable $aux_out_dir_report for more details.
-dir-report-
- Do not report the settings for aux and out directories. (De-
+ Do not report the settings for aux and out directories. (De-
fault)
- -dvi Generate dvi version of document.
+ -dvi Generate dvi version of document using latex.
+
+
+ -dvilua
+ Generate dvi version of document using lualatex instead of la-
+ tex.
-dvi- Turn off generation of dvi version of document. (This may get
@@ -564,50 +567,61 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
is requested.)
+ -dvilualatex="COMMAND"
+ This sets the string specifying the command to run dvi lualatex.
+ It behaves like the -pdflatex option, but sets the variable
+ $dvilualatex.
+
+ Note: This option when provided with the COMMAND argument only
+ sets the command for invoking dvilualatex; it does not turn on
+ the use of dvilualatex. That is done by other options or in an
+ initialization file.
+
+
-e <code>
- Execute the specified initialization code before processing.
- The code is Perl code of the same form as is used in latexmk's
- initialization files. For more details, see the information on
- the -r option, and the section about "Configuration/initializa-
- tion (RC) files". The code is typically a sequence of assign-
+ Execute the specified initialization code before processing.
+ The code is Perl code of the same form as is used in latexmk's
+ initialization files. For more details, see the information on
+ the -r option, and the section about "Configuration/initializa-
+ tion (RC) files". The code is typically a sequence of assign-
ment statements separated by semicolons.
- The code is executed when the -e option is encountered during
- latexmk's parsing of its command line. See the -r option for a
- way of executing initialization code from a file. An error re-
- sults in latexmk stopping. Multiple instances of the -r and -e
- options can be used, and they are executed in the order they ap-
- pear on the command line.
- Some care is needed to deal with proper quoting of special char-
- acters in the code on the command line. For example, suppose
- you want to set the latex command to use its -shell-escape op-
- tion, then under UNIX/Linux you could use the line
- latexmk -e '$latex=q/latex %O -shell-escape %S/' file.tex
+ 18 November 2022 9
- 17 March 2022 9
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ The code is executed when the -e option is encountered during
+ latexmk's parsing of its command line. See the -r option for a
+ way of executing initialization code from a file. An error re-
+ sults in latexmk stopping. Multiple instances of the -r and -e
+ options can be used, and they are executed in the order they ap-
+ pear on the command line.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ Some care is needed to deal with proper quoting of special char-
+ acters in the code on the command line. For example, suppose
+ you want to set the latex command to use its -shell-escape op-
+ tion, then under UNIX/Linux you could use the line
+ latexmk -e '$latex=q/latex %O -shell-escape %S/' file.tex
- Note that the single quotes block normal UNIX/Linux command
- shells from treating the characters inside the quotes as spe-
- 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
+ Note that the single quotes block normal UNIX/Linux command
+ shells from treating the characters inside the quotes as spe-
+ 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
+ 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
@@ -616,18 +630,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
latexmk -e "$latex='latex %O -shell-escape %S'" file.tex
- The last two examples will NOT work with UNIX/Linux command
+ The last two examples will NOT work with UNIX/Linux command
shells.
- (Note: the above examples show are to show how to use the -e to
- specify initialization code to be executed. But the particular
+ (Note: the above examples show are to show how to use the -e to
+ specify initialization code to be executed. But the particular
effect can be achieved also by the use of the -latex option with
less problems in dealing with quoting.)
-emulate-aux-dir
- Emulate -aux-directory instead of leaving it to the *latex pro-
- grams to do it. (MiKTeX supports -aux-directory, but TeXLive
+ Emulate -aux-directory instead of leaving it to the *latex pro-
+ grams to do it. (MiKTeX supports -aux-directory, but TeXLive
doesn't.)
For more details see the explanation for the configuration vari-
@@ -635,49 +649,49 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-emulate-aux-dir-
- Turn off emulatation -aux-directory and leave it to the *latex
+ Turn off emulatation -aux-directory and leave it to the *latex
program to handle the case that aux_dir is not equal to out_dir.
- Note that if you use TeXLive, which doesn't support -aux-direc-
- tory, latexmk will automatically switch aux_dir emulation on af-
- ter the first run of *latex, because it will find the .log file
- in the wrong place.
+ Note that if you use TeXLive, which doesn't support -aux-
- -f Force latexmk to continue document processing despite errors.
- Normally, when latexmk detects that LaTeX or another program has
- found an error which will not be resolved by further processing,
- no further processing is carried out.
- Note: "Further processing" means the running of other programs
- or the rerunning of latex (etc) that would be done if no errors
- had occurred. If instead, or additionally, you want the latex
- (etc) program not to pause for user input after an error, you
+ 18 November 2022 10
- 17 March 2022 10
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ directory, latexmk will automatically switch aux_dir emulation
+ on after the first run of *latex, because it will find the .log
+ file in the wrong place.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -f Force latexmk to continue document processing despite errors.
+ Normally, when latexmk detects that LaTeX or another program has
+ found an error which will not be resolved by further processing,
+ no further processing is carried out.
- should arrange this by an option that is passed to the program,
- e.g., by latexmk's option -interaction=nonstopmode (which la-
+ Note: "Further processing" means the running of other programs
+ or the rerunning of latex (etc) that would be done if no errors
+ had occurred. If instead, or additionally, you want the latex
+ (etc) program not to pause for user input after an error, you
+ should arrange this by an option that is passed to the program,
+ e.g., by latexmk's option -interaction=nonstopmode (which la-
texmk passes to *latex).
-f- Turn off the forced processing-past-errors such as is set by the
- -f option. This could be used to override a setting in a con-
+ -f option. This could be used to override a setting in a con-
figuration file.
- -g Force latexmk to process document fully, even under situations
- where latexmk would normally decide that no changes in the
- source files have occurred since the previous run. This option
- is useful, for example, if you change some options and wish to
+ -g Force latexmk to process document fully, even under situations
+ where latexmk would normally decide that no changes in the
+ source files have occurred since the previous run. This option
+ is useful, for example, if you change some options and wish to
reprocess the files.
@@ -693,45 +707,46 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-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
+ 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
+ This is like the same option for current implementations of the
*latex, and the passing of this option to these programs is part
of latexmk's implementation of -jobname.
There is one enhancement, that the STRING may contain the place-
holder '%A'. This will be substituted by the basename of the TeX
- file. The primary purpose is when multiple files are specified
- on the command line to latexmk, and you wish to use a jobname
- with a different file-dependent value for each file. For exam-
- ple, suppose you had .tex files test1.tex and test2.tex, and you
- wished to compare the results of compilation by *latex and those
- with xelatex. Then under a unix-type operating system you could
- use the command line
+ file. The primary purpose is when multiple files are specified
- latexmk -pdf -jobname=%A-pdflatex *.tex
- latexmk -pdfxe -jobname=%A-xelatex *.tex
- Then the .aux, .log, and .pdf files from the use of pdflatex
- would have basenames test1-pdflatex and test2-pdflatex, while
- from xelatex, the basenames would be test1-xelatex and test2-xe-
- latex.
+ 18 November 2022 11
- 17 March 2022 11
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ on the command line to latexmk, and you wish to use a jobname
+ with a different file-dependent value for each file. For exam-
+ ple, suppose you had .tex files test1.tex and test2.tex, and you
+ wished to compare the results of compilation by *latex and those
+ with xelatex. Then under a unix-type operating system you could
+ use the command line
+
+ latexmk -pdf -jobname=%A-pdflatex *.tex
+ latexmk -pdfxe -jobname=%A-xelatex *.tex
+ Then the .aux, .log, and .pdf files from the use of pdflatex
+ would have basenames test1-pdflatex and test2-pdflatex, while
+ from xelatex, the basenames would be test1-xelatex and test2-xe-
+ latex.
Under MS-Windows with cmd.exe, you would need to double the per-
- cent sign, so that the percent character is passed to latexmk
+ cent sign, so that the percent character is passed to latexmk
rather than being used to substitute an environment variable:
latexmk -pdf -jobname=%%A-pdflatex *.tex
@@ -739,81 +754,81 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-l Run in landscape mode, using the landscape mode for the preview-
- ers and the dvi to postscript converters. This option is not
- normally needed nowadays, since current previewers normally de-
+ ers and the dvi to postscript converters. This option is not
+ normally needed nowadays, since current previewers normally de-
termine this information automatically.
-l- Turn off -l.
- -latex This sets the generation of dvi files by latex, and turns off
+ -latex This sets the generation of dvi files by latex, and turns off
the generation of pdf and ps files.
- Note: to set the command used when latex is specified, see the
+ Note: to set the command used when latex is specified, see the
-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-
+ 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-
- ating system and the command-line shell you are using, you may
- need to change the single quotes to double quotes (or something
+ The specification of the contents of the string are the same as
+ for the $latex configuration variable. Depending on your oper-
+ ating system and the command-line shell you are using, you may
+ need to change the single quotes to double quotes (or something
else).
- Note: This option when provided with the COMMAND argument only
+ Note: This option when provided with the COMMAND argument only
sets the command for invoking latex; it does not turn on the use
- of latex. That is done by other options or in an initialization
- file.
- To set the command for running pdflatex (rather than the command
- for latex) see the -pdflatex option.
- -logfilewarninglist
- -logfilewarnings After a run of *latex, give a list of warnings
- about undefined citations and references (unless silent mode is
- on).
+ 18 November 2022 12
- See also the $silence_logfile_warnings configuration variable.
+LATEXMK(1) General Commands Manual LATEXMK(1)
- 17 March 2022 12
+ of latex. That is done by other options or in an initialization
+ file.
+ To set the command for running pdflatex (rather than the command
+ for latex) see the -pdflatex option.
+ -logfilewarninglist
+ -logfilewarnings After a run of *latex, give a list of warnings
+ about undefined citations and references (unless silent mode is
+ on).
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ See also the $silence_logfile_warnings configuration variable.
-logfilewarninglist-
- -logfilewarnings- After a run of *latex, do not give a list of
+ -logfilewarnings- After a run of *latex, do not give a list of
warnings about undefined citations and references. (Default)
See also the $silence_logfile_warnings configuration variable.
-lualatex
- Use lualatex. That is, use lualatex to process the source
- file(s) to pdf. The generation of dvi and postscript files is
+ Use lualatex. That is, use lualatex to process the source
+ file(s) to pdf. The generation of dvi and postscript files is
turned off.
This option is equivalent to using the following set of options
-pdflua -dvi- -ps-
- (Note: Note that the method of implementation of this option,
- but not its intended effect, differ from some earlier versions
+ (Note: Note that the method of implementation of this option,
+ but not its intended effect, differ from some earlier versions
of latexmk.)
@@ -822,67 +837,65 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
behaves like the -pdflatex option, but sets the variable $luala-
tex.
- Note: This option when provided with the COMMAND argument only
- sets the command for invoking lualatex; it does not turn on the
+ 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-
+ -M Show list of dependent files after processing. This is equiva-
lent to the -deps option.
-MF file
- If a list of dependents is made, the -MF specifies the file to
+ If a list of dependents is made, the -MF specifies the file to
write it to.
- -MP If a list of dependents is made, include a phony target for each
- source file. If you use the dependents list in a Makefile, the
- dummy rules work around errors the program make gives if you re-
- move header files without updating the Makefile to match.
+ 18 November 2022 13
- -makeindexfudge
- Turn on the change-directory fudge for makeindex. See documen-
- tation of $makeindex_fudge for details.
-
-
- -makeindexfudge-
- Turn off the change-directory fudge for makeindex. See
- 17 March 2022 13
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ -MP If a list of dependents is made, include a phony target for each
+ source file. If you use the dependents list in a Makefile, the
+ dummy rules work around errors the program make gives if you re-
+ move header files without updating the Makefile to match.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -makeindexfudge
+ Turn on the change-directory fudge for makeindex. See documen-
+ tation of $makeindex_fudge for details.
- documentation of $makeindex_fudge for details.
+ -makeindexfudge-
+ Turn off the change-directory fudge for makeindex. See documen-
+ tation of $makeindex_fudge for details.
-MSWinBackSlash
This option only has an effect when latexmk is running under MS-
Windows. This is that when latexmk runs a command under MS-Win-
- dows, the Windows standard directory separator "\" is used to
- separate directory components in a file name. Internally, la-
- texmk uses "/" for the directory separator character, which is
+ dows, the Windows standard directory separator "\" is used to
+ separate directory components in a file name. Internally, la-
+ texmk uses "/" for the directory separator character, which is
the character used by Unix-like systems.
This is the default behavior. However the default may have been
- overridden by a configuration file (latexmkrc file) which sets
+ overridden by a configuration file (latexmkrc file) which sets
$MSWin_back_slash=0.
-MSWinBackSlash-
This option only has an effect when latexmk is running under MS-
Windows. This is that when latexmk runs a command under MS-Win-
- dows, the substitution of "\" for the separator character be-
- tween directory components of a file name is not done. Instead
+ dows, the substitution of "\" for the separator character be-
+ tween directory components of a file name is not done. Instead
the forward slash "/" is used, the same as on Unix-like systems.
This is acceptable in most situations under MS-Windows, provided
that filenames are properly quoted, as latexmk does by default.
@@ -892,40 +905,42 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-new-viewer
- When in continuous-preview mode, always start a new viewer to
- view the generated file. By default, latexmk will, in continu-
- ous-preview mode, test for a previously running previewer for
+ When in continuous-preview mode, always start a new viewer to
+ 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
+ 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.
- -nobibtex
- Never run bibtex or biber. Equivalent to the -bibtex- option.
- -nobibtexfudge or -nobibfudge
- Turn off the change-directory fudge for bibtex. See documenta-
- tion of $bibtex_fudge for details.
+ 18 November 2022 14
- 17 March 2022 14
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ -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.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -nobibtex
+ Never run bibtex or biber. Equivalent to the -bibtex- option.
+
+
+ -nobibtexfudge or -nobibfudge
+ Turn off the change-directory fudge for bibtex. See documenta-
+ tion of $bibtex_fudge for details.
-noemulate-aux-dir
@@ -939,72 +954,72 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-norc Turn off the automatic reading of initialization (rc) files.
- N.B. Normally the initialization files are read and obeyed, and
- then command line options are obeyed in the order they are en-
- countered. But -norc is an exception to this rule: it is acted
+ N.B. Normally the initialization files are read and obeyed, and
+ then command line options are obeyed in the order they are en-
+ countered. But -norc is an exception to this rule: it is acted
on first, no matter where it occurs on the command line.
-outdir=FOO or -output-directory=FOO
- Sets the directory for the output files of *latex. This
- achieves its effect by the -output-directory option of *latex,
+ Sets the directory for the output files of *latex. This
+ achieves its effect by the -output-directory option of *latex,
which currently (Dec. 2011 and later) is implemented on the com-
mon versions of *latex, i.e., MiKTeX and TeXLive. It may not be
present in other versions.
- See also the -auxdir/-aux-directory options, and the $aux_dir,
- $out_dir, and $search_path_separator configuration variables of
- latexmk. In particular, see the documentation of $out_dir for
+ See also the -auxdir/-aux-directory options, and the $aux_dir,
+ $out_dir, and $search_path_separator configuration variables of
+ latexmk. In particular, see the documentation of $out_dir for
some complications on what directory names are suitable.
- If you also use the -cd option, and the specified output direc-
- tory is a relative path, then the path is interpreted relative
+ If you also use the -cd option, and the specified output direc-
+ tory is a relative path, then the path is interpreted relative
to the document directory.
-output-format=FORMAT
- This option is one that is allowed for latex, lualatex, and
- pdflatex. But it is not passed to these programs. Instead la-
- texmk emulates it in a way suitable for the context of latexmk
- and its workflows.
+ This option is one that is allowed for latex, lualatex, and
+ pdflatex. But it is not passed to these programs. Instead la-
+ texmk emulates it in a way suitable for the context of latexmk
- If FORMAT is dvi, then dvi output is turned on, and postscript
- and pdf output are turned off. This is equivalent to using the
- options -dvi -ps- -pdf-.
- If FORMAT is pdf, then pdf output is turned on, and dvi and
- postscript output are turned off. This is equivalent to using
- the options -pdf -ps- -dvi-.
- If FORMAT is anything else, latexmk gives an error.
+ 18 November 2022 15
- -p Print out the document. By default the file to be printed is
- the first in the list postscript, pdf, dvi that is being made.
- 17 March 2022 15
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ and its workflows.
+ If FORMAT is dvi, then dvi output is turned on, and postscript
+ and pdf output are turned off. This is equivalent to using the
+ options -dvi -ps- -pdf-.
+ If FORMAT is pdf, then pdf output is turned on, and dvi and
+ postscript output are turned off. This is equivalent to using
+ the options -pdf -ps- -dvi-.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ If FORMAT is anything else, latexmk gives an error.
+ -p Print out the document. By default the file to be printed is
+ the first in the list postscript, pdf, dvi that is being made.
But you can use the -print=... option to change the type of file
to be printed, and you can configure this in a start up file (by
setting the $print_type variable).
- However, printing is enabled by default only under UNIX/Linux
+ 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
very much depends on your system's software. In particular, un-
- der MS-Windows you must have suitable program(s) available, and
- you must have configured the print commands used by latexmk.
- This can be non-trivial. See the documentation on the $lpr,
+ der MS-Windows you must have suitable program(s) available, and
+ you must have configured the print commands used by latexmk.
+ This can be non-trivial. See the documentation on the $lpr,
$lpr_dvi, and $lpr_pdf configuration variables to see how to set
the commands for printing.
@@ -1012,63 +1027,72 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
turns them off.
- -pdf Generate pdf version of document using pdflatex. (If you wish
+ -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
- latexmk to have such behavior by default, see the section on
+ -pdflua, -pdfxe, -lualatex or -xelatex applies.) To configure
+ latexmk to have such behavior by default, see the section on
"Configuration/initialization (rc) files".
-pdfdvi
- Generate pdf version of document from the dvi file, by default
- using dvipdf.
+ Generate dvi file and then pdf version of document from the dvi
+ file, by default using dvipdf.
+
+ The program used to compile the document to dvi is latex by de-
+ fault, but this can be changed to dvilulatex by the use of the
+ -dvilua option or by setting $dvi_mode to 2.
-pdflua
Generate pdf version of document using lualatex.
- -pdfps Generate pdf version of document from the .ps file, by default
- using ps2pdf.
+ -pdfps
- -pdfxe Generate pdf version of document using xelatex. Note that to
- optimize processing time, latexmk uses xelatex to generate an
- .xdv file rather than a pdf file directly. Only after possibly
- multiple runs to generate a fully up-to-date .xdv file does la-
- texmk then call xdvipdfmx to generate the final .pdf file.
- (Note: The reason why latexmk arranges for xelatex to make an
- .xdv file instead of the xelatex's default of a .pdf file is as
- follows: When the document includes large graphics files, espe-
- cially .png files, the production of a .pdf file can be quite
- time consuming, even when the creation of the .xdv file by xela-
- tex is fast. So the use of the intermediate .xdv file can re-
- sult in substantial gains in procesing time, since the .pdf file
- is produced once rather than on every run of xelatex.)
+ 18 November 2022 16
- 17 March 2022 16
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ Generate dvi file, ps file from the dvi file, and then pdf file
+ from the ps file.
+ The program used to compile the document to dvi is latex by de-
+ fault, but this can be changed to dvilulatex by the use of the
+ -dvilua option or by setting $dvi_mode to 2.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -pdfxe Generate pdf version of document using xelatex. Note that to
+ optimize processing time, latexmk uses xelatex to generate an
+ .xdv file rather than a pdf file directly. Only after possibly
+ multiple runs to generate a fully up-to-date .xdv file does la-
+ texmk then call xdvipdfmx to generate the final .pdf file.
+
+ (Note: The reason why latexmk arranges for xelatex to make an
+ .xdv file instead of the xelatex's default of a .pdf file is as
+ follows: When the document includes large graphics files, espe-
+ cially .png files, the production of a .pdf file can be quite
+ time consuming, even when the creation of the .xdv file by xela-
+ tex is fast. So the use of the intermediate .xdv file can re-
+ sult in substantial gains in procesing time, since the .pdf file
+ is produced once rather than on every run of xelatex.)
- -pdf- Turn off generation of pdf version of document. (This can be
- used to override a setting in a configuration file. It may get
+ -pdf- Turn off generation of pdf version of document. (This can be
+ used to override a setting in a configuration file. It may get
overridden if some other option requires the generation of a pdf
file.)
- If after all options have been processed, pdf generation is
- still turned off, then generation of a dvi file will be turned
+ 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-
- tex (or, more precisely, whatever program is configured to be
+ tex (or, more precisely, whatever program is configured to be
used in the $latex configuration variable).
@@ -1076,7 +1100,7 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This sets the generation of pdf files by pdflatex, and turns off
the generation of dvi and ps files.
- Note: to set the command used when pdflatex is specified, see
+ Note: to set the command used when pdflatex is specified, see
the -pdflatex="COMMAND" option.
@@ -1088,49 +1112,49 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
latexmk -pdf -pdflatex="pdflatex --shell-escape %O %S"
foo.tex
- The specification of the contents of the string are the same as
+ The specification of the contents of the string are the same as
for the $pdflatex configuration variable. (The option -pdflatex
- in fact sets the variable $pdflatex.) Depending on your operat-
- ing system and the command-line shell you are using, you may
- need to change the single quotes to double quotes (or something
- else).
- Note: This option when provided with the COMMAND argument only
- sets the command for invoking pdflatex; it does not turn on the
- use of pdflatex. That is done by other options or in an initial-
- ization file.
- To set the command for running latex (rather than the command
- for pdflatex) see the -latex option.
+ 18 November 2022 17
- -pdflualatex="COMMAND"
- Equivalent to -lualatex="COMMAND".
- -pdfxelatex="COMMAND"
- Equivalent to -xelatex="COMMAND".
- -pretex=CODE
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ in fact sets the variable $pdflatex.) Depending on your operat-
+ ing system and the command-line shell you are using, you may
+ need to change the single quotes to double quotes (or something
+ else).
+ Note: This option when provided with the COMMAND argument only
+ sets the command for invoking pdflatex; it does not turn on the
+ use of pdflatex. That is done by other options or in an initial-
+ ization file.
- 17 March 2022 17
+ To set the command for running latex (rather than the command
+ for pdflatex) see the -latex option.
+ -pdflualatex="COMMAND"
+ Equivalent to -lualatex="COMMAND".
+ -pdfxelatex="COMMAND"
+ Equivalent to -xelatex="COMMAND".
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -pretex=CODE
Given that CODE is some TeX code, this options sets that code to
- be executed before inputting source file. This only works if
+ 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-
+ 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.
See also the -usepretex option.
@@ -1150,12 +1174,24 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-print=dvi, -print=ps, -print=pdf, -print=auto,
- Define which kind of file is printed. This option also ensures
+ Define which kind of file is printed. This option also ensures
that the requisite file is made, and turns on printing.
The (default) case -print=auto determines the kind of print file
- automatically from the set of files that is being made. The
- first in the list postscript, pdf, dvi that is among the files
+ automatically from the set of files that is being made. The
+ first in the list postscript, pdf, dvi that is among the files
+
+
+
+ 18 November 2022 18
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
to be made is the one used for print out.
@@ -1163,13 +1199,13 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-ps- Turn off generation of postscript version of document. This can
- be used to override a setting in a configuration file. (It may
- get overridden by some other option that requires a postscript
+ be used to override a setting in a configuration file. (It may
+ get overridden by some other option that requires a postscript
file, for example a request for printing.)
- -pF Postscript file filtering. The argument to this option is a
- filter which will generate a filtered postscript file with the
+ -pF Postscript file filtering. The argument to this option is a
+ filter which will generate a filtered postscript file with the
extension ".psF". All extra processing (e.g. preview, printing)
will then be performed on this filtered postscript file.
@@ -1181,27 +1217,16 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
latexmk -ps -pF "psnup -2" foo.tex
-
-
- 17 March 2022 18
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
Whether to use single or double quotes round the "psnup -2" will
- depend on your command interpreter, as used by the particular
+ depend on your command interpreter, as used by the particular
version of perl and the operating system on your computer.
- -pv Run file previewer. If the -view option is used, this will se-
+ -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
- the -dvi, -ps, -pdf, -pdfps options, in the order .dvi, .ps,
- .pdf (low to high). If no file type has been selected, the dvi
+ erwise the viewer views the "highest" kind of file selected, by
+ the -dvi, -ps, -pdf, -pdfps options, in the order .dvi, .ps,
+ .pdf (low to high). If no file type has been selected, the dvi
previewer will be used. This option is incompatible with the -p
and -pvc options, so it turns them off.
@@ -1209,65 +1234,65 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-pv- Turn off -pv.
- -pvc Run a file previewer and continually update the .dvi, .ps,
+ -pvc Run a file previewer and continually update the .dvi, .ps,
and/or .pdf files whenever changes are made to source files (see
- 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
- can only work with one file. So in this case you will normally
- only specify one filename on the command line. It is also in-
- compatible with the -p and -pv options, so it turns these op-
+ 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
+ can only work with one file. So in this case you will normally
+ only specify one filename on the command line. It is also in-
+ compatible with the -p and -pv options, so it turns these op-
tions off.
- The -pvc option also turns off force mode (-f), as is normally
- best for continuous preview mode. If you really want force
- mode, use the options in the order -pvc -f.
+ The -pvc option also turns off force mode (-f), as is normally
+ best for continuous preview mode. If you really want force
- With a good previewer the display will be automatically updated.
- (Under some but not all versions of UNIX/Linux "gv -watch" does
- this for postscript files; this can be set by a configuration
- variable. This would also work for pdf files except for an ap-
- parent bug in gv that causes an error when the newly updated pdf
- file is read.) Many other previewers will need a manual update.
- Important note: the acroread program on MS-Windows locks the pdf
- file, and prevents new versions being written, so it is a bad
- idea to use acroread to view pdf files in preview-continuous
- mode. It is better to use a different viewer: SumatraPDF and
- gsview are good possibilities.
- There are some other methods for arranging an update, notably
- useful for many versions of xdvi and xpdf. These are best set
- in latexmk's configuration; see below.
+ 18 November 2022 19
- Note that if latexmk dies or is stopped by the user, the
- "forked" previewer will continue to run. Successive invocations
- with the -pvc option will not fork new previewers, but latexmk
- will normally use the existing previewer. (At least this will
- happen when latexmk is running under an operating system where
- it knows how to determine whether an existing previewer is
- 17 March 2022 19
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ mode, use the options in the order -pvc -f.
+ With a good previewer the display will be automatically updated.
+ (Under some but not all versions of UNIX/Linux "gv -watch" does
+ this for postscript files; this can be set by a configuration
+ variable. This would also work for pdf files except for an ap-
+ parent bug in gv that causes an error when the newly updated pdf
+ file is read.) Many other previewers will need a manual update.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ Important note: the acroread program on MS-Windows locks the pdf
+ file, and prevents new versions being written, so it is a bad
+ idea to use acroread to view pdf files in preview-continuous
+ mode. It is better to use a different viewer: SumatraPDF and
+ gsview are good possibilities.
+ There are some other methods for arranging an update, notably
+ useful for many versions of xdvi and xpdf. These are best set
+ in latexmk's configuration; see below.
- running.)
+ Note that if latexmk dies or is stopped by the user, the
+ "forked" previewer will continue to run. Successive invocations
+ with the -pvc option will not fork new previewers, but latexmk
+ will normally use the existing previewer. (At least this will
+ happen when latexmk is running under an operating system where
+ it knows how to determine whether an existing previewer is run-
+ ning.)
-pvc- Turn off -pvc.
-pvctimeout
- Do timeout in pvc mode after period of inactivity, which is 30
+ Do timeout in pvc mode after period of inactivity, which is 30
min. by default. Inactivity means a period when latexmk has de-
- tected no file changes and hence has not taken any actions like
+ tected no file changes and hence has not taken any actions like
compiling the document.
@@ -1283,45 +1308,44 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-r <rcfile>
- Read the specified initialization file ("RC file") before pro-
+ Read the specified initialization file ("RC file") before pro-
cessing.
Be careful about the ordering: (1) Standard initialization files
- -- see the section below on "Configuration/initialization (RC)
- files" -- are read first. (2) Then the options on the command
- line are acted on in the order they are given. Therefore if an
- initialization file is specified by the -r option, it is read
- during this second step. Thus an initialization file specified
- with the -r option can override both the standard initialization
- files and previously specified options. But all of these can be
- overridden by later options.
- The contents of the RC file just comprise a piece of code in the
- Perl programming language (typically a sequence of assignment
- statements); they are executed when the -r option is encountered
- during latexmk's parsing of its command line. See the -e option
- for a way of giving initialization code directly on latexmk's
- command line. An error results in latexmk stopping. Multiple
- instances of the -r and -e options can be used, and they are ex-
- ecuted in the order they appear on the command line.
- -rc-report
- After initialization, give a list of the RC files read. (De-
- fault)
-
+ 18 November 2022 20
- 17 March 2022 20
+LATEXMK(1) General Commands Manual LATEXMK(1)
+ -- see the section below on "Configuration/initialization (RC)
+ files" -- are read first. (2) Then the options on the command
+ line are acted on in the order they are given. Therefore if an
+ initialization file is specified by the -r option, it is read
+ during this second step. Thus an initialization file specified
+ with the -r option can override both the standard initialization
+ files and previously specified options. But all of these can be
+ overridden by later options.
+ The contents of the RC file just comprise a piece of code in the
+ Perl programming language (typically a sequence of assignment
+ statements); they are executed when the -r option is encountered
+ during latexmk's parsing of its command line. See the -e option
+ for a way of giving initialization code directly on latexmk's
+ command line. An error results in latexmk stopping. Multiple
+ instances of the -r and -e options can be used, and they are ex-
+ ecuted in the order they appear on the command line.
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -rc-report
+ After initialization, give a list of the RC files read. (De-
+ fault)
-rc-report-
@@ -1329,10 +1353,10 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-recorder
- Give the -recorder option with *latex. In (most) modern ver-
- sions of these programs, this results in a file of extension
- .fls containing a list of the files that these programs have
- read and written. Latexmk will then use this file to improve
+ Give the -recorder option with *latex. In (most) modern ver-
+ sions of these programs, this results in a file of extension
+ .fls containing a list of the files that these programs have
+ read and written. Latexmk will then use this file to improve
its detection of source files and generated files after a run of
*latex. This is the default setting of latexmk, unless overrid-
den in an initialization file.
@@ -1349,76 +1373,89 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-rules-
- Do not show a list of latexmk's rules and dependencies after
+ 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
- particular option is given to latexmk but is not handled by the
- particular implementation of *latex that is being used, that
- program will probably give a warning or an error.) These op-
- tions are very numerous, but are not listed in this documenta-
- tion because they have no effect on latexmk's actions.
- There are a few options (e.g., -includedirectory=dir, -initial-
- ize, -ini) that are not recognized, either because they don't
- fit with latexmk's intended operations, or because they need
- special processing by latexmk that isn't implemented (at least,
- not yet).
- There are certain options for *latex (e.g., -recorder) that
- trigger special actions or behavior by latexmk itself. Depending
- on the action, they may also be passed in some form to the
- called *latex program, and/or may affect other programs as well.
- These options do have entries in this documentation. Among
- these options are: -jobname=STRING, -aux-directory=dir, -output-
- directory=DIR, -quiet, and -recorder.
+ 18 November 2022 21
- 17 March 2022 21
+LATEXMK(1) General Commands Manual LATEXMK(1)
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ -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
+ particular option is given to latexmk but is not handled by the
+ particular implementation of *latex that is being used, that
+ program will probably give a warning or an error.) These op-
+ tions are very numerous, but are not listed in this documenta-
+ tion because they have no effect on latexmk's actions.
+ There are a few options (e.g., -includedirectory=dir, -initial-
+ ize, -ini) that are not recognized, either because they don't
+ fit with latexmk's intended operations, or because they need
+ special processing by latexmk that isn't implemented (at least,
+ not yet).
+
+ There are certain options for *latex (e.g., -recorder) that
+ trigger special actions or behavior by latexmk itself. Depending
+ on the action, they may also be passed in some form to the
+ called *latex program, and/or may affect other programs as well.
+ These options do have entries in this documentation. Among
+ these options are: -jobname=STRING, -aux-directory=dir, -output-
+ directory=DIR, -quiet, and -recorder.
- There are also options that are accepted by *latex, but instead
+ There are also options that are accepted by *latex, but instead
trigger actions purely by latexmk: -help, -version.
-silent
Run commands silently, i.e., with options that reduce the amount
- of diagnostics generated. For example, with the default set-
- tings, the command "latex -interaction=batchmode" is used for
+ of diagnostics generated. For example, with the default set-
+ tings, the command "latex -interaction=batchmode" is used for
latex, and similarly for its friends.
- See also the -logfilewarninglist and -logfilewarninglist- op-
+ See also the -logfilewarninglist and -logfilewarninglist- op-
tions.
- Also reduce the number of informational messages that latexmk
+ Also reduce the number of informational messages that latexmk
itself generates.
- To change the options used to make the commands run silently,
+ To change the options used to make the commands run silently,
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,
- $dvips_silent_switch, $latex_silent_switch, $luala-
- tex_silent_switch $makeindex_silent_switch, $pdfla-
- tex_silent_switch, and $xelatex_silent_switch
+ uration variables, the relevant ones being $bib-
+ tex_silent_switch, $biber_silent_switch, $dvipdf_silent_switch,
+ $dvips_silent_switch, $dvilualatex_silent_switch, $la-
+ tex_silent_switch, $lualatex_silent_switch $makein-
+ dex_silent_switch, $pdflatex_silent_switch, and $xela-
+ tex_silent_switch
-stdtexcmds
Sets the commands for latex, etc, so that they are the standard
ones. This is useful to override special configurations.
+
+
+ 18 November 2022 22
+
+
+
+
+
+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
for $xelatex is provided automatically, given that %O appears in
@@ -1444,18 +1481,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Note that the filename may be specified without an extension,
e.g., by \includegraphics{drawing} in a LaTeX file. In that
-
-
-
- 17 March 2022 22
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
case, latexmk will try making drawing.ext with ext set in turn
to the possible extensions that are relevant for latex (or as
appropriate pdflatex, lualatex, xelatex).
@@ -1485,6 +1510,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-usepretex=CODE
Equivalent to -pretex=CODE -usepretex. Example
+
+
+
+ 18 November 2022 23
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
latexmk -usepretex='\AtBeginDocument{Message\par}' foo.tex
@@ -1509,19 +1546,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
be opened.
-
-
-
-
- 17 March 2022 23
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-Werror
This causes latexmk to return a non-zero status code if any of
the files processed gives a warning about problems with cita-
@@ -1534,6 +1558,9 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
the configuration variable $warnings_as_errors.
+ -xdv Generate xdv version of document using xelatex.
+
+
-xelatex
Use xelatex. That is, use xelatex to process the source file(s)
to pdf. The generation of dvi and postscript files is turned
@@ -1549,6 +1576,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
file, and does all the extra runs needed (including those of
bibtex, etc). Only after that does it make the pdf file from
the .xdv file, using xdvipdfmx. See the documentation for the
+
+
+
+ 18 November 2022 24
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
-pdfxe for why this is done.]
@@ -1576,18 +1615,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Compatibility between options
-
-
-
- 17 March 2022 24
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
The preview-continuous option -pvc can only work with one file. So in
this case you will normally only specify one filename on the command
line.
@@ -1617,6 +1644,16 @@ EXAMPLES
+
+ 18 November 2022 25
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
DEALING WITH ERRORS, PROBLEMS, ETC
Some possibilities:
@@ -1642,18 +1679,6 @@ DEALING WITH ERRORS, PROBLEMS, ETC
tions. (But there is a lot of reading!)
The remainder of these notes consists of ideas for dealing with more
-
-
-
- 17 March 2022 25
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
difficult situations.
d. Further tricks can involve replacing the standard commands that la-
@@ -1683,6 +1708,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
g. See also the section "Advanced Configuration: Some extra resources".
+
+
+
+ 18 November 2022 26
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
h. Look on tex.stackexchange, i.e., at http://tex.stackex-
change.com/questions/tagged/latexmk Someone may have already solved
your problem.
@@ -1707,21 +1744,9 @@ ALLOWING FOR CHANGE OF OUTPUT FILE TYPE
tion. The difference in output file type can happen for two reasons:
One is that for latex, pdflatex and lualatex the document itself can
override the defaults. The other is that there may be a configuration,
- or misconfiguration, such that the program that latexmk invokes to
-
-
-
- 17 March 2022 26
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- compile the document is not the expected one, or is given options in-
- compatible with what latexmk initially expects.
+ or misconfiguration, such that the program that latexmk invokes to com-
+ pile the document is not the expected one, or is given options incom-
+ patible with what latexmk initially expects.
Under latex and pdflatex, control of the output format by the document
is done by setting the \pdfoutput macro. Under lualatex, the \output-
@@ -1749,6 +1774,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
of .pdf, .dvi, .xdv) and the initially expected output, if possible.
Latexmk does this provided the following conditions are met.
+
+
+
+ 18 November 2022 27
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
The first is that latexmk's $allow_switch configuration variable is set
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 error.
@@ -1774,18 +1811,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
-
- 17 March 2022 27
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
CONFIGURATION/INITIALIZATION (RC) FILES
In this section is explained which configuration files are read by la-
texmk. Subsequent sections "How to Set Variables in Initialization
@@ -1816,6 +1841,17 @@ CONFIGURATION/INITIALIZATION (RC) FILES
"/usr/local/share/latexmk",
"/usr/local/lib/latexmk".
+
+
+ 18 November 2022 28
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
If the environment variable LATEXMKRCSYS is set, its value is used as
the name of the system RC file, instead of any of the above.
@@ -1842,16 +1878,6 @@ CONFIGURATION/INITIALIZATION (RC) FILES
texmk does not look for an RC file under it.
-
- 17 March 2022 28
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
3) The RC file in the current working directory. This file can be
named either "latexmkrc" or ".latexmkrc", and the first of these to be
found is used, if any.
@@ -1880,6 +1906,18 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES
The important variables that can be configured are described in the
section "List of configuration variables usable in initialization
files". (See the earlier section "Configuration/Initialization (rc)
+
+
+
+ 18 November 2022 29
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
Files" for the files where the configurations are done.) Syntax for
setting these variables is of the following forms:
@@ -1906,18 +1944,6 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES
quotes, as in many programming languages. But then the Perl program-
ming language brings into play some special rules for interpolating
variables into strings. People not fluent in Perl will want to avoid
-
-
-
- 17 March 2022 29
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
these complications.)
You can do much more complicated things, but for this you will need to
@@ -1945,9 +1971,21 @@ FORMAT OF COMMAND SPECIFICATIONS
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".)
+ for this command. (E.g., if you used the -silent option in the
+
+
+
+ 18 November 2022 30
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ invocation of latexmk, it results in the replacement of %O by "-inter-
+ action=batchmode".)
The available placeholders are:
@@ -1972,18 +2010,6 @@ FORMAT OF COMMAND SPECIFICATIONS
source file is read.
If the variable $pre_tex_code is the empty string, then %P is
-
-
-
- 17 March 2022 30
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
equivalent to %S.
%R root filename. This is the base name for the main tex file.
@@ -2011,8 +2037,20 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
value $out_dir.
%Z Name of directory for output files (see the configuration vari-
- able $out_dir). A directory separation character ('/') is ap-
- pended if $out_dir is non-empty and does not end in a suitable
+ able $out_dir). A directory separation character ('/') is
+
+
+
+ 18 November 2022 31
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ appended if $out_dir is non-empty and does not end in a suitable
character, with suitable characters being those appropriate to
UNIX and MS-Windows, i.e., ':', '/' and '\'.
@@ -2038,18 +2076,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
"Detaching" a command: Normally when latexmk runs a command, it waits
for the command to run to completion. This is appropriate for commands
-
-
-
- 17 March 2022 31
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
like latex, of course. But for previewers, the command should normally
run detached, so that latexmk gets the previewer running and then re-
turns to its next task (or exits if there is nothing else to do). To
@@ -2078,6 +2104,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p
%S';
+
+
+
+ 18 November 2022 32
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$pdf_previewer = 'start "c:/Program Files/SumatraPDF/Suma-
traPDF.exe" %O %S';
$pdf_previewer = 'start "c:/Program Files/SumatraPDF (x86)/Suma-
@@ -2105,17 +2143,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$dvi_previewer = 'start %S';
-
-
- 17 March 2022 32
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
Under MS-Windows, this will cause to be run whatever program the system
has associated with dvi files. (The same applies for a postscript
viewer and a pdf viewer.) But note that this trick is not always suit-
@@ -2143,6 +2170,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tion starting with "internal", as in
$latex = 'internal mylatex %O %S';
+
+
+
+ 18 November 2022 33
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
sub mylatex {
my @args = @_;
# Possible preprocessing here
@@ -2171,17 +2210,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$pdflatex = 'pdflatex --shell-escape %O %S; pst2pdf_for_latexmk
%B';
-
-
- 17 March 2022 33
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
This definition assumes you are using a UNIX-like system (which in-
cludes Linux and OS-X), so that the two commands to be run are sepa-
rated by the semicolon in the middle of the string.
@@ -2210,6 +2238,16 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
i.e., the behavior does not occur.
+
+ 18 November 2022 34
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$allow_switch [1]
This controls what happens when the output extension of latex,
@@ -2236,18 +2274,6 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
chosen name for the output file.)
This use of a temporary file solves a problem that the making of
-
-
-
- 17 March 2022 34
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
these files can occupy a substantial time. If a viewer (notably
gv) sees that the file has changed, it may read the new file be-
fore the program writing the file has not yet finished its work,
@@ -2276,6 +2302,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
doesn't always generate lines in the .fls file for input lua
files. (The situation with lualatex is HIGHLY version depen-
dent, e.g., there was a big change between TeXLive 2016 and
+
+
+
+ 18 November 2022 35
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
TeXLive 2017.)
To keep backward compatibility with older versions of latexmk,
@@ -2299,22 +2337,12 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$out_dir is set, then $aux_dir is set to $out_dir, which is the
directory to which general output files are to be written.
- Important note: The effect of $aux_dir, if different from
- $out_dir, is achieved by giving *latex the -aux-directory. Cur-
- rently (Dec. 2011 and later) this only works on the MiKTeX
-
-
-
- 17 March 2022 35
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- version of *latex.
+ Important note: The default implementation of the aux dir is to
+ give *latex the -aux-directory option. But that only works with
+ the MiKTeX distribution, not with the TeX Live distribution.
+ Latexmk has an alternative implementation that avoids this prob-
+ lem: See the description of -emulate-aux-dir option and the $em-
+ ulate_aux variable for details.
See also the documentation of $out_dir for some complications on
what directory names are suitable.
@@ -2342,6 +2370,32 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
+
+ 18 November 2022 36
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ $bad_warning_is_error [0]
+ Whether to treat bad warnings reported by *latex in log file as
+ errors. The specifications of the warning messages are in
+ @bad_warnings.
+
+
+ @bad_warnings
+ Array of regular expressions specifying messages in log file
+ that are officially treated as warnings rather than errors by
+ *latex, but which a user may treat as errors: See $bad_warn-
+ ing_is_error.
+
+ Currently the default set of these warnings is those about \end
+ occuring inside constructs.
+
+
$banner [0]
If nonzero, the banner message is printed across each page when
converting the dvi file to postscript. Without modifying the
@@ -2368,18 +2422,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
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
message. The Default is just right for 5 character messages.
-
-
-
- 17 March 2022 36
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
This is equivalent to the -bs option.
@BIBINPUTS
@@ -2392,6 +2434,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tem, of course. Examples for setting this variable are:
@BIBINPUTS = ( ".", "C:\\bibfiles" );
+
+
+
+ 18 November 2022 37
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
@BIBINPUTS = ( ".", "\\server\bibfiles" );
@BIBINPUTS = ( ".", "C:/bibfiles" );
@BIBINPUTS = ( ".", "//server/bibfiles" );
@@ -2434,32 +2488,32 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
refuse to write its bbl and blg files, for security reasons, for
certain cases of the path component of the filename given to it.
+ However, there are also rare cases where the change-directory
+ method prevents bibtex from finding certain bib or bst files.
+ Then $bibtex_fudge needs to be set to 0.
+ $bibtex_silent_switch ["-terse"]
+ Switch(es) for the BibTeX processing program when silent mode is
+ on.
- 17 March 2022 37
+ $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-
+ 18 November 2022 38
-LATEXMK(1) General Commands Manual LATEXMK(1)
- However, there are also rare cases where the change-directory
- method prevents bibtex from finding certain bib or bst files.
- Then $bibtex_fudge needs to be set to 0.
+LATEXMK(1) General Commands Manual LATEXMK(1)
- $bibtex_silent_switch ["-terse"]
- Switch(es) for the BibTeX processing program when silent mode is
- on.
- $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 when-
- ever it appears necessary to regenerate the bbl file(s) from
+ generated bibliographies are used, it can run bibtex or biber
+ whenever 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
@@ -2469,41 +2523,53 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
files are deleted in a cleanup operation.
The possible values of $bibtex_use are:
- 0: never use BibTeX or biber; never delete .bbl files in a
+ 0: never use bibtex or biber; never delete .bbl files in a
cleanup.
- 1: only use bibtex or biber if the bib files exist; never
- delete .bbl files in a cleanup.
- 1.5: only use bibtex or biber if the bib files exist; condi-
- tionally delete .bbl files in a cleanup (i.e., delete them only
- when the bib files all exist).
+ 1: only use bibtex if the bib file(s) exist; never delete .bbl
+ files in a cleanup.
+ 1.5: only use bibtex if the bib files exist; conditionally
+ delete .bbl files in a cleanup (i.e., delete them only when the
+ bib files all exist).
2: run bibtex or biber whenever it appears necessary to update
- the bbl files, without testing for the existence of the bib
+ the bbl file(s), without testing for the existence of the bib
files; always delete .bbl files in a cleanup.
- Note that the value 1.5 does not work properly if the document
- uses biber instead of bibtex. (There's a long story why not.)
+ Important note: Currently, the values 1 and 1.5 do not work
+ properly if the document uses biber instead of bibtex. When
+ biber is used, the values 1 and 1.5 for $bibtex_use are equiva-
+ lent to 2 as regards the running of biber. (There's a long
+ story why not. Basically, the problem is that when biber is
+ used, latexmk only knows the names and status of the bibfiles
+ after running biber. In contrast, when bibtex is used, the in-
+ formation is available after a run of *latex. It is a problem
+ for the future to correct this.)
$cleanup_includes_cusdep_generated [0]
- If nonzero, specifies that cleanup also deletes files that are
+ If nonzero, specifies that cleanup also deletes files that are
generated by custom dependencies. (When doing a clean up, e.g.,
by use of the -C option, custom dependencies are those listed in
the .fdb_latexmk file from a previous run.)
$cleanup_includes_generated [0]
- If nonzero, specifies that cleanup also deletes files that are
+ If nonzero, specifies that cleanup also deletes files that are
detected in the fls file (or failing that, in log file) as being
- generated. It will also include files made from these first
+ generated. It will also include files made from these first
generation generated files.
- 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-
+ 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-
tion. Therefore this variable is turned off by default, and then
+ files to be deleted are restricted to those explicitly specified
+ by patterns configured in the variables clean_ext,
+ clean_full_ext, and @generated_exts. Standard cases (e.g., .log
+ files) appear in latexmk's initial value for the array @gener-
+ ated_exts.
- 17 March 2022 38
+ 18 November 2022 39
@@ -2512,26 +2578,20 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
- files to be deleted are restricted to those explicitly specified
- by patterns configured in the variables clean_ext,
- clean_full_ext, and @generated_exts. Standard cases (e.g., .log
- files) appear in latexmk's initial value for the array @gener-
- ated_exts.
-
$cleanup_mode [0]
- If nonzero, specifies cleanup mode: 1 for full cleanup, 2 for
- cleanup except for .dvi, .ps and .pdf files, 3 for cleanup ex-
- cept for dep and aux files. (There is also extra cleaning as
+ If nonzero, specifies cleanup mode: 1 for full cleanup, 2 for
+ cleanup except for .dvi, .ps and .pdf files, 3 for cleanup ex-
+ cept for dep and aux files. (There is also extra cleaning as
specified by the $clean_ext, $clean_full_ext and @generated_exts
variables.)
- This variable is equivalent to specifying one of the -c or -C
- options. But there should be no need to set this variable from
+ 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.
$clean_ext [""]
- Extra extensions of files for latexmk to remove when any of the
- clean-up options (-c or -C) is selected. The value of this
+ Extra extensions of files for latexmk to remove when any of the
+ clean-up options (-c or -C) is selected. The value of this
variable is a string containing the extensions separated by spa-
ces.
@@ -2543,137 +2603,137 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
files-%R/*";
in an initialization file will imply that when a clean-up opera-
- tion is specified, not only is the standard set of files
- deleted, but also files of the form FOO.out, FOO-blx.bib, FOO-
- figures*.log, and pythontex-files-FOO/*, where FOO stands for
+ tion is specified, not only is the standard set of files
+ deleted, but also files of the form FOO.out, FOO-blx.bib, FOO-
+ figures*.log, and pythontex-files-FOO/*, where FOO stands for
the basename of the file being processed (as in FOO.tex).
- Most of the files to be deleted are relative to the directory
- specified by $aux_dir. Note that if $out_dir but not $aux_dir
- is set, then in its initialization, latexmk sets $aux_dir equal
- to $out_dir. A normal situation is therefore that $aux_dir
- equals $out_dir, which is the only case directly supported by
- TeXLive, unlike MiKTeX. Note that even with TeXLive latexmk
+ Most of the files to be deleted are relative to the directory
+ specified by $aux_dir. Note that if $out_dir but not $aux_dir
+ is set, then in its initialization, latexmk sets $aux_dir equal
+ to $out_dir. A normal situation is therefore that $aux_dir
+ equals $out_dir, which is the only case directly supported by
+ TeXLive, unlike MiKTeX. Note that even with TeXLive latexmk
does now support different values for the directories -- see the
explanation of the $emulate_aux variable.
If $out_dir and $aux_dir different, latexmk actually deletes any
files of the specified names in both $aux_dir and $out_dir; this
- is because under certain error conditions, the files may be put
- in $out_dir instead of $aux_dir. This also handles the case of
+ is because under certain error conditions, the files may be put
+ in $out_dir instead of $aux_dir. This also handles the case of
deleting any fls file, since that file is in $out_dir.
- The filenames specified for a clean-up operation can refer not
- only to regular files but also to directories. Directories are
+ The filenames specified for a clean-up operation can refer not
+ only to regular files but also to directories. Directories are
only deleted if they are empty. An example of an application is
+ to pythontex, which creates files in a particular directory.
+ You can arrange to remove both the files and the directory by
+ setting
+ $clean_ext = "pythontex-files-%R pythontex-files-%R";
- 17 March 2022 39
+ 18 November 2022 40
-LATEXMK(1) General Commands Manual LATEXMK(1)
- to pythontex, which creates files in a particular directory.
- You can arrange to remove both the files and the directory by
- setting
+LATEXMK(1) General Commands Manual LATEXMK(1)
- $clean_ext = "pythontex-files-%R pythontex-files-%R";
- See also the (array) variable @generated_exts. In the past,
- this variable had certain uses beyond that of $clean_ext. But
- now, they accomplish the same things. In fact, after initial-
- ization including the processing of command line options, la-
+ See also the (array) variable @generated_exts. In the past,
+ this variable had certain uses beyond that of $clean_ext. But
+ now, they accomplish the same things. In fact, after initial-
+ ization including the processing of command line options, la-
texmk simply appends the list of extensions in $clean_ext to the
array @generated_exts.
$clean_full_ext [""]
- Extra extensions of files for latexmk to remove when the -C op-
- tion is selected, i.e., extensions of files to remove when the
+ Extra extensions of files for latexmk to remove when the -C op-
+ tion is selected, i.e., extensions of files to remove when the
.dvi, etc files are to be cleaned-up.
More general patterns are allowed, as for $clean_ext.
- The files specified by $clean_full_ext to be deleted are rela-
+ The files specified by $clean_full_ext to be deleted are rela-
tive to the directory specified by $out_dir.
$compiling_cmd [""], $failure_cmd [""], $warning_cmd [""], $success_cmd
[""]
- These variables specify commands that are executed at certain
- points of compilations. One motivation for their existence is
- to allow very useful convenient visual indications of compila-
- tion status even when the window receiving the screen output of
- the compilation is hidden. This is particularly useful in pre-
+ These variables specify commands that are executed at certain
+ points of compilations. One motivation for their existence is
+ to allow very useful convenient visual indications of compila-
+ tion status even when the window receiving the screen output of
+ the compilation is hidden. This is particularly useful in pre-
view-continuous mode.
- The commands are executed at the following points: $compil-
- ing_cmd at the start of compilation, $success_cmd at the end of
- a completely successful compilation, $failure_cmd at the end of
+ The commands are executed at the following points: $compil-
+ ing_cmd at the start of compilation, $success_cmd at the end of
+ a completely successful compilation, $failure_cmd at the end of
an unsuccessful compilation, $warning_cmd at the of an otherwise
successful compilation that gives warnings about undefined cita-
tions or references or about multiply defined references. If any
- of above variables is undefined or blank (the default situa-
+ of above variables is undefined or blank (the default situa-
tion), then the corresponding command is not executed.
- However, when $warning_cmd is not set, then in the case of a
- compilation with warnings about references or citations, but
- with no other error, one or other of $success_cmd or $fail-
- ure_cmd is used (if it is set) according to the setting of
+ However, when $warning_cmd is not set, then in the case of a
+ compilation with warnings about references or citations, but
+ with no other error, one or other of $success_cmd or $fail-
+ ure_cmd is used (if it is set) according to the setting of
$warnings_as_errors.
An example of a simple setting of these variables is as follows
- $compiling_cmd = "xdotool search --name \"%D\" set_window
+ $compiling_cmd = "xdotool search --name \"%D\" set_window
--name \"%D compiling\"";
- $success_cmd = "xdotool search --name \"%D\" set_window
+ $success_cmd = "xdotool search --name \"%D\" set_window
+ --name \"%D OK\"";
+ $warning_cmd = "xdotool search --name \"%D\" ".
+ "set_window --name \"%D CITE/REF ISSUE\"";
+ $failure_cmd = "xdotool search --name \"%D\" set_window
+ --name \"%D FAILURE\"";
- 17 March 2022 40
+ 18 November 2022 41
-LATEXMK(1) General Commands Manual LATEXMK(1)
+LATEXMK(1) General Commands Manual LATEXMK(1)
- --name \"%D OK\"";
- $warning_cmd = "xdotool search --name \"%D\" ".
- "set_window --name \"%D CITE/REF ISSUE\"";
- $failure_cmd = "xdotool search --name \"%D\" set_window
- --name \"%D FAILURE\"";
- 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
- it normally does. When the commands are executed, the place-
- holder string %D is replaced by the name of the destination
+ 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
+ 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
an appropriate string being appended to the filename in the win-
dow title: " compiling", " OK", or " FAILURE".
- Other placeholders that can be used are %S, %T, and %R, with %S
- and %T normally being identical. These can be useful for a com-
- mand changing the title of the edit window. The visual indica-
- tion in a window title can useful, since the user does not have
- to keep shifting attention to the (possibly hidden) compilation
+ Other placeholders that can be used are %S, %T, and %R, with %S
+ and %T normally being identical. These can be useful for a com-
+ mand changing the title of the edit window. The visual indica-
+ tion in a window title can useful, since the user does not have
+ to keep shifting attention to the (possibly hidden) compilation
window to know the status of the compilation.
- More complicated situations can best be handled by defining a
- Perl subroutine to invoke the necessary commands, and using the
- "internal" keyword in the definitions to get the subroutine to
+ More complicated situations can best be handled by defining a
+ Perl subroutine to invoke the necessary commands, and using the
+ "internal" keyword in the definitions to get the subroutine to
be invoked. (See the section "Format of Command Specifications"
for how to do this.)
- Naturally, the above settings that invoke the xdotool program
- are only applicable when the X-Window system is used for the
+ 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
software solutions are available.
@@ -2682,15 +2742,15 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Custom dependency list -- see section on "Custom Dependencies".
@default_excluded_files [()]
- When latexmk is invoked with no files specified on the command
+ When latexmk is invoked with no files specified on the command
line, then, by default, it will process all files in the current
directory with the extension .tex. (In general, it will process
the files specified in the @default_files variable.)
But sometimes you want to exclude particular files from this de-
- fault list. In that case you can specify the excluded files in
+ fault list. In that case you can specify the excluded files in
the array @default_excluded_files. For example if you wanted to
- process all .tex files with the exception of common.tex, which
+ process all .tex files with the exception of common.tex, which
is a not a standard alone LaTeX file but a file input by some or
all of the others, you could do
@@ -2698,10 +2758,16 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
@default_excluded_files = ("common.tex");
+ If you have a variable or large number of files to be processed,
+ this method saves you from having to list them in detail in @de-
+ fault_files and having to update the list every time you change
+ the set of files to be processed.
+ Notes: 1. This variable has no effect except when no files are
- 17 March 2022 41
+
+ 18 November 2022 42
@@ -2710,28 +2776,22 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
LATEXMK(1) General Commands Manual LATEXMK(1)
- If you have a variable or large number of files to be processed,
- this method saves you from having to list them in detail in @de-
- fault_files and having to update the list every time you change
- the set of files to be processed.
-
- Notes: 1. This variable has no effect except when no files are
specified on the latexmk command line. 2. Wildcards are allowed
in @default_excluded_files.
@default_files [("*.tex")]
Default list of files to be processed.
- If no filenames are specified on the command line, latexmk pro-
- cesses all tex files specified in the @default_files variable,
- which by default is set to all tex files ("*.tex") in the cur-
- rent directory. This is a convenience: just run latexmk and it
- will process an appropriate set of files. But sometimes you
+ If no filenames are specified on the command line, latexmk pro-
+ cesses all tex files specified in the @default_files variable,
+ which by default is set to all tex files ("*.tex") in the cur-
+ rent directory. This is a convenience: just run latexmk and it
+ will process an appropriate set of files. But sometimes you
want only some of these files to be processed. In this case you
- can list the files to be processed by setting @default_files in
- an initialization file (e.g., the file "latexmkrc" in the cur-
- rent directory). Then if no files are specified on the command
- line then the files you specify by setting @default_files are
+ can list the files to be processed by setting @default_files in
+ an initialization file (e.g., the file "latexmkrc" in the cur-
+ rent directory). Then if no files are specified on the command
+ line then the files you specify by setting @default_files are
processed.
Three examples:
@@ -2742,64 +2802,92 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
@default_files = ("*.tex", "*.dtx");
- Note that more than file may be given, and that the default ex-
+ Note that more than file may be given, and that the default ex-
tension is ".tex". Wild cards are allowed. The parentheses are
because @default_files is an array variable, i.e., a sequence of
filename specifications is possible.
- If you want latexmk to process all .tex files with a few excep-
+ If you want latexmk to process all .tex files with a few excep-
tions, see the @default_excluded_files array variable.
$dependents_phony [0]
- If a list of dependencies is output, this variable determines
- whether to include a phony target for each source file. If you
- use the dependents list in a Makefile, the dummy rules work
- around errors make gives if you remove header files without up-
+ If a list of dependencies is output, this variable determines
+ whether to include a phony target for each source file. If you
+ use the dependents list in a Makefile, the dummy rules work
+ around errors make gives if you remove header files without up-
dating the Makefile to match.
$dependents_list [0]
- Whether to display a list(s) of dependencies at the end of a
+ Whether to display a list(s) of dependencies at the end of a
run.
$deps_file ["-"]
- Name of file to receive list(s) of dependencies at the end of a
- run, to be used if $dependesnt_list is set. If the filename is
+ Name of file to receive list(s) of dependencies at the end of a
+ run, to be used if $dependesnt_list is set. If the filename is
+ "-", then the dependency list is set to stdout (i.e., normally
+ the screen).
+ $do_cd [0]
+ Whether to change working directory to the directory specified
- 17 March 2022 42
+ 18 November 2022 43
-LATEXMK(1) General Commands Manual LATEXMK(1)
- "-", then the dependency list is set to stdout (i.e., normally
- the screen).
+LATEXMK(1) General Commands Manual LATEXMK(1)
- $do_cd [0]
- Whether to change working directory to the directory specified
- for the main source file before processing it. The default be-
- havior is not to do this, which is the same as the behavior of
- *latex programs. This variable is set by the -cd and -cd- op-
+ for the main source file before processing it. The default be-
+ havior is not to do this, which is the same as the behavior of
+ *latex programs. This variable is set by the -cd and -cd- op-
tions on latexmk's command line.
$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.
+
+ $dvilualatex ["dvilualatex %O %S"]
+ Specifies the command line to invoke the dvilualatex program.
+ Note that as with other programs, you can use this variable not
+ just to change the name of the program used, but also specify
+ options to the program. E.g.,
+
+ $dvilualatex = "dvilualatex --src-specials
+ %O %S";
+
+ To do a coordinated setting of all of $dvilualatex, $latex,
+ $pdflatex, $lualatex, and $xelatex, see the section "Advanced
+ Configuration".
+
+
$dvi_mode [See below for default]
- If nonzero, generate a dvi version of the document. Equivalent
- to the -dvi option.
+ If one, generate a dvi version of the document by use of latex.
+ Equivalent to the -dvi option.
+
+ If 2, generate a dvi version of the document by use of dviluala-
+ tex. Equivalent to the -dvilua option.
The variable $dvi_mode defaults to 0, but if no explicit re-
quests are made for other types of file (postscript, pdf), then
$dvi_mode will be set to 1. In addition, if a request for a
- file for which a .dvi file is a prerequisite, then $dvi_mode
- will be set to 1.
+ file for which a .dvi file is a prerequisite and $dvi_mode is
+ zero, then $dvi_mode is set to 1.
+
+
+
+ $dvilualatex_silent_switch ["-interaction=batchmode"]
+ Switch(es) for the dvilualatex program (specified in the vari-
+ able $dvilualatex) when silent mode is on.
+
+ See details of the $latex_silent_switch for other information
+ that equally applies to $dvilualatex_silent_switch.
+
$dvi_previewer ["start xdvi %O %S" under UNIX]
The command to invoke a dvi-previewer. [Under MS-Windows the
@@ -2808,6 +2896,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
system has associated with .dvi files.]
Important note: Normally you will want to have a previewer run
+
+
+
+ 18 November 2022 44
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
detached, so that latexmk doesn't wait for the previewer to ter-
minate before continuing its work. So normally you should pre-
fix the command by "start ", which flags to latexmk that it
@@ -2830,18 +2930,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$dvipdf = "dvipdfm %O -o %D %S";
-
-
-
- 17 March 2022 43
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
WARNING: The default dvipdf script generates pdf files with
bitmapped fonts, which do not look good when viewed by acroread.
That script should be modified to give dvips the options "-P
@@ -2873,6 +2961,19 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$dvips_silent_switch ["-q"]
Switch(es) for dvips program when silent mode is on.
+
+
+
+
+ 18 November 2022 45
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$dvi_update_command [""]
When the dvi previewer is set to be updated by running a com-
mand, this is the command that is run. See the information for
@@ -2895,20 +2996,8 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
4 => run a command to do the update. The command is speci-
fied by the variable $dvi_update_command.
- See information on the variable $pdf_update_method for an
-
-
-
- 17 March 2022 44
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- example of updating by command.
+ See information on the variable $pdf_update_method for an exam-
+ ple of updating by command.
$dvi_update_signal [Under UNIX: SIGUSR1, which is a system-dependent
value]
@@ -2926,168 +3015,184 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
If you use a version of *latex that doesn't support -aux-direc-
tory, e.g., TeXLive, latexmk will automatically switch aux_dir
emulation on after the first run of *latex, because it will find
- the .log file in the wrong place.
-
- Aux_directory emulation means that when *latex is invoked, the
- output directory provided to *latex is set to be the aux_dir.
- After that, any files that need to be in the output directory
- will be moved there. (These are the files with extensions .dvi,
+ the .log file in the wrong place. But it is better to set $emu-
+ late_aux to 1 in an rc file, or equivalently to use the -emu-
+ late-aux-dir option. This emulation mode works equally well with
+ MiKTeX.
+
+ Aux_directory emulation means that when *latex is invoked, the
+ output directory provided to *latex is set to be the aux_dir.
+ After that, any files that need to be in the output directory
+ will be moved there. (These are the files with extensions .dvi,
.ps, .pdf, .fls, .synctex, .synctex.gz.)
+
+
+
+
+ 18 November 2022 46
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$failure_cmd [undefined]
See the documentation for $compiling_cmd.
$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
+ The extension of the file which latexmk generates to contain a
+ database of information on source files. You will not normally
need to change this.
- $filetime_causality_threshold [5]; $filetime_offset_report_threshold
+ $filetime_causality_threshold [5]; $filetime_offset_report_threshold
[30]. (Units of seconds.)
These variables control how latexmk deals with the following is-
- sue, which can affect the use of files that are on a remote
+ sue, which can affect the use of files that are on a remote
filesystem (network share) instead of being on a file system lo-
cal to the computer running latexmk. Almost users will not have
- to worry about these settings, and can ignore the following ex-
+ to worry about these settings, and can ignore the following ex-
planation.
- In almost all situations, latexmk does not need to use the time
- 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
+ In almost all situations, latexmk does not need to use the time
+ 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
leftover file from a previous run. It does this by comparing the
- modification time of the file with the system time just before
- the program was started. If the modification time is earlier
- than when the program was started, the file is a leftover file,
+ modification time of the file with the system time just before
+ the program was started. If the modification time is earlier
+ than when the program was started, the file is a leftover file,
which latexmk treats as if it were not created. If the filetime
+ is at least the program start time, then it can be assumed that
+ the file was created in the current run.
+ Unfortunately, this test can fail if the file is on a remote
+ system, since its system time is not necessarily synchronized
+ with that of the local system; the timestamps on the remote
+ files are set by the remote system, not the local system. Gen-
+ erally, modern operating systems regularly synchronize their
+ time with a server, so the non-synchronization is mostly small
+ (a second or so, or a few seconds). But even a small difference
+ can mess up latexmk's test.
+ Latexmk measures the time difference between the time on the two
+ systems and compensates for this. But the measurement (in a
+ system-independent way) is only accurate to a second or two. So
+ latexmk allows for a threshold on the difference between file
+ and system time before it concludes that a file is a leftover
+ file from a previous run. The configuration variable $file-
+ time_causality_theshhold, which in units of seconds, specifies
+ this threshold. Luckily high precision is not needed. The pre-
+ vious run is normally the previous run in a human run-edit-run
+ cycle, and is at least many seconds back. A few seconds is
+ therefore appropriate for the threshold, $filetime_causal-
+ ity_theshhold; it should be non-negative always, and should be
+ bigger than 2 if a remote filesystem or network share is used.
- 17 March 2022 45
+ If the difference in system times on the two systems is large,
+ 18 November 2022 47
-LATEXMK(1) General Commands Manual LATEXMK(1)
- is at least the program start time, then it can be assumed that
- the file was created in the current run.
- Unfortunately, this test can fail if the file is on a remote
- system, since its system time is not necessarily synchronized
- with that of the local system; the timestamps on the remote
- files are set by the remote system, not the local system. Gen-
- erally, modern operating systems regularly synchronize their
- time with a server, so the non-synchronization is mostly small
- (a second or so, or a few seconds). But even a small difference
- can mess up latexmk's test.
+LATEXMK(1) General Commands Manual LATEXMK(1)
- Latexmk measures the time difference between the time on the two
- systems and compensates for this. But the measurement (in a
- system-independent way) is only accurate to a second or two. So
- latexmk allows for a threshold on the difference between file
- and system time before it concludes that a file is a leftover
- file from a previous run. The configuration variable $file-
- time_causality_theshhold, which in units of seconds, specifies
- this threshold. Luckily high precision is not needed. The pre-
- vious run is normally the previous run in a human run-edit-run
- cycle, and is at least many seconds back. A few seconds is
- therefore appropriate for the threshold, $filetime_causal-
- ity_theshhold; it should be non-negative always, and should be
- bigger than 2 if a remote filesystem or network share is used.
- If the difference in system times on the two systems is large,
- 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
- 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
+ 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
+ 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
is made if silent mode is used and diagnostic mode is not on.
$force_mode [0]
- If nonzero, continue processing past minor latex errors includ-
+ If nonzero, continue processing past minor latex errors includ-
ing unrecognized cross references. Equivalent to specifying the
-f option.
- @generated_exts [( 'aux', 'bcf', 'fls', 'idx', 'ind', 'lof', 'lot',
+ @generated_exts [( 'aux', 'bcf', 'fls', 'idx', 'ind', 'lof', 'lot',
'out', 'toc', 'blg', 'ilg', 'log', 'xdv' )]
- This contains a list of extensions for files that are generated
- during processing, and that should be deleted during a main
- clean up operation, as invoked by the command line option -c.
+ This contains a list of extensions for files that are generated
+ during processing, and that should be deleted during a main
+ clean up operation, as invoked by the command line option -c.
(The use of -C or -gg gives this clean up and more.)
- The default values are extensions for standard files generated
- by *latex, bibtex, and the like. (Note that the clean up also
- deletes the fdb_latexmk file, but that's separately coded into
+ The default values are extensions for standard files generated
+ by *latex, bibtex, and the like. (Note that the clean up also
+ deletes the fdb_latexmk file, but that's separately coded into
latexmk, currently.)
+ After initialization of latexmk and the processing of its com-
+ mand line, the items in clean_ext are appended to @gener-
+ ated_exts. So these two variables have the same meaning (con-
+ trary to older versions of latexmk).
+ The items in @generated_exts are normally extensions of files,
+ whose base name is the same as the main tex file. But it is
+ also possible to specify patterns including that basename ---
+ see the explanation of the variable $clean_ext.
- 17 March 2022 46
+ In addition to specifying files to be deleted in a clean up, la-
+ texmk uses the same specification to assist its examination of
+ changes in source files: Under some situations it needs to find
+ those changes in files (since a previous run) that are expected
+ to be due to the user editing a file. This contrasts with the
+ cases of files that are generated by some program run by latexmk
+ and that differ from the results of the previous run. This use
+ of @generated_exts is normally unimportant, given the usual ac-
+ curacy of latexmk's other ways of determining these generated
+ files.
+ A convenient way to add an extra extension to the list, without
+ losing the already defined ones is to use a push command in the
+ line in an RC file. E.g.,
+ push @generated_exts, "end";
-LATEXMK(1) General Commands Manual LATEXMK(1)
+ 18 November 2022 48
- After initialization of latexmk and the processing of its com-
- mand line, the items in clean_ext are appended to @gener-
- ated_exts. So these two variables have the same meaning (con-
- trary to older versions of latexmk).
- The items in @generated_exts are normally extensions of files,
- whose base name is the same as the main tex file. But it is
- also possible to specify patterns including that basename ---
- see the explanation of the variable $clean_ext.
- In addition to specifying files to be deleted in a clean up, la-
- texmk uses the same specification to assist its examination of
- changes in source files: Under some situations it needs to find
- those changes in files (since a previous run) that are expected
- to be due to the user editing a file. This contrasts with the
- cases of files that are generated by some program run by latexmk
- and that differ from the results of the previous run. This use
- of @generated_exts is normally unimportant, given the usual ac-
- curacy of latexmk's other ways of determining these generated
- files.
- A convenient way to add an extra extension to the list, without
- losing the already defined ones is to use a push command in the
- line in an RC file. E.g.,
+LATEXMK(1) General Commands Manual LATEXMK(1)
- push @generated_exts, "end";
adds the extension "end" to the list of predefined generated ex-
- tensions. (This extension is used by the RevTeX package, for
+ tensions. (This extension is used by the RevTeX package, for
example.)
$go_mode [0]
- If nonzero, process files regardless of timestamps, and is then
+ If nonzero, process files regardless of timestamps, and is then
equivalent to the -g option.
%hash_calc_ignore_pattern
!!!This variable is for experts only!!!
- 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
- 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
- time changes, latex sees that the eps file has changed, and
- therefore reruns latex. This causes an infinite loop, that is
- only terminated because latexmk has a limit on the number of
+ 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
+ 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
+ time changes, latex sees that the eps file has changed, and
+ therefore reruns latex. This causes an infinite loop, that is
+ only terminated because latexmk has a limit on the number of
runs to guard against pathological situations.
But the changing line has no real effect, since it is a comment.
@@ -3095,43 +3200,44 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$hash_calc_ignore_pattern{'eps'} = '^%%CreationDate: ';
+ 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 contain-
+ ing a regular expression. (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,
+ then you need to combine the patterns into a single regular ex-
+ pression. The simplest method is separate the different simple
+ patterns by a vertical bar character (indicating "alternation"
+ in the jargon of regular expressions). For example,
+ $hash_calc_ignore_pattern{'eps'} = '^%%CreationDate: |^%%Ti-
+ tle: ';
- 17 March 2022 47
+ causes lines starting with either "^%%CreationDate: " or "^%%Ti-
+ tle: " to be ignored.
+ It may happen that a pattern to be ignored is specified in, for
+ example, in a system or user initialization file, and you wish
+ to remove this in a file that is read later. To do this, you
+ 18 November 2022 49
-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 contain-
- ing a regular expression. (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,
- then you need to combine the patterns into a single regular ex-
- pression. The simplest method is separate the different simple
- patterns by a vertical bar character (indicating "alternation"
- in the jargon of regular expressions). For example,
- $hash_calc_ignore_pattern{'eps'} = '^%%CreationDate: |^%%Ti-
- tle: ';
+LATEXMK(1) General Commands Manual LATEXMK(1)
- causes lines starting with either "^%%CreationDate: " or "^%%Ti-
- tle: " to be ignored.
- It may happen that a pattern to be ignored is specified in, for
- example, in a system or user initialization file, and you wish
- to remove this in a file that is read later. To do this, you
use Perl's delete function, e.g.,
delete $hash_calc_ignore_pattern{'eps'};
@@ -3139,107 +3245,97 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$jobname [""]
- This specifies the jobname, i.e., the basename that is used for
- generated files (.aux, .log, .dvi, .ps, .pdf, etc). If this
- variable is a null string, then the basename is the basename of
- the main tex file. (At present, the string in $jobname should
+ This specifies the jobname, i.e., the basename that is used for
+ generated files (.aux, .log, .dvi, .ps, .pdf, etc). If this
+ variable is a null string, then the basename is the basename of
+ the main tex file. (At present, the string in $jobname should
not contain spaces.)
- The placeholder '%A' is permitted. This will be substituted by
+ 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
- different jobname for each but one that is distinct for each.
- Thus if you wanted to compare compilations of a set of files on
+ riety 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
cases, you could set
$jobname = "%A-$^O";
- in an initialization file. (Here $^O is a variable provided by
+ in an initialization file. (Here $^O is a variable provided by
perl that contains perl's name for the operating system.)
- Suppose you had .tex files test1.tex and test2.tex. Then when
+ Suppose you had .tex files test1.tex and test2.tex. Then when
you run
-
-
- 17 March 2022 48
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
latexmk -pdf *.tex
- both files will be compiled. The .aux, .log, and .pdf files
- will have basenames test1-MSWin32 ante test2-MSWin32 on a MS-
+ both files will be compiled. The .aux, .log, and .pdf files
+ 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.
$kpsewhich ["kpsewhich %S"]
- The program called to locate a source file when the name alone
- is not sufficient. Most filenames used by latexmk have suffi-
+ The program called to locate a source file when the name alone
+ is not sufficient. Most filenames used by latexmk have suffi-
cient path information to be found directly. But sometimes, no-
tably when a .bib or a .bst file is found from the log file of a
- bibtex or biber run, only the base name of the file is known,
+ bibtex or biber run, only the base name of the file is known,
but not its path. The program specified by $kpsewhich is used to
find it.
- (For advanced users: Because of the different way in which la-
+ (For advanced users: Because of the different way in which la-
texmk uses the command specified in $kpsewhich, some of the pos-
sibilities listed in the FORMAT OF COMMAND SPECIFICATIONS do not
- apply. The internal and start keywords are not available. A
+ apply. The internal and start keywords are not available. A
simple command specification with possible options and then "%S"
- is all that is guaranteed to work. Note that for other com-
+ is all that is guaranteed to work. Note that for other com-
mands, "%S" is substituted by a single source file. In contrast,
for $kpsewhich, "%S" may be substituted by a long list of space-
- separated filenames, each of which is quoted. The result on
+
+
+
+ 18 November 2022 50
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ separated filenames, each of which is quoted. The result on
STDOUT of running the command is then piped to latexmk.)
- See also the @BIBINPUTS variable for another way that latexmk
+ See also the @BIBINPUTS variable for another way that latexmk
also uses to try to locate files; it applies only in the case of
.bib files.
$kpsewhich_show [0]
- Whether to show diagnostics about invocations of kpsewhich: the
- command line use to invoke it and the results. These diagnos-
- tics are shown if $kpsewhich_show is non-zero or if diagnostics
- mode is on. (But in the second case, lots of other diagnostics
- are also shown.) Without these diagnostics there is nothing
- visible in latexmk's screen output about invocations of kpse-
+ Whether to show diagnostics about invocations of kpsewhich: the
+ command line use to invoke it and the results. These diagnos-
+ tics are shown if $kpsewhich_show is non-zero or if diagnostics
+ mode is on. (But in the second case, lots of other diagnostics
+ are also shown.) Without these diagnostics there is nothing
+ visible in latexmk's screen output about invocations of kpse-
which.
$landscape_mode [0]
If nonzero, run in landscape mode, using the landscape mode pre-
- viewers and dvi to postscript converters. Equivalent to the -l
+ viewers and dvi to postscript converters. Equivalent to the -l
option. Normally not needed with current previewers.
$latex ["latex %O %S"]
- Specifies the command line for the LaTeX processing program.
- Note that as with other programs, you can use this variable not
- just to change the name of the program used, but also specify
+ Specifies the command line for the LaTeX processing program.
+ Note that as with other programs, you can use this variable not
+ just to change the name of the program used, but also specify
options to the program. E.g.,
$latex = "latex --src-specials %O %S";
-
-
-
- 17 March 2022 49
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- To do a coordinated setting of all of $latex, $pdflatex, $luala-
- tex, and $xelatex, see the section "Advanced Configuration".
+ To do a coordinated setting of all of $dvilualatex, $latex,
+ $pdflatex, $lualatex, and $xelatex, see the section "Advanced
+ Configuration".
%latex_input_extensions
@@ -3262,6 +3358,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
put_ext. They are used as in the following examples are possi-
ble lines in an initialization file:
+
+
+
+ 18 November 2022 51
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
remove_input_ext( 'latex', 'tex' );
removes the extension 'tex' from latex_input_extensions
@@ -3292,18 +3400,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Under MS-Windows (unlike UNIX/Linux), there is no standard pro-
gram for printing files. But there are ways you can do it. For
-
-
-
- 17 March 2022 50
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
example, if you have gsview installed, you could use it with the
option "/p":
@@ -3329,6 +3425,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
+
+
+ 18 November 2022 52
+
+
+
+
+
+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 double quotes around
the name: this is necessary because one part of the command name
@@ -3340,43 +3447,32 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
is to be used when the lualatex program is called for (e.g., by
the option -lualatex.
- To do a coordinated setting of all of $latex, $pdflatex, $luala-
- tex, and $xelatex, see the section "Advanced Configuration".
+ To do a coordinated setting of all of $dvilualatex, $latex,
+ $pdflatex, $lualatex, and $xelatex, see the section "Advanced
+ Configuration".
%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
- 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
+ This variable specifies the extensions tried by latexmk when it
+ finds that a lualatex run resulted in an error that a file has
+ 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
file does not exist.
- In this situation, latexmk searches for custom dependencies to
- make the missing file(s), but restricts it to the extensions
- specified by the variable %pdflatex_input_extensions. The de-
+ In this situation, latexmk searches for custom dependencies to
+ make the missing file(s), but restricts it to the extensions
+ specified by the variable %pdflatex_input_extensions. The de-
fault extensions are 'tex', 'pdf', 'jpg, and 'png'.
See details of the %latex_input_extensions for other information
-
-
-
- 17 March 2022 51
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
that equally applies to %lualatex_input_extensions.
$lualatex_silent_switch ["-interaction=batchmode"]
- Switch(es) for the lualatex program (specified in the variable
+ Switch(es) for the lualatex program (specified in the variable
$lualatex) when silent mode is on.
- See details of the $latex_silent_switch for other information
+ See details of the $latex_silent_switch for other information
that equally applies to $lualatex_silent_switch.
$make ["make"]
@@ -3386,133 +3482,133 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The index processing program.
$makeindex_fudge [0]
- When using makeindex, whether to change directory to $aux_dir
- before running makeindex. Set to 1 if $aux_dir is not an ex-
- plicit subdirectory of current directory, otherwise makeindex
+ When using makeindex, whether to change directory to $aux_dir
+ before running makeindex. Set to 1 if $aux_dir is not an ex-
+ plicit subdirectory of current directory, otherwise makeindex
will refuse to write its output and log files, for security rea-
sons.
$makeindex_silent_switch ["-q"]
- Switch(es) for the index processing program when silent mode is
+ Switch(es) for the index processing program when silent mode is
+
+
+
+ 18 November 2022 53
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
on.
$max_repeat [5]
- The maximum number of times latexmk will run *latex before de-
- ciding that there may be an infinite loop and that it needs to
- bail out, rather than rerunning *latex again to resolve cross-
+ The maximum number of times latexmk will run *latex before de-
+ ciding that there may be an infinite loop and that it needs to
+ bail out, rather than rerunning *latex again to resolve cross-
references, etc. The default value covers all normal cases.
(Note that the "etc" covers a lot of cases where one run of *la-
tex generates files to be read in on a later run.)
$MSWin_back_slash [1]
- This configuration variable only has an effect when latexmk is
- running under MS-Windows. With the default value of 1 for this
- variable, when a command is executed under MS-Windows, latexmk
- substitutes "\" for the separator character between components
- of a directory name. Internally, latexmk uses "/" for the di-
- rectory separator character, which is the character used by
+ This configuration variable only has an effect when latexmk is
+ running under MS-Windows. With the default value of 1 for this
+ variable, when a command is executed under MS-Windows, latexmk
+ substitutes "\" for the separator character between components
+ of a directory name. Internally, latexmk uses "/" for the di-
+ rectory separator character, which is the character used by
Unix-like systems.
- 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
+ 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
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-
+ "\" on the command line, since that is the standard directory
+ separator for MS-Windows. So for safety latexmk makes the sub-
stitution from "/" to "\", by default.
- However there are also programs on MS-Windows for which a back
- slash "\" is interpreted differently than as a directory
+ However there are also programs on MS-Windows for which a back
+ slash "\" is interpreted differently than as a directory separa-
+ tor; for these the directory separator should be "/". Programs
+ with this behavior include all the *latex programs in the
+ TeXLive implementation (but not the MiKTeX implementation).
+ Hence if you use TeXLive on MS-Windows, then $MSWin_back_slash
+ should be set to zero.
+ $new_viewer_always [0]
+ This variable applies to latexmk only in continuous-preview
+ mode. If $new_viewer_always is 0, latexmk will check for a pre-
+ 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
+ no viewer is running.
- 17 March 2022 52
+ $out_dir [""]
+ If non-blank, this variable specifies the directory in which
+ output files are to be written by a run of *latex. See also the
+ variable $aux_dir.
+ The effect of this variable (when non-blank) is achieved by us-
+ ing the -output-directory option of *latex. This exists in the
+ usual current (Dec. 2011 and later) implementations of TeX,
+ i.e., MiKTeX and TeXLive. But it may not be present in other
+ 18 November 2022 54
-LATEXMK(1) General Commands Manual LATEXMK(1)
- separator; for these the directory separator should be "/".
- Programs with this behavior include all the *latex programs in
- the TeXLive implementation (but not the MiKTeX implementation).
- Hence if you use TeXLive on MS-Windows, then $MSWin_back_slash
- should be set to zero.
- $new_viewer_always [0]
- This variable applies to latexmk only in continuous-preview
- mode. If $new_viewer_always is 0, latexmk will check for a pre-
- 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
- no viewer is running.
+LATEXMK(1) General Commands Manual LATEXMK(1)
- $out_dir [""]
- If non-blank, this variable specifies the directory in which
- output files are to be written by a run of *latex. See also the
- variable $aux_dir.
- The effect of this variable (when non-blank) is achieved by us-
- ing the -output-directory option of *latex. This exists in the
- usual current (Dec. 2011 and later) implementations of TeX,
- i.e., MiKTeX and TeXLive. But it may not be present in other
versions.
- If you also use the -cd option, and $out_dir (or $aux_dir) con-
- tains a relative path, then the path is interpreted relative to
+ If you also use the -cd option, and $out_dir (or $aux_dir) con-
+ tains a relative path, then the path is interpreted relative to
the document directory.
- Commonly, the directory specified for output files is a subdi-
+ Commonly, the directory specified for output files is a subdi-
rectory of the current working directory. However, if you spec-
- ify some other directory, e.g., "/tmp/foo" or "../output", be
- aware that this could cause problems, e.g., with makeindex or
- bibtex. This is because modern versions of these programs, by
- default, will refuse to work when they find that they are asked
- to write to a file in a directory that appears not to be the
+ ify some other directory, e.g., "/tmp/foo" or "../output", be
+ aware that this could cause problems, e.g., with makeindex or
+ bibtex. This is because modern versions of these programs, by
+ default, will refuse to work when they find that they are asked
+ to write to a file in a directory that appears not to be the
current working directory or one of its subdirectories. This is
- part of security measures by the whole TeX system that try to
+ part of security measures by the whole TeX system that try to
prevent malicious or errant TeX documents from incorrectly mess-
ing with a user's files. If for $out_dir or $aux_dir you really
- do need to specify an absolute pathname (e.g., "/tmp/foo") or a
+ do need to specify an absolute pathname (e.g., "/tmp/foo") or a
path (e.g., "../output") that includes a higher-level directory,
- and you need to use makeindex or bibtex, then you need to dis-
- able the security measures (and assume any risks). One way of
+ 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-
+ variable openout_any to "a" (as in "all"), to override the de-
fault "paranoid" setting.
$pdf_mode [0]
- If zero, do NOT generate a pdf version of the document. If
- equal to 1, generate a pdf version of the document using pdfla-
- tex, using the command specified by the $pdflatex variable. If
- equal to 2, generate a pdf version of the document from the ps
-
-
-
- 17 March 2022 53
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- file, by using the command specified by the $ps2pdf variable.
- If equal to 3, generate a pdf version of the document from the
- dvi file, by using the command specified by the $dvipdf vari-
+ If zero, do NOT generate a pdf version of the document. If
+ equal to 1, generate a pdf version of the document using pdfla-
+ tex, using the command specified by the $pdflatex variable. If
+ equal to 2, generate a pdf version of the document from the ps
+ file, by using the command specified by the $ps2pdf variable.
+ If equal to 3, generate a pdf version of the document from the
+ dvi file, by using the command specified by the $dvipdf vari-
able. If equal to 4, generate a pdf version of the document us-
ing lualatex, using the command specified by the $lualatex vari-
- able. If equal to 5, generate a pdf version (and an xdv ver-
- sion) of the document using xelatex, using the commands speci-
+ able. If equal to 5, generate a pdf version (and an xdv ver-
+ sion) of the document using xelatex, using the commands speci-
fied by the $xelatex and xdvipdfmx variables.
- In $pdf_mode=2, it is ensured that .dvi and .ps files are also
- made. In $pdf_mode=3, it is ensured that a .dvi file is also
+ In $pdf_mode=2, it is ensured that .dvi and .ps files are also
+ made. In $pdf_mode=3, it is ensured that a .dvi file is also
made. But this may be overridden by the document.
$pdflatex ["pdflatex %O %S"]
@@ -3524,14 +3620,28 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$pdflatex = "pdflatex --shell-escape %O %S";
- (In some earlier versions of latexmk, you needed to use an as-
- signment to $pdflatex to allow the use of lualatex or xelatex
+ (In some earlier versions of latexmk, you needed to use an as-
+ signment to $pdflatex to allow the use of lualatex or xelatex
+
+
+
+ 18 November 2022 55
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
instead of pdflatex. There are now separate configuration vari-
- ables for the use of lualatex or xelatex. See $lualatex and
+ ables for the use of lualatex or xelatex. See $lualatex and
$xelatex.)
- To do a coordinated setting of all of $latex, $pdflatex, $luala-
- tex, and $xelatex, see the section "Advanced Configuration".
+ To do a coordinated setting of all of $dvilualatex, $latex,
+ $pdflatex, $lualatex, and $xelatex, see the section "Advanced
+ Configuration".
+
%pdflatex_input_extensions
This variable specifies the extensions tried by latexmk when it
@@ -3556,18 +3666,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
See details of the $latex_silent_switch for other information
that equally applies to $pdflatex_silent_switch.
-
-
-
- 17 March 2022 54
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$pdf_previewer ["start acroread %O %S"]
The command to invoke a pdf-previewer.
@@ -3590,6 +3688,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
ample, SumatraPDF or gsview is used to view pdf files.
Important note: Normally you will want to have a previewer run
+
+
+
+ 18 November 2022 56
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
detached, so that latexmk doesn't wait for the previewer to ter-
minate before continuing its work. So normally you should pre-
fix the command by "start ", which flags to latexmk that it
@@ -3623,17 +3733,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$pdf_update_method = 4;
$pdf_update_command = "xpdf -remote %R -reload";
-
-
- 17 March 2022 55
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
The first setting arranges for the xpdf program to be used in
its "remote server mode", with the server name specified as the
rootname of the TeX file. The second setting arranges for up-
@@ -3655,6 +3754,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
with their default settings of $pscmd.
Setting the variable to -1 is used to indicate that $pscmd is
+
+
+
+ 18 November 2022 57
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
not to be used.
$postscript_mode [0]
@@ -3688,18 +3799,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
option. Which previewer is run depends on the other settings,
see the command line options -view=, and the variable $view.
-
-
-
- 17 March 2022 56
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$preview_mode [0]
If nonzero, run a previewer to preview the document. Equivalent
to the -pv option. Which previewer is run depends on the other
@@ -3721,6 +3820,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The -pvc option uses the command specified by the variable
$pscmd to determine if there is an already running previewer,
and to find the process ID (needed if latexmk needs to signal
+
+
+
+ 18 November 2022 58
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
the previewer about file changes).
Each line of the output of this command is assumed to correspond
@@ -3754,18 +3865,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
WARNING: Linux systems may have installed one (or more) versions
of gv under different names, e.g., ggv, kghostview, etc, but
-
-
-
- 17 March 2022 57
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
perhaps not one actually called gv.
Important note: Normally you will want to have a previewer run
@@ -3788,6 +3887,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
command, this is the command that is run. See the information
for the variable $ps_update_method.
+
+
+ 18 November 2022 59
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$ps_update_method [0 under UNIX, 1 under MS-Windows]
How the postscript viewer updates its display when the .ps file
has changed. See the information on the variable $dvi_up-
@@ -3819,19 +3929,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
The same as $always_view_file_via_temporary, except that it only
applies in preview-continuous mode (-pvc option).
-
-
-
-
- 17 March 2022 58
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$quote_filenames [1]
This specifies whether substitutions for placeholders in command
specifications (as in $pdflatex) are surrounded by double
@@ -3852,11 +3949,23 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
read.
$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
- files that these programs have read and written. Latexmk will
- then use this file to improve its detection of source files and
- generated files after a run of *latex.
+ Whether to use the -recorder option to *latex. Use of this op-
+ tion results in a file of extension .fls containing a list of
+ the files that these programs have read and written. Latexmk
+
+
+
+ 18 November 2022 60
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ will then use this file to improve its detection of source files
+ and generated files after a run of *latex.
It is generally recommended to use this option (or to configure
the $recorder variable to be on.) But it only works if *latex
@@ -3886,18 +3995,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
output or aux directories.]
The default under MSWin and Cygwin is ';' and under UNIX-like
-
-
-
- 17 March 2022 59
-
-
-
-
-
-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
@@ -3922,6 +4019,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
lence_logfile_warning_list and -silence_logfile_warning_list-
also set this variable.
+
+
+ 18 November 2022 61
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
Note that multiple occurrences for the same undefined object on
the same page and same line will be compressed to a single warn-
ing.
@@ -3951,19 +4059,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
$success_cmd [undefined]
See the documentation for $compiling_cmd.
-
-
-
-
- 17 March 2022 60
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$tmpdir [See below for default]
Directory to store temporary files that latexmk may generate
while running.
@@ -3990,6 +4085,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
do this. The intent of calling make from latexmk is merely to
detect dependencies.
+
+
+ 18 November 2022 62
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
$view ["default"]
Which kind of file is to be previewed if a previewer is used.
The possible values are "default", "dvi", "ps", "pdf". The
@@ -4018,18 +4124,6 @@ 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
-
-
-
- 17 March 2022 61
-
-
-
-
-
-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-
@@ -4051,31 +4145,49 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
that one or more of the commands isn't set.)
+ $xdv_mode [0]
+ If one, generate an xdv version of the document by use of xela-
+ tex.
+
+
+
+
+
+ 18 November 2022 63
+
+
+
+
+
+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-
+ The program to make a pdf file from an xdv file (used in con-
junction with xelatex when $pdf_mode=5).
$xdvipdfmx_silent_switch ["-q"]
Switch(es) for the xdvipdfmx program when silent mode is on.
$xelatex ["xelatex %O %S"]
- Specifies the command line for the LaTeX processing program of
- when the xelatex program is called for. See the documentation
- of the -xelatex option for some special properties of latexmk's
+ Specifies the command line for the LaTeX processing program of
+ when the xelatex program is called for. See the documentation
+ of the -xelatex option for some special properties of latexmk's
use of xelatex.
- Note about xelatex: latexmk uses xelatex to make an .xdv rather
- than .pdf file, with the .pdf file being created in a separate
+ Note about xelatex: latexmk uses xelatex to make an .xdv rather
+ than .pdf file, with the .pdf file being created in a separate
step. This is enforced by the use of the -no-pdf option. If %O
- is part of the command for invoking xelatex, then latexmk will
+ is part of the command for invoking xelatex, then latexmk will
insert the -no-pdf option automatically, otherwise you must pro-
- vide the option yourself. See the documentation for the -pdfxe
+ vide the option yourself. See the documentation for the -pdfxe
option for why latexmk makes a .xdv file rather than a .pdf file
when xelatex is used.
- To do a coordinated setting of all of $latex, $pdflatex, $luala-
- tex, and $xelatex, see the section "Advanced Configuration".
+ To do a coordinated setting of all of $dvilualatex, $latex,
+ $pdflatex, $lualatex, and $xelatex, see the section "Advanced
+ Configuration".
%xelatex_input_extensions
@@ -4084,18 +4196,6 @@ 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
-
-
-
- 17 March 2022 62
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
file does not exist.
In this situation, latexmk searches for custom dependencies to
@@ -4116,6 +4216,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+
+ 18 November 2022 64
+
+
+
+
+
+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
@@ -4150,18 +4262,6 @@ 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
-
-
-
- 17 March 2022 63
-
-
-
-
-
-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.
@@ -4184,6 +4284,16 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
tom dependencies to be sent to the screen output.
+
+ 18 November 2022 65
+
+
+
+
+
+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,
@@ -4216,18 +4326,6 @@ 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
-
-
-
- 17 March 2022 64
-
-
-
-
-
-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.
@@ -4249,8 +4347,20 @@ 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 sub-
- routine that carries out the conversion. If a rule for converting
+ script file, with extension "eps". The remaining lines define a
+
+
+
+ 18 November 2022 66
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
+ subroutine 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.
@@ -4282,18 +4392,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
}
Note 1: In the command lines given in the system commands in the above
-
-
-
- 17 March 2022 65
-
-
-
-
-
-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
@@ -4316,6 +4414,18 @@ 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
+
+
+
+ 18 November 2022 67
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
language, you can implement much more complicated processing if you
need it.
@@ -4347,25 +4457,13 @@ 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
-
-
-
- 17 March 2022 66
-
-
-
-
-
-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".
+ 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".
Examples of their use is given in the following examples, concerning
multiple index files and glossaries.
@@ -4382,6 +4480,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
follows:
add_cus_dep( 'ndx', 'nnd', 0, 'ndx2nnd' );
+
+
+
+ 18 November 2022 68
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
sub ndx2nnd {
return system( "makeindex -o \"$_[0].nnd\" \"$_[0].ndx\"" );
}
@@ -4414,18 +4524,6 @@ 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
-
-
-
- 17 March 2022 67
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
any customization you have made for the standard index also applies to
your extra indexes.
@@ -4447,12 +4545,24 @@ 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 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.
+ dependencies was to directly manipulate the table of custom
+
+
+
+ 18 November 2022 69
+
+
+
+
+
+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.
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
@@ -4479,20 +4589,8 @@ 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
-
-
-
- 17 March 2022 68
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
- useful ideas
+ Even if none of the examples apply to your case, they may give you use-
+ ful ideas
Utility subroutines
@@ -4515,6 +4613,17 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
to mean that *latex search for files in the specified directory
and in all subdirectories.)
+
+
+ 18 November 2022 70
+
+
+
+
+
+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
@@ -4545,19 +4654,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This gives the name of the primary source file. Note the double
dollar signs.
-
-
-
-
- 17 March 2022 69
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$$Pdest
This gives the name of the main output file if any. Note the
double dollar signs.
@@ -4582,6 +4678,18 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
This subroutine removes one or more files from the dependency
list for the given rule.
+
+
+
+ 18 November 2022 71
+
+
+
+
+
+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.
@@ -4608,43 +4716,44 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
Coordinated Setting of Commands for *latex
- To set all of $latex, $pdflatex, $lualatex, and $xelatex to a common
- pattern, you can use one of the following subroutines, std_tex_cmds,
- alt_tex_cmds, and set_tex_cmds.
+ To set all of $dvilualatex, $latex, $pdflatex, $lualatex, and $xelatex
+ to a common pattern, you can use one of the following subroutines,
+ std_tex_cmds, alt_tex_cmds, and set_tex_cmds.
+ They work as follows
+ &std_tex_cmds;
+ This results in $latex = 'latex %O %S', and similarly for $dvilualatex,
+ $pdflatex, $lualatex, and $xelatex. Note the ampersand in the invoca-
+ tion; this indicates to Perl that a subroutine is being called.
- 17 March 2022 70
+ &alt_tex_cmds;
+ This results in $latex = 'latex %O %P', and similarly for $dvilualatex,
+ $pdflatex, $lualatex, and $xelatex. Note the ampersand in the invoca-
+ tion; this indicates to Perl that a subroutine is being called.
+ set_tex_cmds( CMD_SPEC );
+ Here CMD_SPEC is the command line without the program name. This re-
+ sults in $latex = 'latex CMD_SPEC', and similarly for $pdflatex, $lu-
+ alatex, and $xelatex. An example would be
+ set_tex_cmds( '--interaction=batchmode %O %S' );
-LATEXMK(1) General Commands Manual LATEXMK(1)
- They work as follows
- &std_tex_cmds;
- This results in $latex = 'latex %O %S', and similarly for $pdflatex,
- $lualatex, and $xelatex. Note the ampersand in the invocation; this
- indicates to Perl that a subroutine is being called.
- &alt_tex_cmds;
+ 18 November 2022 72
- This results in $latex = 'latex %O %P', and similarly for $pdflatex,
- $lualatex, and $xelatex. Note the ampersand in the invocation; this
- indicates to Perl that a subroutine is being called.
- set_tex_cmds( CMD_SPEC );
- Here CMD_SPEC is the command line without the program name. This re-
- sults in $latex = 'latex CMD_SPEC', and similarly for $pdflatex, $lu-
- alatex, and $xelatex. An example would be
- set_tex_cmds( '--interaction=batchmode %O %S' );
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
Advanced configuration: Using latexmk with make
@@ -4677,21 +4786,9 @@ 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
-
-
-
- 17 March 2022 71
-
-
-
-
-
-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
+ 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
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-
@@ -4713,6 +4810,18 @@ 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
+
+
+
+ 18 November 2022 73
+
+
+
+
+
+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
@@ -4744,18 +4853,6 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
mkdir $@
%.pdf : %.tex
if [ ! -e $(DEPS_DIR) ]; then mkdir $(DEPS_DIR); fi
-
-
-
- 17 March 2022 72
-
-
-
-
-
-LATEXMK(1) General Commands Manual LATEXMK(1)
-
-
$(LATEXMK) -pdf -dvi- -ps- -deps-out=$(DEPS_DIR)/$@P $<
%.pdf : %.fig
fig2dev -Lpdf $< $@
@@ -4779,6 +4876,18 @@ 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
+
+
+
+ 18 November 2022 74
+
+
+
+
+
+LATEXMK(1) General Commands Manual LATEXMK(1)
+
+
this. Instead the -use-make is used to delegate the making of missing
files to make itself.
@@ -4794,10 +4903,24 @@ LATEXMK(1) General Commands Manual LATEXMK(1)
delegated to make.
+NON_ASCII CHARACTERS IN FILENAMES, RC FILES, ETC
+ Modern operating systems and file systems allow non-ASCII characters in
+ the names of files and directories that encompass the full Unicode
+ range. Mostly, latexmk deals with these correctly. However, there are
+ some situations in which there are problems, notably on Microsoft Win-
+ dows. Prior to version 4.77, latexmk had problems with non-ASCII file-
+ names on Windows, even though there were no corresponding problems on
+ macOS and Linux. These problems are corrected in the present version.
+
+ DETAILS TO BE FILLED IN
+
+
+
SEE ALSO
latex(1), bibtex(1), lualatex(1), pdflatex(1), xelatex(1).
-BUGS
+
+BUGS (SELECTED)
Sometimes a viewer (gv) tries to read an updated .ps or .pdf file after
its creation is started but before the file is complete. Work around:
manually refresh (or reopen) display. Or use one of the other preview-
@@ -4810,10 +4933,19 @@ 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
+ 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-
+ trapdf instead.)
+
+THANKS TO
+ Authors of previous versions. Many users with their feedback, and es-
+ pecially David Coppit (username david at node coppit.org) who made many
+ useful suggestions that contributed to version 3, and Herbert Schulz.
- 17 March 2022 73
+ 18 November 2022 75
@@ -4822,20 +4954,11 @@ BUGS
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-
- trapdf instead.)
-
-THANKS TO
- Authors of previous versions. Many users with their feedback, and es-
- pecially David Coppit (username david at node coppit.org) who made many
- useful suggestions that contributed to version 3, and Herbert Schulz.
(Please note that the e-mail addresses are not written in their stan-
dard form to avoid being harvested too easily.)
AUTHOR
- Current version, by John Collins (Version 4.77). Report bugs etc to
+ Current version, by John Collins (Version 4.78). Report bugs etc to
his e-mail (jcc8 at psu.edu).
Released version can be obtained from CTAN:
@@ -4879,6 +5002,15 @@ AUTHOR
- 17 March 2022 74
+
+
+
+
+
+
+
+
+
+ 18 November 2022 76