summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/perltex/perltex.pdfbin333020 -> 333605 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/perltex/perltex.pl (renamed from Master/texmf-dist/scripts/perltex/perltex)10
-rw-r--r--Master/texmf-dist/source/latex/perltex/perltex.dtx23
-rw-r--r--Master/texmf-dist/tex/latex/perltex/perltex.sty2
4 files changed, 32 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/perltex/perltex.pdf b/Master/texmf-dist/doc/latex/perltex/perltex.pdf
index 1af4c31e085..19db36b997c 100644
--- a/Master/texmf-dist/doc/latex/perltex/perltex.pdf
+++ b/Master/texmf-dist/doc/latex/perltex/perltex.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/perltex/perltex b/Master/texmf-dist/scripts/perltex/perltex.pl
index 47f8cfc27ec..64309cc1926 100755
--- a/Master/texmf-dist/scripts/perltex/perltex
+++ b/Master/texmf-dist/scripts/perltex/perltex.pl
@@ -39,6 +39,7 @@ use Pod::Usage;
use File::Basename;
use Fcntl;
use POSIX;
+use Cwd qw(abs_path);
use IO::Handle;
use warnings;
use strict;
@@ -104,6 +105,13 @@ $latexcmdline[$firstcmd] =
'\plmac@doneflag', $doneflag,
'\plmac@pipe', $pipe,
$latexcmdline[$firstcmd];
+$toperl = abs_path $toperl;
+$fromperl = abs_path $fromperl;
+$toflag = abs_path $toflag;
+$fromflag = abs_path $fromflag;
+$doneflag = abs_path $doneflag;
+$logfile = abs_path $logfile;
+$pipe = abs_path $pipe;
$SIG{"ALRM"} = sub {
undef $latexpid;
exit 0;
@@ -133,6 +141,7 @@ sub awaitexists ($)
}
delete_files($toperl, $fromperl, $toflag, $fromflag, $doneflag, $pipe);
open (LOGFILE, ">$logfile") || die "open(\"$logfile\"): $!\n";
+autoflush LOGFILE 1;
if (defined $styfile) {
open (STYFILE, ">$styfile") || die "open(\"$styfile\"): $!\n";
}
@@ -211,6 +220,7 @@ while (1) {
if ($@) {
my $msg = $@;
$msg =~ s/at \(eval \d+\) line \d+\W+//;
+ $msg =~ s/\n/\\MessageBreak\n/g;
$msg =~ s/\s+/ /;
$result = "\\PackageError{perltex}{$msg}";
my @helpstring;
diff --git a/Master/texmf-dist/source/latex/perltex/perltex.dtx b/Master/texmf-dist/source/latex/perltex/perltex.dtx
index ea9bee773ea..4513a50f8d3 100644
--- a/Master/texmf-dist/source/latex/perltex/perltex.dtx
+++ b/Master/texmf-dist/source/latex/perltex/perltex.dtx
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{perltex}
%<*package>
- [2009/09/13 v1.9 LaTeX macros for use with PerlTeX]
+ [2009/11/24 v2.0 LaTeX macros for use with PerlTeX]
%</package>
%
%<*driver>
@@ -62,7 +62,7 @@
%</driver>
% \fi
%
-% \CheckSum{597}
+% \CheckSum{601}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -2192,6 +2192,7 @@ use Pod::Usage;
use File::Basename;
use Fcntl;
use POSIX;
+use Cwd qw(abs_path);
use IO::Handle;
use warnings;
use strict;
@@ -2429,6 +2430,19 @@ $latexcmdline[$firstcmd] =
%
% \subsubsection{Increasing \PerlTeX's robustness}
%
+% \changes{v2.0}{2009/11/24}{Refer to each communication file using
+% its absolute path. This makes \perltex\ robust to user code
+% that changes the current directory}
+% \begin{macrocode}
+$toperl = abs_path $toperl;
+$fromperl = abs_path $fromperl;
+$toflag = abs_path $toflag;
+$fromflag = abs_path $fromflag;
+$doneflag = abs_path $doneflag;
+$logfile = abs_path $logfile;
+$pipe = abs_path $pipe;
+% \end{macrocode}
+%
% \changes{v1.9}{2009/09/13}{Introduced handlers for \textsc{sigalrm}
% and \textsc{sigpipe} to make \perltex\ more robust to \texttt{latex}
% exiting at an inopportune time}
@@ -2516,6 +2530,7 @@ sub awaitexists ($)
% \begin{macrocode}
delete_files($toperl, $fromperl, $toflag, $fromflag, $doneflag, $pipe);
open (LOGFILE, ">$logfile") || die "open(\"$logfile\"): $!\n";
+autoflush LOGFILE 1;
if (defined $styfile) {
open (STYFILE, ">$styfile") || die "open(\"$styfile\"): $!\n";
}
@@ -2729,6 +2744,9 @@ while (1) {
% \LaTeX\ code or as a |\PackageError|---we store it in
% |@macroexpansions| in preparation for writing it to \noperlmac\
% (when \perltex\ is run with \texttt{--makesty}).
+% \changes{v2.0}{2009/11/21}{Substituted
+% \texttt{\string\string\string\MessageBreak} for newline when
+% reporting error messages produced by user code}
% \begin{macrocode}
undef $_;
my $result;
@@ -2746,6 +2764,7 @@ while (1) {
if ($@) {
my $msg = $@;
$msg =~ s/at \(eval \d+\) line \d+\W+//;
+ $msg =~ s/\n/\\MessageBreak\n/g;
$msg =~ s/\s+/ /;
$result = "\\PackageError{perltex}{$msg}";
my @helpstring;
diff --git a/Master/texmf-dist/tex/latex/perltex/perltex.sty b/Master/texmf-dist/tex/latex/perltex/perltex.sty
index 174b855a30f..05c6b23cda3 100644
--- a/Master/texmf-dist/tex/latex/perltex/perltex.sty
+++ b/Master/texmf-dist/tex/latex/perltex/perltex.sty
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{perltex}
- [2009/09/13 v1.9 LaTeX macros for use with PerlTeX]
+ [2009/11/24 v2.0 LaTeX macros for use with PerlTeX]
\newif\ifplmac@required \plmac@requiredtrue
\DeclareOption{optional}{\plmac@requiredfalse} \ProcessOptions\relax
\newif\ifperl