diff options
author | Dr. Clea F. Rees <cfrees@imapmail.org> | 2008-12-28 23:57:38 +0000 |
---|---|---|
committer | Dr. Clea F. Rees <cfrees@imapmail.org> | 2008-12-28 23:57:38 +0000 |
commit | 6f46e3a44540030556c507573b834aec4046e113 (patch) | |
tree | afcecfaabda8a768c39740161989783e6d209644 | |
parent | 0ea692dfc516c549c696115ab6e0672659fde2dd (diff) |
latexmk update 2008/12/28
git-svn-id: svn://tug.org/texlive/trunk@11743 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/latexmk.1 | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/latexmk.pdf | bin | 148150 -> 148039 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/support/latexmk/latexmk.txt | 60 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/latexmk/latexmk.pl | 79 |
5 files changed, 82 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/README b/Master/texmf-dist/doc/support/latexmk/README index cd0a58aae24..aa1cc45a7e4 100644 --- a/Master/texmf-dist/doc/support/latexmk/README +++ b/Master/texmf-dist/doc/support/latexmk/README @@ -88,7 +88,7 @@ I hope you find this useful. John Collins ---------------------------- "latexmk -h" ---------------------------- -Latexmk 4.02b: Automatic LaTeX document generation routine +Latexmk 4.03: Automatic LaTeX document generation routine Usage: latexmk [latexmk_options] [filename ...] diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.1 b/Master/texmf-dist/doc/support/latexmk/latexmk.1 index 937807a138c..25132b0cfee 100644 --- a/Master/texmf-dist/doc/support/latexmk/latexmk.1 +++ b/Master/texmf-dist/doc/support/latexmk/latexmk.1 @@ -1,4 +1,4 @@ -.TH LATEXMK 1L "1 December 2008" "" +.TH LATEXMK 1L "22 December 2008" "" .SH NAME latexmk \- generate LaTeX document .SH SYNOPSIS @@ -1462,9 +1462,9 @@ 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.01a). +(Version 4.03). -Released version (last was 4.01) can be obtained from CTAN: +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/>. .br diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf Binary files differindex f81f5706f2b..1220cb0574e 100644 --- a/Master/texmf-dist/doc/support/latexmk/latexmk.pdf +++ b/Master/texmf-dist/doc/support/latexmk/latexmk.pdf diff --git a/Master/texmf-dist/doc/support/latexmk/latexmk.txt b/Master/texmf-dist/doc/support/latexmk/latexmk.txt index 8f6e735eade..1e67ad04111 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 - 1 December 2008 2 + 22 December 2008 2 @@ -193,7 +193,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 3 + 22 December 2008 3 @@ -259,7 +259,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 4 + 22 December 2008 4 @@ -325,7 +325,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 5 + 22 December 2008 5 @@ -391,7 +391,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 6 + 22 December 2008 6 @@ -457,7 +457,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 7 + 22 December 2008 7 @@ -523,7 +523,7 @@ EXAMPLES - 1 December 2008 8 + 22 December 2008 8 @@ -589,7 +589,7 @@ HOW TO SET VARIABLES IN INITIALIZATION FILES - 1 December 2008 9 + 22 December 2008 9 @@ -656,7 +656,7 @@ FORMAT OF COMMAND SPECIFICATIONS - 1 December 2008 10 + 22 December 2008 10 @@ -723,7 +723,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 11 + 22 December 2008 11 @@ -790,7 +790,7 @@ LIST OF CONFIGURATION VARIABLES USABLE IN INITIALIZATION FILES - 1 December 2008 12 + 22 December 2008 12 @@ -857,7 +857,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 13 + 22 December 2008 13 @@ -924,7 +924,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 14 + 22 December 2008 14 @@ -991,7 +991,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 15 + 22 December 2008 15 @@ -1058,7 +1058,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 16 + 22 December 2008 16 @@ -1125,7 +1125,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 17 + 22 December 2008 17 @@ -1192,7 +1192,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 18 + 22 December 2008 18 @@ -1259,7 +1259,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 19 + 22 December 2008 19 @@ -1326,7 +1326,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 20 + 22 December 2008 20 @@ -1393,7 +1393,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 21 + 22 December 2008 21 @@ -1460,7 +1460,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 22 + 22 December 2008 22 @@ -1527,7 +1527,7 @@ CUSTOM DEPENDENCIES - 1 December 2008 23 + 22 December 2008 23 @@ -1594,7 +1594,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 24 + 22 December 2008 24 @@ -1661,7 +1661,7 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 25 + 22 December 2008 25 @@ -1724,11 +1724,11 @@ THANKS TO AUTHOR Current version, by John Collins (username collins at node - phys.psu.edu). (Version 4.01a). + phys.psu.edu). (Version 4.03). - 1 December 2008 26 + 22 December 2008 26 @@ -1737,9 +1737,9 @@ AUTHOR LATEXMK(1L) LATEXMK(1L) - Released version (last was 4.01) 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/>. + 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) @@ -1795,6 +1795,6 @@ LATEXMK(1L) LATEXMK(1L) - 1 December 2008 27 + 22 December 2008 27 diff --git a/Master/texmf-dist/scripts/latexmk/latexmk.pl b/Master/texmf-dist/scripts/latexmk/latexmk.pl index 45fbddd4208..73dfcb48d49 100755 --- a/Master/texmf-dist/scripts/latexmk/latexmk.pl +++ b/Master/texmf-dist/scripts/latexmk/latexmk.pl @@ -148,8 +148,8 @@ if 0; $my_name = 'latexmk'; $My_name = 'Latexmk'; -$version_num = '4.02b'; -$version_details = "$My_name, John Collins, 1 December 2008"; +$version_num = '4.03'; +$version_details = "$My_name, John Collins, 22 December 2008"; use Config; @@ -218,7 +218,16 @@ else { ## ## Modification log for 24 Sep 2008 onwards in detail ## -## 1 Dec 2008, John Collins -c and -C should also delete fdb_latex file +## 22 Dec 2008, John Collins V. 4.03 +## 22 Dec 2008, John Collins Fix possibility that unwrapping of lines +## in log_file is done incorrectly +## 5 Dec 2008, John Collins Correct treatment of -e option +## 2 Dec 2008, John Collins For home directory (where user's .latexmkrc +## is located, when $ENV{'HOME'} does +## not exist, use $ENV{USERPROFILE} +## (suitable for MS-Win). +## Clean up code in rdb_set_rules +## 1 Dec 2008, John Collins -c and -C now also delete fdb_latex file ## 26 Nov 2008, John Collins Correct problem with invocation of MSWin ## with cygwin ## 25 Nov 2008, John Collins Correct problem with invocation of MSWin @@ -1140,6 +1149,17 @@ if (!$TEXINPUTS) { $TEXINPUTS = '.'; } #================================================== ## Read rc files: +# User's home directory +$HOME = ''; +if (exists $ENV{'HOME'} ) { + $HOME = $ENV{'HOME'}; +} +elsif (exists $ENV{'USERPROFILE'} ) { + $HOME = $ENV{'USERPROFILE'}; +} + + + sub read_first_rc_file_in_list { foreach my $rc_file ( @_ ) { #print "===Testing for rc file \"$rc_file\" ...\n"; @@ -1154,7 +1174,7 @@ sub read_first_rc_file_in_list { # Read system rc file: read_first_rc_file_in_list( @rc_system_files ); # Read user rc file. -read_first_rc_file_in_list( "$ENV{'HOME'}/.latexmkrc" ); +read_first_rc_file_in_list( "$HOME/.latexmkrc" ); # Read rc file in current directory. read_first_rc_file_in_list( "latexmkrc", ".latexmkrc" ); @@ -1250,12 +1270,10 @@ while ($_ = $ARGV[0]) elsif (/^-view=ps$/) { $view = "ps";} elsif (/^-view=pdf$/) { $view = "pdf"; } elsif (/^-e$/) { - if ( $ARGV[0] eq '' ) { + if ( $#ARGV < 0 ) { &exit_help( "No code to execute specified after -e switch"); } - else { - execute_code_string( $ARGV[0] ); - } + execute_code_string( $ARGV[0] ); shift; } elsif (/^-r$/) { @@ -1904,11 +1922,10 @@ sub rdb_set_rules { # Set up rule database from definitions # Map of files to rules that MAKE them: - local %from_rules = (); %rule_db = (); foreach my $Prule_list (@_) { - foreach my $rule ( sort keys %$Prule_list) { + foreach my $rule ( keys %$Prule_list) { my ( $cmd_type, $ext_cmd, $int_cmd, $source, $dest, $base, $test_kind ) = @{$$Prule_list{$rule}}; my $needs_making = 0; # Substitute in the filename variables, since we will use @@ -1926,21 +1943,7 @@ sub rdb_set_rules { rdb_create_rule( $rule, $cmd_type, $ext_cmd, $int_cmd, $test_kind, $source, $dest, $base, $needs_making ); - if ($dest) { $from_rules{$dest} = $rule ; } } - rdb_for_all( - 0, - sub{ - # my ($base, $path, $ext) = fileparse( $file, '\.[^\.]*' ); - # if ( exists $from_rules{$file} && ! exists $generated_exts_all{$ext} ) { - # # Show how to make this file. But don't worry about generated - # # files. - if ( exists $from_rules{$file} ) { - $$Pfrom_rule = $from_rules{$file}; - } - #?? print "$rule: $file, $$Pfrom_rule\n"; - } - ); } # End arguments of subroutine &rdb_make_links; } # END rdb_set_rules @@ -2771,21 +2774,30 @@ sub parse_logB { return 0; } -LINE: +# Collect lines of log file + my @lines = (); while(<$log_file>) { # Could use chomp here, but that fails if there is a mismatch # between the end-of-line sequence used by latex and that # used by perl. (Notably a problem with MSWin latex and # cygwin perl!) s/[\n\r]*$//; - if ( $. == 1 ){ + push @lines, $_; + } + close $log_file; + + my $line = 0; +LINE: + while( $line <= $#lines ) { + $_ = $lines[$line]; + $line ++; + if ( $line == 1 ){ if ( /^This is / ) { # First line OK next LINE; } else { warn "$My_name: Error on first line of '$log_name'. ". "This is apparently not a TeX log file.\n"; - close $log_file; $failure = 1; $failure_msg = "Log file '$log_name' appears to have wrong format."; return 0; @@ -2794,10 +2806,16 @@ LINE: # Handle wrapped lines: # They are lines brutally broken at exactly $log_wrap chars # excluding line-end. + # But a line can be of the length where the wrapping occurs, but + # there can be no wrapping. So for a long line, try parsing it + # as if it is wrapped, but leave the index variable $line as is, + # so that on the next loop over LINE, we also try parsing the + # succeeding line as if there was no wrapping: my $len = length($_); - while ($len == $log_wrap) { - my $extra = <$log_file>; - $extra =~ s/[\n\r]*$//; + my $next = $line; + while ( ($len == $log_wrap) && ($next <= $#lines) ) { + my $extra = $lines[$next]; + $next++; $len = length($extra); $_ .= $extra; } @@ -3046,7 +3064,6 @@ LINE: } # INCLUDE_NAME } # INCLUDE_CANDIDATE } # LINE - close($log_file); # Default includes are always definitive: foreach (@default_includes) { $dependents{$_} = 4; } |