summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/perltex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/perltex')
-rw-r--r--Master/texmf-dist/tex/latex/perltex/perltex.sty48
1 files changed, 29 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/perltex/perltex.sty b/Master/texmf-dist/tex/latex/perltex/perltex.sty
index bd0ae4b12c1..f4992ed4985 100644
--- a/Master/texmf-dist/tex/latex/perltex/perltex.sty
+++ b/Master/texmf-dist/tex/latex/perltex/perltex.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2007 Scott Pakin <scott+pt@pakin.org>
+%% Copyright (C) 2009 Scott Pakin <scott+pt@pakin.org>
%%
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3c of this license
@@ -22,24 +22,34 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{perltex}
- [2007/12/10 v1.7 LaTeX macros for use with PerlTeX]
-\newif\ifplmac@have@perltex
-\plmac@have@perltextrue
-\@ifundefined{plmac@tag}{\plmac@have@perltexfalse}{}
-\@ifundefined{plmac@tofile}{\plmac@have@perltexfalse}{}
-\@ifundefined{plmac@fromfile}{\plmac@have@perltexfalse}{}
-\@ifundefined{plmac@toflag}{\plmac@have@perltexfalse}{}
-\@ifundefined{plmac@fromflag}{\plmac@have@perltexfalse}{}
-\@ifundefined{plmac@doneflag}{\plmac@have@perltexfalse}{}
-\@ifundefined{plmac@pipe}{\plmac@have@perltexfalse}{}
-\ifplmac@have@perltex
+ [2009/03/27 v1.8 LaTeX macros for use with PerlTeX]
+\newif\ifplmac@required \plmac@requiredtrue
+\DeclareOption{optional}{\plmac@requiredfalse} \ProcessOptions\relax
+\newif\ifperl
+\perltrue
+\@ifundefined{plmac@tag}{\perlfalse}{}
+\@ifundefined{plmac@tofile}{\perlfalse}{}
+\@ifundefined{plmac@fromfile}{\perlfalse}{}
+\@ifundefined{plmac@toflag}{\perlfalse}{}
+\@ifundefined{plmac@fromflag}{\perlfalse}{}
+\@ifundefined{plmac@doneflag}{\perlfalse}{}
+\@ifundefined{plmac@pipe}{\perlfalse}{}
+\ifperl
\else
- \PackageError{perltex}{Document must be compiled using perltex}
- {Instead of compiling your document directly with latex, you need
- to\MessageBreak use the perltex script. \space perltex sets up
- a variety of macros needed by\MessageBreak the perltex
- package as well as a listener process needed for\MessageBreak
- communication between LaTeX and Perl.}
+ \ifplmac@required
+ \PackageError{perltex}{Document must be compiled using perltex}
+ {Instead of compiling your document directly with latex, you need
+ to\MessageBreak use the perltex script. \space perltex sets up
+ a variety of macros needed by\MessageBreak the perltex
+ package as well as a listener process needed for\MessageBreak
+ communication between LaTeX and Perl.}
+ \else
+ \bgroup
+ \obeyspaces
+ \typeout{perltex: Document was compiled without using the perltex script;}
+ \typeout{ it may not print as desired.}
+ \egroup
+ \fi
\fi
\def\perlnewcommand{%
\let\plmac@command=\newcommand
@@ -216,7 +226,7 @@
\catcode`\}=2
\plmac@write@perl@i
}
-\ifplmac@have@perltex
+\ifperl
\newcommand{\plmac@write@perl@i}[1]{%
\immediate\openout\plmac@outfile=\plmac@tofile\relax
\let\protect=\noexpand