summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-01 00:49:36 +0000
committerKarl Berry <karl@freefriends.org>2011-08-01 00:49:36 +0000
commit9336213eb208ac7e1a3645af0c5b9def89082501 (patch)
tree40e71b041d6a5877d83fd8f0e8a4eb6bbd7b3bec
parent50c7698471bead67efa87f380ca89bb742d4a12b (diff)
latexmk 4.25 (7jul11)
git-svn-id: svn://tug.org/texlive/trunk@23296 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/latexmk/latexmk.pl59
-rw-r--r--Master/texmf-dist/doc/support/latexmk/CHANGES6
-rw-r--r--Master/texmf-dist/doc/support/latexmk/INSTALL2
-rw-r--r--Master/texmf-dist/doc/support/latexmk/README6
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.pdfbin99317 -> 97578 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.txt834
-rwxr-xr-xMaster/texmf-dist/scripts/latexmk/latexmk.pl59
-rw-r--r--Master/texmf/doc/man/man1/latexmk.121
-rw-r--r--Master/texmf/doc/man/man1/latexmk.man1.pdfbin108396 -> 109529 bytes
9 files changed, 541 insertions, 446 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl b/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
index 3a3303e3322..17aef439834 100755
--- a/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
+++ b/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
@@ -107,8 +107,8 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.24';
-$version_details = "$My_name, John Collins, 7 May 2011";
+$version_num = '4.25';
+$version_details = "$My_name, John Collins, 7 July 2011";
use Config;
@@ -177,6 +177,18 @@ else {
##
## Modification log from 1 Jan 2011 onwards in detail
##
+## 7 Jul 2011, John Collins Fix process_rc_file to evade cygwin bug.
+## Version 4.25
+## 6 Jul 2011, John Collins Diagnostic for unreadable rc-file
+## N.B. There appears to be a bug in cygwin's
+## perl: -r /cygdrive/c/latexmk/LatexMk
+## returns false even if the file is readable.
+## 31 May 2011, John Collins Add deps output file to target part
+## of dependency information
+## 15 May 2011, John Collins Start to correct handling of non-existent
+## bib files:
+## a. After run of biber, set the source files
+## b. Parse Reading message from biber in blg file
## 7 May 2011, John Collins With biber, use kpsewhich to find source
## files (e.g., .bib)
## 24 Mar 2011, John Collins Correct bug in detection of source files
@@ -2585,16 +2597,37 @@ sub process_rc_file {
# NEW VERSION
# Run rc_file whose name is given in first argument
# Exit with code 0 on success
- # Exit with code 1 if file could not be read.
+ # Exit with code 1 if file cannot be read or does not exist.
+ # Exit with code 2 if is a syntax error or other problem.
+ # PREVIOUSLY:
# Stop if there is a syntax error or other problem.
my $rc_file = $_[0];
my $ret_code = 0;
warn "$My_name: Executing Perl code in file '$rc_file'...\n"
if $diagnostics;
- if ( ! -r $rc_file ) {
+ # I could use the do command of perl, but the preceeding -r test
+ # to get good diagnostics gets the wrong result under cygwin
+ # (e.g., on /cygdrive/c/latexmk/LatexMk)
+ my $RCH = new FileHandle;
+ if ( !-e $rc_file ) {
+ warn "$My_name: The rc-file '$rc_file' does not exist\n";
return 1;
}
- do( $rc_file );
+ elsif ( open $RCH, "<$rc_file" ) {
+ { local $/; eval <$RCH>; }
+ close $RCH;
+ }
+ else {
+ warn "$My_name: I cannot read the rc-file '$rc_file'\n";
+ return 1;
+ }
+ # PREVIOUS VERSION
+# if ( ! -r $rc_file ) {
+# warn "$My_name: I cannot read the rc-file '$rc_file'\n",
+# " or at least that's what Perl (for $^O) reports\n";
+# return 1;
+# }
+# do( $rc_file );
if ( $@ ) {
# Indent each line of possibly multiline message:
my $message = prefix( $@, " " );
@@ -2935,6 +2968,7 @@ sub check_biber_log {
}
elsif ( /> INFO - Found .* '([^']+)'\s*$/
|| /> INFO - Found '([^']+)'\s*$/
+ || /> INFO - Reading (.*)$/
|| /> INFO - Processing .* file '([^']+)' .*$/
) {
if ( defined $Pbiber_source ) {
@@ -2943,6 +2977,7 @@ sub check_biber_log {
}
}
close $log_file;
+
my $bibret = &find_file_list1( $Pbiber_source, $Pbiber_source,
'', \@BIBINPUTS );
@$Pbiber_source = uniqs( @$Pbiber_source );
@@ -4688,7 +4723,11 @@ sub deps_list {
delete $source{$_};
}
foreach my $dest (@dest) {
- print $fh "$root_filename$dest :";
+ if ($deps_file eq '-' ) {
+ print $fh "$root_filename$dest :";
+ } else {
+ print $fh "$root_filename$dest $deps_file :";
+ }
foreach (sort keys %source) {
print $fh "\\\n $_";
}
@@ -5363,7 +5402,13 @@ sub rdb_run1 {
$$Plast_message = "Bug or configuration error; incorrect command type";
}
if ( $rule =~ /^biber/ ) {
- my $retcode = check_biber_log($$Pbase);
+ my @biber_source = ( );
+ my $retcode = check_biber_log( $$Pbase, \@biber_source );
+ foreach my $source ( @biber_source ) {
+ print " === Source file '$source' for '$rule'\n"
+ if ($diagnostics);
+ rdb_ensure_file( $rule, $source );
+ }
if ($retcode == 3) {
$$Plast_result = 2;
$$Plast_message = "Could not open biber log file for '$$Pbase'";
diff --git a/Master/texmf-dist/doc/support/latexmk/CHANGES b/Master/texmf-dist/doc/support/latexmk/CHANGES
index c6f7da7eb78..79579a9c885 100644
--- a/Master/texmf-dist/doc/support/latexmk/CHANGES
+++ b/Master/texmf-dist/doc/support/latexmk/CHANGES
@@ -257,3 +257,9 @@ From v. 4.23a to v. 4.24
aren't in the current directory (by use of kpsewhich). This was
previously done for bibtex but not biber.
+From v. 4.24 to v. 4.25
+ Fix to evade apparent cygwin bug that prevented system
+ rc-file from being read.
+ Diagnostic for unreadable rc-file.
+ Add deps output file to target part of dependency information
+
diff --git a/Master/texmf-dist/doc/support/latexmk/INSTALL b/Master/texmf-dist/doc/support/latexmk/INSTALL
index 24f1f01835a..2a8d7deb3a0 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.24, 7 May 2011)
+ (Version 4.25, 7 July 2011)
John Collins
Physics Department
diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README
index d2564586f64..4600297c863 100644
--- a/Master/texmf-dist/doc/support/latexmk/README
+++ b/Master/texmf-dist/doc/support/latexmk/README
@@ -1,5 +1,5 @@
-Latexmk, version 4.24, 7 May 2011
----------------------------------
+Latexmk, version 4.25, 7 July 2011
+----------------------------------
Latexmk completely automates the process of generating a LaTeX
document. Essentially, it is a highly specialized cousin of the
@@ -92,7 +92,7 @@ NOTES:-
John Collins
---------------------------- "latexmk -h" ----------------------------
-Latexmk 4.24: Automatic LaTeX document generation routine
+Latexmk 4.25: Automatic LaTeX document generation routine
Usage: latexmk [latexmk_options] [filename ...]
diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf
index 64212561924..4c14c86c4ad 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 2c2cef7471c..c918915149c 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.txt
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
@@ -1,9 +1,4 @@
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
NAME
latexmk - generate LaTeX document
@@ -58,23 +53,22 @@ DESCRIPTION
ply edit a file and, when the changes are written to disk, latexmk com-
pletely automates the cycle of updating the .dvi (and possibly the .ps
and .pdf) file, and refreshing the previewer's display. It's not quite
+ 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.
- 7 May 2011 1
-
+ 1
-LATEXMK(1L) LATEXMK(1L)
- WYSIWYG, but usefully close.
+LATEXMK(1L) LATEXMK(1L)
- 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,
@@ -125,22 +119,23 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
When the source file uses bbl files for bibliography, run bibtex
or biber as needed to regenerate the bbl files.
+ This property can also be configured by setting the $bibtex_use
+ variable to 2 in a configuration file
+ -bibtex-
+ Never run bibtex or biber.
- 7 May 2011 2
+ 7 July 2011 2
-LATEXMK(1L) LATEXMK(1L)
- This property can also be configured by setting the $bibtex_use
- variable to 2 in a configuration file
- -bibtex-
- Never run bibtex or biber.
+LATEXMK(1L) LATEXMK(1L)
+
A common use for this option is when a document comes from an
external source, complete with its bbl file(s), and the user
@@ -170,8 +165,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 spa-
- ces and such.
+ gle argument on the command line so be careful with quoting
+ spaces and such.
Note that if the -bm option is specified, the -ps option is
assumed.
@@ -189,11 +184,18 @@ LATEXMK(1L) LATEXMK(1L)
message. The default is 220.0 which is just right for 5 charac-
ter messages.
+ -commands
+ List the commands used by latexmk for processing files, and then
+ exit.
+ -c Clean up (remove) all regeneratable files generated by latex and
+ bibtex or biber except dvi, postscript and pdf. These files are
+ a combination of log files, aux files, latexmk's database file
+ of source file information, and those with extensions specified
- 7 May 2011 3
+ 7 July 2011 3
@@ -202,14 +204,6 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- -commands
- List the commands used by latexmk for processing files, and then
- exit.
-
- -c Clean up (remove) all regeneratable files generated by latex and
- bibtex or biber except dvi, postscript and pdf. These files are
- a combination of log files, aux files, latexmk's database file
- of source file information, and those with extensions specified
in the @generated_exts configuration variable. In addition,
files with extensions by the $clean_ext configuration variable
are removed.
@@ -256,27 +250,27 @@ LATEXMK(1L) LATEXMK(1L)
latexmk -bm DRAFT
Note that if the -d option is specified, the -ps option is
+ assumed.
+ -deps Show a list of dependent files after processing. This is in the
+ form of a dependency list of the form used by the make program,
+ and it is therefore suitable for use in a Makefile. It gives an
+ overall view of the files without listing intermediate files, as
+ well as latexmk can determine them.
+ By default the list of dependent files is sent to stdout (i.e.,
- 7 May 2011 4
+ 7 July 2011 4
-LATEXMK(1L) LATEXMK(1L)
- assumed.
+LATEXMK(1L) LATEXMK(1L)
- -deps Show a list of dependent files after processing. This is in the
- form of a dependency list of the form used by the make program,
- and it is therefore suitable for use in a Makefile. It gives an
- overall view of the files without listing intermediate files, as
- well as latexmk can determine them.
- By default the list of dependent files is sent to stdout (i.e.,
normally to the screen unless you've redirected latexmk's out-
put). But you can set the filename where the list is sent by
the -deps-out= option.
@@ -323,26 +317,27 @@ LATEXMK(1L) LATEXMK(1L)
-dvi Generate dvi version of document.
+ -dvi- Turn off generation of dvi version of document. (This may get
+ overridden, if some other file is made (e.g., a .ps file) that
+ is generated from the dvi file, or if no generated file at all
+ is requested.)
+ -e <code>
+ Execute the specified initialization code before processing.
+ The code is Perl code of the same form as is used in latexmk's
+ initialization files -- for more details, see the information on
- 7 May 2011 5
+ 7 July 2011 5
-LATEXMK(1L) LATEXMK(1L)
- -dvi- Turn off generation of dvi version of document. (This may get
- overridden, if some other file is made (e.g., a .ps file) that
- is generated from the dvi file, or if no generated file at all
- is requested.)
+LATEXMK(1L) LATEXMK(1L)
+
- -e <code>
- Execute the specified initialization code before processing.
- The code is Perl code of the same form as is used in latexmk's
- initialization files -- for more details, see the information on
the -r option, and the section about "Configuration/initializa-
tion (RC) files". The code is typically a sequence of assign-
ment statements separated by semicolons.
@@ -388,28 +383,28 @@ LATEXMK(1L) LATEXMK(1L)
no further processing is carried out.
-f- Turn off the forced processing-past-errors such as is set by the
+ -f option. This could be used to override a setting in a con-
+ figuration file.
+ -g Force latexmk to process document fully, even under situations
+ where latexmk would normally decide that no changes in the
+ source files have occurred since the previous run. This option
+ is useful, for example, if you change some options and wish to
+ reprocess the files.
+ -g- Turn off -g.
- 7 May 2011 6
+ 7 July 2011 6
-LATEXMK(1L) LATEXMK(1L)
- -f option. This could be used to override a setting in a con-
- figuration file.
- -g Force latexmk to process document fully, even under situations
- where latexmk would normally decide that no changes in the
- source files have occurred since the previous run. This option
- is useful, for example, if you change some options and wish to
- reprocess the files.
+LATEXMK(1L) LATEXMK(1L)
- -g- Turn off -g.
-gg "Super go mode" or "clean make": clean out generated files as if
-C had been given, and then do a regular make.
@@ -449,23 +444,12 @@ LATEXMK(1L) LATEXMK(1L)
trying to run bibtex or biber, 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=...
+ -p Print out the document. By default it is the generated
+ postscript 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).
-
-
- 7 May 2011 7
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
However, printing is enabled by default only under UNIX/LINUX
systems, where the default is to use the lpr command. In gen-
eral, the correct behavior for printing very much depends on
@@ -479,6 +463,17 @@ LATEXMK(1L) LATEXMK(1L)
This option is incompatible with the -pv and -pvc options, so it
turns them off.
+
+
+ 7 July 2011 7
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
-pdf Generate pdf version of document using pdflatex.
-pdfdvi
@@ -520,18 +515,6 @@ LATEXMK(1L) LATEXMK(1L)
Whether to use single or double quotes round the "psnup -2" will
depend on your command interpreter, as used by the particular
-
-
-
- 7 May 2011 8
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
version of perl and the operating system on your computer.
-pv Run file previewer. If the -view option is used, this will
@@ -547,6 +530,18 @@ LATEXMK(1L) LATEXMK(1L)
-pvc Run a file previewer and continually update the .dvi, .ps,
and/or .pdf files whenever changes are made to source files (see
the Description above). Which of these files is generated and
+
+
+
+ 7 July 2011 8
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
which is viewed is governed by the other options, and is the
same as for the -pv option. The preview-continuous option -pvc
can only work with one file. So in this case you will normally
@@ -586,18 +581,6 @@ LATEXMK(1L) LATEXMK(1L)
-pvc- Turn off -pvc.
-
-
-
- 7 May 2011 9
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
-quiet Same as -silent
-r <rcfile>
@@ -615,6 +598,18 @@ LATEXMK(1L) LATEXMK(1L)
overridden by later options.
The contents of the RC file just comprise a piece of code in the
+
+
+
+ 7 July 2011 9
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
Perl programming language (typically a sequence of assignment
statements); they are executed when the -r option is encountered
during latexmk's parsing of its command line. See the -e option
@@ -652,18 +647,6 @@ LATEXMK(1L) LATEXMK(1L)
Also reduce the number of informational messages that latexmk
generates.
-
-
-
- 7 May 2011 10
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
To change the options used to make the commands run silently,
you need to configure latexmk with changed values of its config-
uration variables, the relevant ones being $bib-
@@ -683,6 +666,18 @@ LATEXMK(1L) LATEXMK(1L)
e.g., by \includegraphics{drawing} in a LaTeX file. In that
case, latexmk will try making drawing.ext with ext set in turn
to the possible extensions that are relevant for latex (or as
+
+
+
+ 7 July 2011 10
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
appropriate pdflatex).
See also the documentation for the $use_make_for_missing_files
@@ -718,18 +713,6 @@ EXAMPLES
% latexmk -pvc -ps thesis# run latex enough times to resolve
cross-references, make a postscript
file, start a previewer. Then
-
-
-
- 7 May 2011 11
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
watch for changes in the source
file thesis.tex and any files it
uses. After any changes rerun latex
@@ -751,6 +734,18 @@ CONFIGURATION/INITIALIZATION (RC) FILES
1) The system RC file, if it exists.
On a UNIX system, latexmk searches for following places for its sys-
tem RC file, in the following order, and reads the first it finds:
+
+
+
+ 7 July 2011 11
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
"/opt/local/share/latexmk/LatexMk",
"/usr/local/share/latexmk/LatexMk",
"/usr/local/lib/latexmk/LatexMk".
@@ -784,18 +779,6 @@ CONFIGURATION/INITIALIZATION (RC) FILES
are written; thus any RC file specified on the command line with the -r
option can override previous options but can be itself overridden by
later options on the command line. There is also the -e option, which
-
-
-
- 7 May 2011 12
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
allows initialization code to be specified in latexmk's command line.
@@ -819,6 +802,18 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES
push @default_files, 'paper2';
+
+
+
+ 7 July 2011 12
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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.
@@ -850,18 +845,6 @@ FORMAT OF COMMAND SPECIFICATIONS
The two items starting with the % character are placeholders. These
are substituted by appropriate values before the command is run. Thus
-
-
-
- 7 May 2011 13
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
%S will be replaced by the source file that elatex will be applied to,
and %O will be replaced by any options that latexmk has decided to use
for this command. (E.g., if you used the -silent option it would
@@ -887,6 +870,18 @@ LATEXMK(1L) LATEXMK(1L)
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
+
+
+
+ 7 July 2011 13
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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
@@ -917,17 +912,6 @@ LATEXMK(1L) LATEXMK(1L)
usable in initialization files" for what is normally the most appropri-
ate usage.
-
-
- 7 May 2011 14
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
If you omit to supply any placeholders whatever in the specification of
a command, latexmk will supply what its author thinks are appropriate
defaults. This gives compatibility with configuration files for previ-
@@ -954,6 +938,18 @@ LATEXMK(1L) LATEXMK(1L)
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
+
+
+
+ 7 July 2011 14
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
problem.
Command names containing spaces: Under MS-Windows it is common that the
@@ -963,6 +959,11 @@ LATEXMK(1L) LATEXMK(1L)
$lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p
%S';
+ $pdf_previewer = 'start "c:/Program Files/SumatraPDF/Suma-
+ traPDF.exe" %O %S';
+ $pdf_previewer = 'start "c:/Program Files/SumatraPDF (x86)/Suma-
+ traPDF.exe" %O %S';
+
(Note about the above example: Forward slashes are equivalent to back-
slashes in filenames under MS-Windows, provided that the filename is
@@ -971,6 +972,14 @@ LATEXMK(1L) LATEXMK(1L)
rules for dealing with forward slashes in strings in the Perl lan-
guage.)
+ Command names under Cygwin: If latexmk is executed by Cygwin's perl,
+ be particularly certain that pathnames in commands have forward slashes
+ not the usual backslashes for the separator of pathname components.
+ See the above examples. Backslashes often get misinterpreted by the
+ Unix shell used by Cygwin's Perl to execute external commands. Forward
+ slashes don't suffer from this problem, and (when quoted, as above) are
+ equally acceptable to MS-Windows.
+
Using MS-Windows file associations: A useful trick under modern ver-
sions of MS-Windows (e.g., WinXP) is to use just the command 'start' by
itself:
@@ -979,32 +988,36 @@ LATEXMK(1L) LATEXMK(1L)
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.)
+ for a postscript viewer and a pdf viewer.) But note that this trick is
+ not always suitable for the pdf previwer, if your system has acroread
+ for the default pdf viewer. As explained elsewhere, acroread under MS-
+ Windows does not work well with latex and latexmk, because acroread
+ locks the pdf file.
Not using a certain command: If a command is not to be run, the command
+ name NONE is used, as in
+ $lpr = 'NONE lpr';
+ This typically is used when an appropriate command does not exist on
+ your system. The string after the "NONE" is effectively a comment.
- 7 May 2011 15
+ 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
+ 7 July 2011 15
-LATEXMK(1L) LATEXMK(1L)
- name NONE is used, as in
- $lpr = 'NONE lpr';
+LATEXMK(1L) LATEXMK(1L)
- 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
file:
$latex = 'latex --src-specials %O %S';
@@ -1048,18 +1061,6 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
See the $pvc_view_file_via_temporary variable for a setting that
applies only if preview-continuous mode (-pvc option) is used.
-
-
-
- 7 May 2011 16
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
See $tmpdir for the setting of the directory where the temporary
file is created.
@@ -1074,6 +1075,17 @@ LATEXMK(1L) LATEXMK(1L)
and the postscript file is always generated, even if it is newer
than the dvi file.
+
+
+ 7 July 2011 16
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
$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
@@ -1114,18 +1126,6 @@ LATEXMK(1L) LATEXMK(1L)
Perl's rules for writing strings.
Important note: This variable is now mostly obsolete in the current
-
-
-
- 7 May 2011 17
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
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-
@@ -1145,6 +1145,17 @@ LATEXMK(1L) LATEXMK(1L)
Switch(es) for the BibTeX processing program when silent mode is
on.
+
+
+ 7 July 2011 17
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
$bibtex_use [1]
Under what conditions to run BibTeX or biber. When latexmk dis-
covers from the log file that one (or more) BibTeX/biber-gener-
@@ -1181,25 +1192,14 @@ LATEXMK(1L) LATEXMK(1L)
fied by the $clean_ext, $clean_full_ext and @generated_exts
variables.)
-
-
- 7 May 2011 18
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
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.
+ variable is a string containing the extensions separated by
+ spaces.
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
@@ -1214,6 +1214,18 @@ LATEXMK(1L) LATEXMK(1L)
(as in FOO.tex).
+
+
+
+ 7 July 2011 18
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
$clean_full_ext [""]
Extra extensions of files for latexmk to remove when the -C
option is selected, i.e., extensions of files to remove when the
@@ -1246,18 +1258,6 @@ LATEXMK(1L) LATEXMK(1L)
Note that more than file may be given, and that the default
extension is ".tex". Wild cards are allowed. The parentheses
-
-
-
- 7 May 2011 19
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
are because @default_files is an array variable, i.e., a
sequence of filename specifications is possible.
@@ -1285,6 +1285,17 @@ LATEXMK(1L) LATEXMK(1L)
will cause to be run whatever command the system has associated
with .dvi files.]
+
+
+ 7 July 2011 19
+
+
+
+
+
+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
@@ -1313,17 +1324,6 @@ LATEXMK(1L) LATEXMK(1L)
The program to used as a filter to convert a .dvi file to a .ps
file in landscape mode.
-
-
- 7 May 2011 20
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
$dvips_pdf_switch ["-P pdf"]
Switch(es) for dvips program when pdf file is to be generated
from ps file.
@@ -1353,8 +1353,20 @@ 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 exam-
- ple of updating by command.
+ See information on the variable $pdf_update_method for an
+
+
+
+ 7 July 2011 20
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ example of updating by command.
$dvi_update_signal [Under UNIX: SIGUSR1, which is a system-dependent
value]
@@ -1379,17 +1391,6 @@ LATEXMK(1L) LATEXMK(1L)
during a LaTeX run and that are read in by LaTeX in later runs,
either directly or indirectly.
-
-
- 7 May 2011 21
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
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
@@ -1423,6 +1424,18 @@ LATEXMK(1L) LATEXMK(1L)
!!!This variable is for experts only!!!
The general rule latexmk uses for determining when an extra run
+
+
+
+ 7 July 2011 21
+
+
+
+
+
+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
@@ -1444,18 +1457,6 @@ LATEXMK(1L) LATEXMK(1L)
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
-
-
-
- 7 May 2011 22
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
expression specifies that lines beginning with "%%CreationDate:
" are to be ignored in deciding whether a file of the given
extension .eps has changed.
@@ -1493,6 +1494,18 @@ LATEXMK(1L) LATEXMK(1L)
also uses to try to locate files; it applies only in the case of
.bib files.
+
+
+
+ 7 July 2011 22
+
+
+
+
+
+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
@@ -1510,18 +1523,6 @@ LATEXMK(1L) LATEXMK(1L)
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}
-
-
-
- 7 May 2011 23
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
or \includegraphics{figure}, when the relevant source file does
not exist.
@@ -1563,31 +1564,31 @@ LATEXMK(1L) LATEXMK(1L)
errors";
- $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-
- 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
+ 7 July 2011 23
- 7 May 2011 24
+LATEXMK(1L) LATEXMK(1L)
+ $lpr ["lpr %O %S" under UNIX/LINUX, "NONE lpr" under MS-WINDOWS]
+ The command to print postscript files.
-LATEXMK(1L) LATEXMK(1L)
+ 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-
@@ -1632,20 +1633,11 @@ 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-
- 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.
+ viously running previewer on the same file, and if one is
- $pdf_mode [0]
- If zero, do NOT generate a pdf version of the document. If
- equal to 1, generate a pdf version of the document using pdfla-
- tex. If equal to 2, generate a pdf version of the document from
- the ps file, by using the command specified by the $ps2pdf
-
- 7 May 2011 25
+ 7 July 2011 24
@@ -1654,7 +1646,16 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- variable. If equal to 3, generate a pdf version of the document
+ running 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.
+
+ $pdf_mode [0]
+ If zero, do NOT generate a pdf version of the document. If
+ equal to 1, generate a pdf version of the document using pdfla-
+ tex. 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
from the dvi file, by using the command specified by the $dvipdf
variable.
@@ -1703,15 +1704,10 @@ LATEXMK(1L) LATEXMK(1L)
$pdflatex when silent mode is on.
If you use MikTeX, you may prefer the results if you configure
- the options to include -c-style-errors, e.g., by the following
- line in an initialization file
-
- $latex_silent_switch = "-interaction=batchmode -c-style-
- errors";
- 7 May 2011 26
+ 7 July 2011 25
@@ -1720,6 +1716,13 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ the options to include -c-style-errors, e.g., by the following
+ line in an initialization file
+
+ $latex_silent_switch = "-interaction=batchmode -c-style-
+ errors";
+
+
$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,
@@ -1771,13 +1774,10 @@ LATEXMK(1L) LATEXMK(1L)
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.
- 7 May 2011 27
+ 7 July 2011 26
@@ -1786,6 +1786,9 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ $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 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
@@ -1826,8 +1829,8 @@ LATEXMK(1L) LATEXMK(1L)
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
- process number is determined.
+ 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
(i.e., the command is not used), "ps --width 200 -f -u
@@ -1839,11 +1842,13 @@ LATEXMK(1L) LATEXMK(1L)
$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
+ postscript file before other processing. Equivalent to
-
- 7 May 2011 28
+ 7 July 2011 27
@@ -1852,10 +1857,7 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- $ps_filter [empty]
- The postscript file filter to be run on the newly produced post-
- script file before other processing. Equivalent to specifying
- the -pF option.
+ 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-
@@ -1906,28 +1908,28 @@ LATEXMK(1L) LATEXMK(1L)
$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
- 7 May 2011 29
+ 7 July 2011 28
-LATEXMK(1L) LATEXMK(1L)
+LATEXMK(1L) LATEXMK(1L)
- 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 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.)
+ quoting only ensures that such filenames are correctly treated by the
+ operating system in passing arguments to programs.)
$recorder [0]
Whether to use the -recorder option to latex and pdflatex. Use
@@ -1973,17 +1975,6 @@ LATEXMK(1L) LATEXMK(1L)
Directory to store temporary files that latexmk may generate
while running.
-
-
- 7 May 2011 30
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
The default under MSWindows (including cygwin), is to set
$tmpdir to the value of the first of whichever of the system
environment variables TMPDIR or TEMP exists, otherwise to the
@@ -1996,6 +1987,18 @@ LATEXMK(1L) LATEXMK(1L)
Whether to use make to try and make files that are missing after
a run of latex or pdflatex, and for which a custom dependency
has not been found. This is generally useful only when latexmk
+
+
+
+ 7 July 2011 29
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
is used as part of a bigger project which is built by using the
make program.
@@ -2038,18 +2041,6 @@ CUSTOM DEPENDENCIES
to extension:
The extension of the file we are converting to (e.g. "eps"). It
-
-
-
- 7 May 2011 31
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
is specified without a period.
must: If non-zero, the file from which we are converting must exist,
@@ -2067,6 +2058,18 @@ LATEXMK(1L) LATEXMK(1L)
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-
+
+
+
+ 7 July 2011 30
+
+
+
+
+
+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
@@ -2104,18 +2107,6 @@ LATEXMK(1L) LATEXMK(1L)
the above code with a single argument "figure", which is the basename
of each of the files (possibly with a path component). This argument
is referred to by Perl as $_[0]. In the example above, the subroutine
-
-
-
- 7 May 2011 32
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
uses the Perl command system to invoke the program fig2dev. The double
quotes around the string are a Perl idiom that signify that each string
of the form of a variable name, $_[0] in this case, is to be substi-
@@ -2137,12 +2128,24 @@ 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 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.
+ This causes the invocation of the fig2dev program to have quoted
+
+
+
+ 7 July 2011 31
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
+ filenames; it should therefore work with filenames containing spaces.
+ However, 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
@@ -2170,18 +2173,6 @@ LATEXMK(1L) LATEXMK(1L)
Another example of a custom dependency overcomes a limitation of
latexmk concerning index files. The only index-file conversion built-
-
-
-
- 7 May 2011 33
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
in to latexmk is from an ".idx" file written on one run of latex/pdfla-
tex to an ".ind" file to be read in on a subsequent run. But with the
index.sty package you can create extra indexes with extensions that you
@@ -2209,6 +2200,18 @@ LATEXMK(1L) LATEXMK(1L)
use of an md5 checksum), and only does a remake when the file contents
have actually changed.
+
+
+
+ 7 July 2011 32
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
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
@@ -2236,18 +2239,6 @@ OLD METHOD OF DEFINING CUSTOM DEPENDENCIES
}
This method still works, and is equivalent to the earlier code using
-
-
-
- 7 May 2011 34
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
the add_cus_dep subroutine, except that it doesn't delete any previous
custom-dependency for the same conversion. So the new method is
preferable.
@@ -2280,6 +2271,18 @@ USING latexmk WITH make
Nevertheless there are projects for which a Makefile is appropriate,
and it is useful to know how to use latexmk from a Makefile. A typical
+
+
+
+ 7 July 2011 33
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
example would be to generate documentation for a software project.
Potentially the interaction with the rest of the rules in the Makefile
could be quite complicated, for example if some of the source files for
@@ -2302,18 +2305,6 @@ USING latexmk WITH make
(Note: the last line must be introduced by a tab for the Makefile to
function correctly!) Naturally, if making try.pdf from its associated
LaTeX file try.tex were the only task to be performed, a direct use of
-
-
-
- 7 May 2011 35
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
latexmk without a Makefile would normally be better. The benefit of
using a Makefile for a LaTeX document would be in a larger project,
where lines such as the above would be only be a small part of a larger
@@ -2351,6 +2342,18 @@ LATEXMK(1L) LATEXMK(1L)
$(DEPS_DIR) :
mkdir $@
%.pdf : %.tex
+
+
+
+ 7 July 2011 34
+
+
+
+
+
+LATEXMK(1L) LATEXMK(1L)
+
+
if [ ! -e $(DEPS_DIR) ]; then mkdir $(DEPS_DIR); fi
$(LATEXMK) -pdf -dvi- -ps- -deps-out=$(DEPS_DIR)/$@P $<
%.pdf : %.fig
@@ -2368,18 +2371,6 @@ LATEXMK(1L) LATEXMK(1L)
dency files are .deps/document1.pdfP and .deps/document2.pdfP.
There is now no need for the phony prerequisite for the rule to make
-
-
-
- 7 May 2011 36
-
-
-
-
-
-LATEXMK(1L) LATEXMK(1L)
-
-
.pdf files from .tex files. But I have added a rule to make .pdf files
from .fig files produced by the xfig program; these are commonly used
for graphics insertions in LaTeX documents. Latexmk is arranged to
@@ -2423,31 +2414,30 @@ BUGS
pdf file cannot be updated. (Remedy: configure latexmk to use gsview
instead.)
-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.24).
+ 7 July 2011 35
- 7 May 2011 37
+LATEXMK(1L) LATEXMK(1L)
-LATEXMK(1L) LATEXMK(1L)
+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.25).
- Released version can be obtained from CTAN: <http://www.tug.org/tex-ar-
- chive/support/latexmk/>, and from the author's website
+ 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/>.
Modifications and enhancements by Evan McLean (Version 2.0)
Original script called "go" by David J. Musliner (RCS Version 3.2)
@@ -2497,12 +2487,6 @@ LATEXMK(1L) LATEXMK(1L)
-
-
-
-
-
-
- 7 May 2011 38
+ 7 July 2011 36
diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl
index 3a3303e3322..17aef439834 100755
--- a/Master/texmf-dist/scripts/latexmk/latexmk.pl
+++ b/Master/texmf-dist/scripts/latexmk/latexmk.pl
@@ -107,8 +107,8 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.24';
-$version_details = "$My_name, John Collins, 7 May 2011";
+$version_num = '4.25';
+$version_details = "$My_name, John Collins, 7 July 2011";
use Config;
@@ -177,6 +177,18 @@ else {
##
## Modification log from 1 Jan 2011 onwards in detail
##
+## 7 Jul 2011, John Collins Fix process_rc_file to evade cygwin bug.
+## Version 4.25
+## 6 Jul 2011, John Collins Diagnostic for unreadable rc-file
+## N.B. There appears to be a bug in cygwin's
+## perl: -r /cygdrive/c/latexmk/LatexMk
+## returns false even if the file is readable.
+## 31 May 2011, John Collins Add deps output file to target part
+## of dependency information
+## 15 May 2011, John Collins Start to correct handling of non-existent
+## bib files:
+## a. After run of biber, set the source files
+## b. Parse Reading message from biber in blg file
## 7 May 2011, John Collins With biber, use kpsewhich to find source
## files (e.g., .bib)
## 24 Mar 2011, John Collins Correct bug in detection of source files
@@ -2585,16 +2597,37 @@ sub process_rc_file {
# NEW VERSION
# Run rc_file whose name is given in first argument
# Exit with code 0 on success
- # Exit with code 1 if file could not be read.
+ # Exit with code 1 if file cannot be read or does not exist.
+ # Exit with code 2 if is a syntax error or other problem.
+ # PREVIOUSLY:
# Stop if there is a syntax error or other problem.
my $rc_file = $_[0];
my $ret_code = 0;
warn "$My_name: Executing Perl code in file '$rc_file'...\n"
if $diagnostics;
- if ( ! -r $rc_file ) {
+ # I could use the do command of perl, but the preceeding -r test
+ # to get good diagnostics gets the wrong result under cygwin
+ # (e.g., on /cygdrive/c/latexmk/LatexMk)
+ my $RCH = new FileHandle;
+ if ( !-e $rc_file ) {
+ warn "$My_name: The rc-file '$rc_file' does not exist\n";
return 1;
}
- do( $rc_file );
+ elsif ( open $RCH, "<$rc_file" ) {
+ { local $/; eval <$RCH>; }
+ close $RCH;
+ }
+ else {
+ warn "$My_name: I cannot read the rc-file '$rc_file'\n";
+ return 1;
+ }
+ # PREVIOUS VERSION
+# if ( ! -r $rc_file ) {
+# warn "$My_name: I cannot read the rc-file '$rc_file'\n",
+# " or at least that's what Perl (for $^O) reports\n";
+# return 1;
+# }
+# do( $rc_file );
if ( $@ ) {
# Indent each line of possibly multiline message:
my $message = prefix( $@, " " );
@@ -2935,6 +2968,7 @@ sub check_biber_log {
}
elsif ( /> INFO - Found .* '([^']+)'\s*$/
|| /> INFO - Found '([^']+)'\s*$/
+ || /> INFO - Reading (.*)$/
|| /> INFO - Processing .* file '([^']+)' .*$/
) {
if ( defined $Pbiber_source ) {
@@ -2943,6 +2977,7 @@ sub check_biber_log {
}
}
close $log_file;
+
my $bibret = &find_file_list1( $Pbiber_source, $Pbiber_source,
'', \@BIBINPUTS );
@$Pbiber_source = uniqs( @$Pbiber_source );
@@ -4688,7 +4723,11 @@ sub deps_list {
delete $source{$_};
}
foreach my $dest (@dest) {
- print $fh "$root_filename$dest :";
+ if ($deps_file eq '-' ) {
+ print $fh "$root_filename$dest :";
+ } else {
+ print $fh "$root_filename$dest $deps_file :";
+ }
foreach (sort keys %source) {
print $fh "\\\n $_";
}
@@ -5363,7 +5402,13 @@ sub rdb_run1 {
$$Plast_message = "Bug or configuration error; incorrect command type";
}
if ( $rule =~ /^biber/ ) {
- my $retcode = check_biber_log($$Pbase);
+ my @biber_source = ( );
+ my $retcode = check_biber_log( $$Pbase, \@biber_source );
+ foreach my $source ( @biber_source ) {
+ print " === Source file '$source' for '$rule'\n"
+ if ($diagnostics);
+ rdb_ensure_file( $rule, $source );
+ }
if ($retcode == 3) {
$$Plast_result = 2;
$$Plast_message = "Could not open biber log file for '$$Pbase'";
diff --git a/Master/texmf/doc/man/man1/latexmk.1 b/Master/texmf/doc/man/man1/latexmk.1
index 768cb1ff6c8..56e4fa4a2ff 100644
--- a/Master/texmf/doc/man/man1/latexmk.1
+++ b/Master/texmf/doc/man/man1/latexmk.1
@@ -1,4 +1,4 @@
-.TH LATEXMK 1L "7 May 2011" ""
+.TH LATEXMK 1L "7 July 2011" ""
.SH NAME
latexmk \- generate LaTeX document
.SH SYNOPSIS
@@ -828,6 +828,9 @@ installed in a subdirectory of "C:\\Program Files". Such command names
should be enclosed in double quotes, as in
.PP
$lpr_pdf = '"c:/Program Files/Ghostgum/gsview/gsview32.exe" /p %S';
+ $pdf_previewer = 'start "c:/Program Files/SumatraPDF/SumatraPDF.exe" %O %S';
+ $pdf_previewer = 'start "c:/Program Files/SumatraPDF (x86)/SumatraPDF.exe" %O %S';
+
.PP
(Note about the above example: Forward slashes are equivalent to
backslashes in filenames under MS-Windows, provided that the filename
@@ -836,6 +839,14 @@ examples like the one above, since then one does not have to worry
about the rules for dealing with forward slashes in strings in the
Perl language.)
+\fBCommand names under Cygwin\fR: If latexmk is executed by Cygwin's
+perl, \fI be particularly certain that pathnames in commands have
+\fBforward\fI slashes\fR not the usual backslashes for the separator
+of pathname components. See the above examples. Backslashes often
+get misinterpreted by the Unix shell used by Cygwin's Perl to execute
+external commands. Forward slashes don't suffer from this problem,
+and (when quoted, as above) are equally acceptable to MS-Windows.
+
\fBUsing MS-Windows file associations\fR: A useful trick under modern
versions of MS-Windows (e.g., WinXP) is to use just the
command 'start' by itself:
@@ -844,7 +855,11 @@ command 'start' by itself:
.PP
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.)
+applies for a postscript viewer and a pdf viewer.) But note that this
+trick is not always suitable for the pdf previwer, if your system has
+acroread for the default pdf viewer. As explained elsewhere, acroread
+under MS-Windows does not work well with \fIlatex\fR and
+\fIlatexmk\fR, because acroread locks the pdf file.
\fBNot using a certain command\fR: If a command is not to be run, the
command name NONE is used, as in
@@ -2027,7 +2042,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.24).
+(Version 4.25).
Released version can be obtained from CTAN:
<http://www.tug.org/tex-archive/support/latexmk/>, and from the
diff --git a/Master/texmf/doc/man/man1/latexmk.man1.pdf b/Master/texmf/doc/man/man1/latexmk.man1.pdf
index 0ee497e47cb..ab4fd7e6fb0 100644
--- a/Master/texmf/doc/man/man1/latexmk.man1.pdf
+++ b/Master/texmf/doc/man/man1/latexmk.man1.pdf
Binary files differ