summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/perltex/perltex.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/perltex/perltex.dtx')
-rw-r--r--macros/latex/contrib/perltex/perltex.dtx52
1 files changed, 29 insertions, 23 deletions
diff --git a/macros/latex/contrib/perltex/perltex.dtx b/macros/latex/contrib/perltex/perltex.dtx
index 3f61570dda..ec04181817 100644
--- a/macros/latex/contrib/perltex/perltex.dtx
+++ b/macros/latex/contrib/perltex/perltex.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
-% Copyright (C) 2010 Scott Pakin <scott+pt@pakin.org>
-% ---------------------------------------------------
+% Copyright (C) 2003-2019 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,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{perltex}
%<*package>
- [2010/07/10 v2.1 LaTeX macros for use with PerlTeX]
+ [2019/09/14 v2.2 LaTeX macros for use with PerlTeX]
%</package>
%
%<*driver>
@@ -41,17 +41,15 @@
\usepackage{flafter}
\usepackage{textcomp}
\usepackage{graphicx}
-\IfFileExists{hyperref.sty}{%
- \usepackage{hyperref}
- \hypersetup{%
- hyperindex=false,
- bookmarksopen,
- pdftitle={PerlTeX: Defining LaTeX macros in terms of Perl code},
- pdfauthor={Scott Pakin, scott+pt@pakin.org},
- pdfsubject={Using Perl to define LaTeX macros},
- pdfkeywords={programming, LaTeX, macros, Perl}
- }
-}{}
+\usepackage{hyperref}
+\hypersetup{%
+ hyperindex=false,
+ bookmarksopen,
+ pdftitle={PerlTeX: Defining LaTeX macros in terms of Perl code},
+ pdfauthor={Scott Pakin, scott+pt@pakin.org},
+ pdfsubject={Using Perl to define LaTeX macros},
+ pdfkeywords={programming, LaTeX, macros, Perl}
+}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -62,7 +60,7 @@
%</driver>
% \fi
%
-% \CheckSum{602}
+% \CheckSum{605}
%
% \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
@@ -921,7 +919,7 @@
% \section{License agreement}
% \label{sec:license}
%
-% Copyright \textcopyright{} 2010 Scott Pakin \texttt{<scott+pt@pakin.org>}
+% Copyright \textcopyright{} 2003--2019 Scott Pakin \texttt{<scott+pt@pakin.org>}
%
% \providecommand{\url}[1]{\texttt{##1}}
%
@@ -943,9 +941,11 @@
% final draft; to Andrei Alexandrescu for providing a few bug fixes; to
% Nick Andrewes for identifying and helping diagnose a problem running
% \PerlTeX\ with \XeTeX\ and to Jonathan Kew for suggesting a
-% workaround; and to Linus K\"allberg for reporting and helping diagnose
-% some problems with running \PerlTeX\ on Windows. Also, thanks to the
-% many people who have sent me fan mail or submitted bug reports,
+% workaround; to Linus K\"allberg for reporting and helping diagnose
+% some problems with running \PerlTeX\ on Windows; and to Ulrike Fischer
+% for reporting and helping correct a bug encountered when using
+% \noperlmac\ with newer versions of \LaTeX\@. Also, thanks to the many
+% people who have sent me fan mail or submitted bug reports,
% documentation corrections, or feature requests. (The
% \texttt{\string\perldo} macro and the \texttt{--makesty} option were
% particularly popular requests.)
@@ -1049,8 +1049,10 @@
% option to suppress the ``must be compiled using perltex'' error
% message}
% \begin{macrocode}
-\newif\ifplmac@required \plmac@requiredtrue
-\DeclareOption{optional}{\plmac@requiredfalse} \ProcessOptions\relax
+\newif\ifplmac@required
+\plmac@requiredtrue
+\DeclareOption{optional}{\plmac@requiredfalse}
+\ProcessOptions\relax
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1109,10 +1111,14 @@
% not defined, \perlmac{} gives an error message and---as we shall see
% on page~\pageref{page:define-dummies}---defines dummy versions of
% |\perl|[|re|]|newcommand| and |\perl|[|re|]|newenvironment|.
+% \changes{v2.2}{2019/09/14}{Let-bind \cs{plmac@tag} to \cs{relax} if
+% \cs{plmac@tag} is undefined. This corrects a problem when
+% \noexpand\texttt{noperltex} is used with newer versions of
+% \noexpand\LaTeX}
% \begin{macrocode}
\newif\ifperl
\perltrue
-\@ifundefined{plmac@tag}{\perlfalse}{}
+\@ifundefined{plmac@tag}{\perlfalse\let\plmac@tag=\relax}{}
\@ifundefined{plmac@tofile}{\perlfalse}{}
\@ifundefined{plmac@fromfile}{\perlfalse}{}
\@ifundefined{plmac@toflag}{\perlfalse}{}
@@ -2145,7 +2151,7 @@
#
# This is a generated file.
#
-# Copyright (C) 2010 Scott Pakin <scott+pt@pakin.org>
+# Copyright (C) 2003-2019 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