summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/memoir/mempatch.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/memoir/mempatch.dtx')
-rw-r--r--macros/latex/contrib/memoir/mempatch.dtx123
1 files changed, 28 insertions, 95 deletions
diff --git a/macros/latex/contrib/memoir/mempatch.dtx b/macros/latex/contrib/memoir/mempatch.dtx
index 540bc678cb..f47f1f0195 100644
--- a/macros/latex/contrib/memoir/mempatch.dtx
+++ b/macros/latex/contrib/memoir/mempatch.dtx
@@ -20,7 +20,7 @@
%
%
% \fi
-% \CheckSum{610}
+% \CheckSum{562}
%
% \def\dtxfile{\texttt{mempatch.dtx}}
% \def\fileversion{v1.0} \def\filedate{2003/10/04}
@@ -312,6 +312,7 @@
%% With the new hooking system from 2020+ memhfixc is automatically
%% added after loading hyperref with the memoir class
%%
+%% Version 1.21 2023/07/28
%% Version 1.20 2022/11/17
%% Version 1.19 2021/06/16
%% Version 1.18 2019/10/24
@@ -338,7 +339,7 @@
%
%
% \begin{macrocode}
-\ProvidesPackage{memhfixc}[2022/11/17 v1.20 nameref/hyperref package fixes for memoir class]
+\ProvidesPackage{memhfixc}[2023/07/28 v1.21 hyperref package fixes for memoir class]
% \end{macrocode}
%
% \begin{macro}{\M@hfixcfinish}
@@ -355,86 +356,13 @@
%
% \subsection{Patches for nameref}
%
-% \changes{v1.13}{2010/04/19}{Rewritten to help fix a race condition}
%
-% The nameref package changes \cs{@sect} and \cs{label} so we bring
-% back the memoir stuff. We have earlier been using
-% \verb?\AtBeginDocument? plus \verb?\@ifpackageloaded{nameref}? to
-% add our changes to \Lpack{nameref}. But this is not a good solution,
-% as \Lpack{hyperref} can delay \Lpack{nameref} loading using
-% \verb?\AtBeginDocument{\usepackage{nameref}}? \emph{and} add thiis
-% \emph{after} \Lpack{memhfixc} is loaded. A better solution is to use
-% \verb?\AtEndPackage?, then it does not matter how far after
-% \Lpack{memhfixc} \Lpack{nameref} is loaded.
-%
-% \changes{v1.13}{2010/04/19}{Code in the next part have been changed
-% to match \cs{AtEndPackage}}
-% \begin{macrocode}
-\AtEndPackage{nameref}{%
-% \end{macrocode}
-
-% \begin{macro}{\M@sect}
-% \begin{macro}{\NR@sectm@m}
-% The \Lpack{nameref} package~\cite{NAMEREF} fiddles with \cs{@sect} (which memoir replaces
-% by \cs{M@sect}).
-% \begin{macrocode}
- \@ifundefined{NR@sectm@m}{% haven't fiddled with \M@sect
- \typeout{Redoing nameref's sectioning}
- \let\NR@sectm@m\M@sect
- \def\M@sect##1##2##3##4##5##6[##7][##8]##9{%
- \setcounter{section@level}{##2}%
- \def\@currentlabelname{##7}%
- \NR@sectm@m{##1}{##2}{##3}{##4}{##5}{##6}[{##7}][{##8}]{\Sectionformat{##9}{##2}}}%
- }%
- {% \NR@sectm@m has already been defined
- }%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
+% \changes{v1.21}{2023/07/25}{Patches removed}
%
-% \begin{macro}{\label}
-% \begin{macro}{\MNR@label}
-% The \Lpack{nameref} package replaces \cs{label}, which (which memoir has added to).
-% Make the memoir addition again.
-%
-% \begin{macrocode}
- \@ifundefined{MNR@label}{% haven't fiddled with \label
- \typeout{Redoing nameref's label}
- \let\MNR@label\label
- \def\label##1{\@bsphack\begingroup
- \protected@edef\@currentlabel{\protect\M@TitleReference
- {\@currentlabel}{\M@currentTitle}}%
- \MNR@label{##1}%
- \endgroup \@esphack}%
- \let\MNR@old@caption\@caption
- \long\def\@caption##1[##2]##3{%
- \MNR@old@caption{##1}[{##2}]{##3}%
- \def\@currentlabelname{##2}%
- \M@gettitle{##2}%
- }%
- }%
- {% \MNR@label has already been defined
- }%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
+% As of Summer 2023, memoir now autoloads \Lpack{nameref} and adjusts
+% it self to it. Thus no patches needed.
%
-% \begin{macro}{\nameref}
-% We use \cs{titleref} to provide the same functionality as
-% \cs{nameref}, so as not to confuse users, we let \cs{nameref} be
-% an alias for \cs{titleref}.
-% \begin{macrocode}
-\DeclareRobustCommand\nameref{\@ifstar{\@mem@titlerefnolink}{\@mem@titleref}}
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macrocode}
-}% end of AtEndPackage
-% \end{macrocode}
-
-
%
% We are done unless the \Lpack{hyperref} package has been loaded
% \begin{macrocode}
@@ -531,11 +459,15 @@
% \end{macro}
%
% \begin{macro}{\bookautorefname}
+% \begin{macro}{\subfigureautorefname}
+% \changes{v1.21}{2023/07/28}{Added \cs{subfigureautorefname}}
% \begin{macrocode}
\providecommand{\bookautorefname}{Book}
+\providecommand{\subfigureautorefname}{Subfigure}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@writetorep}
% Change \Lpack{hyperref}'s \cs{@@writetorep} as memoir uses \cs{partnumberline} and
@@ -774,10 +706,11 @@
% \Lpack{hyperref} provide a \cs{ref*} command that does not give a
% hyperlink under \Lpack{hyperref}, we extend \cs{titleref} to
% support it.
+% \changes{v1.21}{2023/08/07}{removed}
% \begin{macrocode}
-\def\@mem@titlerefnolink#1{\begingroup \let\numberline\@gobble
- \let\M@TitleReference\@mem@theTR % interrupt recursion of \ref
- \ref*{#1}\endgroup}
+ %\def\@mem@titlerefnolink#1{\begingroup \let\numberline\@gobble
+ % \let\M@TitleReference\@mem@theTR % interrupt recursion of \ref
+ % \ref*{#1}\endgroup}
% \end{macrocode}
% \end{macro}
@@ -1027,26 +960,26 @@
% \newblock \emph{The LaTeX Companion}.
% \newblock Addison-Wesley Publishing Company, 1994.
%
+% \bibitem[Rahtz23a]{NAMEREF}
+% Sebastian Rahtz, Heiko Oberdiek, The \LaTeX3 Project.
+% \newblock \emph{Section name references in LaTeX}.
+% \newblock 2023.
+% \newblock (Available from CTAN (the \texttt{nameref} package) via
+% \texttt{/macros/latex/contrib/hyperref/})
%
-% \bibitem[Rah01]{NAMEREF}
-% Sebastian Rahtz.
-% \newblock \emph{Section name references in LaTeX}.
-% \newblock January 2001.
-% \newblock (Available from CTAN in
-% \texttt{/macros/latex/contrib/hyperref})
%
-% \bibitem[Rah02]{HYPERREF}
-% Sebastian Rahtz.
-% \newblock \emph{Hypertext marks in LaTeX}.
-% \newblock March 2002.
-% \newblock (Available from CTAN in
-% \texttt{/macros/latex/contrib/hyperref})
+% \bibitem[Rahtz23b]{HYPERREF}
+% Sebastian Rahtz, Heiko Oberdiek, The \LaTeX3 Project.
+% \newblock \emph{Hypertext marks in LaTeX}.
+% \newblock 2023.
+% \newblock (Available from CTAN via
+% \texttt{/macros/latex/contrib/hyperref/})
%
-% \bibitem[Wil08]{MEMOIR}
+% \bibitem[Wil23]{MEMOIR}
% Peter Wilson.
% \newblock \emph{The LaTeX \Lpack{memoir} class for configurable
% typesetting: Source code}.
-% \newblock July 2008.
+% \newblock July 2023.
% \newblock (Available from CTAN in
% \texttt{macros/latex/contrib/memoir})
%