summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/latexmk.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/support/latexmk/latexmk.txt')
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.txt764
1 files changed, 402 insertions, 362 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.txt b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
index f8d83547723..2a31fec47d7 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.txt
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
@@ -1,4 +1,9 @@
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
NAME
latexmk - generate LaTeX document
@@ -53,15 +58,10 @@ DESCRIPTION
WYSIWYG, but usefully close.
For other previewers, the user may have to manually make the previewer
- update its display, which can be (some versions of xdvi and gsview) as
- simple as forcing a redraw of its display.
-
- Latexmk has the ability to print a banner in gray diagonally across
- each page when making the postscript file. It can also, if needed,
- 1
+ 28 December 2010 1
@@ -70,6 +70,11 @@ DESCRIPTION
LATEXMK(1L) LATEXMK(1L)
+ update its display, which can be (some versions of xdvi and gsview) as
+ simple as forcing a redraw of its display.
+
+ Latexmk has the ability to print a banner in gray diagonally across
+ each page when making the postscript file. It can also, if needed,
call an external program to do other postprocessing on the generated
files.
@@ -120,14 +125,9 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
This property can also be configured by setting the $bibtex_use
variable to 2 in a configuration file
- -bibtex-
- Never run bibtex.
-
- A common use for this option is when a document comes from an
-
- 27 July 2010 2
+ 28 December 2010 2
@@ -136,6 +136,10 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
LATEXMK(1L) LATEXMK(1L)
+ -bibtex-
+ Never run bibtex.
+
+ A common use for this option is when a document comes from an
external source, complete with its bbl file(s), and the user
does not have the corresponding bib files available. In this
situation use of the -bibtex- option will prevent latexmk from
@@ -163,8 +167,8 @@ LATEXMK(1L) LATEXMK(1L)
-bm <message>
A banner message to print diagonally across each page when con-
verting the dvi file to postscript. The message must be a sin-
- gle argument on the command line so be careful with quoting
- spaces and such.
+ 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
assumed.
@@ -186,14 +190,10 @@ LATEXMK(1L) LATEXMK(1L)
List the commands used by latexmk for processing files, and then
exit.
- -c Clean up (remove) all regeneratable files generated by latex and
- bibtex except dvi, postscript and pdf. These files are a combi-
- nation of log files, aux files, latexmk's database file of
- source file information, and those with extensions specified in
- 27 July 2010 3
+ 28 December 2010 3
@@ -202,6 +202,10 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ -c Clean up (remove) all regeneratable files generated by latex and
+ bibtex except dvi, postscript and pdf. These files are a combi-
+ nation 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
with extensions by the $clean_ext configuration variable are
removed.
@@ -212,25 +216,29 @@ LATEXMK(1L) LATEXMK(1L)
If $bibtex_use is set to 0 or 1, bbl files are counted as non-
regeneratable.
+ If $cleanup_includes_cusdep_generated is nonzero, regeneratable
+ files are considered as including those generated by custom
+ dependencies and are also deleted. Otherwise these files are
+ not deleted.
+
-C Clean up (remove) all regeneratable files generated by latex and
- bibtex. This is the same as the -c option with the addition of
- dvi, postscript and pdf files, and those with extensions in the
+ bibtex. This is the same as the -c option with the addition of
+ dvi, postscript and pdf files, and those with extensions in the
$clean_full_ext configuration variable.
- 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 than a make.
- If $bibtex_use is set to 0 or 1, bbl files are counted as non-
+ If $bibtex_use is set to 0 or 1, bbl files are counted as non-
regeneratable.
- -CA Clean up (remove) absolutely all regeneratable files. It is now
- equivalent to the -C option
-
- This cleanup is instead of a regular make. See the -gg option
- if you want to do a cleanup then a make.
+ If $cleanup_includes_cusdep_generated is nonzero, regeneratable
+ files are considered as including those generated by custom
+ dependencies and are also deleted. Otherwise these files are
+ not deleted.
- If $bibtex_use is set to 0 or 1, bbl files are counted as non-
- regeneratable.
+ -CA Clean up (remove) absolutely all regeneratable files. It is now
+ equivalent to the -C option. See that option for details.
-CF Remove the file containing the database of source file informa-
tion, before doing the other actions requested.
@@ -248,25 +256,26 @@ LATEXMK(1L) LATEXMK(1L)
-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:
- latexmk -dF 'dviselect even' foo.tex
+ 28 December 2010 4
- 27 July 2010 4
+LATEXMK(1L) LATEXMK(1L)
-LATEXMK(1L) LATEXMK(1L)
+ ".dviF". All extra processing (e.g. conversion to postscript,
+ preview, printing) will then be performed on this filtered dvi
+ file.
+
+ Example usage: To use dviselect to select only the even pages of
+ the dvi file:
+ latexmk -dF 'dviselect even' foo.tex
-diagnostics
Print detailed diagnostics during a run. This may help for
@@ -314,25 +323,25 @@ LATEXMK(1L) LATEXMK(1L)
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
- or
- latexmk -e "$latex='latex %O -shell-escape %S'" file.tex
+ 28 December 2010 5
- The last two examples will NOT work with UNIX/LINUX command
- shells.
- 27 July 2010 5
+LATEXMK(1L) LATEXMK(1L)
+ latexmk -e "$latex=q/latex %O -shell-escape %S/" file.tex
+ or
-LATEXMK(1L) LATEXMK(1L)
+ latexmk -e "$latex='latex %O -shell-escape %S'" file.tex
+ The last two examples will NOT work with UNIX/LINUX command
+ shells.
-f Force latexmk to continue document processing despite errors.
Normally, when latexmk detects that LaTeX or another program has
@@ -379,19 +388,10 @@ LATEXMK(1L) LATEXMK(1L)
normal behavior that in preview-continuous mode it checks for an
already-running previewer.
- -nobibtex
- Never run bibtex.
-
- A common use for this option is when a document comes from an
- external source, complete with its bbl file(s), and the user
- does not have the corresponding bib files available. In this
- situation use of the -nobibtex option will prevent latexmk from
- trying to run bibtex, which would result in overwriting of the
- bbl files.
- 27 July 2010 6
+ 28 December 2010 6
@@ -400,8 +400,18 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- -p Print out the document. By default it is the generated
- postscript file that is printed. But you can use the -print=...
+ -nobibtex
+ Never run bibtex.
+
+ A common use for this option is when a document comes from an
+ external source, complete with its bbl file(s), and the user
+ does not have the corresponding bib files available. In this
+ situation use of the -nobibtex option will prevent latexmk from
+ trying to run bibtex, which would result in overwriting of the
+ bbl files.
+
+ -p Print out the document. By default it is the generated post-
+ script file that is printed. But you can use the -print=...
option to print the dvi or pdf files instead, and you can con-
figure this in a start up file (by setting the $print_type vari-
able).
@@ -445,26 +455,25 @@ LATEXMK(1L) LATEXMK(1L)
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
- extension ".psF". All extra processing (e.g. preview, printing)
- will then be performed on this filtered postscript file.
-
- Example of usage: Use psnup to print two pages on the one page:
- latexmk -ps -pF 'psnup -2' foo.tex
+ 28 December 2010 7
- 27 July 2010 7
+LATEXMK(1L) LATEXMK(1L)
+ -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.
-LATEXMK(1L) LATEXMK(1L)
+ Example of usage: Use psnup to print two pages on the one page:
+ latexmk -ps -pF 'psnup -2' foo.tex
or
@@ -512,18 +521,9 @@ LATEXMK(1L) LATEXMK(1L)
mode. It is better to use a dvi or ps viewer, as set by one of
the -view=dvi and -view=ps options.
- 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.
-
- 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
-
- 27 July 2010 8
+ 28 December 2010 8
@@ -532,6 +532,14 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ 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.
+
+ 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.)
@@ -578,27 +586,27 @@ LATEXMK(1L) LATEXMK(1L)
tex_silent_switch, $dvips_silent_switch, $latex_silent_switch,
and $pdflatex_silent_switch.
- -v, -version
- Print version number of latexmk.
- -verbose
- Opposite of -silent. This is the default setting.
- -view=default, -view=dvi, -view=ps, -view=pdf
- Set the kind of file used when previewing is requested (e.g., by
- the -pv or -pvc switches). The default is to view the "highest"
+ 28 December 2010 9
- 27 July 2010 9
+LATEXMK(1L) LATEXMK(1L)
-LATEXMK(1L) LATEXMK(1L)
+ -v, -version
+ Print version number of latexmk.
+ -verbose
+ Opposite of -silent. This is the default setting.
+ -view=default, -view=dvi, -view=ps, -view=pdf
+ Set the kind of file used when previewing is requested (e.g., by
+ the -pv or -pvc switches). The default is to view the "highest"
kind of requested file (in the order dvi, ps, pdf).
The preview-continuous option -pvc can only work with one file. So in
@@ -644,28 +652,28 @@ CONFIGURATION/INITIALIZATION (RC) FILES
On a cygwin system (i.e., a MS-Windows system in which perl is
that of cygwin), latexmk reads for the first it finds of
"/cygdrive/c/latexmk/LatexMk",
- "/opt/local/share/latexmk/LatexMk",
- "/usr/local/share/latexmk/LatexMk",
- "/usr/local/lib/latexmk/LatexMk".
- 2) The user's RC file, "$HOME/.latexmkrc", if it exists. Here $HOME is
- the value of the environment variable HOME. On UNIX and clones
- (including LINUX), this variable is set by the system; on MS-Windows,
- the user may choose to set it.
- 3) The RC file in the current working directory. This file can be
+ 28 December 2010 10
- 27 July 2010 10
+LATEXMK(1L) LATEXMK(1L)
-LATEXMK(1L) LATEXMK(1L)
+ "/opt/local/share/latexmk/LatexMk",
+ "/usr/local/share/latexmk/LatexMk",
+ "/usr/local/lib/latexmk/LatexMk".
+ 2) The user's RC file, "$HOME/.latexmkrc", if it exists. Here $HOME is
+ the value of the environment variable HOME. On UNIX and clones
+ (including LINUX), this variable is set by the system; on MS-Windows,
+ the user may choose to set it.
+ 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.
@@ -710,27 +718,27 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES
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.
+ 28 December 2010 11
- 27 July 2010 11
+LATEXMK(1L) LATEXMK(1L)
+ 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.
-LATEXMK(1L) LATEXMK(1L)
FORMAT OF COMMAND SPECIFICATIONS
@@ -776,30 +784,30 @@ FORMAT OF COMMAND SPECIFICATIONS
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
+ 28 December 2010 12
- 27 July 2010 12
+LATEXMK(1L) LATEXMK(1L)
-LATEXMK(1L) LATEXMK(1L)
+ 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
@@ -843,6 +851,17 @@ LATEXMK(1L) LATEXMK(1L)
UNIX and MS-Windows. See the source code for how I've handled the
problem.
+
+
+ 28 December 2010 13
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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
@@ -855,18 +874,6 @@ LATEXMK(1L) LATEXMK(1L)
slashes in filenames under MS-Windows, provided that the filename is
inside double quotes. It is easier to use forward slashes in examples
like the one above, since then one does not have to worry about the
-
-
-
- 27 July 2010 13
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
rules for dealing with forward slashes in strings in the Perl lan-
guage.)
@@ -909,32 +916,32 @@ LATEXMK(1L) LATEXMK(1L)
extra processing, you could do something like:
$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
- the string.
+ 28 December 2010 14
-LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
- Default values are indicated in brackets.
- $always_view_file_via_temporary [0]
- Whether ps and pdf files are initially to be made in a temporary
- directory and then moved to the final location. (This applies
- 27 July 2010 14
+LATEXMK(1L) LATEXMK(1L)
+ %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
+ the string.
-LATEXMK(1L) LATEXMK(1L)
+LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
+ Default values are indicated in brackets.
+ $always_view_file_via_temporary [0]
+ Whether ps and pdf files are initially to be made in a temporary
+ directory and then moved to the final location. (This applies
to dvips, dvipdf, and ps2pdf operations, and the filtering oper-
ators on dvi and ps files. It does not apply to pdflatex,
unfortunately.)
@@ -975,6 +982,18 @@ LATEXMK(1L) LATEXMK(1L)
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
+
+
+
+ 28 December 2010 15
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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.
@@ -991,18 +1010,6 @@ LATEXMK(1L) LATEXMK(1L)
@BIBINPUTS = ( ".", "C:\bibfiles" );
@BIBINPUTS = ( ".", "\\server\bibfiles" );
@BIBINPUTS = ( ".", "C:/bibfiles" );
-
-
-
- 27 July 2010 15
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
@BIBINPUTS = ( ".", "//server/bibfiles" );
@BIBINPUTS = ( ".", "/usr/local/texmf/bibtex/bib" );
@@ -1041,40 +1048,58 @@ LATEXMK(1L) LATEXMK(1L)
2: run BibTeX whenever it appears necessary to update the bbl
files, without testing for the existence of the bib files.
- $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
- 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
- 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
+ 28 December 2010 16
- 27 July 2010 16
+LATEXMK(1L) LATEXMK(1L)
+ $cleanup_includes_cusdep_generated [0]
+ 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.)
-LATEXMK(1L) LATEXMK(1L)
+ $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
+ 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 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
+ variable is a string containing the extensions separated by spa-
+ ces.
+
+ It is also possible to specify a more general pattern of file to
+ be deleted, by using the place holder %R, as in commands. Thus
+ setting
+
+ $clean_ext = "out %R-blx.bib";
+
+ 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 and FOO-blx.bib,
+ where FOO stands for the basename of the file being processed
+ (as in FOO.tex).
- 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
@@ -1089,6 +1114,18 @@ LATEXMK(1L) LATEXMK(1L)
Normally, if no filenames are specified on the command line,
latexmk processes all tex files specified in the @default_files
+
+
+
+ 28 December 2010 17
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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
@@ -1131,18 +1168,6 @@ LATEXMK(1L) LATEXMK(1L)
will cause to be run whatever command the system has associated
with .dvi files.]
-
-
-
- 27 July 2010 17
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
$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
@@ -1156,6 +1181,17 @@ LATEXMK(1L) LATEXMK(1L)
$dvipdf = "dvipdfm %O -o %D %S";
+
+
+ 28 December 2010 18
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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
@@ -1200,27 +1236,27 @@ LATEXMK(1L) LATEXMK(1L)
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
+ 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]
+ 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.
- 27 July 2010 18
+ 28 December 2010 19
-LATEXMK(1L) LATEXMK(1L)
- example of updating by command.
+LATEXMK(1L) LATEXMK(1L)
- $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
- appropriate for xdvi on a UNIX system.
$fdb_ext ["fdb_latexmk"]
The extension of the file which latexmk generates to contain a
@@ -1271,10 +1307,15 @@ LATEXMK(1L) LATEXMK(1L)
!!!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
- 27 July 2010 19
+ 28 December 2010 20
@@ -1283,15 +1324,10 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- 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.
+ therefore reruns latex. This causes an infinite loop, that is
+ only terminated 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.
You can instruct latex to ignore the offending line as follows:
@@ -1308,6 +1344,27 @@ LATEXMK(1L) LATEXMK(1L)
" are to be ignored in deciding whether a file of the given
extension .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
+ expression. The simplest method is separate the different sim-
+ ple patterns by a vertical bar character (indicating "alterna-
+ tion" in the jargon of regular expressions). For example,
+
+ $hash_calc_ignore_pattern{'eps'} = '^%%CreationDate:
+ |^%%Title: ';
+
+ causes lines starting with either "^%%CreationDate: " or
+ "^%%Title: " 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 read later. To do this, you use perl's
+ delete function, e.g.,
+
+ delete $hash_calc_ignore_pattern{'eps'};
+
+
$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-
@@ -1320,6 +1377,19 @@ LATEXMK(1L) LATEXMK(1L)
also uses to try to locate files; it applies only in the case of
.bib files.
+
+
+
+
+ 28 December 2010 21
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
$landscape_mode [0]
If nonzero, run in landscape mode, using the landscape mode pre-
viewers and dvi to postscript converters. Equivalent to the -l
@@ -1341,18 +1411,6 @@ LATEXMK(1L) LATEXMK(1L)
not exist.
In this situation, latexmk searches for custom dependencies to
-
-
-
- 27 July 2010 20
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
make the missing file(s), but restricts it to the extensions
specified by the variable %latex_input_extensions. The default
extensions are 'tex' and 'eps'.
@@ -1386,6 +1444,18 @@ LATEXMK(1L) LATEXMK(1L)
the options to include -c-style-errors, e.g., by the following
line in an initialization file
+
+
+
+ 28 December 2010 22
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
$latex_silent_switch = "-interaction=batchmode -c-style-
errors";
@@ -1412,18 +1482,6 @@ LATEXMK(1L) LATEXMK(1L)
$lpr_dvi ["NONE lpr_dvi"]
The printing program to print dvi files.
-
-
-
- 27 July 2010 21
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
$lpr_pdf ["NONE lpr_pdf"]
The printing program to print pdf files.
@@ -1452,6 +1510,18 @@ LATEXMK(1L) LATEXMK(1L)
(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.)
+
+
+
+ 28 December 2010 23
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
$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-
@@ -1483,18 +1553,6 @@ LATEXMK(1L) LATEXMK(1L)
\input{file} or \includegraphics{figure}, when the relevant
source file does not exist.
-
-
-
- 27 July 2010 22
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
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
@@ -1517,8 +1575,20 @@ LATEXMK(1L) LATEXMK(1L)
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-
- tex and its graphics/graphicx packages.)
+ file to be read. The standard extensions are handled by
+
+
+
+ 28 December 2010 24
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ pdflatex and its graphics/graphicx packages.)
$pdflatex_silent_switch ["-interaction=batchmode"]
@@ -1554,18 +1624,6 @@ LATEXMK(1L) LATEXMK(1L)
$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
-
-
-
- 27 July 2010 23
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
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
@@ -1584,6 +1642,18 @@ LATEXMK(1L) LATEXMK(1L)
The first setting arranges for the xpdf program to be used in
its "remote server mode", with the server name specified as the
+
+
+
+ 28 December 2010 25
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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.
@@ -1625,34 +1695,34 @@ LATEXMK(1L) LATEXMK(1L)
$printout_mode [0]
If nonzero, print the document using lpr. Equivalent to the -p
- option. This is recommended not to be set from an RC file,
+ 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",
+ "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 previewer about file changes).
- 27 July 2010 24
+ 28 December 2010 26
-LATEXMK(1L) LATEXMK(1L)
- otherwise you could waste lots of paper.
- $print_type = ["ps"]
- Type of file to printout: possibilities are "dvi", "none",
- "pdf", or "ps".
+LATEXMK(1L) LATEXMK(1L)
- $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 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.
+ to one process. See the $pid_position variable for how the
+ process number is determined.
The default for pscmd is "NONE" under MS-Windows and cygwin
(i.e., the command is not used), "ps --width 200 -f -u
@@ -1665,9 +1735,9 @@ LATEXMK(1L) LATEXMK(1L)
Command to convert ps to pdf file.
$ps_filter [empty]
- The postscript file filter to be run on the newly produced
- postscript file before other processing. Equivalent to specify-
- ing the -pF option.
+ The postscript file filter to be run on the newly produced post-
+ script file before other processing. Equivalent to specifying
+ 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-
@@ -1698,21 +1768,22 @@ LATEXMK(1L) LATEXMK(1L)
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
+ signal, the signal is specified by $ps_update_signal.)
- 27 July 2010 25
+ 28 December 2010 27
-LATEXMK(1L) LATEXMK(1L)
- do the update, the command is specified by the variable
- $ps_update_command, and for the value 2, to specify update by
- signal, the signal is specified by $ps_update_signal.)
+
+LATEXMK(1L) LATEXMK(1L)
$ps_update_signal [Under UNIX: SIGHUP, which is a system-dependent
@@ -1735,8 +1806,8 @@ LATEXMK(1L) LATEXMK(1L)
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-
+ allows the use of filenames containing special characters, notably spa-
+ ces. (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.)
@@ -1769,11 +1840,10 @@ LATEXMK(1L) LATEXMK(1L)
current directory. Under other operating systems (expected to
be UNIX/Linux, including OS-X), the default is the value of the
system environment variable TMPDIR if it exists, otherwise
- "/tmp".
- 27 July 2010 26
+ 28 December 2010 28
@@ -1782,6 +1852,8 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ "/tmp".
+
$view ["default"]
Which kind of file is to be previewed if a previewer is used.
The possible values are "default", "dvi", "ps", "pdf". The
@@ -1834,18 +1906,10 @@ CUSTOM DEPENDENCIES
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.
-
- To make the new destination file, the Perl subroutine specified in the
- rule is invoked, with an argument that is the base name of the files in
- question. Simple cases just involve a subroutine invoking an external
- program; this can be done by following the templates below, even by
- those without knowledge of the Perl programming language. Of course,
- 27 July 2010 27
+ 28 December 2010 29
@@ -1854,6 +1918,14 @@ CUSTOM DEPENDENCIES
LATEXMK(1L) LATEXMK(1L)
+ the destination file (the one with the to-extension) is out-of-date
+ with respect to the corresponding source file.
+
+ To make the new destination file, the Perl subroutine specified in the
+ rule is invoked, with an argument that is the base name of the files in
+ question. Simple cases just involve a subroutine invoking an external
+ program; this can be done by following the templates below, even by
+ those without knowledge of the Perl programming language. Of course,
experts could do something much more elaborate.
One other item in each custom-dependency rule labelled "must" above
@@ -1901,31 +1973,30 @@ 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
- 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.
-
- If you use pdflatex instead of latex, then you will probably prefer to
- convert your graphics files to pdf format, in which case you would
- replace the above code in an initialization file by
- add_cus_dep( 'fig', 'pdf, 0, 'fig2pdf' );
- sub fig2pdf {
+ 28 December 2010 30
- 27 July 2010 28
+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 spa-
+ ces. 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.
+ If you use pdflatex instead of latex, then you will probably prefer to
+ convert your graphics files to pdf format, in which case you would
+ replace the above code in an initialization file by
+ add_cus_dep( 'fig', 'pdf, 0, 'fig2pdf' );
+ sub fig2pdf {
system("fig2dev -Lpdf $_[0].fig $_[0].pdf");
}
@@ -1967,6 +2038,18 @@ LATEXMK(1L) LATEXMK(1L)
Those of you with experience with Makefiles, will undoubtedly be con-
cerned that the .ndx file is written during a run of latex/pdflatex and
is always later than the .nnd last read in. Thus the .nnd appears to
+
+
+
+ 28 December 2010 31
+
+
+
+
+
+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
@@ -1985,20 +2068,8 @@ OLD METHOD OF DEFINING CUSTOM DEPENDENCIES
In previous 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
-
-
-
- 27 July 2010 29
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
- separated by a space, the from-extension, the to-extension, the "must"
+ 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.
@@ -2033,6 +2104,18 @@ BUGS
manual update (reopen); it views postscript and pdf. Gsview under MS-
Windows works for both postscript and pdf, but only reads the updated
file when its screen is refreshed. Acroread under UNIX/LINUX views
+
+
+
+ 28 December 2010 32
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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 gsview
@@ -2047,10 +2130,10 @@ THANKS TO
AUTHOR
Current version, by John Collins (username collins at node
- phys.psu.edu). (Version 4.17).
+ phys.psu.edu). (Version 4.21).
- Released version can be obtained from CTAN: <http://www.tug.org/tex-
- archive/support/latexmk/>, and from the author's website
+ Released version can be obtained from CTAN: <http://www.tug.org/tex-ar-
+ chive/support/latexmk/>, and from the author's website
<http://www.phys.psu.edu/~collins/software/latexmk/>.
Modifications and enhancements by Evan McLean (Version 2.0)
Original script called "go" by David J. Musliner (RCS Version 3.2)
@@ -2061,49 +2144,6 @@ AUTHOR
- 27 July 2010 30
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2133,6 +2173,6 @@ LATEXMK(1L) LATEXMK(1L)
- 27 July 2010 31
+ 28 December 2010 33