From 026bcd88f082ea4bb3f2ddbac395339309f00a63 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 11 Sep 2020 03:02:42 +0000 Subject: CTAN sync 202009110302 --- macros/latex/contrib/memoir/doc-src/memman.tex | 231 +++++++++++++++++-------- macros/latex/contrib/memoir/doc-src/memsty.sty | 5 +- 2 files changed, 167 insertions(+), 69 deletions(-) (limited to 'macros/latex/contrib/memoir/doc-src') diff --git a/macros/latex/contrib/memoir/doc-src/memman.tex b/macros/latex/contrib/memoir/doc-src/memman.tex index 5ed8b9935c..8c24a50322 100644 --- a/macros/latex/contrib/memoir/doc-src/memman.tex +++ b/macros/latex/contrib/memoir/doc-src/memman.tex @@ -28144,8 +28144,8 @@ pdflatex memman \svnidlong {$Ignore: $} -{$LastChangedDate: 2019-11-11 16:55:48 +0100 (Mon, 11 Nov 2019) $} -{$LastChangedRevision: 661 $} +{$LastChangedDate: 2020-08-06 14:38:28 +0200 (Thu, 06 Aug 2020) $} +{$LastChangedRevision: 693 $} {$LastChangedBy: daleif@math.au.dk $} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -28262,6 +28262,20 @@ declaration switches off the trim marks; the \cmd{\showtrimson} declaration, which is the default, switches on the trim marks. These declarations do nothing if the \Lopt{showtrims} option has not been used. + +\begin{Changed} + From the \LaTeX\ format dated 2020/10/01 we changed the way + trimmarks are added to the pages. It will now go through the + »\texttt{shipout/background}« hook instead of changing the + \cmd{\shipout} routine directly. This also have the advantage that + the hooks can be reordered if say you want something to be added to + \texttt{shipout/background} \emph{before} the trimmarks are added. + For more details about the hooks see \cite{LTHOOKS,LTSHIPOUT}. + + The trimmarks will have the hook label »\texttt{memoir/trimmarks}«. +\end{Changed} + + \LMnote{2013/05/01}{added caveat} \begin{caveat} Most modern \LaTeX\ editors make use of the \emph{synctex} features @@ -28275,10 +28289,17 @@ nothing if the \Lopt{showtrims} option has not been used. line one is referred back to may be off by tens of lines. Currently, there is no known workarounds for this deficiency. + + NB: We have yet to see if the 2020/10/01 format update and change to + the trimmarks implementation will fix this issue. + \end{caveat} + + + Trim marks can be placed at each corner of the (trimmed) page, and also at the middle of each side of the page. @@ -30161,6 +30182,16 @@ in your preamble. \subsection{Inserting code before and after a file, package or class} +\begin{Changed} + As of \LaTeX\ format dated 2020/10/01 these \cs{At...} macros + described below will be implemented using kernel hooks as layed out + via \cite{LTFILEHOOK}. Which also means the order of the hooks can + actually be changed. See \cite{LTHOOKS} for general information + about the hooking feature. +\end{Changed} + + + The kernel provides two commands, \cmd{\AtBeginDocument} and \cmd{\AtEndDocument} which can only be used in the preamble, for inserting code at the start and end @@ -30176,31 +30207,57 @@ The class provides a more comprensive set of macros for code insertions, which should be used before the relevant file is called for. \begin{syntax} -\cmd{\AtBeginFile}\marg{file}\marg{code} \\ -\cmd{\AtEndFile}\marg{file}\marg{code} \\ +\cmd{\AtBeginFile}\marg{filename}\marg{code} \\ +\cmd{\AtEndFile}\marg{filename}\marg{code} \\ \end{syntax} \glossary(AtBeginFile)% - {\cs{AtBeginFile}\marg{file}\marg{code}}% - {Inserts \meta{code} just before the \meta{file} is input + {\cs{AtBeginFile}\marg{filename}\marg{code}}% + {Inserts \meta{code} just before the \meta{filename} is input (or included, etc.).}% \glossary(AtEndFile)% - {\cs{AtEndFile}\marg{file}\marg{code}}% - {Inserts \meta{code} just after the \meta{file} is input - (or included, etc.).}% -The \cmd{\AtBeginFile} macro inserts \meta{code} just before the \meta{file} -file is \cmd{\input} (or \cmd{\include}d, etc.). Similarly -\cmd{\AtEndFile} inserts the \meta{code} immediately after the -\meta{file}. The \meta{file} argument must be the same as used in the -corresponding \cmd{\input} command. If \meta{file} includes an -extension, for example \texttt{fred.def}, then that is taken as -the complete name, otherwise if there is no extension, -for instance \texttt{fred}, then the \texttt{.tex} extension is -automatically appended making the full name \texttt{fred.tex}. + {\cs{AtEndFile}\marg{filename}\marg{code}}% + {Inserts \meta{code} just after the \meta{filename} is input + (or included, etc.).}% +The \cmd{\AtBeginFile} macro inserts \meta{code} just before the +\meta{filename} file is \cmd{\input} (or \cmd{\include}d, +etc.). Similarly \cmd{\AtEndFile} inserts the \meta{code} +immediately after the \meta{filename}. The \meta{filename} argument +must be the same as used in the corresponding \cmd{\input} +command. If \meta{filename} includes an extension, for example +\texttt{fred.def}, then that is taken as the complete name, +otherwise if there is no extension, for instance \texttt{fred}, then +the \texttt{.tex} extension is automatically appended making the +full name \texttt{fred.tex}. The \cs{At...File} commands -must be issued \emph{before} the corresponding \meta{file} is input +must be issued \emph{before} the corresponding \meta{filename} is input otherwise nothing will happen. +\begin{caveat} + As of \LaTeX\ format 2020/10/01 this is \textbf{no longer true!} You + will now have to provide the \texttt{.tex} extension if it is a + \texttt{.tex} file you want to hook into, as in: +\begin{verbatim} +\AtEndFile{test.tex}{\typeout{test.tex is done}} +\end{verbatim} + Also note that the 2020/10/01 format will have some specific hooks + what apply to \cmd{\include}. The class does not provide an + interface for this and instead refers to \cite{LTFILEHOOK}. + + Note that \cmd{\At...File} actually did not work correctly for + \cmd{\include} in the old implementation, it still needed the + extension! In this new implementation both \cmd{\input} and + \cmd{\include} trigger. +\end{caveat} +\begin{Changed} + By the 2020/10/01 format this is now implemented via the + \texttt{file/before/filename} and \texttt{file/after/filename} + hooks. We are not adding any hook label. +\end{Changed} + + + + \begin{syntax} \cmd{\AtBeginPackage}\marg{pack}\marg{code} \\ \cmd{\AtEndPackage}\marg{pack}\marg{code} \\ @@ -30231,6 +30288,14 @@ at the end of the \meta{pack} package if it has not yet been used. If the package has already been used then the \meta{code} is called immediately. +\begin{Changed} + By the 2020/10/01 format this is now implemented via the + \texttt{package/before/pack} and \texttt{package/after/pack} + hooks. We are not adding any hook label. +\end{Changed} + + + \begin{syntax} \cmd{\AtBeginClass}\marg{class}\marg{code} \\ @@ -30262,61 +30327,75 @@ at the end of the \meta{class} class if it has not yet been used. If the class has already been used then the \meta{code} is called immediately. - There is an unfortunate interaction between the kernel's -\cmd{\AtEndOfPackage} and the class's \cmd{\AtEndPackage}, and similarly -for the \cmd{\AtEndOfClass} and \cmd{\AtEndClass}. I discovered this when -I tried to automate using the \Lpack{memhfixc} package if \Lpack{hyperref} -was being used by putting the following into the \Pclass{memoir} code -\begin{lcode} -\AtEndPackage{hyperref}{\usepackage{memhfixc}} -\end{lcode} -which caused all sorts of problems. +\begin{Changed} + By the 2020/10/01 format this is now implemented via the + \texttt{class/before/pack} and \texttt{class/after/pack} + hooks. We are not adding any hook label. +\end{Changed} - The kernel scheme looks like this: -\begin{lcode} -\newcommand{\usepackage}[1]{% - ... - \InputIfFileExists{#1} -} -\end{lcode} - The basic mechanism for implementing the class macros is by modifying -the kernel's \cmd{\InputIfFileExists} macro, which internally uses a form of -\cs{input} to read in the file, so that the inserted \meta{code} comes -immediately before and after the \cs{input}, somewhat like: -\begin{lcode} -\renewcommand{\InputIfFileExists}[1]{% - ... - \input{#1} } -\end{lcode} - If \cmd{\AtEndPackage} is applied to a package that has an internal -\cmd{\AtEndOfPackage} then the result can be sketched as: -\begin{lcode} -\newcommand{\usepackage}[1]{% - ... - - \input{#1} - - -} -\end{lcode} -In other words the body of the package is read in, the \cmd{\AtEndPackage} code -is called, and then \emph{after} that the \cmd{\AtEndOfPackage} code is called. - The \Lpack{hyperref} package internally uses \cmd{\AtEndOfPackage} to read -some files and \Lpack{memhfixc} had to be input after these. A way to automate -\Lpack{memhfixc} after \Lpack{hyperref} is: -\begin{lcode} -\AtEndPackage{hyperref}{% - \AtBeginDocument{\usepackage{memhfixc}}} -\end{lcode} -but this seems more trouble than it's worth especially since -Heiko\index{Oberdiek, Heiko} Oberdiek has kindly updated \Lpack{hyperref} -so that versions after 2006/11/15 will automatically load the -\Lpack{memhfixc} package. +% There is an unfortunate interaction between the kernel's +% \cmd{\AtEndOfPackage} and the class's \cmd{\AtEndPackage}, and similarly +% for the \cmd{\AtEndOfClass} and \cmd{\AtEndClass}. I discovered this when +% I tried to automate using the \Lpack{memhfixc} package if \Lpack{hyperref} +% was being used by putting the following into the \Pclass{memoir} code +% \begin{lcode} +% \AtEndPackage{hyperref}{\usepackage{memhfixc}} +% \end{lcode} +% which caused all sorts of problems. + +% The kernel scheme looks like this: +% \begin{lcode} +% \newcommand{\usepackage}[1]{% +% ... +% \InputIfFileExists{#1} +% } +% \end{lcode} + +% The basic mechanism for implementing the class macros is by modifying +% the kernel's \cmd{\InputIfFileExists} macro, which internally uses a form of +% \cs{input} to read in the file, so that the inserted \meta{code} comes +% immediately before and after the \cs{input}, somewhat like: +% \begin{lcode} +% \renewcommand{\InputIfFileExists}[1]{% +% ... +% \input{#1} } +% \end{lcode} + +% If \cmd{\AtEndPackage} is applied to a package that has an internal +% \cmd{\AtEndOfPackage} then the result can be sketched as: +% \begin{lcode} +% \newcommand{\usepackage}[1]{% +% ... +% +% \input{#1} +% +% +% } +% \end{lcode} +% In other words the body of the package is read in, the \cmd{\AtEndPackage} code +% is called, and then \emph{after} that the \cmd{\AtEndOfPackage} code is called. + +% The \Lpack{hyperref} package internally uses \cmd{\AtEndOfPackage} to read +% some files and \Lpack{memhfixc} had to be input after these. A way to automate +% \Lpack{memhfixc} after \Lpack{hyperref} is: +% \begin{lcode} +% \AtEndPackage{hyperref}{% +% \AtBeginDocument{\usepackage{memhfixc}}} +% \end{lcode} +% but this seems more trouble than it's worth especially since +% Heiko\index{Oberdiek, Heiko} Oberdiek has kindly updated \Lpack{hyperref} +% so that versions after 2006/11/15 will automatically load the +% \Lpack{memhfixc} package. +The 2020/10/01 format hooking features will solve a lot of issues we +have had with file hooking, especially when things are delayed via +\cmd{\AtBeginDocument} and you want to have your code to run after +someone else's code. The hooking feature now offers users to add rules +to reorder how the hooks are executed. See \cite{LTHOOKS} for details. \renewcommand{\memsecinfo}[5]{\edef\Margi{#1}\edef\Margii{#2}% \edef\Margiii{#3}\edef\Margiv{#4}% @@ -39368,6 +39447,22 @@ I.~D. Faux and M.~J. Pratt. \newblock (Available from CTAN (the \texttt{multicol} package) via \CTANurl{/macros/latex/required/tools/}) +\bibitem[Mit2020a]{LTFILEHOOK} + Frank Mittelbach + \newblock \emph{The ltfilehook package} + \newblock July 2020. + + \bibitem[Mit2020b]{LTHOOKS} + Frank Mittelbach + \newblock \emph{The lthooks package} + \newblock July 2020. + + \bibitem[Mit2020c]{LTSHIPOUT} + Frank Mittelbach + \newblock \emph{The ltshipout package} + \newblock July 2020. + + %%keep \LMnote{2018/09/06}{Updated year} \bibitem[MC18]{ARRAY} diff --git a/macros/latex/contrib/memoir/doc-src/memsty.sty b/macros/latex/contrib/memoir/doc-src/memsty.sty index b3362e981e..dfe40dc0b2 100644 --- a/macros/latex/contrib/memoir/doc-src/memsty.sty +++ b/macros/latex/contrib/memoir/doc-src/memsty.sty @@ -1132,7 +1132,10 @@ it to use the new width for the margin par} \fancybreak{} } -\newenvironment{caveat}{\par\medskip\noindent\textbf{\textit{Caveat.}}\enskip\itshape}{\par\medskip} +%\newenvironment{caveat}{\par\medskip\noindent\textbf{\textit{Caveat.}}\enskip\itshape}{\par\medskip} +\newenvironment{caveat}{\begin{leftbar}\noindent\textbf{\textit{Caveat.}}\enskip}{\end{leftbar}} +%\newenvironment{Changed}{\par\medskip\noindent\textbf{\textit{Changed.}}\enskip}{\par\medskip} +\newenvironment{Changed}{\begin{leftbar}\noindent\textbf{\textit{Changed.}}\enskip}{\end{leftbar}} \newenvironment{note}{\par\medskip\noindent\textbf{\textit{Note.}}\enskip\itshape}{\par\medskip} \newenvironment{note*}[1]{\par\medskip\noindent\textbf{\textit{#1.}}\enskip\itshape}{\par\medskip} \newenvironment{hint}{\par\medskip\noindent\textbf{\textit{Hint.}}\enskip\itshape}{\par\medskip} -- cgit v1.2.3