summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-19 23:23:51 +0000
committerKarl Berry <karl@freefriends.org>2010-05-19 23:23:51 +0000
commit994e8740e5b5588a65c3baec92333b81ae2edd54 (patch)
tree042867ad1828218c2585eea633a2587aaed65006
parent666a6e2300f00cb53ed434b53f5fecebfc97f2ef (diff)
latexmk 4.16a (19may10)
git-svn-id: svn://tug.org/texlive/trunk@18356 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/latexmk/latexmk.pl27
-rw-r--r--Master/texmf-dist/doc/support/latexmk/CHANGES7
-rw-r--r--Master/texmf-dist/doc/support/latexmk/README6
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.pdfbin79391 -> 79663 bytes
-rw-r--r--Master/texmf-dist/doc/support/latexmk/latexmk.txt302
-rwxr-xr-xMaster/texmf-dist/scripts/latexmk/latexmk.pl27
-rw-r--r--Master/texmf/doc/man/man1/latexmk.112
-rw-r--r--Master/texmf/doc/man/man1/latexmk.man1.pdfbin89821 -> 90633 bytes
8 files changed, 216 insertions, 165 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl b/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
index 7372174cc9f..08fdc5b4ebe 100755
--- a/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
+++ b/Build/source/texk/texlive/linked_scripts/latexmk/latexmk.pl
@@ -108,8 +108,8 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.16';
-$version_details = "$My_name, John Collins, 10 May 2010";
+$version_num = '4.16a';
+$version_details = "$My_name, John Collins, 18 May 2010";
use Config;
@@ -178,6 +178,10 @@ else {
##
## Modification log from 22 Jan 2010 onwards in detail
##
+## 18 May 2010, John Collins Remove unlink $$Pdest in do_viewfile
+## 17 May 2010, John Collins Correct sleep time to 1 sec
+## if s<0 (otherwise infinite delay)
+## or if 0<s<1 (otherwise zero delay)
## 10 May 2010, John Collins Deal with filenames in log file that are
## messed up by pdfTeX warnings not preceeded
## by a new line
@@ -1550,6 +1554,22 @@ if ( $pdf_mode == 2 ) {
add_option( \$dvips, " $dvips_pdf_switch" );
}
+# Note sleep has granularity of 1 second.
+# Sleep periods 0 < $sleep_time < 1 give zero delay,
+# which is probably not what the user intended.
+# Sleep periods less than zero give infinite delay
+if ( $sleep_time < 0 ) {
+ warn "$My_name: Correcting negative sleep_time to 1 sec.\n";
+ $sleep_time = 1;
+}
+elsif ( ($sleep_time < 1) && ( $sleep_time != 0 ) ) {
+ warn "$My_name: Correcting nonzero sleep_time of less than 1 sec to 1 sec.\n";
+ $sleep_time = 1;
+}
+elsif ( $sleep_time == 0 ) {
+ warn "$My_name: sleep_time was configured to zero.\n",
+ " Do you really want to do this? It will give 100% CPU usage.";
+}
# Make convenient forms for lookup.
# Extensions always have period.
@@ -2110,7 +2130,6 @@ sub do_viewfile {
if ( &view_file_via_temporary ) {
my $tmpfile = tempfile1( "${root_filename}_tmp", $ext );
$return = &rdb_ext_cmd1( '', '', $tmpfile );
- unlink $$Pdest;
move( $tmpfile, $$Pdest );
}
else {
@@ -2417,7 +2436,7 @@ CHANGE:
&catch_break;
$have_break = 0;
WAIT: while (1) {
- sleep($sleep_time);
+ sleep( $sleep_time );
if ($have_break) { last WAIT; }
if ( rdb_new_changes(keys %rules_to_watch) ) {
if (!$silent) {
diff --git a/Master/texmf-dist/doc/support/latexmk/CHANGES b/Master/texmf-dist/doc/support/latexmk/CHANGES
index fcd92f4ba7c..5f208d7369a 100644
--- a/Master/texmf-dist/doc/support/latexmk/CHANGES
+++ b/Master/texmf-dist/doc/support/latexmk/CHANGES
@@ -164,4 +164,9 @@ From v. 4.15b to v. 4.16
Updated documentation to mention previously undocumented feature
about the use of temporary files in making ps and pdf files.
-
+From v. 4.16 to v. 4.16a
+ Sanity check on $sleep_time. (Negative times and times between 0
+ and 1 are replaced by 1.)
+ Corrected problem under preview-continuous mode that some
+ previewers would not see the changed file on an NFS file
+ system.
diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README
index a7b85ae2b10..01a3221a01c 100644
--- a/Master/texmf-dist/doc/support/latexmk/README
+++ b/Master/texmf-dist/doc/support/latexmk/README
@@ -1,5 +1,5 @@
-Latexmk, version 4.16, 10 May 2010
-----------------------------------
+Latexmk, version 4.16a, 18 May 2010
+-----------------------------------
Latexmk completely automates the process of generating a LaTeX document.
Essentially, it is a highly specialized cousin of the general make
@@ -91,7 +91,7 @@ I hope you find this useful.
John Collins
---------------------------- "latexmk -h" ----------------------------
-Latexmk 4.16: Automatic LaTeX document generation routine
+Latexmk 4.16a: 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 5b6a147d6be..e098634792e 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 1ba8104b662..84914dde566 100644
--- a/Master/texmf-dist/doc/support/latexmk/latexmk.txt
+++ b/Master/texmf-dist/doc/support/latexmk/latexmk.txt
@@ -127,7 +127,7 @@ LATEXMK OPTIONS AND ARGUMENTS ON COMMAND LINE
- 10 May 2010 2
+ 18 May 2010 2
@@ -193,7 +193,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 3
+ 18 May 2010 3
@@ -259,7 +259,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 4
+ 18 May 2010 4
@@ -325,7 +325,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 5
+ 18 May 2010 5
@@ -391,7 +391,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 6
+ 18 May 2010 6
@@ -457,7 +457,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 7
+ 18 May 2010 7
@@ -523,7 +523,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 8
+ 18 May 2010 8
@@ -589,7 +589,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 9
+ 18 May 2010 9
@@ -655,7 +655,7 @@ CONFIGURATION/INITIALIZATION (RC) FILES
- 10 May 2010 10
+ 18 May 2010 10
@@ -722,7 +722,7 @@ FORMAT OF COMMAND SPECIFICATIONS
- 10 May 2010 11
+ 18 May 2010 11
@@ -789,7 +789,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 12
+ 18 May 2010 12
@@ -856,7 +856,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 13
+ 18 May 2010 13
@@ -923,7 +923,7 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES
- 10 May 2010 14
+ 18 May 2010 14
@@ -990,7 +990,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 15
+ 18 May 2010 15
@@ -1057,7 +1057,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 16
+ 18 May 2010 16
@@ -1124,7 +1124,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 17
+ 18 May 2010 17
@@ -1191,7 +1191,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 18
+ 18 May 2010 18
@@ -1260,7 +1260,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 19
+ 18 May 2010 19
@@ -1329,7 +1329,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 20
+ 18 May 2010 20
@@ -1398,7 +1398,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 21
+ 18 May 2010 21
@@ -1467,7 +1467,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 22
+ 18 May 2010 22
@@ -1538,7 +1538,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 23
+ 18 May 2010 23
@@ -1609,7 +1609,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 24
+ 18 May 2010 24
@@ -1680,7 +1680,7 @@ LATEXMK(1L) LATEXMK(1L)
- 10 May 2010 25
+ 18 May 2010 25
@@ -1729,29 +1729,29 @@ LATEXMK(1L) LATEXMK(1L)
$sleep_time [2]
The time to sleep (in seconds) between checking for source file
- changes when running the -pvc option.
+ changes when running with the -pvc option. This is subject to a
+ minimum of one second delay, except that zero delay is also
+ allowed.
+
+ A value of exactly 0 gives no delay, and typically results in
+ 100% CPU usage, which may not be desirable.
$texfile_search [""]
- This is an obsolete variable, replaced by the @default_files
+ This is an obsolete variable, replaced by the @default_files
variable.
- For backward compatibility, if you choose to set $tex-
- file_search, it is a string of space-separated filenames, and
+ For backward compatibility, if you choose to set $tex-
+ file_search, it is a string of space-separated filenames, and
then latexmk replaces @default_files with the filenames in $tex-
file_search to which is added "*.tex".
$tmpdir [See below for default]
- Directory to store temporary files that latexmk may generate
+ Directory to store temporary files that latexmk may generate
while running.
- 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
- current directory. Under other operating systems (expected to
-
- 10 May 2010 26
+ 18 May 2010 26
@@ -1760,27 +1760,31 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- be UNIX/Linux, including OS-X), the default is the value of the
- system environment variable TMPDIR if it exists, otherwise
+ 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
+ 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".
$view ["default"]
- Which kind of file is to be previewed if a previewer is used.
- The possible values are "default", "dvi", "ps", "pdf". The
+ Which kind of file is to be previewed if a previewer is used.
+ The possible values are "default", "dvi", "ps", "pdf". The
value of "default" means that the "highest" of the kinds of file
generated is to be used (among dvi, ps and pdf).
CUSTOM DEPENDENCIES
- In any RC file a set of custom dependencies can be set up to convert a
+ In any RC file a set of custom dependencies can be set up to convert a
file with one extension to a file with another. An example use of this
would be to allow latexmk to convert a .fig file to .eps to be included
in the .tex file.
- The old method of configuring latexmk was to directly manipulate the
- @cus_dep_list array that contains information defining the custom
- dependencies. This method still works. But now there are subroutines
- that allow convenient manipulations of the custom dependency list.
+ The old method of configuring latexmk was to directly manipulate the
+ @cus_dep_list array that contains information defining the custom
+ dependencies. This method still works. But now there are subroutines
+ that allow convenient manipulations of the custom dependency list.
These are
add_cus_dep( fromextension, toextension, must, subroutine )
@@ -1791,38 +1795,34 @@ CUSTOM DEPENDENCIES
follow:
from extension:
- The extension of the file we are converting from (e.g. "fig").
+ The extension of the file we are converting from (e.g. "fig").
It is specified without a period.
to extension:
The extension of the file we are converting to (e.g. "eps"). It
is specified without a period.
- must: If non-zero, the file from which we are converting must exist,
- if it doesn't exist latexmk will give an error message and exit
+ must: If non-zero, the file from which we are converting must exist,
+ if it doesn't exist latexmk will give an error message and exit
unless the -f option is specified. If must is zero and the file
we are converting from doesn't exist, then no action is taken.
function:
- The name of the subroutine that latexmk should call to perform
- the file conversion. The first argument to the subroutine is
+ The name of the subroutine that latexmk should call to perform
+ the file conversion. The first argument to the subroutine is
the base name of the file to be converted without any extension.
- The subroutines are declared in the syntax of Perl. The func-
- tion should return 0 if it was successful and a nonzero number
+ The subroutines are declared in the syntax of Perl. The func-
+ tion should return 0 if it was successful and a nonzero number
if it failed.
- 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-
+ 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,
- 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.
+ exists with the same name, but with the corresponding from-extension,
-
- 10 May 2010 27
+ 18 May 2010 27
@@ -1831,15 +1831,19 @@ CUSTOM DEPENDENCIES
LATEXMK(1L) LATEXMK(1L)
- To make the new destination file, the Perl subroutine specified in the
+ 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,
+ 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
- specifies how the rule should be applied when the source file fails to
+ One other item in each custom-dependency rule labelled "must" above
+ specifies how the rule should be applied when the source file fails to
exist.
A simple and typical example of code in an initialization rcfile is
@@ -1849,33 +1853,33 @@ LATEXMK(1L) LATEXMK(1L)
system("fig2dev -Leps $_[0].fig $_[0].eps");
}
- The first line adds a custom dependency that converts a file with
- extension "fig", as created by the xfig program, to an encapsulated
- postscript file, with extension "eps". The remaining lines define a
- subroutine that carries out the conversion. If a rule for converting
- "fig" to "eps" files already exists (e.g., from a previously read-in
- initialization file), the latexmk will delete this rule before making
+ The first line adds a custom dependency that converts a file with
+ extension "fig", as created by the xfig program, to an encapsulated
+ postscript file, with extension "eps". The remaining lines define a
+ subroutine that carries out the conversion. If a rule for converting
+ "fig" to "eps" files already exists (e.g., from a previously read-in
+ initialization file), the latexmk will delete this rule before making
the new one.
- Suppose latexmk is using this rule to convert a file "figure.fig" to
- "figure.eps". Then it will invoke the fig2eps subroutine defined in
- 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
+ Suppose latexmk is using this rule to convert a file "figure.fig" to
+ "figure.eps". Then it will invoke the fig2eps subroutine defined in
+ 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
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-
+ of the form of a variable name, $_[0] in this case, is to be substi-
tuted by its value.
- If the return value of the subroutine is non-zero, then latexmk will
- assume an error occurred during the execution of the subroutine. In
- the above example, no explicit return value is given, and instead the
- return value is the value returned by the last (and only) statement,
+ If the return value of the subroutine is non-zero, then latexmk will
+ assume an error occurred during the execution of the subroutine. In
+ the above example, no explicit return value is given, and instead the
+ return value is the value returned by the last (and only) statement,
i.e., the invocation of system, which returns the value 0 on success.
- If you use filenames with spaces in them, and if your LaTeX system and
- all other relevant software correctly handle such filenames, then you
- could put single quotes around filenames in the command line that is
+ If you use filenames with spaces in them, and if your LaTeX system and
+ all other relevant software correctly handle such filenames, then you
+ could put single quotes around filenames in the command line that is
executed:
add_cus_dep( 'fig', 'eps', 0, 'fig2eps' );
@@ -1883,17 +1887,13 @@ LATEXMK(1L) LATEXMK(1L)
system("fig2dev -Lps '$_[0].fig' '$_[0].eps'");
}
- This causes the invocation of the fig2dev program to have quoted file-
+ 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.
-
+ ever, not all software deals correctly with filenames that contain
- 10 May 2010 28
+ 18 May 2010 28
@@ -1902,8 +1902,12 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
- 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
+ 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' );
@@ -1911,31 +1915,31 @@ LATEXMK(1L) LATEXMK(1L)
system("fig2dev -Lpdf $_[0].fig $_[0].pdf");
}
- If you have some general custom dependencies defined in the system or
- user initialization file, you may find that for a particular project
- they are undesirable. So you might want to delete the unneeded ones.
+ If you have some general custom dependencies defined in the system or
+ user initialization file, you may find that for a particular project
+ they are undesirable. So you might want to delete the unneeded ones.
For example, you remove any "fig" to "eps" rule by the line
remove_cus_dep( 'fig', 'eps' );
- If you have complicated sets of custom dependencies, you may want to
- get a listing of the custom dependencies. This is done by using the
+ If you have complicated sets of custom dependencies, you may want to
+ get a listing of the custom dependencies. This is done by using the
line
show_cus_dep();
in an initialization file.
- Another example of a custom dependency overcomes a limitation of
- latexmk concerning index files. The only index-file conversion built-
+ Another example of a custom dependency overcomes a limitation of
+ latexmk concerning index files. The only index-file conversion built-
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
+ 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
configure. Latexmk does not know how to deduce the extensions from the
information it has. But you can easily write a custom dependency. For
- example if your latex file uses the command "\newindex{spe-
+ example if your latex file uses the command "\newindex{spe-
cial}{ndx}{nnd}{Special index}" you will need to convert files with the
- extension .ndx to .nnd. The following lines in an initialization RC
+ extension .ndx to .nnd. The following lines in an initialization RC
file will cause this to happen:
add_cus_dep('ndx', 'nnd', 0, 'makendx2nnd');
@@ -1943,28 +1947,24 @@ LATEXMK(1L) LATEXMK(1L)
system("makeindex -o $_[0].nnd $_[0].ndx");
}
- (You will need to modify this code if you use filenames with spaces in
+ (You will need to modify this code if you use filenames with spaces in
them, to provide correct quoting of the filenames.)
- Those of you with experience with Makefiles, will undoubtedly be con-
+ 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
- be perpetually out-of-date. This situation, of circular dependencies,
+ is always later than the .nnd last read in. Thus the .nnd appears to
+ 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
+ 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.
- For real experts: See the %hash_cal_ignore_pattern if you have to deal
- with such problems.
-
- Glossaries can be dealt with similarly.
+ 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.
- 10 May 2010 29
+ 18 May 2010 29
@@ -1973,17 +1973,23 @@ LATEXMK(1L) LATEXMK(1L)
LATEXMK(1L) LATEXMK(1L)
+ For real experts: See the %hash_cal_ignore_pattern if you have to deal
+ with such problems.
+
+ Glossaries can be dealt with similarly.
+
+
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-
+ 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 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
+ strings, and each string in the array has four items in it, each sepa-
+ rated by a space, the from-extension, the to-extension, the "must"
+ item, and the name of the subroutine for the custom dependency. These
were all defined above.
An example of the old method of defining custom dependencies is as fol-
- lows. It is the code in an RC file to ensure automatic conversion of
+ lows. It is the code in an RC file to ensure automatic conversion of
.fig files to .eps files:
push @cus_dep_list, "fig eps 0 fig2eps";
@@ -1991,9 +1997,9 @@ OLD METHOD OF DEFINING CUSTOM DEPENDENCIES
system("fig2dev -Lps $_[0].fig $_[0].eps");
}
- This method still works, and is equivalent to the earlier code using
- the add_cus_dep subroutine, except that it doesn't delete any previous
- custom-dependency for the same conversion. So the new method is
+ This method still works, and is equivalent to the earlier code using
+ 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.
@@ -2002,40 +2008,36 @@ SEE ALSO
BUGS
Sometimes a viewer (gv) tries to read an updated .ps or .pdf file after
- its creation is started but before the file is complete. Work around:
+ its creation is started but before the file is complete. Work around:
manually refresh (or reopen) display. Or use one of the other preview-
ers and update methods.
- (The following isn't really a bug, but concerns features of preview-
- ers.) Preview continuous mode only works perfectly with certain pre-
- viewers: Xdvi on UNIX/LINUX works for dvi files. Gv on UNIX/LINUX
- works for both postscript and pdf. Ghostview on UNIX/LINUX needs a
- manual update (reopen); it views postscript and pdf. Gsview under MS-
- Windows works for both postscript and pdf, but only reads the updated
- file when its screen is refreshed. Acroread under UNIX/LINUX views
- pdf, but the file needs to be closed and reopened to view an updated
- version. Under MS-Windows, acroread locks its input file and so the
- pdf file cannot be updated. (Remedy: configure latexmk to use gsview
+ (The following isn't really a bug, but concerns features of preview-
+ ers.) Preview continuous mode only works perfectly with certain pre-
+ viewers: Xdvi on UNIX/LINUX works for dvi files. Gv on UNIX/LINUX
+ works for both postscript and pdf. Ghostview on UNIX/LINUX needs a
+ manual update (reopen); it views postscript and pdf. Gsview under MS-
+ Windows works for both postscript and pdf, but only reads the updated
+ file when its screen is refreshed. Acroread under UNIX/LINUX views
+ pdf, but the file needs to be closed and reopened to view an updated
+ version. Under MS-Windows, acroread locks its input file and so the
+ pdf file cannot be updated. (Remedy: configure latexmk to use 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
+ 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.16).
-
- 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/>.
+ Current version, by John Collins (username collins at node
+ phys.psu.edu). (Version 4.16a).
- 10 May 2010 30
+ 18 May 2010 30
@@ -2044,6 +2046,9 @@ AUTHOR
LATEXMK(1L) LATEXMK(1L)
+ 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)
@@ -2105,7 +2110,6 @@ LATEXMK(1L) LATEXMK(1L)
-
- 10 May 2010 31
+ 18 May 2010 31
diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl
index 7372174cc9f..08fdc5b4ebe 100755
--- a/Master/texmf-dist/scripts/latexmk/latexmk.pl
+++ b/Master/texmf-dist/scripts/latexmk/latexmk.pl
@@ -108,8 +108,8 @@ use warnings;
$my_name = 'latexmk';
$My_name = 'Latexmk';
-$version_num = '4.16';
-$version_details = "$My_name, John Collins, 10 May 2010";
+$version_num = '4.16a';
+$version_details = "$My_name, John Collins, 18 May 2010";
use Config;
@@ -178,6 +178,10 @@ else {
##
## Modification log from 22 Jan 2010 onwards in detail
##
+## 18 May 2010, John Collins Remove unlink $$Pdest in do_viewfile
+## 17 May 2010, John Collins Correct sleep time to 1 sec
+## if s<0 (otherwise infinite delay)
+## or if 0<s<1 (otherwise zero delay)
## 10 May 2010, John Collins Deal with filenames in log file that are
## messed up by pdfTeX warnings not preceeded
## by a new line
@@ -1550,6 +1554,22 @@ if ( $pdf_mode == 2 ) {
add_option( \$dvips, " $dvips_pdf_switch" );
}
+# Note sleep has granularity of 1 second.
+# Sleep periods 0 < $sleep_time < 1 give zero delay,
+# which is probably not what the user intended.
+# Sleep periods less than zero give infinite delay
+if ( $sleep_time < 0 ) {
+ warn "$My_name: Correcting negative sleep_time to 1 sec.\n";
+ $sleep_time = 1;
+}
+elsif ( ($sleep_time < 1) && ( $sleep_time != 0 ) ) {
+ warn "$My_name: Correcting nonzero sleep_time of less than 1 sec to 1 sec.\n";
+ $sleep_time = 1;
+}
+elsif ( $sleep_time == 0 ) {
+ warn "$My_name: sleep_time was configured to zero.\n",
+ " Do you really want to do this? It will give 100% CPU usage.";
+}
# Make convenient forms for lookup.
# Extensions always have period.
@@ -2110,7 +2130,6 @@ sub do_viewfile {
if ( &view_file_via_temporary ) {
my $tmpfile = tempfile1( "${root_filename}_tmp", $ext );
$return = &rdb_ext_cmd1( '', '', $tmpfile );
- unlink $$Pdest;
move( $tmpfile, $$Pdest );
}
else {
@@ -2417,7 +2436,7 @@ CHANGE:
&catch_break;
$have_break = 0;
WAIT: while (1) {
- sleep($sleep_time);
+ sleep( $sleep_time );
if ($have_break) { last WAIT; }
if ( rdb_new_changes(keys %rules_to_watch) ) {
if (!$silent) {
diff --git a/Master/texmf/doc/man/man1/latexmk.1 b/Master/texmf/doc/man/man1/latexmk.1
index 917435b18b1..9a1205a08ee 100644
--- a/Master/texmf/doc/man/man1/latexmk.1
+++ b/Master/texmf/doc/man/man1/latexmk.1
@@ -1,4 +1,4 @@
-.TH LATEXMK 1L "10 May 2010" ""
+.TH LATEXMK 1L "18 May 2010" ""
.SH NAME
latexmk \- generate LaTeX document
.SH SYNOPSIS
@@ -1445,8 +1445,12 @@ 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.
+The time to sleep (in seconds) between checking for source file
+changes when running with the \fB-pvc\fR option. This is subject to a
+minimum of one second delay, except that zero delay is also allowed.
+
+A value of exactly 0 gives no delay, and typically results in 100% CPU
+usage, which may not be desirable.
.TP
.B $texfile_search [""]
This is an obsolete variable, replaced by the \fI@default_files\fR
@@ -1700,7 +1704,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.16).
+(Version 4.16a).
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 3b064de0cf3..aabdd5954d1 100644
--- a/Master/texmf/doc/man/man1/latexmk.man1.pdf
+++ b/Master/texmf/doc/man/man1/latexmk.man1.pdf
Binary files differ