[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: catcode protection, merged from master (c634ba8d)

David Carlisle d.p.carlisle at gmail.com
Thu Oct 17 15:39:34 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/c634ba8d12b3f13cbcc2a79c29bb7a9bce7f121e

>---------------------------------------------------------------

commit c634ba8d12b3f13cbcc2a79c29bb7a9bce7f121e
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Thu Oct 17 14:39:34 2019 +0100

    catcode protection, merged from master


>---------------------------------------------------------------

c634ba8d12b3f13cbcc2a79c29bb7a9bce7f121e
 required/tools/changes.txt  |  4 ++++
 required/tools/shellesc.dtx | 20 +++++++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index b30f3c96..6237d49e 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2019-10-17  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* shellesc.dtx: protect against active _ and "
+
 2019-10-15  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* multicol.dtx:
diff --git a/required/tools/shellesc.dtx b/required/tools/shellesc.dtx
index 5702c352..ee5675db 100644
--- a/required/tools/shellesc.dtx
+++ b/required/tools/shellesc.dtx
@@ -20,7 +20,7 @@
 %<driver> \ProvidesFile{shellesc.drv}
 % \fi
 %         \ProvidesFile{shellesc.dtx}
-       [2019/10/13 v1.0a unified shell escape interface for LaTeX]
+       [2019/10/17 v1.0b unified shell escape interface for LaTeX]
 %
 % \iffalse
 %<*driver>
@@ -103,6 +103,14 @@
 %<*package>
 %    \end{macrocode}
 %
+% \changes{v1.0b}{2019/10/17}{Catcode protection}
+%    \begin{macrocode}
+\chardef\shellesc at quotecat\catcode`\"
+\chardef\shellesc at underscorecat\catcode`\_
+\@makeother\"
+\@makeother\_
+%    \end{macrocode}
+%
 % \subsection{Status Check}
 %
 %
@@ -232,7 +240,11 @@ if status == nil then
 %
 % Stop at this point if not a recent Lua\TeX.
 %    \begin{macrocode}
-\ifx\lastsavedimageresourcepages\@undefined\expandafter\endinput\fi
+\ifx\lastsavedimageresourcepages\@undefined
+ \catcode`\"\shellesc at quotecat
+ \catcode`\_\shellesc at underscorecat
+ \expandafter\endinput
+\fi
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -276,7 +288,9 @@ shellesc.write_or_execute=write_or_execute
 \protected\def\write{\directlua{shellesc.write_or_execute()}}
 %    \end{macrocode}
 %
-%
+%    \begin{macrocode}
+\catcode`\"\shellesc at quotecat
+%    \end{macrocode}
 %
 %    \begin{macrocode}
 %</package>





More information about the latex3-commits mailing list