summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-04-15 18:21:17 +0000
committerKarl Berry <karl@freefriends.org>2009-04-15 18:21:17 +0000
commit88f7d1ac35385d57d17eb60fb2d77f6704eadde5 (patch)
tree9a1168ab8bd498e87bd743e4fe2e9b4fe289653b /Master/texmf-dist/doc/support
parentf331ca2bd8e23f91132a8c372c999c2d8a8731aa (diff)
latexmk 4.05 (13apr09)
git-svn-id: svn://tug.org/texlive/trunk@12722 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support')
-rw-r--r--Master/texmf-dist/doc/support/latexmk/CHANGES19
-rw-r--r--Master/texmf-dist/doc/support/latexmk/INSTALL91
-rw-r--r--Master/texmf-dist/doc/support/latexmk/README2
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.137
-rwxr-xr-xMaster/texmf-dist/doc/support/latexmk/latexmk.bat10
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.pdfbin155123 -> 73863 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.txt741
7 files changed, 518 insertions, 382 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/CHANGES b/Master/texmf-dist/doc/support/latexmk/CHANGES
index 509b82fe299..b4b4422f3e5 100644
--- a/Master/texmf-dist/doc/support/latexmk/CHANGES
+++ b/Master/texmf-dist/doc/support/latexmk/CHANGES
@@ -50,3 +50,22 @@ From v. 3.07 to v. 4.01
Miscellaneous bug fixes, etc.
Improvements in parsing of log file
+From v. 4.01 to v. 4.05
+ Miscellaneous bug fixes
+ Fix bug that -ps -pdfps runs ps2pdf before dvips
+ Deal with quoted filenames in log file
+ Correct problem with invocation of MSWin start command
+ -c and -C now also delete fdb_latex file
+ For home directory (where user's .latexmkrc is located,
+ when $ENV{'HOME'} does not exist, use $ENV{USERPROFILE}
+ (suitable for MS-Win).
+ Correct treatment of -e option
+ Fix possibility that unwrapping of lines in log_file is done
+ incorrectly
+ Correct parsing of log file
+ Improve diagnostics of reasons for rerun of external program.
+ Fix problems when using both latex and pdflatex
+ Configurable extensions for finding cusdep
+ Change to a nicer #! line
+ Safer use of % in placeholders in commands
+
diff --git a/Master/texmf-dist/doc/support/latexmk/INSTALL b/Master/texmf-dist/doc/support/latexmk/INSTALL
index 225e1c6e6b5..d351b7165cd 100644
--- a/Master/texmf-dist/doc/support/latexmk/INSTALL
+++ b/Master/texmf-dist/doc/support/latexmk/INSTALL
@@ -1,6 +1,6 @@
INSTALLING latexmk
==================
- (Version 4.00, 12 March 2008)
+ (Version 4.05, 11 April 2008)
John Collins
Physics Department
@@ -46,33 +46,51 @@ b. A working installation of TeX and LaTeX. (See http://www.ctan.org/ if
Installing on UNIX/LINUX
========================
+(Power users can modify these as appropriate.)
+
1. Make sure you have working installations of Perl and TeX/LaTeX.
2. Put the file latexmk.pl in a directory for executable files. For
example, for a system-wide installation, you could put it in
- /usr/local/bin.
+ /usr/local/bin. But if you are an ordinary user, you can put the
+ file somewhere where you have access.
3. Rename this file to latexmk.
4. Make sure latexmk is executable, e.g., by using chmod suitably.
+ [Special case, which you probably don't have to be concerned
+ with: You may also find it necessary to change the first line
+ of the script so that perl can be found to execute latexmk.
+ Currently the first line is #!/usr/bin/env perl, which uses
+ the program /usr/bin/env to find perl, provided only that the
+ perl executable can be found in the PATH for executables.
+ This insulates latexmk from the fact that the perl executable
+ has a very system dependent location. The program /usr/bin/env
+ is suppposed to be present on almost all modern UNIX/Linux
+ systems.]
5. (Optional) Copy the file latexmk.1 to an appropriate directory for man
pages, e.g., /usr/local/man/man1/.
-6. Check whether the commands used by latexmk for executing latex etc are
- correct. Normally the only one you have to worry about is $pscmd.
- This runs the command ps and is used in preview_continuous_mode to
- determine whether a previewer is already running. The format of the
- output of ps is highly system dependent. Latexmk should get it right
- under LINUX and Solaris. If latexmk does not get this or another
- command correct, put an override in a startup file.
+6. Check whether the commands used by latexmk for executing latex etc
+ are correct. The ones you have to worry about are those for
+ previewing files ($pdf_previewer, $ps_previewer, and
+ $dvi_previwer), and most importantly $pscmd, and its associated
+ variable $pid_position --- see below. The command $pscmd is the
+ least obvious: it runs the command ps and is used in
+ preview_continuous_mode to determine whether a previewer is
+ already running. The format of the output of ps is highly system
+ dependent. Latexmk should get it right under LINUX and Solaris.
+ If latexmk does not get this or another command correct, put an
+ override in a startup file.
a. For a system-wide installation, the correction should be in the
system startup file, which is any one of the files
/opt/local/share/latexmk/LatexMk,
/usr/local/share/latexmk/LatexMk,
/usr/local/lib/latexmk/LatexMk.
- (You get to choose which.)
+ (You get to choose which, but only one. If none of these
+ directories is appropriate you'll need to modify latexmk.pl.)
b. If you are installing latexmk as an ordinary user, the startup
file is the user startup file, which is the file .latexmkrc in
@@ -80,23 +98,43 @@ Installing on UNIX/LINUX
The startup files are written in perl, so possible overrides are like
- $latex = 'unusual_program_to_run_instead_of_normal_latex';
+ $latex = 'unusual_program_to_run_instead_of_normal_latex %O %S';
for changing the program to run latex, and
$pscmd = 'ps -aeg';
$pid_position = 1;
- for the ps command. Here, $pid_position = 1 indicates that the process
- ID number is in the first column of the output of the command ps.
+ for the ps command. Here, $pid_position = 1 indicates that the
+ process ID number is in the first column of the output of the
+ command ps. See the latexmk.pl file for some examples.
7. If you need any modifications on the commands for running previewers,
like gv, note that prefixing a command by start, as in
- $ps_previewer = 'start gv -watch';
+ $ps_previewer = 'start gv -watch %O %S';
ensures that the command is run detached, as is normally appropriate
- for a previewer.
+ for a previewer.
+
+ (In the examples above, there appear the strings %O and %S. See
+ the documenation for details. They are placeholders used when
+ latexmk constructs the command line. %O denotes any options
+ latexmk wants to add to the command invocation, and %S denotes the
+ source file.)
+
+8. You may also want to change the defaults on what kinds of output
+ file makes. By default latexmk makes dvi files, but not
+ postscript or pdf files. If you (or people on your system)
+ generally make pdf files using pdflatex, it would be a good idea
+ to put the following in an appropriate initialization file:
+
+ $pdf_mode = 1;
+ $postscript_mode = 0;
+ $dvi_mode = 0;
+
+ See step 6 for the locations of these files (under UNIX-like
+ systems). This change is likely to be particularly for Mac OS-X.
Installing on MS-Windows
@@ -153,11 +191,12 @@ Installing on MS-Windows
which is a pure ASCII text file, and latexmk.ps which is a postscript
file.
-6. Check whether perl is in the search path for executables. (E.g., from
- the MSDOS command-line prompt, try the command perl --version.) If
- perl is not in the search path, then modify the first line of
- latexmk.bat (which you installed at step 2) by replacing the command
- perl by the full path name for perl, e.g., C:\perl\bin\perl.exe.
+6. Check whether perl is in the search path for executables. (E.g.,
+ from the MS-Windows command-line prompt, try the command perl
+ --version.) If perl is not in the search path, then modify the
+ first line of latexmk.bat (which you installed at step 2) by
+ replacing the command perl by the full path name for perl, e.g.,
+ C:\perl\bin\perl.exe.
7. You may need to reboot, or at least logoff and log back in, if you
made any changes to the path at step 3. Test out the installation
@@ -199,12 +238,16 @@ Installing on MS-Windows
installation instructions for what to do. The only changes needed
from the UNIX instructions are:
- a. The system initialization file is C:\latexmk\LatexMk.
+ a. The system initialization file is C:\latexmk\LatexMk. (If
+ this is not suitable for some reason, you'll need to change
+ the latexmk.pl file where this filename appears.)
b. The user initialization file is .latexmkrc in the directory
specified by the environment variable HOME. If there is no HOME
- variable, then the file is in the root directory of the current
- drive.
+ variable, then the file is in the directory specified by the
+ environment variable USERPROFILE, which should have been set
+ by the MS-Windows operating system at login.
+
Other systems
@@ -265,7 +308,7 @@ Version 2 was modified by Evan McLean.
The current version is by John Collins (username collins at node
phys.psu.edu) -- other contact details at the top. It is copyright
-1998-2008 by John Collins, and the previous authors; see the copyright
+1998-2009 by John Collins, and the previous authors; see the copyright
notice in the latexmk.pl file, which gives permission to use, copy,
modify, and distribute this software and its documentation under the
terms of the GNU Public License.
diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README
index 7a3b07a87c4..c6dd361df1e 100644
--- a/Master/texmf-dist/doc/support/latexmk/README
+++ b/Master/texmf-dist/doc/support/latexmk/README
@@ -88,7 +88,7 @@ I hope you find this useful.
John Collins
---------------------------- "latexmk -h" ----------------------------
-Latexmk 4.05: Automatic LaTeX document generation routine
+Latexmk 4.05b: Automatic LaTeX document generation routine
Usage: latexmk [latexmk_options] [filename ...]
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.1 b/Master/texmf-dist/doc/support/latexmk/latexmk.1
index c50258b3f28..ec5c9245afa 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.1
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.1
@@ -532,6 +532,12 @@ Note that simple "scalar" variables have names that begin with a $
character and array variables have names that begin with a @
character. Each statement ends with a semicolon.
+Strings should be enclosed in single quotes. (You could use double
+quotes, as in many programming languages. But then the \fIPerl\fR
+programming language brings into play some special rules for
+interpolating variables into strings. People not fluent in \fIPerl\fR
+will want to avoid these complications.)
+
You can do much more complicated things, but for this you will need to
consult a manual for the \fIPerl\fR programming language.
@@ -582,6 +588,21 @@ to ps).
.B %T
The name of the primary tex file.
.PP
+If for some reason you need a literal % character in your string not
+subject to the above rules, use a pair of these characters. Thus with
+the command specification $ps_previewer = 'latex -ad=%%Sfile.ad %S',
+the %%S will become %S when the command is executed, but the %S will
+be replaced by the source filename, which in this case would be the
+name of a postscript file to be viewed.
+.PP
+Appropriate quoting will be applied to the filename substitutions, so
+you mustn't supply them yourself even if you the names of your have
+spaces in them. (But if your TeX filenames have spaces in them,
+beware that many versions of the TeX program cannot correctly handle
+filenames containing spaces.) In case latexmk's quoting does not work
+correctly on your system, you can turn it off -- see the documentation
+for the variable \fI$quote_filenames\fR.
+.PP
The distinction between %B and %R needs a bit of care, since they are
often the same, but not always. For example on a simple document, the
basename of a bibtex run is the same as for the texfile. But in a
@@ -1283,6 +1304,20 @@ The number of the signal that is sent to the pdf viewer when it is
updated by sending a signal -- see \fI$ps_update_method\fR. The
default value is the one appropriate for gv on a UNIX system.
.TP
+.B $quote_filenames [1]
+This specifies whether substitutions for placeholders in command
+specifications (as in \fI$pdflatex\fR) are surrounded by double
+quotes. If this variable is 1 (or any other value Perl regards as
+true), then quoting is done. Otherwise quoting is omitted.
+.PP
+The quoting method used by latexmk is tested to work correctly under
+UNIX systems (including Linux and Mac OS-X) and under MS-Windows. It
+allows the use of filenames containing special characters, notably
+spaces. (But note that many versions of LaTeX and PdfLaTeX cannot
+correctly deal with TeX files whose names contain spaces. Latexmk's
+quoting only ensures that such filenames are correctly treated by the
+operating system in passing arguments to programs.)
+.TP
.B $sleep_time [2]
The time to sleep (in seconds) between checking for source file
changes when running the \fB-pvc\fR option.
@@ -1539,7 +1574,7 @@ e-mail addresses are not written in their standard form to avoid being
harvested by worms and viruses.)
.SH AUTHOR
Current version, by John Collins (username collins at node phys.psu.edu).
-(Version 4.05).
+(Version 4.05a).
Released version can be obtained from CTAN:
<http://www.tug.org/tex-archive/support/latexmk/>, and from the
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.bat b/Master/texmf-dist/doc/support/latexmk/latexmk.bat
index f119082adac..48e01d6e5e1 100755
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.bat
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.bat
@@ -1,5 +1,5 @@
-Rem Execute latexmk.pl, searching for it in the PATH
-Rem Assume perl is in the PATH. If not, you should replace 'perl' by
-Rem the full pathname of the perl executable, e.g., 'C:\perl\bin\perl.exe'
-
-perl -S latexmk.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
+Rem Execute latexmk.pl, searching for it in the PATH
+Rem Assume perl is in the PATH. If not, you should replace 'perl' by
+Rem the full pathname of the perl executable, e.g., 'C:\perl\bin\perl.exe'
+
+perl -S latexmk.pl %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
index d804f857a68..2fd1f26f1fc 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.txt b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
index 2248a598c3e..3c6e7197147 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.txt
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
@@ -611,6 +611,12 @@ LATEXMK(1L) LATEXMK(1L)
character and array variables have names that begin with a @ character.
Each statement ends with a semicolon.
+ Strings should be enclosed in single quotes. (You could use double
+ 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
+ these complications.)
+
You can do much more complicated things, but for this you will need to
consult a manual for the Perl programming language.
@@ -655,11 +661,6 @@ FORMAT OF COMMAND SPECIFICATIONS
%T The name of the primary tex file.
- The distinction between %B and %R needs a bit of care, since they are
- often the same, but not always. For example on a simple document, the
- basename of a bibtex run is the same as for the texfile. But in a doc-
- ument with several bibliographies, the bibliography files will have a
- variety of names. Since bibtex is invoked with the basename of the
@@ -672,73 +673,93 @@ FORMAT OF COMMAND SPECIFICATIONS
LATEXMK(1L) LATEXMK(1L)
- bibliography file, the setting for the bibtex command should therefore
+ If for some reason you need a literal % character in your string not
+ subject to the above rules, use a pair of these characters. Thus with
+ the command specification $ps_previewer = 'latex -ad=%%Sfile.ad %S',
+ the %%S will become %S when the command is executed, but the %S will be
+ replaced by the source filename, which in this case would be the name
+ of a postscript file to be viewed.
+
+ Appropriate quoting will be applied to the filename substitutions, so
+ you mustn't supply them yourself even if you the names of your have
+ spaces in them. (But if your TeX filenames have spaces in them, beware
+ that many versions of the TeX program cannot correctly handle filenames
+ containing spaces.) In case latexmk's quoting does not work correctly
+ on your system, you can turn it off -- see the documentation for the
+ variable $quote_filenames.
+
+ The distinction between %B and %R needs a bit of care, since they are
+ often the same, but not always. For example on a simple document, the
+ basename of a bibtex run is the same as for the texfile. But in a doc-
+ ument with several bibliographies, the bibliography files will have a
+ variety of names. Since bibtex is invoked with the basename of the
+ bibliography file, the setting for the bibtex command should therefore
be
$bibtex = 'bibtex %O %B';
- Generally, you should use %B rather than %R. Similarly for most pur-
- poses, the name %T of the primary texfile is not a useful placeholder.
+ Generally, you should use %B rather than %R. Similarly for most pur-
+ poses, the name %T of the primary texfile is not a useful placeholder.
- See the default values in the section "List of configuration variables
+ See the default values in the section "List of configuration variables
usable in initialization files" for what is normally the most appropri-
ate usage.
If you omit to supply any placeholders whatever in the specification of
- a command, latexmk will supply what its author thinks are appropriate
+ a command, latexmk will supply what its author thinks are appropriate
defaults. This gives compatibility with configuration files for previ-
ous versions of latexmk, which didn't use placeholders.
- "Detaching" a command: Normally when latexmk runs a command, it waits
+ "Detaching" a command: Normally when latexmk runs a command, it waits
for the command to run to completion. This is appropriate for commands
like latex, of course. But for previewers, the command should normally
- run detached, so that latexmk gets the previewer running and then
+ run detached, so that latexmk gets the previewer running and then
returns to its next task (or exits if there is nothing else to do). To
- achieve this effect of detaching a command, you need to precede the
+ achieve this effect of detaching a command, you need to precede the
command name with "start ", as in
$dvi_previewer = 'start xdvi %O %S';
- This will be translated to whatever is appropriate for your operating
+ This will be translated to whatever is appropriate for your operating
system.
- Notes: (1) In some circumstances, latex will always run a command
+ Notes: (1) In some circumstances, latex will always run a command
detached. This is the case for a previewer in preview continuous mode,
- since otherwise previewing continuously makes no sense. (2) This pre-
- cludes the possibility of running a command named start. (3) If the
- word start occurs more than once at the beginning of the command
- string, that is equivalent to having just one. (4) Under cygwin, some
- complications happen, since cygwin amounts to a complicated merging of
- UNIX and MS-Windows. See the source code for how I've handled the
- problem.
+ since otherwise previewing continuously makes no sense. (2) This pre-
+ cludes the possibility of running a command named start. (3) If the
+ word start occurs more than once at the beginning of the command
+ string, that is equivalent to having just one. (4) Under cygwin, some
- Command names containing spaces: Under MS-Windows it is common that the
- name of a command includes spaces, since software is often installed in
- a subdirectory of "C:Program Files". Such command names should be
- enclosed in double quotes, as in
- $lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p
- %S';
- Using MS-Windows file associations: A useful trick under modern ver-
- sions of MS-Windows (e.g., WinXP) is to use just the command
+ 10 April 2009 11
- $dvi_previewer = 'start %S';
- Under recent versions of MS-Windows, this will cause to be run whatever
- program the system has associated with dvi files. (The same applies
- 10 April 2009 11
+LATEXMK(1L) LATEXMK(1L)
+ complications happen, since cygwin amounts to a complicated merging of
+ UNIX and MS-Windows. See the source code for how I've handled the
+ problem.
+ Command names containing spaces: Under MS-Windows it is common that the
+ name of a command includes spaces, since software is often installed in
+ a subdirectory of "C:Program Files". Such command names should be
+ enclosed in double quotes, as in
+ $lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p
+ %S';
-LATEXMK(1L) LATEXMK(1L)
+ Using MS-Windows file associations: A useful trick under modern ver-
+ sions of MS-Windows (e.g., WinXP) is to use just the command
+ $dvi_previewer = 'start %S';
+ Under recent versions of 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.)
Not using a certain command: If a command is not to be run, the command
@@ -746,45 +767,55 @@ LATEXMK(1L) LATEXMK(1L)
$lpr = 'NONE lpr';
- This typically is used when an appropriate command does not exist on
+ This typically is used when an appropriate command does not exist on
your system. The string after the "NONE" is effectively a comment.
Options to commands: Setting the name of a command can be used not only
for changing the name of the command called, but also to add options to
- command. Suppose you want latexmk to use latex with source specials
- enabled. Then you might use the following line in an initialization
+ command. Suppose you want latexmk to use latex with source specials
+ enabled. Then you might use the following line in an initialization
file:
$latex = 'latex --src-specials %O %S';
- Advanced tricks: Normally one specifies a single command for the com-
- mands invoked by latexmk. Naturally, if there is some complicated
+ Advanced tricks: Normally one specifies a single command for the com-
+ mands invoked by latexmk. Naturally, if there is some complicated
additional processing you need to do in your special situation, you can
write a script (or batch file) to do the processing, and then configure
latexmk to use your script in place of the standard program.
It is also possible to configure latexmk to run multiple commands. For
- example, if when running pdflatex to generate a pdf file from a tex
- file you need to run another program after pdflatex to perform some
+ example, if when running pdflatex to generate a pdf file from a tex
+ file you need to run another program after pdflatex to perform some
extra processing, you could do something like:
- $pdflatex = 'pdflatex --shell-escape %O %S; pst2pdf_for_latexmk
+ $pdflatex = 'pdflatex --shell-escape %O %S; pst2pdf_for_latexmk
%B';
- This definition assumes you are using a UNIX-like system, so that the
- two commands to be run are separated by the semicolon in the middle of
+ This definition assumes you are using a UNIX-like system, so that the
+ two commands to be run are separated by the semicolon in the middle of
the string.
+
+ 10 April 2009 12
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
Default values are indicated in brackets.
$banner [0]
- If nonzero, the banner message is printed across each page when
- converting the dvi file to postscript. Without modifying the
- variable $banner_message, this is equivalent to specifying the
+ If nonzero, the banner message is printed across each page when
+ converting the dvi file to postscript. Without modifying the
+ variable $banner_message, this is equivalent to specifying the
-d option.
Note that if $banner is nonzero, the $postscript_mode is assumed
@@ -793,19 +824,7 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
$banner_intensity [0.95]
Equivalent to the -bi option, this is a decimal number between 0
- and 1 that specifies how dark to print the banner message. 0 is
-
-
-
- 10 April 2009 12
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
+ and 1 that specifies how dark to print the banner message. 0 is
black, 1 is white. The default is just right if your toner car-
tridge isn't running too low.
@@ -814,19 +833,19 @@ LATEXMK(1L) LATEXMK(1L)
dvi file to postscript. This is equivalent to the -bm option.
$banner_scale [220.0]
- 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 just right for 5 character messages.
+ 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 just right for 5 character messages.
This is equivalent to the -bs option.
@BIBINPUTS
- This is an array variable, now mostly obsolete, that specifies
- directories where latexmk should look for .bib files. By
+ This is an array variable, now mostly obsolete, that specifies
+ directories where latexmk should look for .bib files. By
default it is set from the BIBINPUTS environment variable of the
- operating system. If that environment variable is not set, a
- single element list consisting of the current directory is set.
+ operating system. If that environment variable is not set, a
+ single element list consisting of the current directory is set.
The format of the directory names depends on your operating sys-
tem, of course. Examples for setting this variable are:
@@ -836,166 +855,155 @@ LATEXMK(1L) LATEXMK(1L)
@BIBINPUTS = ( ".", "//server/bibfiles" );
@BIBINPUTS = ( ".", "/usr/local/texmf/bibtex/bib" );
- Note that under MS Windows, either a forward slash "/" or a
- backward slash "\" can be used to separate pathname components,
- so the first two and the second two examples are equivalent.
- Each backward slash should be doubled to avoid running afoul of
+ Note that under MS Windows, either a forward slash "/" or a
+ backward slash "\" can be used to separate pathname components,
+ so the first two and the second two examples are equivalent.
+ Each backward slash should be doubled to avoid running afoul of
Perl's rules for writing strings.
- Important note: This variable is now mostly obsolete in the current
+ Important note: This variable is now mostly obsolete in the current
version of latexmk, since it has a better method of searching for files
using the kpsewhich command. However, if your system is an unusual one
- without the kpsewhich command, you may need to set the variable @BIBIN-
- PUTS.
+ without the kpsewhich command, you may need to set the variable
- $bibtex ["bibtex %O %S"]
- The BibTeX processing program.
- $bibtex_silent_switch ["-terse"]
- Switch(es) for the BibTeX processing program when silent mode is
- on.
- $cleanup_includes_generated [0]
- If nonzero, specifies that cleanup also deletes files that are
- detected in log file as being generated (see the \openout lines
- in the log file). It will also include files made from these
- first generation generated files.
+ 10 April 2009 13
- 10 April 2009 13
+LATEXMK(1L) LATEXMK(1L)
+ @BIBINPUTS.
+ $bibtex ["bibtex %O %S"]
+ The BibTeX processing program.
-LATEXMK(1L) LATEXMK(1L)
+ $bibtex_silent_switch ["-terse"]
+ Switch(es) for the BibTeX processing program when silent mode is
+ on.
+ $cleanup_includes_generated [0]
+ If nonzero, specifies that cleanup also deletes files that are
+ detected in log file as being generated (see the \openout lines
+ in the log file). It will also include files made from these
+ first generation generated files.
$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 except
- for dep and aux files. (There is also extra cleaning as speci-
- fied by the $clean_ext, $clean_full_ext and @generated_exts
+ If nonzero, specifies cleanup mode: 1 for full cleanup, 2 for
+ cleanup except for dvi, ps and pdf files, 3 for cleanup except
+ for dep and aux files. (There is also extra cleaning as speci-
+ fied by the $clean_ext, $clean_full_ext and @generated_exts
variables.)
- This variable is equivalent to specifying one of the -c, -c1, or -C
- options. But there should be no need to set this variable from an RC
+ This variable is equivalent to specifying one of the -c, -c1, 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, -c1, or -C) is selected. The value of
+ Extra extensions of files for latexmk to remove when any of the
+ clean-up options (-c, -c1, or -C) is selected. The value of
this variable is a string containing the extensions separated by
spaces.
$clean_full_ext [""]
- Extra extensions of files for latexmk to remove when the -C
+ Extra extensions of files for latexmk to remove when the -C
option is selected, i.e., extensions of files to remove when the
.dvi, etc files are to be cleaned-up.
@cus_dep_list [()]
- Custom dependency list -- see section on "Custom Dependencies".
+ Custom dependency list -- see section on "Custom Dependencies".
@default_files [("*.tex")]
Default list of files to be processed.
- Normally, if no filenames are specified on the command line,
- latexmk processes all tex files specified in the @default_files
- variable, which by default is set to all tex files ("*.tex") in
- the current directory. This is a convenience: just run latexmk
- and it will process an appropriate set of files. But sometimes
+ Normally, if no filenames are specified on the command line,
+ latexmk processes all tex files specified in the @default_files
+ variable, which by default is set to all tex files ("*.tex") in
+ the current 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 set the @default_files in an initialization file (e.g., the
- file "latexmkrc" in the current directory). Then if no files
- are specified on the command line then the files you specify by
+ you set the @default_files in an initialization file (e.g., the
+ file "latexmkrc" in the current directory). Then if no files
+ are specified on the command line then the files you specify by
setting @default_files are processed.
Three examples:
- @default_files = ("paper_current");
- @default_files = ("paper1", "paper2.tex");
- @default_files = ("*.tex", "*.dtx");
- Note that more than file may be given, and that the default
- extension 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.
+ 10 April 2009 14
- $dvi_filter [empty]
- The dvi file filter to be run on the newly produced dvi file
- before other processing. Equivalent to specifying the -dF
- 10 April 2009 14
+LATEXMK(1L) LATEXMK(1L)
+ @default_files = ("paper_current");
+ @default_files = ("paper1", "paper2.tex");
-LATEXMK(1L) LATEXMK(1L)
+ @default_files = ("*.tex", "*.dtx");
+ Note that more than file may be given, and that the default
+ extension 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.
+ $dvi_filter [empty]
+ The dvi file filter to be run on the newly produced dvi file
+ before other processing. Equivalent to specifying the -dF
option.
$dvi_mode [See below for default]
- If nonzero, generate a dvi version of the document. Equivalent
+ If nonzero, generate a dvi version of the document. Equivalent
to the -dvi option.
- The variable $dvi_mode defaults to 0, but if no explicit requests 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
+ The variable $dvi_mode defaults to 0, but if no explicit requests 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.
$dvi_previewer ["start xdvi %O %S" under UNIX]
- The command to invoke a dvi-previewer. [Default is "start"
- under MS-WINDOWS; under more recent versions of Windows, this
- will cause to be run whatever command the system has associated
+ The command to invoke a dvi-previewer. [Default is "start"
+ under MS-WINDOWS; under more recent versions of Windows, this
+ will cause to be run whatever command the system has associated
with .dvi files.]
$dvi_previewer_landscape ["start xdvi %O %S"]
The command to invoke a dvi-previewer in landscape mode.
[Default is "start" under MS-WINDOWS; under more recent versions
- of Windows, this will cause to be run whatever command the sys-
+ of Windows, this will cause to be run whatever command the sys-
tem has associated with .dvi files.]
$dvipdf ["dvipdf %O %S %D"]
Command to convert dvi to pdf file. A common reconfiguration is
- to use the dvipdfm command, which needs its arguments in a dif-
+ to use the dvipdfm command, which needs its arguments in a dif-
ferent order:
$dvipdf = "dvipdfm %O -o %D %S";
- WARNING: The default dvipdf script generates pdf files with
+ 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
+ That script should be modified to give dvips the options "-P
pdf" to ensure that type 1 fonts are used in the pdf file.
$dvips ["dvips %O -o %D %S"]
- The program to used as a filter to convert a .dvi file to a .ps
- file. If pdf is going to be generated from pdf, then the value
+ The program to used as a filter to convert a .dvi file to a .ps
+ file. If pdf is going to be generated from pdf, then the value
of the $dvips_pdf_switch -- see below -- will be included in the
options substituted for "%O".
$dvips_landscape ["dvips -tlandscape %O -o %D %S"]
- The program to used as a filter to convert a .dvi file to a .ps
+ The program to used as a filter to convert a .dvi file to a .ps
file in landscape mode.
- $dvips_pdf_switch ["-P pdf"]
- Switch(es) for dvips program when pdf file is to be generated
- from ps file.
-
- $dvips_silent_switch ["-q"]
- Switch(es) for dvips program when silent mode is on.
-
- $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
-
10 April 2009 15
@@ -1007,61 +1015,64 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ $dvips_pdf_switch ["-P pdf"]
+ Switch(es) for dvips program when pdf file is to be generated
+ from ps file.
+
+ $dvips_silent_switch ["-q"]
+ Switch(es) for dvips program when silent mode is on.
+
+ $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
the variable $dvi_update_method for further information, and see
- information on the variable $pdf_update_method for an example
+ information on the variable $pdf_update_method for an example
for the analogous case of a pdf previewer.
$dvi_update_method [2 under UNIX, 1 under MS-Windows]
- How the dvi viewer updates its display when the dvi file has
- changed. The values here apply equally to the
+ How the dvi viewer updates its display when the dvi file has
+ changed. The values here apply equally to the
$pdf_update_method and to the $ps_update_method variables.
0 => update is automatic,
1=> manual update by user, which may only mean a mouse click
on the viewer's window or may mean a more serious action.
- 2 => Send the signal, whose number is in the variable
- $dvi_update_signal. The default value under UNIX is suitable
+ 2 => Send the signal, whose number is in the variable
+ $dvi_update_signal. The default value under UNIX is suitable
for xdvi.
- 3 => Viewer cannot do an update, because it locks the file.
+ 3 => Viewer cannot do an update, because it locks the file.
(As with acroread under MS-Windows.)
- 4 => run a command to do the update. The command is speci-
+ 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 exam-
+ 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
+ $dvi_update_signal [Under UNIX: SIGUSR1, which is a system-dependent
value]
- The number of the signal that is sent to the dvi viewer when it
- is updated by sending a signal -- see the information on the
- variable $dvi_update_method. The default value is the one
+ The number of the signal that is sent to the dvi viewer when it
+ is updated by sending a signal -- see the information on the
+ variable $dvi_update_method. The default value is the one
appropriate for xdvi on a UNIX system.
$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.
$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 , bbl , idx , ind , lof , lot , out , toc ,
+ @generated_exts [( aux , bbl , idx , ind , lof , lot , out , toc ,
$fdb_ext )]
- This contains a list of extensions for files that are generated
- during a LaTeX run and that are read in by LaTeX in later runs,
+ This contains a list of extensions for files that are generated
+ during a LaTeX run and that are read in by LaTeX in later runs,
either directly or indirectly.
- This list has two uses: (a) to set the kinds of file to be
+ This list has two uses: (a) to set the kinds of file to be
deleted in a cleanup operation (with the -c, -C, -CA, -g and -gg
- options), and (b) in the determination of whether a rerun of
- (pdf)LaTeX is needed after a run that gives an error.
-
- (Normally, a change of a source file during a run should provoke
- a rerun. This includes a file generated by LaTeX, e.g., an aux
- file, that is read in on subsequent runs. But after a run that
- results in an error, a new run should occur until the user has
- made a change in the files. But the user may have corrected an
+ options), and (b) in the determination of whether a rerun of
@@ -1074,37 +1085,44 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ (pdf)LaTeX is needed after a run that gives an error.
+
+ (Normally, a change of a source file during a run should provoke
+ a rerun. This includes a file generated by LaTeX, e.g., an aux
+ file, that is read in on subsequent runs. But after a run that
+ results in an error, a new run should occur until the user has
+ made a change in the files. But the user may have corrected an
error in a source .tex file during the run. So latexmk needs to
distinguish user-generated and automatically generated files; it
- determines the automatically generated files as those with
+ determines the automatically generated files as those with
extensions in the list in @generated_exts.)
- 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
+ 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";
- adds the extension "end" to the list of predefined generated
- extensions. (This extension is used by the RevTeX package, for
+ adds the extension "end" to the list of predefined generated
+ extensions. (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, only
- exited becaues latexmk has a limit on the number of runs to
+ 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, only
+ exited becaues 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.
@@ -1113,22 +1131,18 @@ LATEXMK(1L) LATEXMK(1L)
$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
+ 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 expresssion. (See documentation on Perl for how
- they are to be specified in general.) This particular regular
- expression specifies that lines beginning with "%%CreationDate:
- " are to be ignored in deciding whether a file of the given
+ ing a regular expresssion. (See documentation on Perl for how
+ they are to be specified in general.) This particular regular
+ expression specifies that lines beginning with "%%CreationDate:
+ " are to be ignored in deciding whether a file of the given
extension .eps has changed.
$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-
- cient path information to be found directly. But sometimes,
- notably when the file, but not its path is known. The program
- specified by $kpsewhich is used to find it.
-
+ The program called to locate a source file when the name alone
+ is not sufficient. Most filenames used by latexmk have
@@ -1141,40 +1155,44 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- See also the @BIBINPUTS variable for another way that latexmk
+ sufficient path information to be found directly. But some-
+ times, notably when the file, but not its path is known. The
+ program specified by $kpsewhich is used to find it.
+
+ 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.
$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"]
The LaTeX processing program. Note that as with other programs,
- you can use this variable not just to change the name of the
+ 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";
%latex_input_extensions
- This variable specifies the extensions tried by latexmk when it
- finds that a LaTeX run resulted in an error that a file has not
- been found, and the file is given without an extension. This
+ This variable specifies the extensions tried by latexmk when it
+ finds that a LaTeX 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 input{file} or
- includegraphics{figure}, when the relevant source file does not
+ 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 %latex_input_extensions. The default
+ In this situation, latexmk searches for custom dependencies to
+ make the missing file(s), but restricts it to the extensions
+ specified by the variable %latex_input_extensions. The default
extensions are
- (For Perl experts: %latex_input_extensions is a hash whose keys
- are the extensions. The values are irrelevant.) Two subrou-
- tines are provided for manipulating this and the related vari-
- able %pdflatex_input_extensions, add_input_ext and
- remove_input_ext. They are used as in the following examples
+ (For Perl experts: %latex_input_extensions is a hash whose keys
+ are the extensions. The values are irrelevant.) Two subrou-
+ tines are provided for manipulating this and the related vari-
+ able %pdflatex_input_extensions, add_input_ext and
+ remove_input_ext. They are used as in the following examples
are possible lines in an initialization file:
remove_input_ext( 'latex', 'tex' );
@@ -1183,19 +1201,18 @@ LATEXMK(1L) LATEXMK(1L)
add_input_ext( 'latex', 'asdf' );
- add the extension 'asdf to latex_input_extensions. (Naturally
+ add the extension 'asdf to latex_input_extensions. (Naturally
with such an extension, you should have made an appropriate cus-
tom dependency for latexmk, and should also have done the appro-
- priate programming in the LaTeX source file to enable the file
- to be read. The standard extensions are handled by LaTeX and
+ priate programming in the LaTeX source file to enable the file
+ to be read. The standard extensions are handled by LaTeX and
its graphics/graphicx packages.
$latex_silent_switch ["-interaction=batchmode"]
- Switch(es) for the LaTeX processing program when silent mode is
- on. Under MS-Windows, the default value is changed to "-inter-
- action=batchmode -c-style-errors", as used by MikTeX and fpTeX.
-
+ Switch(es) for the LaTeX processing program when silent mode is
+ on. Under MS-Windows, the default value is changed to "-inter-
+ action=batchmode -c-style-errors", as used by MikTeX and fpTeX.
@@ -1211,19 +1228,19 @@ LATEXMK(1L) LATEXMK(1L)
$lpr ["lpr %O %S" under UNIX/LINUX, "NONE lpr" under MS-WINDOWS]
The command to print postscript files.
- Under MS-Windows (unlike UNIX/LINUX), there is no standard pro-
+ Under MS-Windows (unlike UNIX/LINUX), there is no standard pro-
gram for printing files. But there are ways you can do it. For
example, if you have gsview installed, you could use it with the
option "/p":
$lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
- If gsview is installed in a different directory, you will need
- to make the appropriate change. Note the combination of single
- and double quotes around the name. The single quotes specify
- that this is a string to be assigned to the configuration vari-
- able $lpr. The double quotes are part of the string passed to
- the operating system to get the command obeyed; this is neces-
+ If gsview is installed in a different directory, you will need
+ to make the appropriate change. Note the combination of single
+ and double quotes around the name. The single quotes specify
+ that this is a string to be assigned to the configuration vari-
+ able $lpr. The double quotes are part of the string passed to
+ the operating system to get the command obeyed; this is neces-
sary because one part of the command name ("Program Files") con-
tains a space which would otherwise be misinterpreted.
@@ -1233,13 +1250,13 @@ LATEXMK(1L) LATEXMK(1L)
$lpr_pdf ["NONE lpr_pdf"]
The printing program to print pdf files.
- Under MS-Windows you could set this to use gsview, if it is
+ Under MS-Windows you could set this to use gsview, if it is
installed, e.g.,
$lpr = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p';
- If gsview is installed in a different directory, you will need
- to make the appropriate change. Note the double quotes around
+ 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
("Program Files") contains a space which would otherwise be mis-
interpreted.
@@ -1249,20 +1266,23 @@ LATEXMK(1L) LATEXMK(1L)
The index processing program.
$max_repeat [5]
- The maximum number of times latexmk will run latex/pdflatex
- before deciding that there may be an infinite loop and that it
+ The maximum number of times latexmk will run latex/pdflatex
+ before deciding that there may be an infinite loop and that it
needs to bail out, rather than rerunning latex/pdflatex again to
- resolve cross-references, etc. The default value covers all
+ resolve cross-references, etc. The default value covers all
normal cases.
- (Note that the "etc" covers a lot of cases where one run of
+ (Note that the "etc" covers a lot of cases where one run of
latex/pdflatex generates files to be read in on a later run.)
$new_viewer_always [0]
- This variable applies to latexmk only in continuous-preview
+ 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-
+ 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.
+
@@ -1275,42 +1295,39 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- zero, this check will be skipped, and latexmk will behave as if
- no viewer is running.
-
$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-
+ 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. If equal to 2, generate a pdf version of the document from
the ps file, by using the command specified by the $ps2pdf vari-
- able. If equal to 3, generate a pdf version of the document
+ able. If equal to 3, generate a pdf version of the document
from the dvi file, by using the command specified by the $dvipdf
variable.
Equivalent to the -pdf-, -pdf, -pdfdvi, -pdfps options.
$pdflatex ["pdflatex %O %S"]
- The LaTeX processing program in the version that makes a pdf
+ The LaTeX processing program in the version that makes a pdf
file instead of a dvi file.
%pdflatex_input_extensions
- This variable specifies the extensions tried by latexmk when it
- finds that a pdfLaTeX 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
+ This variable specifies the extensions tried by latexmk when it
+ finds that a pdfLaTeX 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
input{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
+ 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
default extensions are
- (For Perl experts: %pdflatex_input_extensions is a hash whose
- keys are the extensions. The values are irrelevant.) Two sub-
- routines are provided for manipulating this and the related
- variable %latex_input_extensions, add_input_ext and
- remove_input_ext. They are used as in the following examples
+ (For Perl experts: %pdflatex_input_extensions is a hash whose
+ keys are the extensions. The values are irrelevant.) Two sub-
+ routines are provided for manipulating this and the related
+ variable %latex_input_extensions, add_input_ext and
+ remove_input_ext. They are used as in the following examples
are possible lines in an initialization file:
remove_input_ext( 'pdflatex', 'tex' );
@@ -1319,17 +1336,23 @@ LATEXMK(1L) LATEXMK(1L)
add_input_ext( 'pdflatex', 'asdf' );
- add the extension 'asdf to pdflatex_input_extensions. (Natu-
- rally with such an extension, you should have made an appropri-
+ add the extension 'asdf to pdflatex_input_extensions. (Natu-
+ rally with such an extension, you should have made an appropri-
ate custom dependency for latexmk, and should also have done the
- appropriate programming in the LaTeX source file to enable the
- file to be read. The standard extensions are handled by pdfla-
+ appropriate programming in the LaTeX source file to enable the
+ file to be read. The standard extensions are handled by pdfla-
tex and its graphics/graphicx packages.)
$pdflatex_silent_switch ["-interaction=batchmode"]
- Switch(es) for the pdflatex program (specified in the variable
+ Switch(es) for the pdflatex program (specified in the variable
$pdflatex when silent mode is on. Under MS-Windows, the default
+ value is changed to "-interaction=batchmode -c-style-errors", as
+ used by MikTeX and fpTeX.
+
+ $pdf_previewer ["start acroread %O %S"]
+ The command to invoke a pdf-previewer. [Default is changed to
+ "start" on MS-WINDOWS; under more recent versions of Windows,
@@ -1342,34 +1365,28 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- value is changed to "-interaction=batchmode -c-style-errors", as
- used by MikTeX and fpTeX.
-
- $pdf_previewer ["start acroread %O %S"]
- The command to invoke a pdf-previewer. [Default is changed to
- "start" on MS-WINDOWS; under more recent versions of Windows,
- this will cause to be run whatever command the system has asso-
+ this will cause to be run whatever command the system has asso-
ciated with .pdf files.]
WARNING: Potential problem under MS-Windows: if acroread is used
as the pdf previewer, and it is actually viewing a pdf file, the
pdf file cannot be updated. Thus makes acroread a bad choice of
- previewer if you use latexmk's previous-continuous mode (option
- -pvc) under MS-windows. This problem does not occur if
+ previewer if you use latexmk's previous-continuous mode (option
+ -pvc) under MS-windows. This problem does not occur if
ghostview, gv or gsview is used to view pdf files.
$pdf_update_command [""]
- When the pdf previewer is set to be updated by running a com-
- mand, this is the command that is run. See the information for
+ When the pdf previewer is set to be updated by running a com-
+ mand, this is the command that is run. See the information for
the variable $pdf_update_method.
$pdf_update_method [1 under UNIX, 3 under MS-Windows]
- How the pdf viewer updates its display when the pdf file has
- changed. See the information on the variable $dvi_update_method
+ How the pdf viewer updates its display when the pdf file has
+ changed. See the information on the variable $dvi_update_method
for the codes. (Note that information needs be changed slightly
- so that for the value 4, to run a command to do the update, the
- command is specified by the variable $pdf_update_command, and
- for the value 2, to specify update by signal, the signal is
+ so that for the value 4, to run a command to do the update, the
+ command is specified by the variable $pdf_update_command, and
+ for the value 2, to specify update by signal, the signal is
specified by $pdf_update_signal.)
Note that acroread under MS-Windows (but not UNIX) locks the pdf
@@ -1382,23 +1399,31 @@ LATEXMK(1L) LATEXMK(1L)
$pdf_update_method = 4;
$pdf_update_command = "xpdf -remote %R -reload";
- 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
+ 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
updating to be done in response to a command, and the third set-
ting sets the update command.
- $pdf_update_signal [Under UNIX: SIGHUP, which is a system-dependent
+ $pdf_update_signal [Under UNIX: SIGHUP, which is a system-dependent
value]
- The number of the signal that is sent to the pdf viewer when it
- is updated by sending a signal -- see the information on the
- variable $pdf_update_method. The default value is the one
+ The number of the signal that is sent to the pdf viewer when it
+ is updated by sending a signal -- see the information on the
+ variable $pdf_update_method. The default value is the one
appropriate for gv on a UNIX system.
$pid_position[1 under UNIX, -1 under MS-Windows]
- The variable $pid_position is used to specify which word in
- lines of the output from $pscmd corresponds to the process ID.
+ The variable $pid_position is used to specify which word in
+ lines of the output from $pscmd corresponds to the process ID.
+ The first word in the line is numbered 0. The default value of
+ 1 (2nd word in line) is correct for Solaris 2.6 and Linux. Set-
+ ting the variable to -1 is used to indicate that $pscmd is not
+ to be used.
+
+ $postscript_mode [0]
+ If nonzero, generate a postscript version of the document.
+ Equivalent to the -ps option.
@@ -1411,115 +1436,120 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- The first word in the line is numbered 0. The default value of
- 1 (2nd word in line) is correct for Solaris 2.6 and Linux. Set-
- ting the variable to -1 is used to indicate that $pscmd is not
- to be used.
-
- $postscript_mode [0]
- If nonzero, generate a postscript version of the document.
- Equivalent to the -ps option.
-
- If some other request is made for which a postscript file is needed,
+ If some other request is made for which a postscript file is needed,
then $postscript_mode will be set to 1.
$preview_continuous_mode [0]
- If nonzero, run a previewer to view the document, and continue
+ If nonzero, run a previewer to view the document, and continue
running latexmk to keep .dvi up-to-date. Equivalent to the -pvc
- option. Which previewer is run depends on the other settings,
+ option. Which previewer is run depends on the other settings,
see the command line options -view=, and the variable $view.
$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
- settings, see the command line options -view=, and the variable
+ to the -pv option. Which previewer is run depends on the other
+ settings, see the command line options -view=, and the variable
$view.
$printout_mode [0]
- If nonzero, print the document using lpr. Equivalent to the -p
+ If nonzero, print the document using lpr. Equivalent to the -p
option. This is recommended not to be set from an RC file, oth-
erwise you could waste lots of paper.
$print_type = ["ps"]
- Type of file to printout: possibilities are "dvi", "none",
+ Type of file to printout: possibilities are "dvi", "none",
"pdf", or "ps".
$pscmd Command used to get all the processes currently run by the user.
- 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
+ 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
the previewer about file changes).
Each line of the output of this command is assumed to correspond
to one process. See the $pid_position variable for how the pro-
cess number is determined.
- The default for pscmd is "NONE" under MS-Windows and cygwin
+ The default for pscmd is "NONE" under MS-Windows and cygwin
(i.e., the command is not used), "ps --width 200 -f -u
- $ENV{USER}" under linux, "ps -ww -u $ENV{USER}" under darwin
- (Macintosh OS-X), and "ps -f -u $ENV{USER}" under other operat-
- ing systems (including other flavors of UNIX). In these speci-
+ $ENV{USER}" under linux, "ps -ww -u $ENV{USER}" under darwin
+ (Macintosh OS-X), and "ps -f -u $ENV{USER}" under other operat-
+ ing systems (including other flavors of UNIX). In these speci-
fications "$ENV{USER}" is substituted by the username.
$ps2pdf ["ps2pdf %O %S %D"]
Command to convert ps to pdf file.
$ps_filter [empty]
- The postscript file filter to be run on the newly produced
+ The postscript file filter to be run on the newly produced
postscript file before other processing. Equivalent to specify-
ing the -pF option.
+ $ps_previewer ["start gv %O %S", but "start %O %S" under MS-WINDOWS]
+ The command to invoke a ps-previewer. (The default under MS-
+ WINDOWS will cause to be run whatever command the system has
+ associated with .ps files.)
+ Note that gv could be used with the -watch option updates its
+ display whenever the postscript file changes, whereas ghostview
+ does not. However, different versions of gv have slightly dif-
+ ferent ways of writing this option. You can configure this
+ variable apppropriately.
- 10 April 2009 22
+ 10 April 2009 22
-LATEXMK(1L) LATEXMK(1L)
- $ps_previewer ["start gv %O %S", but "start %O %S" under MS-WINDOWS]
- The command to invoke a ps-previewer. (The default under MS-
- WINDOWS will cause to be run whatever command the system has
- associated with .ps files.)
+LATEXMK(1L) LATEXMK(1L)
- Note that gv could be used with the -watch option updates its
- display whenever the postscript file changes, whereas ghostview
- does not. However, different versions of gv have slightly dif-
- ferent ways of writing this option. You can configure this
- variable apppropriately.
WARNING: Linux systems may have installed one (or more) versions
- of gv under different names, e.g., ggv, kghostview, etc, but
+ of gv under different names, e.g., ggv, kghostview, etc, but
perhaps not one called gv.
- $ps_previewer_landscape ["start gv -swap %O %S", but "start %O %S"
+ $ps_previewer_landscape ["start gv -swap %O %S", but "start %O %S"
under MS-WINDOWS]
The command to invoke a ps-previewer in landscape mode.
$ps_update_command [""]
- When the postscript previewer is set to be updated by running a
- command, this is the command that is run. See the information
+ When the postscript previewer is set to be updated by running a
+ command, this is the command that is run. See the information
for the variable $ps_update_method.
$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_update_method for the codes. (Note that information needs
+ How the postscript viewer updates its display when the ps file
+ has changed. See the information on the variable
+ $dvi_update_method for the codes. (Note that information needs
be changed slightly so that for the value 4, to run a command to
do the update, the command is specified by the variable
- $ps_update_command, and for the value 2, to specify update by
+ $ps_update_command, and for the value 2, to specify update by
signal, the signal is specified by $ps_update_signal.)
- $ps_update_signal [Under UNIX: SIGHUP, which is a system-dependent
+ $ps_update_signal [Under UNIX: SIGHUP, which is a system-dependent
value]
- The number of the signal that is sent to the pdf viewer when it
- is updated by sending a signal -- see $ps_update_method. The
+ The number of the signal that is sent to the pdf viewer when it
+ is updated by sending a signal -- see $ps_update_method. The
default value is the one appropriate for gv on a UNIX system.
+ $quote_filenames [1]
+ This specifies whether substitutions for placeholders in command
+ specifications (as in $pdflatex) are surrounded by double
+ quotes. If this variable is 1 (or any other value Perl regards
+ as true), then quoting is done. Otherwise quoting is omitted.
+
+ The quoting method used by latexmk is tested to work correctly under
+ UNIX systems (including Linux and Mac OS-X) and under MS-Windows. It
+ allows the use of filenames containing special characters, notably
+ spaces. (But note that many versions of LaTeX and PdfLaTeX cannot cor-
+ rectly deal with TeX files whose names contain spaces. Latexmk's quot-
+ ing only ensures that such filenames are correctly treated by the oper-
+ ating system in passing arguments to programs.)
+
$sleep_time [2]
The time to sleep (in seconds) between checking for source file
changes when running the -pvc option.
@@ -1539,7 +1569,6 @@ LATEXMK(1L) LATEXMK(1L)
-
10 April 2009 23
@@ -1606,6 +1635,8 @@ CUSTOM DEPENDENCIES
It is invoked whenever latexmk detects that a run of latex/pdflatex
needs to read a file, like a graphics file, whose extension is the to-
+ extension of a custom dependency. Then latexmk examines whether a file
+ exists with the same name, but with the corresponding from-extension,
@@ -1618,8 +1649,6 @@ CUSTOM DEPENDENCIES
LATEXMK(1L) LATEXMK(1L)
- extension of a custom dependency. Then latexmk examines whether a file
- exists with the same name, but with the corresponding from-extension,
as specified in the custom-dependency rule. If it does, then whenever
the destination file (the one with the to-extension) is out-of-date
with respect to the corresponding source file.
@@ -1676,6 +1705,10 @@ LATEXMK(1L) LATEXMK(1L)
system("fig2dev -Lps '$_[0].fig' '$_[0].eps'");
}
+ This causes the invocation of the fig2dev program to have quoted file-
+ names; it should therefore work with filenames containing spaces. How-
+ ever, not all software deals correctly with filenames that contain
+
10 April 2009 25
@@ -1687,9 +1720,6 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- This causes the invocation of the fig2dev program to have quoted file-
- names; it should therefore work with filenames containing spaces. How-
- ever, not all software deals correctly with filenames that contain
spaces. Moreover, the rules, if any, for quoting filenames vary
between operating systems, command shells and individual pieces of
software, so this code may not always work.
@@ -1744,6 +1774,11 @@ LATEXMK(1L) LATEXMK(1L)
be perpetually out-of-date. This situation, of circular dependencies,
is endemic to latex, and latexmk in its current version works correctly
with circular dependencies. It examines the contents of the files (by
+ use of an md5 checksum), and only does a remake when the file contents
+ have actually changed.
+
+ Of course if you choose to write random data to the .nnd (or and .aux
+ file, etc) that changes on each new run, then you will have a problem.
@@ -1756,11 +1791,6 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- use of an md5 checksum), and only does a remake when the file contents
- have actually changed.
-
- Of course if you choose to write random data to the .nnd (or and .aux
- file, etc) that changes on each new run, then you will have a problem.
For real experts: See the %hash_cal_ignore_pattern if you have to deal
with such problems.
@@ -1815,6 +1845,13 @@ BUGS
THANKS TO
Authors of previous versions. Many users with their feedback, and
especially 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 standard form to avoid being harvested by worms and viruses.)
+
+AUTHOR
+ Current version, by John Collins (username collins at node
+ phys.psu.edu). (Version 4.05a).
@@ -1827,14 +1864,6 @@ THANKS TO
LATEXMK(1L) LATEXMK(1L)
- many useful suggestions that contributed to version 3, and Herbert
- Schulz. (Please note that the e-mail addresses are not written in
- their standard form to avoid being harvested by worms and viruses.)
-
-AUTHOR
- Current version, by John Collins (username collins at node
- phys.psu.edu). (Version 4.05).
-
Released version can be obtained from CTAN: <http://www.tug.org/tex-
archive/support/latexmk/>, and from the author's website
<http://www.phys.psu.edu/~collins/software/latexmk/>.
@@ -1889,6 +1918,16 @@ AUTHOR
+
+
+
+
+
+
+
+
+
+
10 April 2009 28