diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/perltex/perltex.pdf | bin | 333558 -> 300045 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/perltex/perltex.dtx | 66 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/perltex/perltex.sty | 2 |
3 files changed, 52 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/perltex/perltex.pdf b/Master/texmf-dist/doc/latex/perltex/perltex.pdf Binary files differindex ae6ba073305..2f7cd111297 100644 --- a/Master/texmf-dist/doc/latex/perltex/perltex.pdf +++ b/Master/texmf-dist/doc/latex/perltex/perltex.pdf diff --git a/Master/texmf-dist/source/latex/perltex/perltex.dtx b/Master/texmf-dist/source/latex/perltex/perltex.dtx index 801a0f8005c..84a1a5be833 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> - [2007/10/13 v1.5 LaTeX macros for use with PerlTeX] + [2007/12/08 v1.6 LaTeX macros for use with PerlTeX] %</package> % %<*driver> @@ -40,6 +40,7 @@ \usepackage{varioref} \usepackage{flafter} \usepackage{textcomp} +\usepackage{graphicx} \IfFileExists{hyperref.sty}{% \usepackage{hyperref} \hypersetup{% @@ -61,7 +62,7 @@ %</driver> % \fi % -% \CheckSum{577} +% \CheckSum{578} % % \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 @@ -111,6 +112,9 @@ % \newcommand{\perltex}{\texttt{perltex.pl}} ^^A Name of the Perl script % \newcommand{\perlmac}{\texttt{perltex.sty}} ^^A Name of the LaTeX package % \newcommand{\noperlmac}{\texttt{noperltex.sty}} ^^A Name of the alternate LaTeX package +% \newcommand{\XeTeX}{^^A ^^A Used in the documentation +% X\lower0.5ex\hbox{\kern-0.15em\reflectbox{E}}\kern-0.1667em\TeX^^A +% } % % ^^A Define an environment just like macro but for Perl scalars or lists. % \makeatletter @@ -453,6 +457,7 @@ % [\textbf{--help}] % [\textbf{--latex}=\textit{program}] % [\textbf{--}[\textbf{no}]\textbf{safe}] +% [\textbf{--}[\textbf{no}]\textbf{pipe}] % [\textbf{--permit}=\textit{feature}] % [\textbf{--makesty}] % [\textit{latex options}] @@ -510,6 +515,17 @@ % blanche} to execute any arbitrary Perl code, including that which can % harm the user's files. See \emph{Safe} for more information. % +% \item[{\textbf{-{}-}[\textbf{no}]\textbf{pipe}}] \mbox{} +% +% Enable or disable the named-pipe speed optimization. By default +% (\textbf{-{}-pipe}), communication between Perl and \LaTeX\ occurs +% through a high-speed named pipe on operating systems that support +% persistent named pipes (e.g.,~Linux). Operating systems that lack +% support for persistent named pipes (e.g.,~Windows) will automatically +% fall back onto using slower, file-based communication. Specifying +% \textbf{-{}-nopipe} forces \PerlTeX\ to use the slower, file-based +% communication on all platforms. There have been reports of \PerlTeX\ +% failing under \XeTeX\ when run without \textbf{-{}-nopipe}. % % \item[{\textbf{-{}-permit}=\textit{feature}}] \mbox{} % @@ -1927,6 +1943,7 @@ my @permittedops; % \begin{perlmacro}{$doneflag} % \begin{perlmacro}{$logfile} % \begin{perlmacro}{$pipe} +% \begin{perlmacro}{$usepipe} % \begin{perlmacro}{$styfile} % \begin{perlmacro}{@macroexpansions} % \begin{perlmacro}{$sandbox} @@ -1945,14 +1962,14 @@ my @permittedops; % |$fromflag|. |$logfile| is the name of a log file to which \perltex{} % writes verbose execution information. |$pipe| is the name of a Unix % named pipe (or ordinary file on operating systems that lack support -% for persistent named pipes) used to convince the |latex| process to -% yield control of the CPU\@. |$styfile| is the string \noperlmac\ if -% \perltex\ is run with \texttt{--makesty}, otherwise undefined. -% |$sandbox| is a secure sandbox in which to run code that appeared in -% the \LaTeX{} document. |$sandbox_eval| is a subroutine that evalutes -% a string within |$sandbox| (normally) or outside of all sandboxes (if -% |--nosafe| is specified). |$latexpid| is the process~ID of the -% |latex| process. +% for persistent named pipes or in the case that |$usepipe| is set +% to~|0|) used to convince the |latex| process to yield control of the +% CPU\@. |$styfile| is the string \noperlmac\ if \perltex\ is run with +% \texttt{--makesty}, otherwise undefined. |$sandbox| is a secure +% sandbox in which to run code that appeared in the \LaTeX{} document. +% |$sandbox_eval| is a subroutine that evalutes a string within +% |$sandbox| (normally) or outside of all sandboxes (if |--nosafe| is +% specified). |$latexpid| is the process~ID of the |latex| process. % \begin{macrocode} my $progname = basename $0; my $jobname = "texput"; @@ -1964,6 +1981,7 @@ my $fromflag; my $doneflag; my $logfile; my $pipe; +my $usepipe = 1; my $styfile; my @macroexpansions; my $sandbox = new Safe; @@ -1985,6 +2003,7 @@ my $latexpid; % \end{perlmacro} % \end{perlmacro} % \end{perlmacro} +% \end{perlmacro} % % \subsubsection{Command-line conversion} % @@ -1997,12 +2016,15 @@ my $latexpid; % specified. We then use |Getopt::Long| to parse the command line, % leaving any parameters we don't recognize in the argument vector % (|@ARGV|) because these are presumably |latex| options. +% \changes{v1.6}{2007/12/07}{Added a \texttt{--nopipe} option +% to \protect\perltex\ to help it work with \protect\XeTeX} % \begin{macrocode} $latexprog = $ENV{"PERLTEX"} || "latex"; Getopt::Long::Configure("require_order", "pass_through"); GetOptions("help" => sub {pod2usage(-verbose => 1)}, "latex=s" => \$latexprog, "safe!" => \$runsafely, + "pipe!" => \$usepipe, "makesty" => sub {$styfile = "noperltex.sty"}, "permit=s" => \@permittedops) || pod2usage(2); % \end{macrocode} @@ -2102,10 +2124,11 @@ if (defined $styfile) { } % \end{macrocode} % \begin{macrocode} -if (!eval {mkfifo($pipe, 0600)}) { +if (!$usepipe || !eval {mkfifo($pipe, 0600)}) { sysopen PIPE, $pipe, O_WRONLY|O_CREAT, 0755; print PIPE "\\endinput\n"; close PIPE; + $usepipe = 0; } % \end{macrocode} % \begin{macrocode} @@ -2413,8 +2436,8 @@ while (1) { % \end{macrocode} % \begin{macrocode} if (open (PIPE, ">$pipe")) { - print PIPE "\\endinput\n"; - close PIPE; + print PIPE "\\endinput\n"; + close PIPE; } % \end{macrocode} % @@ -2431,8 +2454,8 @@ while (1) { % Again, we awaken the |latex| process, which is blocked on |$pipe|. % \begin{macrocode} if (open (PIPE, ">$pipe")) { - print PIPE "\\endinput\n"; - close PIPE; + print PIPE "\\endinput\n"; + close PIPE; } } % \end{macrocode} @@ -2554,6 +2577,7 @@ perltex [B<--help>] [B<--latex>=I<program>] [B<-->[B<no>]B<safe>] +[B<-->[B<no>]B<pipe>] [B<--permit>=I<feature>] [B<--makesty>] [I<latex options>] @@ -2606,6 +2630,18 @@ external programs. Specifying B<--nosafe> gives the LaTeX document I<carte blanche> to execute any arbitrary Perl code, including that which can harm the user's files. See L<Safe> for more information. +=item B<-->[B<no>]B<pipe> + +Enable or disable the named-pipe speed optimization. By default +(B<--pipe>), communication between Perl and LaTeX occurs through a +high-speed named pipe on operating systems that support persistent +named pipes (e.g., Linux). Operating systems that lack support for +persistent named pipes (e.g., Windows) will automatically fall back +onto using slower, file-based communication. Specifying B<--nopipe> +forces PerlTeX to use the slower, file-based communication on all +platforms. There have been reports of PerlTeX failing under XeTeX +when run without B<--nopipe>. + =item B<--permit>=I<feature> Permit particular Perl operations to be performed. The B<--permit> diff --git a/Master/texmf-dist/tex/latex/perltex/perltex.sty b/Master/texmf-dist/tex/latex/perltex/perltex.sty index aea050bdf59..0952d5c4eee 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} - [2007/10/13 v1.5 LaTeX macros for use with PerlTeX] + [2007/12/08 v1.6 LaTeX macros for use with PerlTeX] \newif\ifplmac@have@perltex \plmac@have@perltextrue \@ifundefined{plmac@tag}{\plmac@have@perltexfalse}{} |