From 07723a50707217d2d397c098ec67af793cdfa916 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 5 Oct 2020 03:00:57 +0000 Subject: CTAN sync 202010050300 --- macros/latex/contrib/memoir/memoir.dtx | 46 ++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 11 deletions(-) (limited to 'macros/latex/contrib/memoir/memoir.dtx') diff --git a/macros/latex/contrib/memoir/memoir.dtx b/macros/latex/contrib/memoir/memoir.dtx index 3785106482..123d6371c1 100644 --- a/macros/latex/contrib/memoir/memoir.dtx +++ b/macros/latex/contrib/memoir/memoir.dtx @@ -20,7 +20,7 @@ % This work consists of the files listed in the README file. % % \fi -% \CheckSum{31201} +% \CheckSum{31219} % % \changes{v0.1}{2001/05/20}{First public alpha release} % \changes{v0.2}{2001/06/03}{First beta release} @@ -123,6 +123,8 @@ % \changes{v3.7k}{2020/03/25}{Maintenance} % \changes{v3.7l}{2020/06/02}{Small preparation for october kernel update} % \changes{v3.7m}{2020/09/10}{More preparations for october kernel update} +% \changes{v3.7n}{2020/10/04}{Foced # doubling in AtBegin/EndX macros +% to ensure backwards compatability} % % \def\dtxfile{memoir.dtx} % @@ -184,6 +186,7 @@ % \def\fileversion{v3.7k} \def\filedate{2020/03/25} % \def\fileversion{v3.7l} \def\filedate{2020/06/02} % \def\fileversion{v3.7m} \def\filedate{2020/09/10} +% \def\fileversion{v3.7n} \def\filedate{2020/10/04} % \title{The LaTeX \Lpack{memoir} class for configurable book % typesetting: Source code\thanks{This % file (\texttt{\dtxfile}) has version number \fileversion, last revised @@ -414,11 +417,11 @@ % Announce the name, option files and version for LaTeX2e files: % \begin{macrocode} %\ProvidesClass{memoir}% -% [2020/09/10 v3.7m configurable book, report, article document class] +% [2020/10/04 v3.7n configurable book, report, article document class] % \end{macrocode} % In the manual it is useful to know the current version. % \begin{macrocode} -%\newcommand\memversion{v3.7m, 2020/09/10} +%\newcommand\memversion{v3.7n, 2020/10/04} %<9pt>\ProvidesFile{mem9.clo}% %<9pt> [2008/01/30 v0.4 memoir class 9pt size option] %<10pt>\ProvidesFile{mem10.clo}% @@ -927,9 +930,16 @@ % \verb!\AtEndFile{file}! worked for \texttt{file.tex} even if one % did not speficy the extension. Now you will need to use % \verb!\AtEndFile{file.tex}! explicitly. -% \begin{macrocode} - \newcommand\AtBeginFile[2]{\AddToHook{file/before/#1}{#2}} - \newcommand\AtEndFile[2]{\AddToHook{file/after/#1}{#2}} +% \changes{v3.7n}{2020/10/04}{The old AtXFile code required \#\ +% doubling. The new does not, and this is not backwards compatible. By +% suggestion from David Carlisle we change the code a little such that +% \#\ is needed} +% We add a \cs{temp} trick suggested by David Carlisle as the old code +% required \#\ doubling and the new does not. To be backwards +% compatible we force required \#\ doubling. +% \begin{macrocode} + \newcommand\AtBeginFile[2]{\def\temp{\AddToHook{file/before/#1}{#2}}\temp} + \newcommand\AtEndFile[2]{\def\temp{\AddToHook{file/after/#1}{#2}}\temp} % \end{macrocode} % \end{macro} @@ -942,9 +952,16 @@ % is the equivalent for after input. \cs{RequireAtEndPackage} inserts % \meta{code} either at the end of \meta{pack}, or immediately if % \meta{pack} has already been input. -% \begin{macrocode} - \newcommand\AtBeginPackage[2]{\AddToHook{package/before/#1}{#2}} - \newcommand\AtEndPackage[2]{\AddToHook{package/after/#1}{#2}} +% \changes{v3.7n}{2020/10/04}{The old AtXPackage code required \#\ +% doubling. The new does not, and this is not backwards compatible. By +% suggestion from David Carlisle we change the code a little such that +% \#\ is needed} +% We add a \cs{temp} trick suggested by David Carlisle as the old code +% required \#\ doubling and the new does not. To be backwards +% compatible we force required \#\ doubling. +% \begin{macrocode} + \newcommand\AtBeginPackage[2]{\def\temp{\AddToHook{package/before/#1}{#2}}\temp} + \newcommand\AtEndPackage[2]{\def\temp{\AddToHook{package/after/#1}{#2}}\temp} \newcommand{\RequireAtEndPackage}[2]{% \@ifpackageloaded{#1}{#2}{\AtEndPackage{#1}{#2}}} @@ -957,9 +974,16 @@ % \begin{macro}{\RequireAtEndClass} % \cs{AtBeginClass}\marg{class}\marg{code} and friends are the class % equivalents of \cs{AtBeginPackage} and friends. +% \changes{v3.7n}{2020/10/04}{The old AtXPackage code required \#\ +% doubling. The new does not, and this is not backwards compatible. By +% suggestion from David Carlisle we change the code a little such that +% \#\ is needed} +% We add a \cs{temp} trick suggested by David Carlisle as the old code +% required \#\ doubling and the new does not. To be backwards +% compatible we force required \#\ doubling. % \begin{macrocode} - \newcommand\AtBeginClass[2]{\AddToHook{class/before/#1}{#2}} - \newcommand\AtEndClass[2]{\AddToHook{class/after/#1}{#2}} + \newcommand\AtBeginClass[2]{\def\temp{\AddToHook{class/before/#1}{#2}}\temp} + \newcommand\AtEndClass[2]{\def\temp{\AddToHook{class/after/#1}{#2}}\temp} \newcommand{\RequireAtEndClass}[2]{% \@ifclassloaded{#1}{#2}{\AtEndClass{#1}{#2}}} -- cgit v1.2.3