diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-15 21:40:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-15 21:40:34 +0000 |
commit | 7ebe75c756258ce417125e376f199df4fd5b47a9 (patch) | |
tree | 2c6cbc9b8b7146603554f7f38c2a29af214ec7cd /Master/texmf-dist | |
parent | 755661ec89a876b678d3f8ae0fb13206021b6fa9 (diff) |
memoir (15nov19)
git-svn-id: svn://tug.org/texlive/trunk@52807 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/memoir/README | 81 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/memoir/memman.pdf | bin | 2788654 -> 2800232 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/memoir/memman.tex | 1006 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/memoir/memsty.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/memoir/memoir.dtx | 587 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/memoir/memoir.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/memoir/mempatch.dtx | 34 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/memoir/mempatch.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/memoir/memhfixc.sty | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/memoir/memoir.cls | 186 |
10 files changed, 1383 insertions, 540 deletions
diff --git a/Master/texmf-dist/doc/latex/memoir/README b/Master/texmf-dist/doc/latex/memoir/README index 45c21dd7049..b133416d7ba 100644 --- a/Master/texmf-dist/doc/latex/memoir/README +++ b/Master/texmf-dist/doc/latex/memoir/README @@ -7,8 +7,8 @@ you create your particular design. The class incorporates over 30 of the more popular packages. IF YOU HAVE ANY QUESTIONS PLEASE ASK THEM ON TEX.STACKEXCHANGE.COM - (PLEASE USE THE MEMOIR TAG) OR ON THE COMP.TEXT.TEX NEWSGROUP, - OR BY EMAIL TO THE MAINTAINER. PLEASE ADD MEMOIR TO THE SUBJECT. + (PLEASE USE THE MEMOIR TAG) OR BY EMAIL TO THE MAINTAINER. + PLEASE ADD MEMOIR TO THE SUBJECT. PLEASE DON'T WRITE PETER DIRECTLY AS HE IS AWAY MORE OFTEN THAN NOT. @@ -16,14 +16,6 @@ more popular packages. Lars Madsen <daleif@math.au.dk> is maintaining memoir. - NOTE: If you are using the hyperref package dated earlier than 2006/11/15, -use the memhfixc package after the hyperref package, e.g., -... -\usepackage[...]{hyperref} -\usepackage{memhfixc} -... -Later versions of the hyperref package automatically load the memhfixc package. - NOTE: The full User Manual (memman.pdf) is a large document of about 550 pages in total. You do not need to print all of it, especially if you already have an earlier edition. Roughly speaking, the main portions are: @@ -36,6 +28,72 @@ o Backmatter: Bibliography, indexes ~ 50 pages +Changed (2019/11/15) + +o memoir v3.7i + +-- indexes now uses protection when being moved from the aux to the + idx file(s) + +-- changed loading ifpdf, ifetex, ifxetex and ifluatex to just loading + the new iftex package. Suggested by The LaTeX Support Team. + +-- new feature for \createmark: the <show> variable now accepts: + nonumber, shownumber and notitle (implies shownumber). The latter + enables chapter headers to be just of the form "Chapter <number>" + +-- By request, added a7paper and b7paper options (plus \stockavii, + \stockbvii, \pageavii and \pagebvii) + +-- changed the header construction for tableofcontents and + friends. The anchor that hyperref will use for TOC, LOF etc entries + in the TOC will now point above the header not below it. + +-- changed a few things in \subbottom, which hopefully fixes an issue + with hypcap, https://tex.stackexchange.com/q/440399/3929 (and + https://github.com/ho-tex/oberdiek/issues/42) + +-- the handling of \absindent, \absparsep is now correctly described in the + manual (any changes of these of use of them has to be delayed to the start of + the document via \AtBeginDocument) + +-- Updated the patched \InputIfFileExists to match the one used in the + 2019/10/01 format (if using that format, we use the old version) + +-- Updated the embedded copy of the booktabs package, bringing it in ling with + booktabs v1.6180339. + +-- Changed the warning emitted at the start of loading the caption + package. Apparently users got spooked by it. The caption package works just + fine with with memoir, the warning is just there to remind users that once + the caption package is loaded, all caption related configurations should go + through the caption package interface, not through the class interface. + +-- Fixed a bug in \lofmark and \lotmark when using the oneside option. The + default headings style uses \markright for all marks under oneside, but due + to an ordering mistake, \lofmark and \lotmark would still be using \markboth + unless you explicitly issued \pagestyle{headings} in the preamble. This is + now fixed. + +-- fixed bug in \newfootnoteseries, the included footnote type did not support + more than one paragraph. Is now long. + +-- fixed bug in \pagenote[...]{...}. Under hyperref + \pagenote{.}\pagenote[.]{.}{\pagenote{.} did not add a separator as + expected. It does now. + + +o memhfixc v1.18 + +-- added a \par to \contcaption to get rid of a sporadic space coming + from \refstepcounter under hyperref + +-- additionally added a patch when hypcap is loaded, now using + \contcaption is no longer an error (hypcap looks to see if \caption + has been used) + + + Changed (2018/12/12) o memoir v3.7h @@ -477,8 +535,7 @@ o run: latex memoir.ins (which will generate memoir.cls, o Move memoir.cls, the mem*.clo files and any mem*.sty file to locations where LaTeX will find them (typically in a local texmf tree at /tex/latex/memoir) and refresh the file database. - See the FAQ on CTAN at help - or http://www.tex.ac.uk/ for more information on this. + See the https://texfaq.org/ for more information on this. However, it is alway recommended that you update your LaTeX installation, instead of attempting to manually install a Package or diff --git a/Master/texmf-dist/doc/latex/memoir/memman.pdf b/Master/texmf-dist/doc/latex/memoir/memman.pdf Binary files differindex 38847b78a7b..346b815bd3f 100644 --- a/Master/texmf-dist/doc/latex/memoir/memman.pdf +++ b/Master/texmf-dist/doc/latex/memoir/memman.pdf diff --git a/Master/texmf-dist/doc/latex/memoir/memman.tex b/Master/texmf-dist/doc/latex/memoir/memman.tex index 63d653c5a96..965da3bb865 100644 --- a/Master/texmf-dist/doc/latex/memoir/memman.tex +++ b/Master/texmf-dist/doc/latex/memoir/memman.tex @@ -11,6 +11,8 @@ \documentclass[10pt,letterpaper,extrafontsizes]{memoir} \usepackage{comment} +\hfuzz=5pt + % For (non-printing) notes \PWnote{date}{text} \newcommand{\PWnote}[2]{} @@ -82,8 +84,8 @@ % \svnidlong % {} -% {$LastChangedDate: 2018-12-12 12:53:37 +0100 (Wed, 12 Dec 2018) $} -% {$LastChangedRevision: 622 $} +% {$LastChangedDate: 2019-11-14 18:06:44 +0100 (Thu, 14 Nov 2019) $} +% {$LastChangedRevision: 662 $} % {$LastChangedBy: daleif@math.au.dk $} @@ -115,10 +117,15 @@ + + %% end preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %#% extend + +\hfuzz=10pt + \usepackage[draft]{fixme} \fxsetup{ multiuser, @@ -1305,9 +1312,9 @@ been answered. \svnidlong {$Ignore: $} -{$LastChangedDate: 2015-04-22 17:17:51 +0200 (Wed, 22 Apr 2015) $} -{$LastChangedRevision: 527 $} -{$LastChangedBy: daleif $} +{$LastChangedDate: 2019-11-14 18:06:44 +0100 (Thu, 14 Nov 2019) $} +{$LastChangedRevision: 662 $} +{$LastChangedBy: daleif@math.au.dk $} \chapter{Introduction to the eighth edition} @@ -1338,7 +1345,7 @@ typesetting mathematics. On the other hand it is easy to configure a work produced with \Mname\ to meet a university's thesis layout requirements. - \Mname\ has improved substantially since it was first released --- +The \Mname\ class has improved substantially since it was first released --- over 50 \ltx ers have provided code or suggestions for improvements. The class is included in the \TeXUG\ \tx\ distributions and the latest version of the class and its supporting documentation is always @@ -1357,16 +1364,16 @@ and \Lbibtex. \section{General considerations} - The class is a large one consisting of about 10,000 lines of \ltx\ code -documented in a 400 page report; there is no need for most users to look at -this~\cite{MEMCODE}. However if you want to see exactly how some part, -or all of, \Mname\ is defined it is there for you to peruse. -The document you are now reading is the separate comprehensive -User Manual~\cite{MEMMAN} which runs to about 500 pages, and from time to -time an Addendum %\cite{MEMADD} -is released noting extensions to the class.\footnote{Currently not in use.} -Again, if you want to see how something was done in this Manual, which -of course was prepared using \Mname\ itself, the source +The class is a large one consisting of about 10,000 lines of \ltx\ +code documented in a 400 page report; there is no need for most users +to look at this~\cite{MEMCODE}. However if you want to see exactly how +some part, or all of, \Mname\ is defined it is there for you to +peruse. The document you are now reading is the separate +comprehensive User Manual~\cite{MEMMAN} which runs to about 500 pages, +and from time to time an Addendum %\cite{MEMADD} +is released noting extensions to the class.\footnote{Currently not in + use.} Again, if you want to see how something was done in this +Manual, which of course was prepared using \Mname\ itself, the source is available for you to read. % There is also the \Lpack{memexsupp} package by Lars Madsen~\cite{MEMEXSUPP} % which provides some extra facilities for the class. @@ -1468,10 +1475,20 @@ with the corresponding `\listofx'. \section{Tables} - Code from the \Lpack{array}, \Lpack{dcolumn}, \Lpack{delarray} and -\Lpack{tabularx} packges is integrated within the class. To improve -the appearance of rules in tabular material the \Lpack{booktabs} -package is also included. +% Code from the \Lpack{array}, \Lpack{dcolumn}, \Lpack{delarray} and +%\Lpack{tabularx} packges is integrated within the class. To improve +%the appearance of rules in tabular material the \Lpack{booktabs} +%package is also included. + +The \Lpack{array}, \Lpack{dcolumn}, \Lpack{delarray}, \Lpack{tabularx} +are automatically loaded by the class. In earlier days their code were +embedded into the class, nowadays we just load the respective +packages. To improve the appearance of rules in tabular material the +\Lpack{booktabs} package is also included (as a code copy, this may +change in the future). + + + Multipage tabulations are often set with the \Lpack{longtable} or \Lpack{xtab} packages, which can of course be used with the class. For @@ -1622,65 +1639,73 @@ page, and so on and so forth. %% \appendix \section{Packages} - Most packages work with the \Mname\ class, the main exception being -the \Lpack{hyperref} package. This package modifies -many of the internals of the standard classes but does not cater for all of -the differences between \Mname\ and the standard ones. If you wish to use -\Lpack{hyperref} with \Mname\ then you must use the \Lpack{memhfixc} +Most packages work with the \Mname\ class, the main exception being +the \Lpack{hyperref} package. This package modifies many of the +internals of the standard classes but does not cater for all of the +differences between \Mname\ and the standard ones. + +If you use \Lpack{hyperref} with \Mname\ then the \Lpack{memhfixc} package\footnote{\Lpack{memhfixc} is supplied as part of the \Mname\ -distribution.} after using \Lpack{hyperref}. For example like: -\begin{lcode} -\documentclass[...]{memoir} -... -\usepackage[...]{hyperref} -\usepackage{memhfixc} -... -\begin{document} -\end{lcode} -However, if you have a version of \Lpack{hyperref} dated 2006/11/15 or after, -\Lpack{hyperref} -will automatically call in \Lpack{memhfixc} so that you don't have to do -anything. + distribution.} is automatically loaded by \Lpack{hyperref} to +provide some class specific alterations. +% For example like: +% \begin{lcode} +% \documentclass[...]{memoir} +% ... +% \usepackage[...]{hyperref} +% \usepackage{memhfixc} +% ... +% \begin{document} +% \end{lcode} +% However, if you have a version of \Lpack{hyperref} dated 2006/11/15 or after, +% \Lpack{hyperref} +% will automatically call in \Lpack{memhfixc} so that you don't have to do +% anything. The \Mname\ class includes code either equivalent to, or extensions of, the following packages; that is, the set of commands and environments is at least the same as those in the packages: %\begin{itemize}%\item -\begin{lineitems} +\begin{adjustwidth}{2em}{2em} + \begin{center} + \begin{lineitems} \Lpack{abstract} -\item \Lpack{appendix} -\item \Lpack{array} -\item \Lpack{booktabs} -\item \Lpack{ccaption} -\item \Lpack{chngcntr} -\item \Lpack{chngpage} -\item \Lpack{dcolumn} -\item \Lpack{delarray} -\item \Lpack{enumerate} -\item \Lpack{epigraph} -\item \Lpack{framed} -\item \Lpack{ifmtarg} -\item \Lpack{ifpdf} -\item \Lpack{index} -\item \Lpack{makeidx} -\item \Lpack{moreverb} -\item \Lpack{needspace} -\item \Lpack{newfile} -\item \Lpack{nextpage} -\item \Lpack{parskip} -\item \Lpack{patchcmd} -\item \Lpack{setspace} -\item \Lpack{shortvrb} -\item \Lpack{showidx} -\item \Lpack{tabularx} -\item \Lpack{titleref} -\item \Lpack{titling} -\item \Lpack{tocbibind} -\item \Lpack{tocloft} -\item \Lpack{verbatim} -\item \Lpack{verse}. -\end{lineitems} -%\end{itemize} + \item \Lpack{appendix} + % \item \Lpack{array} + \item \Lpack{booktabs} + \item \Lpack{ccaption} + \item \Lpack{chngcntr} + \item \Lpack{chngpage} + % \item \Lpack{dcolumn} + % \item \Lpack{delarray} + \item \Lpack{enumerate} + \item \Lpack{epigraph} + \item \Lpack{framed} + \item \Lpack{ifmtarg} + % \item \Lpack{ifpdf} + \item \Lpack{index} + \item \Lpack{makeidx} + \item \Lpack{moreverb} + \item \Lpack{needspace} + \item \Lpack{newfile} + \item \Lpack{nextpage} + \item \Lpack{parskip} + \item \Lpack{patchcmd} + \item \Lpack{setspace} + \item \Lpack{shortvrb} + \item \Lpack{showidx} + % \item \Lpack{tabularx} + \item \Lpack{titleref} + \item \Lpack{titling} + \item \Lpack{tocbibind} + \item \Lpack{tocloft} + \item \Lpack{verbatim} + \item \Lpack{verse}. + \end{lineitems} + \end{center} +\end{adjustwidth} +% \end{itemize} + The class automatically ignores any \verb?\usepackage? or \verb?\RequirePackage? related to these. However, if you want to specifically use one of these packages rather than the integrated @@ -1705,14 +1730,16 @@ material; this has not occured with \Mname's implementation. The class also provides functions similar to those provided by the following packages, although the commands are different: %\begin{itemize}%\item -\begin{lineitems}%\item -\Lpack{crop} -\item \Lpack{fancyhdr} -\item \Lpack{geometry} -\item \Lpack{sidecap} -\item \Lpack{subfigure} -\item \Lpack{titlesec}. -\end{lineitems} +\begin{center} + \begin{lineitems}%\item + \Lpack{crop} + \item \Lpack{fancyhdr} + \item \Lpack{geometry} + \item \Lpack{sidecap} + \item \Lpack{subfigure} + \item \Lpack{titlesec}. + \end{lineitems} +\end{center} %\end{itemize} You can use these packages if you wish, or just use the capabilities of the \Mname\ class. @@ -1720,6 +1747,22 @@ if you wish, or just use the capabilities of the \Mname\ class. The class has built in support for the \Lpack{bidi} package for bidirectional typesetting~\cite{BIDI}. +The following packages are automatically loaded by the class: +\begin{center} + \begin{lineitems} + \Lpack{array} + \item \Lpack{dcolumn} + \item \Lpack{delarray} + \item \Lpack{etex} +% \item \Lpack{ifetex} +% \item \Lpack{ifxetex} +% \item \Lpack{ifpdf} +% \item \Lpack{ifluatex} + \item \Lpack{iftex} + \item \Lpack{tabularx} + \item \Lpack{textcase}~(with~\texttt{overload}~option) + \end{lineitems} +\end{center} \section{Resources} \label{sec:resources} @@ -1786,11 +1829,19 @@ this is well worth looking at just as an example of fine typesetting. freely available from \pixctan\ if you wish to see exactly what it does and how it does it. - For a more interactive resource you can ask questions on the -\url{comp.text.tex} newsgroup. If you are a newcomer to \pixctt\ -please read the FAQ~\cite{FAQ} before asking a question, and also read -a few day's worth of messages to check that your question hasn't just -been answered. +For a more interactive resource you can ask questions on +\begin{center} + \url{http://tex.stackexchange.com}. +\end{center} +-- if the question is \Mname\ related, please tag it so. + + + +% For a more interactive resource you can ask questions on the +% \url{comp.text.tex} newsgroup. If you are a newcomer to \pixctt\ +% please read the FAQ~\cite{FAQ} before asking a question, and also read +% a few day's worth of messages to check that your question hasn't just +% been answered. \section{Type conventions} @@ -1941,7 +1992,8 @@ omisssion.% \footnote{Peter is currently occasionably reachable via email % the maintainer at \texttt{daleif at math dot au dot dk}} \footnote{Please write the maintainer at \texttt{daleif at math dot au dot dk}} Along those lines, if you have any questions you may -direct them to the \url{comp.text.tex} newsgroup or post them on +%direct them to the \url{comp.text.tex} newsgroup or +post them on \url{http://tex.stackexchange.com} as you are likely to get a satisfactory and timely response. @@ -1983,11 +2035,12 @@ and make the changes there. Do not expect any help if you change the \fancybreak{} As the years go by support for \Lclass{memoir} will devolve from one -person to another.\footnote{This is currently (July 2009) happening as - Lars Madsen is taking over from Peter Wilson.} Therefore it is +person to another.\footnote{Lars Madsen took over from Peter Wilson in + 2009.} Therefore it is probably safer to ask questions, complain, make suggestions, etc., on -a Q\&A site like \url{http://tex.stackexchange.com} or on the the -newsgroup \url{comp.text.tex}, which is archived and read by many, +a Q\&A site like \url{http://tex.stackexchange.com}% or on the the +% newsgroup \url{comp.text.tex} +, which is archived and read by many, than correspond directly with the maintainer, who might well be away for some considerable time and perhaps not notice your email after having returned to base. @@ -1999,12 +2052,11 @@ track of memoir related matters. \fancybreak{} -\textit{From the maintainer:} It seems that traffic on -\url{comp.text.tex} is less frequent. So most \theclass\ related -questions should go to \url{http://tex.stackexchange.com}, please -remember to tag them properly, that really helps locating the -\theclass\ related questions. If no-one comes up with an answer, you -can also write me directly via \texttt{daleif (at) math dot au dot dk}. +\textit{From the maintainer:} Most \Mname\ related questions +should go to \url{http://tex.stackexchange.com}, please remember to +tag them properly, that really helps locating the \Mname\ related +questions. If no-one comes up with an answer, you can also write me +directly via \texttt{daleif (at) math dot au dot dk}. @@ -2221,8 +2273,8 @@ an em, often a quad is 1em. \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-03-09 13:41:30 +0100 (Fri, 09 Mar 2018) $} -{$LastChangedRevision: 587 $} +{$LastChangedDate: 2019-11-04 16:13:21 +0100 (Mon, 04 Nov 2019) $} +{$LastChangedRevision: 658 $} {$LastChangedBy: daleif@math.au.dk $} \chapter{Starting off} \label{chap:starting} @@ -2249,6 +2301,8 @@ the same dimensions. \caption{Class stock metric paper size options, and commands}\label{tab:sizeoptsmetric} \begin{tabular}{llll} \toprule Option & Size & stock size command & page size command \\ \midrule +\Lopt{a7paper}\index{paper!size!A7}\index{stock!size!A7} + & \abybm{105}{74}{mm} & \cmd{\stockavii} & \cmd{\pageavii} \\ \Lopt{a6paper}\index{paper!size!A6}\index{stock!size!A6} & \abybm{148}{105}{mm} & \cmd{\stockavi} & \cmd{\pageavi} \\ \Lopt{a5paper}\index{paper!size!A5}\index{stock!size!A5} @@ -2257,6 +2311,8 @@ Option & Size & stock size command & page size command \\ \midrule & \abybm{297}{210}{mm} & \cmd{\stockaiv} & \cmd{\pageaiv} \\ \Lopt{a3paper}\index{paper!size!A3}\index{stock!size!A3} & \abybm{420}{297}{mm} & \cmd{\stockaiii} & \cmd{\pageaiii} \\ +\Lopt{b7paper}\index{paper!size!B7}\index{stock!size!B7} + & \abybm{125}{88}{mm} & \cmd{\stockbvii} & \cmd{\pagebvii} \\ \Lopt{b6paper}\index{paper!size!B6}\index{stock!size!B6} & \abybm{176}{125}{mm} & \cmd{\stockbvi} & \cmd{\pagebvi} \\ \Lopt{b5paper}\index{paper!size!B5}\index{stock!size!B5} @@ -4839,8 +4895,8 @@ code below, and then the result is scaled down. \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-09-19 15:47:14 +0200 (Wed, 19 Sep 2018) $} -{$LastChangedRevision: 621 $} +{$LastChangedDate: 2019-10-22 14:49:52 +0200 (Tue, 22 Oct 2019) $} +{$LastChangedRevision: 651 $} {$LastChangedBy: daleif@math.au.dk $} @@ -5993,15 +6049,39 @@ odd line or to reword the text. \label{sec:text-case} The standard kernel \cmd{\MakeUppercase}\marg{text} and -\cmd{\MakeLowercase}\marg{text} -basically upper or lower case everything it can get its hands on. This -is not particularly nice if the \meta{text} contain, say, math. - -In order to help with this we provide the \cmd{\MakeTextUppercase} and -\cmd{\MakeTextLowercase} macros from the \Lpack{textcase} package -(\cite{textcase}) by David Carlisle. The following is DCs own -documentation of the provided code changed to match the typography we -use. +\cmd{\MakeLowercase}\marg{text} basically upper or lower case +everything it can get its hands on. This is not particularly nice if +the \meta{text} contain, say, math. + +In order to help with this we load the \Lpack{textcase} package +(\cite{textcase}) by David Carlisle (with the \texttt{overload} +option) which provide the \cmd{\MakeTextUppercase} and +\cmd{\MakeTextLowercase} macros.\footnote{Overload causes the original + \cmd{\MakeUppercase} and \cmd{\MakeLowercase} to be copies of + \cmd{\MakeTextUppercase} and \cmd{\MakeTextLowercase}.} + + +\begin{caveat} + This change was made in October 2019, earlier we embedded a copy of + \texttt{textcase} into the class it self. Now we check to see of you + have a copy and use that, if found, if not we use our old embedded + copy. + + If, for some reason, you want the original \cmd{\MakeUppercase} and + \cmd{\MakeLowercase} macros back, add +\begin{syntax} + \cmd{\MemRestoreOrigMakecase} +\end{syntax} +to your preamble. +\end{caveat} + + +The following is DCs own documentation of the provided code changed to +match the typography we use.\footnote{Note: This documentation will + probably be removed in a future version and replaced by a summary + and a reference to \cite{textcase}.} + + \fancybreak{} @@ -7044,9 +7124,9 @@ and thanks notes are meant to be different. \svnidlong {$Ignore: $} -{$LastChangedDate: 2014-03-31 11:34:44 +0200 (Mon, 31 Mar 2014) $} -{$LastChangedRevision: 480 $} -{$LastChangedBy: daleif $} +{$LastChangedDate: 2019-10-22 18:09:22 +0200 (Tue, 22 Oct 2019) $} +{$LastChangedRevision: 652 $} +{$LastChangedBy: daleif@math.au.dk $} \chapter{Abstracts} @@ -7191,6 +7271,23 @@ between paragraphs in this environment. The default values depend on whether or not the \Lopt{twocolumn} class option is used. The general layout parameters for lists are illustrated in \fref{fig:listlay}. +\begin{caveat} + The default values for \cmd{\absparindent} and \cmd{\absparsep} are + \cmd{\parindent} and \cmd{\parskip}. But, since users may change + these values in the preamble, we delay setting \cmd{\absparindent} + and \cmd{\absparsep} to the beginning of the document. Thus if you + want to change these values remember to use +\begin{verbatim} +\AtBeginDocument{ + \setlength{\absparindent}{...} + \setlength{\absparsep}{...} +} +\end{verbatim} + +\end{caveat} + + + \begin{syntax} \cmd{\abslabeldelim}\marg{text} \\ @@ -7238,15 +7335,17 @@ other appropriate environment which is supported by a used package\index{package \lnc{\abstitleskip} is typeset before the heading. For example, if \lnc{\absparindent} is non-zero, then: \begin{lcode} -\setlength{\abstitleskip}{-\absparindent} +\AtBeginDocument{ + \setlength{\abstitleskip}{-\absparindent} +} \end{lcode} - will typeset the heading flush left. +will typeset the heading flush left (we have to delay as the value of +\cmd{\absparindent} is zero in the preamble and is set at the start of +the doc). -Without the \cmd{\abstractrunin} declaration, \lnc{\abstitleskip} is -aditional vertical -space (either positive -or negative) that is inserted between the abstract name and the text of -the abstract. +Without the \cmd{\abstractrunin} declaration, \lnc{\abstitleskip} is +aditional vertical space (either positive or negative) that is +inserted between the abstract name and the text of the abstract. \index{abstract!styling|)} @@ -7315,9 +7414,9 @@ optional argument of the \cmd{\twocolumn} command. In fact, \svnidlong {$Ignore: $} -{$LastChangedDate: 2015-07-17 12:08:47 +0200 (Fri, 17 Jul 2015) $} -{$LastChangedRevision: 541 $} -{$LastChangedBy: daleif $} +{$LastChangedDate: 2019-11-04 16:13:21 +0100 (Mon, 04 Nov 2019) $} +{$LastChangedRevision: 658 $} +{$LastChangedBy: daleif@math.au.dk $} %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % chapter style @@ -7818,6 +7917,15 @@ The \cmd{\frontmatter} commands sets the numbering level to \texttt{none}. The commands \cmd{\mainmatter} and \cmd{\mainmatter*} set the numbering level to the value specified by \cmd{\maxsecnumdepth}. +\begin{hint} + One will often set \cmd{\setsecnumdepth} in the preamble and then + wonder why it didn't do anything. That is probably because of + \cmd{\frontmatter} and \cmd{mainmatter}, so make it a habit of + setting them both like above. +\end{hint} + + + The number setting commands come from the \Lpack{tocvsec2} package~\cite{TOCVSEC2}. @@ -9427,6 +9535,19 @@ centered, and in the normal font, you can do \setsubsubsecheadstyle{\normalfont\centering\MakeUppercase} \end{lcode} +\fancybreak{$***$} + +Under very special circumstances, one might want to get completely rid +of the sectional header (for example, if you are using a very small +paper size, and you are placing the section information in the header +instead), by creating a macro that takes on argument and ignores it +\begin{lcode} + \newcommand\ignoreMe[1]{} + \setsecheadstyle{\ignoreMe} +\end{lcode} + +\fancybreak{$***$} + As another example, although I don't recommend this, you can draw a horizontal line under section titles via: \begin{lcode} @@ -9512,10 +9633,13 @@ is to be located. \glossary(setsecnumformat)% {\cs{setsecnumformat}\marg{code}}% {Redefines \cs{@seccntformat} to \meta{code}.} -Internally all the titling macros use a kernel macro called +Internally all the titling macros like \cmd{\section}, +\cmd{\subsection} etc. use a kernel macro called \cmd{\@seccntformat} which defines the formatting of sectional numbers in a title. Its -default definition (in file \file{ltsect.dtx}) is effectively: +default definition (in file \file{ltsect.dtx}) is +effectively:\footnote{Because they all internally use the +\cmd{\@startsection} macro.} \begin{lcode} \newcommand{\@seccntformat}[1]{\csname the#1\endcsname\quad} \end{lcode} @@ -9740,7 +9864,22 @@ In this example we will provide separate formatting for \cmd{\section} and \cmd{ \newcommand\subsectionsecnumformat{\fbox{\enspace\thesubsection\enspace}\enspace} \end{lcode} Since the macro is only called in the proper context, we can use -\cmd{\thesection} directly in the code for \cmd{\section}. +\cmd{\thesection} directly in the code for \cmd{\section}. However, +this requires you to define formatting macros for all sectional +headings. Here is how to reverse it, that is see if a format exists, +use it, otherwise use a default: +\begin{lcode} + \makeatletter + \setsecnumformat{% + \@ifundefined{#1secnumformat}{% nope, use a default + \csname the#1\endcsname\quad% + }{% + \csname #1secnumformat\endcsname% + }% + } +\makeatother +\end{lcode} + @@ -10188,8 +10327,8 @@ normal size by the time subsubsection heads are reached, or before. \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-09-06 15:05:23 +0200 (Thu, 06 Sep 2018) $} -{$LastChangedRevision: 612 $} +{$LastChangedDate: 2019-11-11 16:55:48 +0100 (Mon, 11 Nov 2019) $} +{$LastChangedRevision: 661 $} {$LastChangedBy: daleif@math.au.dk $} \chapterstyle{demo3} @@ -10247,6 +10386,26 @@ is changed, but sometimes it may be desirable to have a continuous sequence of numbers irrespective of their displayed form, which is where the starred version comes in handy. +\begin{hint} + If you are using \Lpack{hyperref} and include a title page, the + following setup might be useful + \begin{lcode} +\pagenumbering{Alpha} +\begin{titlingpage} + ... +\end{titlingpage} +\frontmatter +... % this has roman numbering +\mainmatter +... % this has arabic numbering +\end{lcode} +The code has the advantage that \Lpack{hyperref} does not warn that +the page anchors for pages 1 and 2 are already defined (the +\Ie{titlingpage} env does not show the A, B page numbers). +\end{hint} + + + \begin{syntax} \cmd{\savepagenumber} \\ \cmd{\restorepagenumber} \\ @@ -10415,10 +10574,11 @@ Called from & Style \\ \midrule is \cmd{\uppercaseheads} which specifies that the titles are to be automatically uppercased. -\textbf{Change 2012:} The upper casing macro used by \cmd{\uppercaseheads} has -been changed into \cmd{\MakeTextUppercase} such that the upper casing -does not touch math, references or citations. - +\begin{note*}{Change 2012} The upper casing macro used by + \cmd{\uppercaseheads} has been changed into \cmd{\MakeTextUppercase} + (from the \Lpack{textcase} package) such that the upper casing does + not touch math, references or citations. +\end{note*} For the \pstyle{myheadings} pagestyle above, you have to define your own titles to go into the header\index{header}. Each sectioning command, @@ -10530,8 +10690,8 @@ are diagrammed in \fref{lay:header}. the \pstyle{plain} pagestyle is defined as \begin{lcode} \makepagestyle{plain} - \makeevenfoot{plain}{}{\thepage}{} - \makeoddfoot{plain}{}{\thepage}{} +\makeevenfoot{plain}{}{\thepage}{} +\makeoddfoot{plain}{}{\thepage}{} \end{lcode} which centers the page number at the bottom of the page. @@ -10725,11 +10885,12 @@ same as the \lnc{\textwidth}. setting any marks.} The last thing that the \cmd{\pagestyle}\marg{style} does is call the \meta{code} argument of the \cmd{\makepsmarks} macro for \meta{style}. -This is normally used for specifying non-default code -(i.e., code not specifiable via any of the previous macros) for the -particular pagestyle. The code normally defines the marks, if any, -that will be used in -the headers\index{header} and footers\index{footer}. +If specified, this code will often redefine the various macros that +provide the automated data for the headers (or footers). For example +how \cmd{\chapter} makes the title and chapter number avaialble for +the header. If no \meta{code} is specified (or \cmd{\makepsmarks} is +not setup for this \meta{style}, the providing macros already active +will be used. \LMnote{2010/06/25}{Added a mentioning of \cs{makeheadfootstrut}} \begin{syntax} @@ -10742,6 +10903,211 @@ them to \cmd{\strut} (except the \pstyle{empty} style where the struts are empty). One can use the macro above to change these struts to something different. +\fancybreak{$***$} + +\LMnote{2019/11/07}{Moved the explanation for \cmd{createmark} and + friends} + +Writing the \meta{code} part for \cmd{\makepsmarks} can be very +daunting, as you will be needing to define most of the macros listed +in Table~\ref{tab:markmacros} + +However, most uses are very similar, so we have provided some helper +macros: +\begin{syntax} +\cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} \\ +\cmd{\createplainmark}\marg{type}\marg{marks}\marg{text} \\ +\cmd{\memUChead}\marg{text} \\ +\cmd{\uppercaseheads} \cmd{\nouppercaseheads} \\ +\end{syntax} +\glossary(createplainmark)% + {\cs{createplainmark}\marg{type}\marg{marks}\marg{text}}% + {Defines the \cs{typemark} macro using \meta{text} as the mark, where + \meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}.} +\glossary(createmark)% + {\cs{createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix}}% + {Defines the \cs{secmark} macro where \meta{show} (\texttt{shownumber} + or \texttt{nonumber}) controls whether the division number will be + displayed within \cs{mainmatter}, \meta{marks} is \texttt{left}, + \texttt{both} or \texttt{right}, and \meta{prefix} and \meta{postfix} + are affixed before and after the \meta{sec} (division) number.} +\glossary(memUChead)% + {\cs{memUChead}\marg{text}}% + {May uppercase \meta{text}, depending on \cs{uppercaseheads} and + \cs{nouppercaseheads}.} +\glossary(uppercaseheads)% + {\cs{uppercaseheads}}% + {Defines \cs{memUChead} as equivalent to \cs{MakeUppercase}.} +\glossary(nouppercaseheads)% + {\cs{nouppercaseheads}}% + {Defines \cs{memUChead} as \cs{relax} (i.e., do nothing).} + +\noindent +The macro \cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} +defines a new macro \verb?\<sec>mark? that will take one argument, where +\begin{description} + \item[\meta{marks}] is either \texttt{left}, \texttt{right} or \texttt{both}, +\item[\meta{sec}] is a sectional division + such as \texttt{part}, \texttt{chapter}, \texttt{section}, etc., +\item[\meta{show}] is one of the terms \texttt{shownumber}, \texttt{nonumber} or + \texttt{notitle}. They control what is available in the provided + header text. The terms \texttt{shownumber}, \texttt{nonumber} + control whether the number is displayed within \cmd{\mainmatter} + (under \cmd{\frontmatter} no numbers are displayed. + + The term \texttt{notitle} (which implies \texttt{shownumber}) will + only show the number part (including the \meta{postfix} and + \meta{prefix} parts described below) and \emph{no} title. + +\item[\meta{pre-/postfix}] are affixed before and after the division number. +\end{description} +For example: +\begin{lcode} +\createmark{section}{left}{nonumber}{}{} +\createmark{section}{both}{nonumber}{}{} +\createmark{section}{right}{nonumber}{}{} +\end{lcode} +is equivalent to, respectively +\begin{lcode} +\def\sectionmark#1{\markboth{\memUChead{#1}}{}} +\def\sectionmark#1{\markboth{\memUChead{#1}}{\memUChead{#1}}} +\def\sectionmark#1{\markight{\memUChead{#1}}} +\end{lcode} +whereas +\begin{lcode} +\createmark{section}{left}{shownumber}{}{} +\end{lcode} +is equivalent to the following pseudo code +\begin{lcode} +\def\sectionmark#1{\markboth{ + \memUChead{ + if secnumdepth > number: + if mainmatter: + prefix \thesection postfix + fi + fi + #1% aka the section title + } +}{}} +\end{lcode} +and +\begin{lcode} +\createmark{section}{left}{notitle}{}{} +\end{lcode} +is equivalent to the following pseudo code +\begin{lcode} +\def\sectionmark#1{\markboth{ + \memUChead{ + if secnumdepth > number: + if mainmatter: + prefix \thesection postfix + fi + fi + } +}{}} +\end{lcode} + +\fancybreak{} + +The macro \cmd{\createplainmark} defines the \verb?\<type>mark?, where +\meta{type} is an unnumbered division-like head, such as \texttt{toc}, +\texttt{lof}, \texttt{index}, using \meta{text} as the mark value, and +\meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}. For example: +\begin{lcode} +\createplainmark{toc}{left}{\contentsname} +\createplainmark{lot}{right}{\listtablename} +\createplainmark{bib}{both}{\bibname} +\end{lcode} +is equivalent to +\begin{lcode} +\def\tocmark{\markboth{\memUChead{\contentsname}}{}} +\def\lotmark{\markright{\memUChead{\listtablename}}} +\def\lofmark{\markboth{\memUChead{\bibname}}{\memUChead{\bibname}}} +\end{lcode} + +\fancybreak{} + +Lastly the macro \cmd{\memUChead} is an internal macro handling the +upper- or non-uppercasing. Its definition is usually controlled using +\cmd{\uppercaseheads} which sets \cmd{\memUChead} to +\cmd{\MakeTextUppercase} (from \Lpack{textcase}) whereas +\cmd{\nouppercaseheads} defines it to output the argument +unchanged. The class default is \cmd{\uppercaseheads}. + +\fancybreak{} + +The class' default page style is \pstyle{headings}, which has the +following setup for \cmd{\makepsmarks} (slight pseudocode): +\begin{lcode} +if twopage setup: + \makepsmarks{headings}{% + \createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ } + \createmark{section}{right}{shownumber}{}{. \ } + \createplainmark{toc}{both}{\contentsname} + \createplainmark{lof}{both}{\listfigurename} + \createplainmark{lot}{both}{\listtablename} + \createplainmark{bib}{both}{\bibname} + \createplainmark{index}{both}{\indexname} + \createplainmark{glossary}{both}{\glossaryname} + } +else: % aka oneside + \makepsmarks{headings}{% + \createmark{chapter}{right}{shownumber}{\@chapapp\ }{. \ } + \createplainmark{toc}{right}{\contentsname} + \createplainmark{lof}{right}{\listfigurename} + \createplainmark{lot}{right}{\listtablename} + \createplainmark{bib}{right}{\bibname} + \createplainmark{index}{right}{\indexname} + \createplainmark{glossary}{right}{\glossaryname} + } +fi +\end{lcode} +Where \cmd{\@chapapp} is a special macro what equals +\cmd{\chaptername} unless \cmd{\appendix} is active, where it is then +equal to \cmd{\appendixname}. + +Note how the twosided setup only include marks for \cmd{\chapter} and +\cmd{\section} and onesided only for \cmd{\chapter}. + +\fancybreak{} + +So what if we wanted to add support for \cmd{\subsection} to an +already defined page style? Use this: +\begin{syntax} +\cmd{\addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append} \\ +\end{syntax} +\glossary(addtopsmarks)% + {\cs{addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append}}% + {Inserts \meta{prepend} and \meta{append} before and after the current + definition of \cs{makepsmarks} for \meta{pagestyle}.} +Here \meta{prepend} and \meta{append} is inserted +\emph{before} and \emph{after} the current definition of \cs{makepsmarks} +for \meta{pagestyle}. So to answer our question we could use +\begin{lcode} +\addtopsmarks{headings}{}{% + \createmark{subsection}{right}{shownumber}{}{. \space}} +\pagestyle{headings} +\end{lcode} +-- always remember to activate the page style afterwards. + + +\fancybreak{} + +\LMnote{2010/02/08}{fixed typo} + +When the class runs the marks part of page style, it does not zero out +old marks, i.e.\ if an old \cmd{\sectionmark} exist, it still exist +even if we do not change it. This is both a good and a bad thing. To +help users redefine these marks to doing nothing we provide +\begin{syntax} +\cmd{\clearplainmark}\marg{type}\\ +\cmd{\clearmark}\marg{type}\\ +\end{syntax} +The used types are the same as for \cmd{\createplainmark} and \cmd{\createmark}. + + + + \subsection{Example pagestyles} @@ -10766,9 +11132,12 @@ date will be typeset in italics at the bottom of each page by the spine margin. If any \pstyle{empty} pages should be marked as well, specify similar footers for that style as well. +\fancybreak{} + + Here is part of the standard definition of the \pstyle{headings} pagestyle for the \Lclass{book} class which uses many internal \ltx\ commands; -but note that \Mname\ does not use this. +but note that the class does not use this! \begin{lcode} \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty @@ -10806,7 +11175,7 @@ the section's title, again all in upper case. \makeoddhead{headings}{\slshape\rightmark}{}{\thepage} \makepsmarks{headings}{% \def\chaptermark##1{% - \markboth{\MakeUppercase{% + \markboth{\MakeTextUppercase{% \ifnum\c@secnumdepth > \m@ne \if@mainmatter \@chapapp\ \thechapter. \ % @@ -10814,74 +11183,96 @@ the section's title, again all in upper case. \fi ##1}}{}}% \def\sectionmark##1{% - \markright{\MakeUppercase{% + \markright{\MakeTextUppercase{% \ifnum\c@secnumdepth > \z@ \thesection. \ % \fi ##1}}} - \def\tocmark{\markboth{\MakeUppercase{\contentsname}}{}} - \def\lofmark{\markboth{\MakeUppercase{\listfigurename}}{}} - \def\lotmark{\markboth{\MakeUppercase{\listtablename}}{}} - \def\bibmark{\markboth{\MakeUppercase{\bibname}}{}} - \def\indexmark{\markboth{\MakeUppercase{\indexname}}{}} - \def\glossarymark{\markboth{\MakeUppercase{\glossaryname}}{}}} + \def\tocmark{\markboth{\MakeTextUppercase{\contentsname}}{}} + \def\lofmark{\markboth{\MakeTextUppercase{\listfigurename}}{}} + \def\lotmark{\markboth{\MakeTextUppercase{\listtablename}}{}} + \def\bibmark{\markboth{\MakeTextUppercase{\bibname}}{}} + \def\indexmark{\markboth{\MakeTextUppercase{\indexname}}{}} + \def\glossarymark{\markboth{\MakeTextUppercase{\glossaryname}}{}}} \end{lcode} As you can see, defining the marks for a pagestyle is not necessarily the -simplest thing in the world. However, courtesy of Lars\index{Madsen, Lars} Madsen, -help is at hand. +simplest thing in the world. With the extra tools described above, +this code can be reduced to +\begin{lcode} +\makepagestyle{headings} +\makeevenhead{headings}{\thepage}{}{\slshape\leftmark} +\makeoddhead{headings}{\slshape\rightmark}{}{\thepage} +\makepsmarks{headings}{% + \createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ } + \createmark{section}{right}{shownumber}{}{. \ } + \createplainmark{toc}{both}{\contentsname} + \createplainmark{lof}{both}{\listfigurename} + \createplainmark{lot}{both}{\listtablename} + \createplainmark{bib}{both}{\bibname} + \createplainmark{index}{both}{\indexname} + \createplainmark{glossary}{both}{\glossaryname} +} +\end{lcode} + -\begin{syntax} -\cmd{\createplainmark}\marg{type}\marg{marks}\marg{text} \\ -\cmd{\memUChead}\marg{text} \\ -\cmd{\uppercaseheads} \cmd{\nouppercaseheads} \\ -\cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} \\ -\end{syntax} -\glossary(createplainmark)% - {\cs{createplainmark}\marg{type}\marg{marks}\marg{text}}% - {Defines the \cs{typemark} macro using \meta{text} as the mark, where - \meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}.} -\glossary(createmark)% - {\cs{createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix}}% - {Defines the \cs{secmark} macro where \meta{show} (\texttt{shownumber} - or \texttt{nonumber}) controls whether the division number will be - displayed within \cs{mainmatter}, \meta{marks} is \texttt{left}, - \texttt{both} or \texttt{right}, and \meta{prefix} and \meta{postfix} - are affixed before and after the \meta{sec} (division) number.} -\glossary(memUChead)% - {\cs{memUChead}\marg{text}}% - {May uppercase \meta{text}, depending on \cs{uppercaseheads} and - \cs{nouppercaseheads}.} -\glossary(uppercaseheads)% - {\cs{uppercaseheads}}% - {Defines \cs{memUChead} as equivalent to \cs{MakeUppercase}.} -\glossary(nouppercaseheads)% - {\cs{nouppercaseheads}}% - {Defines \cs{memUChead} as \cs{relax} (i.e., do nothing).} -The macro \cmd{\createplainmark} defines the \verb?\<type>mark?, where -\meta{type} is an unnumbered division-like head, such as \texttt{toc}, -\texttt{lof}, \texttt{index}, using \meta{text} as the mark value, and -\meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}. For example: -\begin{lcode} -\createplainmark{toc}{left}{\contentsname} -\createplainmark{lot}{right}{\listtablename} -\createplainmark{bib}{both}{\bibname} -\end{lcode} -is equivalent to -\begin{lcode} -\def\tocmark{\markboth{\memUChead{\contentsname}}{}} -\def\lotmark{\markright{\memUChead{\listtablename}}} -\def\lofmark{\markboth{\memUChead{\bibname}}{\memUChead{\bibname}}} -\end{lcode} - Following the declaration \cmd{\uppercaseheads} the \cmd{\memUChead} -command is equivalent to \cmd{\MakeUppercase} but after the -\cmd{\nouppercaseheads} it is equivalent to \cmd{\relax} (which does nothing). -The \cmd{\createplainmark} macro wraps \cmd{\memUChead} around the \meta{text} -argument within the generated \cs{mark(both/right)} macro. By using the -\cs{(no)uppercaseheads} declarations you can control the uppercasing, or -otherwise, of the mark texts. The default is \cmd{\uppercaseheads}. +% However, courtesy of Lars\index{Madsen, Lars} Madsen, +% help is at hand. + +% \begin{syntax} +% \cmd{\createplainmark}\marg{type}\marg{marks}\marg{text} \\ +% \cmd{\memUChead}\marg{text} \\ +% \cmd{\uppercaseheads} \cmd{\nouppercaseheads} \\ +% \cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} \\ +% \end{syntax} +% \glossary(createplainmark)% +% {\cs{createplainmark}\marg{type}\marg{marks}\marg{text}}% +% {Defines the \cs{typemark} macro using \meta{text} as the mark, where +% \meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}.} +% \glossary(createmark)% +% {\cs{createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix}}% +% {Defines the \cs{secmark} macro where \meta{show} (\texttt{shownumber} +% or \texttt{nonumber}) controls whether the division number will be +% displayed within \cs{mainmatter}, \meta{marks} is \texttt{left}, +% \texttt{both} or \texttt{right}, and \meta{prefix} and \meta{postfix} +% are affixed before and after the \meta{sec} (division) number.} +% \glossary(memUChead)% +% {\cs{memUChead}\marg{text}}% +% {May uppercase \meta{text}, depending on \cs{uppercaseheads} and +% \cs{nouppercaseheads}.} +% \glossary(uppercaseheads)% +% {\cs{uppercaseheads}}% +% {Defines \cs{memUChead} as equivalent to \cs{MakeTextUppercase}.} +% \glossary(nouppercaseheads)% +% {\cs{nouppercaseheads}}% +% {Defines \cs{memUChead} as \cs{relax} (i.e., do nothing).} + + +% The macro \cmd{\createplainmark} defines the \verb?\<type>mark?, where +% \meta{type} is an unnumbered division-like head, such as \texttt{toc}, +% \texttt{lof}, \texttt{index}, using \meta{text} as the mark value, and +% \meta{marks} is \texttt{left}, \texttt{both} or \texttt{right}. For example: +% \begin{lcode} +% \createplainmark{toc}{left}{\contentsname} +% \createplainmark{lot}{right}{\listtablename} +% \createplainmark{bib}{both}{\bibname} +% \end{lcode} +% is equivalent to +% \begin{lcode} +% \def\tocmark{\markboth{\memUChead{\contentsname}}{}} +% \def\lotmark{\markright{\memUChead{\listtablename}}} +% \def\lofmark{\markboth{\memUChead{\bibname}}{\memUChead{\bibname}}} +% \end{lcode} + +% Following the declaration \cmd{\uppercaseheads} the \cmd{\memUChead} +% command is equivalent to \cmd{\MakeTextUppercase} but after the +% \cmd{\nouppercaseheads} it is equivalent to \cmd{\relax} (which does nothing). +% The \cmd{\createplainmark} macro wraps \cmd{\memUChead} around the \meta{text} +% argument within the generated \cs{mark(both/right)} macro. By using the +% \cs{(no)uppercaseheads} declarations you can control the uppercasing, or +% otherwise, of the mark texts. The default is \cmd{\uppercaseheads}. \LMnote{2010/02/08}{added the following paragraph} Note that if you want to use a predefined page style, but would like @@ -10893,59 +11284,49 @@ reload the page style, for example with the default page style in \theclass\ \end{lcode} - The macro \cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} -defines the \verb?\<sec>mark? macro where \meta{sec} is a sectional division -such as \texttt{part}, \texttt{chapter}, \texttt{section}, etc., -and \meta{show} (\texttt{shownumber} -or \texttt{nonumber}) controls whether the division number will be -displayed within \cs{mainmatter}. The \meta{marks} argument is \texttt{left}, -\texttt{both} or \texttt{right}, and \meta{prefix} and \meta{postfix} -are affixed before and after the division number. For example: -\begin{lcode} -\createmark{section}{left}{nonumber}{}{} -\createmark{section}{both}{nonumber}{}{} -\createmark{section}{right}{nonumber}{}{} -\end{lcode} -is equivalent to, respectively -\begin{lcode} -\def\sectionmark#1{\markboth{#1}{}} -\def\sectionmark#1{\markboth{#1}{#1}} -\def\sectionmark#1{\markight{#1}} -\end{lcode} +% The macro \cmd{\createmark}\marg{sec}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} +% defines the \verb?\<sec>mark? macro where \meta{sec} is a sectional division +% such as \texttt{part}, \texttt{chapter}, \texttt{section}, etc., +% and \meta{show} (\texttt{shownumber}, \texttt{nonumber} or +% \texttt{notitle} (implies \texttt{shownumber})) controls whether the division number will be +% displayed within \cs{mainmatter}. The \meta{marks} argument is \texttt{left}, +% \texttt{both} or \texttt{right}, and \meta{prefix} and \meta{postfix} +% are affixed before and after the division number. For example: +% \begin{lcode} +% \createmark{section}{left}{nonumber}{}{} +% \createmark{section}{both}{nonumber}{}{} +% \createmark{section}{right}{nonumber}{}{} +% \end{lcode} +% is equivalent to, respectively +% \begin{lcode} +% \def\sectionmark#1{\markboth{#1}{}} +% \def\sectionmark#1{\markboth{#1}{#1}} +% \def\sectionmark#1{\markight{#1}} +% \end{lcode} -The difference between \cmd{\createmark} and \cmd{\createplainmark} is -that the former create a macro that takes an argument, whereas -\cmd{\createplainmark} does not. +% The difference between \cmd{\createmark} and \cmd{\createplainmark} is +% that the former create a macro that takes an argument, whereas +% \cmd{\createplainmark} does not. - Using these macros \Mname's current definition of -\verb?\makepsmarks{headings}? is much simpler (it also leads to a -slightly different result as the \texttt{toc} etc., marks set both -the \cmd{\leftmark} and \cmd{\rightmark} instead of just the -\cmd{\leftmark}): -\begin{lcode} -\makepsmarks{headings}{% - \createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ } - \createmark{section}{right}{shownumber}{}{. \ } - \createplainmark{toc}{both}{\contentsname} - \createplainmark{lof}{both}{\listfigurename} - \createplainmark{lot}{both}{\listtablename} - \createplainmark{bib}{both}{\bibname} - \createplainmark{index}{both}{\indexname} - \createplainmark{glossary}{both}{\glossaryname}} -\end{lcode} +% Using these macros \Mname's current definition of +% \verb?\makepsmarks{headings}? is much simpler (it also leads to a +% slightly different result as the \texttt{toc} etc., marks set both +% the \cmd{\leftmark} and \cmd{\rightmark} instead of just the +% \cmd{\leftmark}): +% \begin{lcode} +% \makepsmarks{headings}{% +% \createmark{chapter}{left}{shownumber}{\@chapapp\ }{. \ } +% \createmark{section}{right}{shownumber}{}{. \ } +% \createplainmark{toc}{both}{\contentsname} +% \createplainmark{lof}{both}{\listfigurename} +% \createplainmark{lot}{both}{\listtablename} +% \createplainmark{bib}{both}{\bibname} +% \createplainmark{index}{both}{\indexname} +% \createplainmark{glossary}{both}{\glossaryname}} +% \end{lcode} -\LMnote{2010/02/08}{fixed typo} -When \Mname{} runs the marks part of page style, it does not zero out -old marks, i.e.\ if an old \cmd{\sectionmark} exist, it still exist -even if we do not change it. This is both a good and a bad thing. To help -users redefine these marks to doing nothing we provide -\begin{syntax} -\cmd{\clearplainmark}\marg{type}\\ -\cmd{\clearmark}\marg{type}\\ -\end{syntax} -The used types are the same as for \cmd{\createplainmark} and \cmd{\createmark}. @@ -11066,17 +11447,18 @@ what goes into each header\index{header} and footer\index{footer} slot typeset with \pstyle{companion} pagestyle headers\index{header}. This pagestyle is part of the class. -\begin{syntax} -\cmd{\addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append} \\ -\end{syntax} -\glossary(addtopsmarks)% - {\cs{addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append}}% - {Inserts \meta{prepend} and \meta{append} before and after the current - definition of \cs{makepsmarks} for \meta{pagestyle}.} -\cmd{\addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append} is the last -of this group of helper macros. It inserts \meta{prepend} and \meta{append} -before and after the current definition of \cs{makepsmarks} -for \meta{pagestyle}. For instance, if you wanted \cs{subsection} titles to appear +% \begin{syntax} +% \cmd{\addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append} \\ +% \end{syntax} +% \glossary(addtopsmarks)% +% {\cs{addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append}}% +% {Inserts \meta{prepend} and \meta{append} before and after the current +% definition of \cs{makepsmarks} for \meta{pagestyle}.} +% \cmd{\addtopsmarks}\marg{pagestyle}\marg{prepend}\marg{append} is the last +% of this group of helper macros. It inserts \meta{prepend} and \meta{append} +% before and after the current definition of \cs{makepsmarks} +% for \meta{pagestyle}. +For instance, if you wanted \cs{subsection} titles to appear in the page headers of the \pstyle{companion} pagestyle then this would be a way of doing it: \begin{lcode} @@ -19894,8 +20276,8 @@ illustrate these points. \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-09-19 15:47:14 +0200 (Wed, 19 Sep 2018) $} -{$LastChangedRevision: 621 $} +{$LastChangedDate: 2019-11-14 18:06:44 +0100 (Thu, 14 Nov 2019) $} +{$LastChangedRevision: 662 $} {$LastChangedBy: daleif@math.au.dk $} \chapter{Page notes} \label{chap:mnotes} @@ -19911,6 +20293,7 @@ for fixed marginal notes and sidebars. \section{Footnotes} + A footnote can be considered to be a special kind of float\index{float} that is put at the bottom of a page. @@ -19930,6 +20313,8 @@ bottom of the page, or in a \Ie{minipage} where it puts the note at the end of the \Ie{minipage}. Results are likely to be peculiar if it is used anywhere else (like in a \Ie{tabular}). + + \begin{syntax} \cmd{\footnotemark}\oarg{num} \\ \cmd{\footnotetext}\oarg{num}\marg{text} \\ @@ -19954,6 +20339,8 @@ defined like: In any event, you can use a combination of \cmd{\footnotemark} and \cmd{\footnotetext} to do footnoting where \ltx\ would normally get upset. + + \begin{syntax} \cmd{\footref}\marg{label} \\ \end{syntax} @@ -19964,18 +20351,18 @@ In any event, you can use a combination of \cmd{\footnotemark} and to the text of a footnote\index{footnote!reference}. This can be done by putting a \cmd{\label} in the footnote and then using \cmd{\footref} to refer to the label; this prints the footnote mark. For example: -\begin{comment} -%%% in memdesign, not memman -\begin{lcode} -...\footnote{... adults or babies.\label{fn:rabbits}} -... -... The footnote\footref{fn:rabbits} on \pref{fn:rabbits} ... -\end{lcode} -In this manual, the last line above prints: -\begin{syntax} -... The footnote\footref{fn:rabbits} on \pref{fn:rabbits} ... \\ -\end{syntax} -\end{comment} +% \begin{comment} +% %%% in memdesign, not memman +% \begin{lcode} +% ...\footnote{... adults or babies.\label{fn:rabbits}} +% ... +% ... The footnote\footref{fn:rabbits} on \pref{fn:rabbits} ... +% \end{lcode} +% In this manual, the last line above prints: +% \begin{syntax} +% ... The footnote\footref{fn:rabbits} on \pref{fn:rabbits} ... \\ +% \end{syntax} +% \end{comment} \begin{lcode} ...\footnote{...values for the kerning.\label{fn:kerning}} ... ... @@ -19983,10 +20370,14 @@ In this manual, the last line above prints: \end{lcode} In this manual, the last line above prints: \begin{syntax} -... The footnote\footref{fn:kerning} on \pref{fn:kerning} ... \\ + ... + The footnote\footref{fn:kerning} +% on \pref{fn:kerning} ... \end{syntax} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% from membook @@ -20623,8 +21014,10 @@ Internally \cmd{\setfootins} also sets the skips being used by \index{footnote|)} - \section{Marginal notes} +\section{Marginal notes} + + \LMnote{2010/01/**}{added a reference back to \cs{setmarginnotes}} Some marginalia can also be considered to be kinds of floats. The class provides the standard margin notes\index{margin note} @@ -27682,8 +28075,8 @@ pdflatex memman \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-04-05 11:07:48 +0200 (Thu, 05 Apr 2018) $} -{$LastChangedRevision: 596 $} +{$LastChangedDate: 2019-11-11 16:55:48 +0100 (Mon, 11 Nov 2019) $} +{$LastChangedRevision: 661 $} {$LastChangedBy: daleif@math.au.dk $} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -29104,9 +29497,9 @@ If you want a \file{dvi} file output use \ltx\ and if you want a \begin{syntax} \piif{ifpdf} ... \verb?\fi? \\ \end{syntax} -The class provides \piif{ifpdf} (by autoloading the \Lpack{ifpdf} -package) which is \ptrue\ when the document is -being processed by \pixpdfltx\ and \pfalse\ otherwise. You can use it like this: +The class provides \piif{ifpdf} (by autoloading the \Lpack{iftex} +package) which is \ptrue\ when the document is being processed by +\pixpdfltx\ and \pfalse\ otherwise. You can use it like this: \begin{lcode} \ifpdf code for pdfLaTeX only @@ -29131,7 +29524,7 @@ available (Though, as of 2018, this is \emph{very} rare). {\ptrue\ if \etx\ is the underlying engine, otherwise \pfalse.} \piif{ifetex} can be used to determine if \pixetx\ is being used as the underlying engine; it is analagous to \piif{ifpdf} which tests for -\pixpdfltx\ (provided by autoloading the \Lpack{ifetex} package). For +\pixpdfltx\ (provided by autoloading the \Lpack{iftex} package). For example: \begin{lcode} \ifetex @@ -29144,8 +29537,8 @@ example: \subsection{Checking for XeTeX} - You have been able to use \cs{ifpdf} to check if \pixpdfltx\ is being used -to process the document. +You have been able to use \cs{ifpdf} to check if PDF output is being +used to process the document. \begin{syntax} \piif{ifxetex} \\ @@ -29154,9 +29547,9 @@ to process the document. {\cs{ifxetex}}% {\ptrue\ if \xetx\ is being used to process the document.} -In a similar manner you can use \piif{ifxetex} to check if the document -is being processed by \pixxetx\ (provided by autoloading the -\Lpack{ifxetex} package). + In a similar manner you can use \piif{ifxetex} to check if the + document is being processed by \pixxetx\ (provided by autoloading + the \Lpack{iftex} package). \begin{syntax} \cmd{\RequireXeTeX} \\ @@ -29164,7 +29557,7 @@ is being processed by \pixxetx\ (provided by autoloading the \glossary(RequireXeTeX)% {\cs{RequireXeTeX}}% {Generates an error if the document is not being processed by \xetx.} -The \Lpack{ifxetex} package also provides \cmd{\RequireXeTeX}, which +The \Lpack{iftex} package also provides \cmd{\RequireXeTeX}, which generates an error if \pixxetx\ is not being used to process the document. This can be useful if you make your own class building upon \Lclass{memoir}. @@ -29179,7 +29572,8 @@ Similarly you can use \glossary(ifluatex)% {\cs{ifluatex}}% {\ptrue\ if \luatx\ is being used to process the document.} -to check if the doc is being process by \luatx. +to check if the doc is being process by \luatx. Again provided by +loading \Lpack{iftex}. \section{Leading} @@ -32137,6 +32531,7 @@ The \theclass\ memoir class has several features that involve a \emph{style} and it provide several of these styles. This chapter is used to showcase these styles. + \begingroup % because of hyperref warnings @@ -38116,8 +38511,8 @@ recognized. \svnidlong {$Ignore: $} -{$LastChangedDate: 2018-04-05 11:07:48 +0200 (Thu, 05 Apr 2018) $} -{$LastChangedRevision: 596 $} +{$LastChangedDate: 2019-11-14 18:06:44 +0100 (Thu, 14 Nov 2019) $} +{$LastChangedRevision: 662 $} {$LastChangedBy: daleif@math.au.dk $} \chapter{Comments} @@ -38142,19 +38537,19 @@ used \cmd{\setmarginnotes}. \vskip-2\baselineskip \begin{small} \begin{verbatim} -if twocolumn then +if twocolumn then: marginparwidth = min{inner margin,outer margin} else - if twoside then - if marginpar always left or always right then + if twoside then: + if marginpar always left or always right then: marginparwidth = min{inner margin,outer margin} - else if marginpar in outer margin then + else if marginpar in outer margin then: marginparwidth = outer margin - else if marginpar in inner margin then + else if marginpar in inner margin then: marginparmargin = inner margin end if else - if marginpar in left margin then + if marginpar in left margin then: marginparwidth = inner margin else marginparwidth = outer margin @@ -38162,7 +38557,7 @@ else end if end if marginparwidth = marginparwidth - 2marginparsep -if marginparwidth < 1pt then +if marginparwidth < 1pt then: marginparwidth = 1pt end if \end{verbatim} @@ -38407,10 +38802,11 @@ access CTAN is available at \url{http://www.tug.org}. \newblock (Available from CTAN via \CTANurl{/macros/latex/required/tools/}) -\bibitem[Car04]{textcase} % casing intentional +\LMnote{2019/10/2}{Updated year} +\bibitem[Car19]{textcase} % casing intentional David Carlisle. \newblock \emph{The \Lpack{textcase} package}. -\newblock October, 2004. +\newblock September, 2019. \newblock (Available from CTAN in \texttt{/macros/latex/contrib/textcase}) @@ -39473,26 +39869,26 @@ Peter Wilson. \newblock (Available from CTAN via \CTANurl{/macros/latex/contrib/fonttable/}) -\bibitem[Wil09b]{MEMCODE} +\bibitem[Wil19a]{MEMCODE} Peter Wilson (with the assistance of Lars Madsen). \newblock \emph{The \ltx\ memoir class for configurable book typesetting: source code} - \newblock July, 2009. + \newblock November, 2019. \newblock (Available from CTAN via \CTANurl{/macros/latex/contrib/memoir/}) -\bibitem[Wil07c]{MEMMAN} +\bibitem[Wil19b]{MEMMAN} Peter Wilson (with the assistance of Lars Madsen). \newblock \emph{The Memoir Class for Configurable Typesetting --- User Guide} - \newblock August, 2009. Regularly updated. + \newblock November, 2019. Regularly updated. \newblock (Available from CTAN via \CTANurl{/macros/latex/contrib/memoir/}) -\bibitem[Wil09d]{MEMDESIGN} +\bibitem[Wil18]{MEMDESIGN} Peter Wilson. \newblock \emph{A Few Notes on Book Design} - \newblock August, 2009. + \newblock September, 2018. \newblock (Available from CTAN via \CTANurl{/info/memdesign/}) @@ -39504,10 +39900,10 @@ Peter Wilson. \newblock To be published. -\bibitem[Wri18]{SIUNITX} +\bibitem[Wri19]{SIUNITX} Joseph Wright. \newblock \emph{Siunitx — A comprehensive (SI) units package} - \newblock May, 2018. + \newblock October, 2019. \newblock (Available from CTAN via \CTANurl{/macros/latex/contrib/siunitx}) diff --git a/Master/texmf-dist/doc/latex/memoir/memsty.sty b/Master/texmf-dist/doc/latex/memoir/memsty.sty index a59bd4d4556..a0427c232b1 100644 --- a/Master/texmf-dist/doc/latex/memoir/memsty.sty +++ b/Master/texmf-dist/doc/latex/memoir/memsty.sty @@ -1125,6 +1125,7 @@ it to use the new width for the margin par} \newenvironment{caveat}{\par\medskip\noindent\textbf{\textit{Caveat.}}\enskip\itshape}{\par\medskip} \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} \renewcommand{\cmdprint}[1]{\textup{\texttt{\string#1}}} @@ -1151,7 +1152,8 @@ it to use the new width for the margin par} \endshaded} - +%\renewcommand\theHfootnote{\thefootnote.\thesheetsequence} + \typeout{End memsty.sty} diff --git a/Master/texmf-dist/source/latex/memoir/memoir.dtx b/Master/texmf-dist/source/latex/memoir/memoir.dtx index 2fd0bb32a55..aefdd23d051 100644 --- a/Master/texmf-dist/source/latex/memoir/memoir.dtx +++ b/Master/texmf-dist/source/latex/memoir/memoir.dtx @@ -20,7 +20,7 @@ % This work consists of the files listed in the README file. % % \fi -% \CheckSum{31004} +% \CheckSum{31140} % % \changes{v0.1}{2001/05/20}{First public alpha release} % \changes{v0.2}{2001/06/03}{First beta release} @@ -117,6 +117,7 @@ % \changes{v3.7f}{2016/05/16}{Maintenance, luatex85 and booktabs update} % % \changes{v3.7h}{2018/12/12}{Maintenance, removing some emulated packages} +% \changes{v3.7i}{2019/11/15}{Maintenance, various edits} % % \def\dtxfile{memoir.dtx} % @@ -172,7 +173,8 @@ % \def\fileversion{v3.7e} \def\filedate{2015/07/08} % \def\fileversion{v3.7f} \def\filedate{2016/05/16} % \def\fileversion{v3.7g} \def\filedate{2018/04/04} -% \def\fileversion{v3.7h} \def\filedate{2018/12/12} ^^A remember to fix +% \def\fileversion{v3.7h} \def\filedate{2018/12/12} +% \def\fileversion{v3.7i} \def\filedate{2019/11/15} % \title{The LaTeX \Lpack{memoir} class for configurable book % typesetting: Source code\thanks{This % file (\texttt{\dtxfile}) has version number \fileversion, last revised @@ -403,11 +405,11 @@ % Announce the name, option files and version for LaTeX2e files: % \begin{macrocode} %<class>\ProvidesClass{memoir}% -%<class> [2018/12/12 v3.7h configurable book, report, article document class] +%<class> [2019/11/15 v3.7i configurable book, report, article document class] % \end{macrocode} % In the manual it is useful to know the current version. % \begin{macrocode} -%<class>\newcommand\memversion{v3.7h, 2018/12/12} +%<class>\newcommand\memversion{v3.7i, 2019/11/15} %<9pt>\ProvidesFile{mem9.clo}% %<9pt> [2008/01/30 v0.4 memoir class 9pt size option] %<10pt>\ProvidesFile{mem10.clo}% @@ -887,17 +889,43 @@ % \IfFileExists{#1}% % {\#2\@addtofilelist{#1}\@@input \@filef@und}} % \end{verbatim} +% and as of 2019/10/01: +% \begin{verbatim} +% \DeclareRobustCommand \InputIfFileExists[2]{% +% \IfFileExists{#1}% +% {\expandafter\@swaptwoargs\expandafter +% {\@filef@und}{#2\@addtofilelist{#1}\@@input}}} +% \end{verbatim} +% Just to make sure we still work on formats prior and after +% 2019/10/01 we `redefine' both % % \begin{macro}{\InputIfFileExists} % Effectively all file input is handled by this macro. Extend it % by adding pre- and post- input hooks. -% \begin{macrocode} +% +% \changes{3.7i}{2019/10/22}{Added latest kernel changes, special +% thanks to Phelype Oleinik} +% \begin{macrocode} +\ifcsname InputIfFileExists \endcsname% looking for an explicit space + % here aka the robust version + \DeclareRobustCommand \InputIfFileExists[2]{% + \IfFileExists{#1}% + {% + \expandafter\@swaptwoargs\expandafter + {\@filef@und\m@matendf{#1}\killm@matf{#1}}{% + #2\@addtofilelist{#1}\m@matbeginf{#1}\@@input% + }% + }% + } +\else + % Old definition \renewcommand{\InputIfFileExists}[2]{% \IfFileExists{#1}% {#2\@addtofilelist{#1}\m@matbeginf{#1}% \@@input \@filef@und \m@matendf{#1}% \killm@matf{#1}}} +\fi % \end{macrocode} % \end{macro} @@ -1128,112 +1156,143 @@ % % \subsection{Checking the processor} % -% Prior to 2008/07/22 the \Lpack{hyperref} package was modified in such a -% way as to produce warnings about versions of the \Lpack{ifpdf} and -% \Lpack{ifxetex} packages when \Lpack{hyperref} was used with versions -% v1.618033, -% v1.61803, or v1.618 mempatch v4.9 of the class. -% \Lpack{hyperref}'s author refused to -% make any changes to his package, insisting that emulating a package was -% `ugly hacking'. He did, though, provide an example code that could be -% added to memoir -% to use a package if it was available. I have used it for the emulations -% in this section. There will be no further changes to the class to accomodate -% any further changes to \Lpack{hyperref} --- it's easy for a package to -% determine what class is being used and make arrangements accordingly, -% especially as there are not all that many classes. There are hundreds -% of packages that might be used with a particular class and it would be -% senseless for a class to attempt to take account of everything that might -% be used with it. -% +% As of November 2019, we load the \Lpack{iftex} package in order to +% the the various processor tests. The package was updated in 2019 to +% cover the functionality of the \Lpack{ifpdf}, \Lpack{ifetex}, +% \Lpack{ifxetex} and \Lpack{ifluatex} packages. You can find details +% about its use in \cite{IFTEX}. +% \changes{v3.7i}{2019/11/11}{Changed +% ifX package loading to just loading the new \Lpack{iftex} +% package. At the request of the LaTeX Project Team.} +% \begin{macrocode} +\RequirePackage{iftex}[2019/11/07] +% \end{macrocode} +% The \Lpack{iftex} provides the following tests +% (and several more): +% \begin{macro}{\ifpdf} +% True if the output mode is PDF. Useful if for example you are +% working in an environment where you need to provide explicit code +% for the LaTeX+dvips route. +% \end{macro} +% \begin{macro}{\ifxetex} +% True if the XeTeX engine is being used. +% \end{macro} +% \begin{macro}{\ifluatex} +% True if the LuaTeX engine is being used. Useful if you want to add +% code that only apply under the LuaTeX based engines. +% \end{macro} +% +% +% +% ^^A % Prior to 2008/07/22 the \Lpack{hyperref} package was modified in such a +% ^^A % way as to produce warnings about versions of the \Lpack{ifpdf} and +% ^^A % \Lpack{ifxetex} packages when \Lpack{hyperref} was used with versions +% ^^A % v1.618033, +% ^^A % v1.61803, or v1.618 mempatch v4.9 of the class. +% ^^A % \Lpack{hyperref}'s author refused to +% ^^A % make any changes to his package, insisting that emulating a package was +% ^^A % `ugly hacking'. He did, though, provide an example code that could be +% ^^A % added to memoir +% ^^A % to use a package if it was available. I have used it for the emulations +% ^^A % in this section. There will be no further changes to the class to accomodate +% ^^A % any further changes to \Lpack{hyperref} --- it's easy for a package to +% ^^A % determine what class is being used and make arrangements accordingly, +% ^^A % especially as there are not all that many classes. There are hundreds +% ^^A % of packages that might be used with a particular class and it would be +% ^^A % senseless for a class to attempt to take account of everything that might +% ^^A % be used with it. +% ^^A % % ^^A % Note (2016/05/16): Due to recent changes in Luatex, most notably the % ^^A % removal of several \cs{pdf...} macro, several PDF tests fail with % ^^A % LuaLaTeX. As a temporary measure the following is used to restore % ^^A % the old functionality when a newer LuaLaTeX is used. Code courtesy % ^^A % of David Carlisle. At some point we will include some of this into % ^^A % the class. -% \changes{v3.7f}{2016/05/16}{Temp measure to make the class work with -% updated luatex} -% \changes{v3.7g}{2018/03/09}{\Lpack{luatex85} removed again, now -% relying on external \cs{if<engine>} packages and have rewritten the -% macros that use \cs{pdf...}} +% ^^A % \changes{v3.7f}{2016/05/16}{Temp measure to make the class work with +% ^^A % updated luatex} +% ^^A % \changes{v3.7g}{2018/03/09}{\Lpack{luatex85} removed again, now +% ^^A % relying on external \cs{if<engine>} packages and have rewritten the +% ^^A % macros that use \cs{pdf...}} +% ^^A % ^^A % \begin{macrocode} +% ^^A % ^^A \ifx\pdfextension\@undefined\else +% ^^A % ^^A \RequirePackage{luatex85} +% ^^A % ^^A \fi +% ^^A % ^^A +% ^^A % ^^A % \end{macrocode} +% ^^A % +% ^^A % +% ^^A % \begin{macro}{\ifpdf} +% ^^A % This can be used to check whether or not a document is being processed +% ^^A % by \LaTeX{} or pdf\LaTeX. We will simply require the \Lpack{ifpdf} package. +% ^^A % \changes{v1.0}{2001/09/21}{Made checking of \cs{pdfouput} more robust} +% ^^A % \changes{v1.618}{2005/09/03}{Prohibit loading the ifpdf package (mempatch v3.9)} +% ^^A % \changes{v1.618033}{2008/06/02}{Further improved pdf checking} +% ^^A % \changes{v1.6180339}{2008/07/23}{Use ifpdf package if available} +% ^^A % \changes{v1.61803398d}{2009/12/01}{if \cs{ifpdf} is already +% ^^A % defined, e.g. using \cs{RequirePackage} before \cs{documentclass}, +% ^^A % then using \cs{newif}\cs{ifpdf} will cause TeX to eat up a lot of +% ^^A % code. We fix this using a hint by Will Robertson.} +% ^^A % \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be +% ^^A % emulating \cs{if}\meta{engine} packages, you'll get an error if you +% ^^A % do not have them} % ^^A % \begin{macrocode} -% ^^A \ifx\pdfextension\@undefined\else -% ^^A \RequirePackage{luatex85} -% ^^A \fi -% ^^A +% ^^A % \RequirePackage{ifpdf}[2017/03/15] % ^^A % \end{macrocode} -% +% ^^A % \end{macro} +% ^^A % +% ^^A % \begin{macro}{\ifetex} +% ^^A % Check if \texttt{etex} is being used. We will simply require the \Lpack{ifetex} package. +% ^^A % \changes{v1.61803}{2008/01/30}{Added check for etex (mempatch v4.9)} +% ^^A % \changes{v1.618033}{2008/06/02}{Improved check for etex} +% ^^A % \changes{v1.6180339}{2008/07/23}{Use an ifetex package if available} +% ^^A % \changes{v1.6180339c}{2008/12/27}{Changed ifetex message from Warning to Info} +% ^^A % \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be +% ^^A % emulating \cs{if}\meta{engine} packages, you'll get an error if you +% ^^A % do not have them} +% ^^A % \begin{macrocode} +% ^^A % \RequirePackage{ifetex} +% ^^A % \end{macrocode} +% ^^A % \end{macro} +% ^^A % Having supplied an \cs{ifpdf} to check if pdfLaTeX is being used, +% ^^A % here's one for XeTeX. +% ^^A % +% ^^A % \begin{macro}{\ifxetex} +% ^^A % Checks if XeTeX is being used. We will simply require the \Lpack{ifxetex} package. +% ^^A % \changes{v1.61803}{2008/01/30}{Added checks for XeTeX (mempatch v4.9)} +% ^^A % \changes{v1.6180339}{2008/07/23}{Use ifxetex package if available} +% ^^A % \changes{v1.61803398d}{2009/12/01}{if \cs{ifxetex} is already +% ^^A % defined, e.g. using \cs{RequirePackage} before \cs{documentclass}, +% ^^A % then using \cs{newif}\cs{ifxetex} will cause TeX to eat up a lot of +% ^^A % code. We fix this using a hint by Will Robertson.} +% ^^A % \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be +% ^^A % emulating \cs{if}\meta{engine} packages, you'll get an error if you +% ^^A % do not have them} +% ^^A % \begin{macrocode} +% ^^A % \RequirePackage{ifxetex}[2010/09/12] +% ^^A % \end{macrocode} +% ^^A % \end{macro} +% ^^A % +% ^^A % \begin{macro}{\ifluatex} +% ^^A % Check if \texttt{luatex} is being used. We will simply require the \Lpack{ifluatex} package. +% ^^A % \changes{v1.61803}{2008/01/30}{Added check for luatex} +% ^^A % \changes{v1.6180339}{2008/07/23}{Use an ifluatex package if available} +% ^^A % \changes{v1.6180339c}{2008/12/31}{It seems that Heiko Oberdiek has created an +% ^^A % ifluatex package.} +% ^^A % \changes{v1.61803398d}{2009/12/01}{if \cs{ifluatex} is already +% ^^A % defined, e.g. using \cs{RequirePackage} before \cs{documentclass}, +% ^^A % then using \cs{newif}\cs{ifluatex} will cause TeX to eat up a lot of +% ^^A % code. We fix this using a hint by Will Robertson.} +% ^^A % \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be +% ^^A % emulating \cs{if}\meta{engine} packages, you'll get an error if you +% ^^A % do not have them} +% ^^A % \begin{macrocode} +% ^^A % \RequirePackage{ifluatex}[2016/05/16] +% ^^A % +% ^^A % \end{macrocode} +% ^^A % \end{macro} +% ^^A % % -% \begin{macro}{\ifpdf} -% This can be used to check whether or not a document is being processed -% by \LaTeX{} or pdf\LaTeX. We will simply require the \Lpack{ifpdf} package. -% \changes{v1.0}{2001/09/21}{Made checking of \cs{pdfouput} more robust} -% \changes{v1.618}{2005/09/03}{Prohibit loading the ifpdf package (mempatch v3.9)} -% \changes{v1.618033}{2008/06/02}{Further improved pdf checking} -% \changes{v1.6180339}{2008/07/23}{Use ifpdf package if available} -% \changes{v1.61803398d}{2009/12/01}{if \cs{ifpdf} is already -% defined, e.g. using \cs{RequirePackage} before \cs{documentclass}, -% then using \cs{newif}\cs{ifpdf} will cause TeX to eat up a lot of -% code. We fix this using a hint by Will Robertson.} -% \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be -% emulating \cs{if}\meta{engine} packages, you'll get an error if you -% do not have them} -% \begin{macrocode} -\RequirePackage{ifpdf}[2017/03/15] -% \end{macrocode} -% \end{macro} % -% \begin{macro}{\ifetex} -% Check if \texttt{etex} is being used. We will simply require the \Lpack{ifetex} package. -% \changes{v1.61803}{2008/01/30}{Added check for etex (mempatch v4.9)} -% \changes{v1.618033}{2008/06/02}{Improved check for etex} -% \changes{v1.6180339}{2008/07/23}{Use an ifetex package if available} -% \changes{v1.6180339c}{2008/12/27}{Changed ifetex message from Warning to Info} -% \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be -% emulating \cs{if}\meta{engine} packages, you'll get an error if you -% do not have them} -% \begin{macrocode} -\RequirePackage{ifetex} -% \end{macrocode} -% \end{macro} -% Having supplied an \cs{ifpdf} to check if pdfLaTeX is being used, -% here's one for XeTeX. -% -% \begin{macro}{\ifxetex} -% Checks if XeTeX is being used. We will simply require the \Lpack{ifxetex} package. -% \changes{v1.61803}{2008/01/30}{Added checks for XeTeX (mempatch v4.9)} -% \changes{v1.6180339}{2008/07/23}{Use ifxetex package if available} -% \changes{v1.61803398d}{2009/12/01}{if \cs{ifxetex} is already -% defined, e.g. using \cs{RequirePackage} before \cs{documentclass}, -% then using \cs{newif}\cs{ifxetex} will cause TeX to eat up a lot of -% code. We fix this using a hint by Will Robertson.} -% \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be -% emulating \cs{if}\meta{engine} packages, you'll get an error if you -% do not have them} -% \begin{macrocode} -\RequirePackage{ifxetex}[2010/09/12] -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\ifluatex} -% Check if \texttt{luatex} is being used. We will simply require the \Lpack{ifluatex} package. -% \changes{v1.61803}{2008/01/30}{Added check for luatex} -% \changes{v1.6180339}{2008/07/23}{Use an ifluatex package if available} -% \changes{v1.6180339c}{2008/12/31}{It seems that Heiko Oberdiek has created an -% ifluatex package.} -% \changes{v1.61803398d}{2009/12/01}{if \cs{ifluatex} is already -% defined, e.g. using \cs{RequirePackage} before \cs{documentclass}, -% then using \cs{newif}\cs{ifluatex} will cause TeX to eat up a lot of -% code. We fix this using a hint by Will Robertson.} -% \changes{v3.7g}{2018/03/08}{As of 2018, we will no longer be -% emulating \cs{if}\meta{engine} packages, you'll get an error if you -% do not have them} -% \begin{macrocode} -\RequirePackage{ifluatex}[2016/05/16] - -% \end{macrocode} -% \end{macro} % % \subsection{Extending an existing macro} % @@ -1776,9 +1835,11 @@ % \begin{macro}{\stockaiv} % \begin{macro}{\stockav} % \begin{macro}{\stockavi} -% The A series, A0 --- A6. +% \begin{macro}{\stockavii} +% The A series, A0 --- A7. % \changes{v1.6180339c}{2008/12/26}{Extended the A and B stock/paper size -% seies with A/B0 through A/B2} +% seies with A/B0 through A/B6} +% \changes{v3.7i}{2019/11/04}{Added A7 stock} % \begin{macrocode} \newcommand*{\stockao} {\stockheight=1189mm \stockwidth=841mm} \newcommand*{\stockai} {\stockheight=841mm \stockwidth=594mm} @@ -1787,6 +1848,7 @@ \newcommand*{\stockaiv} {\stockheight=297mm \stockwidth=210mm} \newcommand*{\stockav} {\stockheight=210mm \stockwidth=148mm} \newcommand*{\stockavi} {\stockheight=148mm \stockwidth=105mm} +\newcommand*{\stockavii}{\stockheight=105mm \stockwidth=74mm} % \end{macrocode} % \end{macro} @@ -1796,6 +1858,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\stockbo} % \begin{macro}{\stockbi} @@ -1804,7 +1867,9 @@ % \begin{macro}{\stockbiv} % \begin{macro}{\stockbv} % \begin{macro}{\stockbvi} -% The B series, B0 --- B6. +% \begin{macro}{\stockbvii} +% The B series, B0 --- B7. +% \changes{v3.7i}{2019/11/04}{added B7 stock} % \begin{macrocode} \newcommand*{\stockbo} {\stockheight=1414mm \stockwidth=1000mm} \newcommand*{\stockbi} {\stockheight=1000mm \stockwidth=707mm} @@ -1813,6 +1878,7 @@ \newcommand*{\stockbiv} {\stockheight=353mm \stockwidth=250mm} \newcommand*{\stockbv} {\stockheight=250mm \stockwidth=176mm} \newcommand*{\stockbvi} {\stockheight=176mm \stockwidth=125mm} +\newcommand*{\stockbvii}{\stockheight=125mm \stockwidth=88mm} % \end{macrocode} % \end{macro} @@ -1822,6 +1888,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % It will be useful also to provide macros that set the page sizes. % @@ -1929,7 +1996,9 @@ % \begin{macro}{\pageaiv} % \begin{macro}{\pageav} % \begin{macro}{\pageavi} -% The A series, A0 --- A6. +% \begin{macro}{\pageavii} +% The A series, A0 --- A7. +% \changes{v3.7i}{2019/11/04}{added A7 paper} % \begin{macrocode} \newcommand*{\pageao} {\paperheight=1189mm \paperwidth=841mm} \newcommand*{\pageai} {\paperheight=841mm \paperwidth=594mm} @@ -1938,6 +2007,7 @@ \newcommand*{\pageaiv} {\paperheight=297mm \paperwidth=210mm} \newcommand*{\pageav} {\paperheight=210mm \paperwidth=148mm} \newcommand*{\pageavi} {\paperheight=148mm \paperwidth=105mm} +\newcommand*{\pageavii}{\paperheight=105mm \paperwidth=74mm} % \end{macrocode} % \end{macro} @@ -1947,6 +2017,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\pagebo} % \begin{macro}{\pagebi} @@ -1955,7 +2026,9 @@ % \begin{macro}{\pagebiv} % \begin{macro}{\pagebv} % \begin{macro}{\pagebvi} -% The B series, B0 --- B6. +% \begin{macro}{\pagebvii} +% The B series, B0 --- B7. +% \changes{v3.7i}{2019/11/04}{Added B7 paper} % \begin{macrocode} \newcommand*{\pagebo} {\paperheight=1414mm \paperwidth=1000mm} \newcommand*{\pagebi} {\paperheight=1000mm \paperwidth=707mm} @@ -1964,6 +2037,7 @@ \newcommand*{\pagebiv} {\paperheight=353mm \paperwidth=250mm} \newcommand*{\pagebv} {\paperheight=250mm \paperwidth=176mm} \newcommand*{\pagebvi} {\paperheight=176mm \paperwidth=125mm} +\newcommand*{\pagebvii}{\paperheight=125mm \paperwidth=88mm} % \end{macrocode} % \end{macro} @@ -1973,12 +2047,14 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % Declare the stock size options. % % Metric paper stock sizes. % \changes{v1.6180339c}{2008/12/26}{Extended class options to include stock % sizes A0, A1, A2, B0, B1 and B2} +% \changes{v3.7i}{2019/11/04}{Added a7paper and b7paper options} % \begin{macrocode} \DeclareOption{a0paper}{\stockao} \DeclareOption{a1paper}{\stockai} @@ -1987,6 +2063,7 @@ \DeclareOption{a4paper}{\stockaiv} \DeclareOption{a5paper}{\stockav} \DeclareOption{a6paper}{\stockavi} +\DeclareOption{a7paper}{\stockavii} \DeclareOption{b0paper}{\stockbo} \DeclareOption{b1paper}{\stockbi} \DeclareOption{b2paper}{\stockbii} @@ -1994,6 +2071,7 @@ \DeclareOption{b4paper}{\stockbiv} \DeclareOption{b5paper}{\stockbv} \DeclareOption{b6paper}{\stockbvi} +\DeclareOption{b7paper}{\stockbvii} \DeclareOption{mcrownvopaper}{\stockmcrownvo} \DeclareOption{mlargecrownvopaper}{\stockmlargecrownvo} \DeclareOption{mdemyvopaper}{\stockmdemyvo} @@ -6531,30 +6609,65 @@ % \cs{createmark}\marg{division}\marg{marks}\marg{show}\marg{prefix}\marg{postfix} % creates a \cs{divisionmark} with \meta{marks} (= \texttt{left}, \texttt{both} % or \texttt{right}) controlling which marks are set, -% \meta{show} (= \texttt{shownumber} or \texttt{nonumber}) controls the +% \meta{show} (= \texttt{shownumber}, \texttt{nonumber} or \texttt{notitle}) controls the % display of the divison number in \cs{mainmatter}, \meta{prefix} is text % before the number and \meta{postfix} is text after the number. % \begin{macrocode} \newcommand\createmark[5]{% % \end{macrocode} -% Handle \texttt{(show/no)number}, fails to \texttt{shownumber}. +% Handle \texttt{(show/no)number/notitle}. +% \changes{v3.7i}{2019/11/07}{Added notitle show option and +% reimplemented its checking a bit} % \begin{macrocode} - \def\@tempa{00} + % \def\@tempa{00} + % \nametest{#3}{nonumber}% + % \ifsamename + % \def\@tempa{01}% + % \else + % \nametest{#3}{shownumber} + % \ifsamename\else + % \@memerror{Unknown numbering value `#3' for #1mark}% + % {I expected `shownumber' or `nonumber'.\MessageBreak + % I will assume you meant `shownumber'}% + % \fi + % \fi + % \expandafter\if\@tempa% compares the two \@tempa digits + % \@namedef{#1marksn}##1{##1}% + % \else + % \@namedef{#1marksn}{\@gobble}% + % \fi + \def\@tempa{1} \nametest{#3}{nonumber}% \ifsamename - \def\@tempa{01}% + \def\@tempa{0} \else \nametest{#3}{shownumber} - \ifsamename\else - \@memerror{Unknown numbering value `#3' for #1mark}% - {I expected `shownumber' or `nonumber'.\MessageBreak - I will assume you meant `shownumber'}% + \ifsamename + \def\@tempa{1} + \else + \nametest{#3}{notitle} + \ifsamename + \def\@tempa{2} + \else + \@memerror{Unknown numbering value `#3' for + #1mark,\MessageBreak + please use one of 'shownumber', 'nonumber' or 'notitle'}% + {I expected `shownumber', `nonumber' or 'notitle'.\MessageBreak + I will assume you meant `shownumber'}% + \fi \fi \fi - \expandafter\if\@tempa% compares the two \@tempa digits - \@namedef{#1marksn}##1{##1}% - \else + \@namedef{#1markst}##1{##1} + \ifcase\@tempa\relax + % nonumber \@namedef{#1marksn}{\@gobble}% + \or % 1 + % shownumber + \@namedef{#1marksn}##1{##1} + \or % 2, 2 implies shownumber + % shownumber + \@namedef{#1marksn}##1{##1} + \@namedef{#1markst}{\@gobble} \fi % \end{macrocode} % The three \meta{marks} cases, \texttt{left}, \texttt{both} and @@ -6573,7 +6686,14 @@ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi \fi - ##1}}{}}% +% \end{macrocode} +% \changes{v3.7i}{2019/11/07}{Added macro to get rid of the title if needed} +% \begin{macrocode} + \@nameuse{#1markst}{##1}% + }% + }% + {}% just left + }% \else \nametest{#2}{right} \ifsamename @@ -6587,7 +6707,13 @@ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi% \fi% - ##1}}}% +% \end{macrocode} +% \changes{v3.7i}{2019/11/07}{Added macro to get rid of the title if needed} +% \begin{macrocode} + \@nameuse{#1markst}{##1}% + }% + }% + }% \else \nametest{#2}{both}% \ifsamename\else @@ -6606,16 +6732,28 @@ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi \fi - ##1}}{% +% \end{macrocode} +% \changes{v3.7i}{2019/11/07}{Added macro to get rid of the title if needed} +% \begin{macrocode} + \@nameuse{#1markst}{##1}% + }% + }{% \memUChead{% \ifnum \c@secnumdepth > \c@@memmarkcntra \if@mainmatter \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi \fi - ##1}}}% +% \end{macrocode} +% \changes{v3.7i}{2019/11/07}{Added macro to get rid of the title if needed} +% \begin{macrocode} + \@nameuse{#1markst}{##1}% + }% + }% + }% \fi - \fi} + \fi +} % \end{macrocode} % \end{macro} @@ -18196,8 +18334,16 @@ \else\ifx\hline\LT@hline \let\@BTswitch\@BLTrule \else - \let\@BTswitch\@BTnormal - \fi\fi +% \end{macrocode} +% \changes{v3.7i}{2019/10/21}{Added this extra if construction to +% bring the class back into line with the latest booktabs changes, now +% matching booktabs v1.6180339} +% \begin{macrocode} + \ifx\xltabular\undefined + \let\@BTswitch\@BTnormal + \else + \let\@BTswitch\@BLTrule + \fi\fi\fi % \end{macrocode} % On with the code % \begin{macrocode} @@ -20480,8 +20626,12 @@ % \begin{macro}{\subcaption} % \cs{subcaption}\oarg{list-entry}\marg{caption} is a generic % subcaption. There is no \Lpack{subfigure} equivalent. +% +% \changes{v3.7i}{2019/10/24}{Added a \cs{par} to the start. This can +% get rid of sporadic spaces caused by hyperref changing \cs{refstepcounter}} % \begin{macrocode} \newcommand{\subcaption}{% + \par \bgroup \let\label=\memsub@label \ifdonemaincaption\else @@ -20562,7 +20712,15 @@ % \end{macrocode} % \end{environment} % -% +% \begin{macro}{\mem@step@subcounter} +% \changes{v3.7i}{2019/10/24}{Added} +% Utility macro to save some typing. +% \begin{macrocode} +\newcommand\mem@step@subcounter{% + \refstepcounter{sub\@captype}\@contkeep% +} +% \end{macrocode} +% \end{macro} % % \begin{macro}{\subbottom} % \begin{macro}{\@memsubbody} @@ -20580,7 +20738,14 @@ \ifdonemaincaption\else \advance\csname c@\@captype\endcsname\@ne \fi - \refstepcounter{sub\@captype}\@contkeep% +% \end{macrocode} +% To help with hyperref target placement (hyperref usually uses +% \cs{refstepcounter} to make the anchors) we move the counter +% business into \cs{@memsubfloat} instead. This way they come right at +% the top. +% \begin{macrocode} +% \changes{v3.7i}{2019/10/24}{Moved \cs{refstepcounter}} + % \refstepcounter{sub\@captype}\@contkeep% \leavevmode \@ifnextchar [% {\@memsubfig}% @@ -20602,7 +20767,13 @@ \bgroup \let\label=\memsub@label \@contset - \refstepcounter{sub\@captype}\@contkeep% +% To help with hyperref target placement (hyperref usually uses +% \cs{refstepcounter} to make the anchors) we move the counter +% business into \cs{@memsubfloat} instead. This way they come right at +% the top. +% \begin{macrocode} +% \changes{v3.7i}{2019/10/24}{Moved \cs{refstepcounter}} + % \refstepcounter{sub\@captype}\@contkeep% \leavevmode \@ifnextchar [% {\@memsubfig}% @@ -20671,7 +20842,15 @@ \fi \setbox\@tempboxa \hbox{#4}% \@tempdima=\wd\@tempboxa - \vtop\bgroup +% \end{macrocode} +% We move the refstep business here to help \Lpack{hyperref} get +% better anchors. +% \changes{v3.7i}{2019/10/24}{moved counter stepping, additionally +% changed \cs{vtop} to \cs{vbox}, otherwise we align the images at the +% top} +% \begin{macrocode} + \vbox\bgroup% + \mem@step@subcounter% \vbox\bgroup \ifcase\@tempcnta \@minipagefalse @@ -22573,8 +22752,13 @@ % and \cs{@plainZ}, to reduce code we now only use one, the argument % of it takes care of differentiating between the stuff that are % different. Two hooks is added just before and after importing the -% list file contents. +% list file contents. Additionally we have added a hook before the +% title is being executed, it comes after \cs{phantomsection} but +% before any \cs{addcontentsline} % \changes{v1.61803398d}{2010/02/14}{added the before and after hooks} +% \changes{v3.7i}{2019/10/25}{moved the @\#2maketitle until after the +% \cs{addcontentsline}, that way the hyperref anchor is above the +% title, not below it. } % \begin{macrocode} \@namedef{cft#2beforelisthook}{}% \@namedef{cft#2afterlisthook}{}% @@ -22582,13 +22766,13 @@ \ensureonecol \par \begingroup - \@nameuse{@#2maketitle} + \phantomsection \if##1 \ifmem@em@starred@listof\else - \phantomsection \addcontentsline{toc}{chapter}{#3} \fi \fi + \@nameuse{@#2maketitle} \parskip\cftparskip \@nameuse{cft#2beforelisthook}% \@starttoc{#2}% @@ -24762,12 +24946,14 @@ % \changes{v1.618}{2005/09/02}{Made \cs{@@@wrindexm@m} obey \cs{nofiles}} % \changes{v1.618}{2005/09/25}{\cs{@@@wrindexm@m} now reads the aux % file at the end of the document} +% \changes{v3.7i}{2019/11/15}{Changed the writing to protected} % \begin{macrocode} \newcommand{\@@@wrindexm@m}[2]{\endgroup} \AtBeginDocument{% \def\@@@wrindexm@m#1#2{% \if@filesw - \immediate\write \@idxfile{\string\indexentry{#1}{#2}}% + %\immediate\write \@idxfile{\string\indexentry{#1}{#2}}% + \immediate@protected@write\@idxfile{}{\string\indexentry{#1}{#2}}% \fi \endgroup}% } @@ -27206,7 +27392,11 @@ \m@makefootfootmark{#1}% -> \footfootmark#1 \m@makemakefootmark{#1}% -> \makefootmark#1 \m@makefootmarkstyle{#1}% -> \footmarkstyle#1 - \@namedef{@makefntext#1}##1{\@nameuse{makefootmark#1} ##1}% +% \end{macrocode} +% \changes{3.7i}{2019/05/24}{@makefntext\#1 should of course be +% long. Reported on TSE by meide, https://tex.stackexchange.com/q/491303/3929} +% \begin{macrocode} + \@namelongdef{@makefntext#1}##1{\@nameuse{makefootmark#1} ##1}% \m@make@footstart{#1}% -> \@footstart#1 \m@make@footgroup{#1}% -> \@footgroup#1 \expandafter\newinsert\csname @mpfootins#1\endcsname% -> \@mpfootins#1 @@ -29411,15 +29601,20 @@ % \begin{macro}{\immediate@protected@write} % We might have to do some immediate writes. This is an immediate % version of the kernel \cs{protected@write}. +% \changes{v3.7i}{2019/11/15}{changed to \cs{providecommand} and +% removed the \cs{if@nobreak} line, also removed the edef part, +% suggested by Davis Carlisle} % \begin{macrocode} -\newcommand{\immediate@protected@write}[3]{% +\providecommand{\immediate@protected@write}[3]{% \begingroup #2% \let\protect\@unexpandable@protect - \edef\reserved@a{\immediate\write#1{#3}}% - \reserved@a + %\edef\reserved@a{\immediate\write#1{#3}}% + %\reserved@a + \immediate\write#1{#3}% \endgroup - \if@nobreak\ifvmode\nobreak\fi\fi} + %\if@nobreak\ifvmode\nobreak\fi\fi% +} % \end{macrocode} % \end{macro} @@ -29433,11 +29628,16 @@ % beast, \cs{immediate@protected@write} can write it to disk, but % \cs{m@m@pnwrite} cannot. To get past this we also include a version % that has an embedded \cs{detokenize} (thanks to Heiko Oberdiek for -% that hint). +% that hint). We also add a \% at the end of the \cs{m@m@pnwrited} +% process (don't think \cs{m@m@pnwrite} needs it). This is handy in +% those cases where the user is using a design which rely on there not +% being any spaces after the note text. % \changes{v3.6k}{2011/04/06}{Added the version with \cs{detokenize}} % \begin{macrocode} +% \changes{v3.7i}{2019/06/07}{Added \cs{@percentchar} to +% \cs{m@m@pnwrited}} \newcommand{\m@m@pnwrite}[3]{\immediate\write#1{#3}} -\newcommand{\m@m@pnwrited}[3]{\immediate\write#1{\detokenize{#3}}} +\newcommand{\m@m@pnwrited}[3]{\immediate\write#1{\detokenize{#3}\@percentchar}} % \end{macrocode} % \end{macro} @@ -29540,7 +29740,12 @@ \m@mmf@prepare% rerun \fi% \mem@pn@multiple@marker{\notenumintext{\thepagenote}}% - }{}% +% \end{macrocode} +% \changes{3.7i}{2019/05/28}{Added the special kern also if the +% optional arg is empty. Otherwise the multiple marker might not work +% under hyperref. Reported in private email} +% \begin{macrocode} + }{\m@mmf@prepare}% \fi% % \end{macrocode} % Check if this is the first note in a division, and if so indicate this @@ -35522,7 +35727,9 @@ % % \subsection{Text case} % \changes{v3.6k}{2012/09/13}{Included a copy of the \texttt{textcase} -% package.} +% package.} +% +% \changes{3.7i}{2019/10/22}{Made textcase into a required package instead} % % Since, say, \cs{MakeUppercase} does too much, i.e.\ also upper case % math and arguments to, say, \cs{ref}, we provide a version that does @@ -35532,6 +35739,27 @@ % package as have been emulated. Loading \texttt{textcase} just % overwrites the macros if they exist. % +% As of October 2019, we will instead load the \texttt{textcase} +% package if found. If not we resort to the old version we had +% embedded. +% +% +% \begin{macrocode} +\expandafter\let\csname MemOrigMakeUppercase \expandafter\endcsname + \csname MakeUppercase \endcsname +\expandafter\let\csname MemOrigMakeLowercase \expandafter\endcsname + \csname MakeLowercase \endcsname +\def\MemRestoreOrigMakecase{ + \expandafter\let\csname MakeUppercase \expandafter\endcsname + \csname MemOrigMakeUppercase \endcsname + \expandafter\let\csname MakeLowercase \expandafter\endcsname + \csname MemOrigMakeLowercase \endcsname +} +\IfFileExists{textcase.sty}{ + \RequirePackage[overload]{textcase} + }{% resort to the +% \end{macrocode} +% % \MakeShortVerb{\|} % \begin{macrocode} %%%% Nearly a carbon copy from textcase.dtx by David Carlisle @@ -35698,6 +35926,9 @@ % \end{macrocode} % \DeleteShortVerb{\|} % +% \begin{macrocode} +} % end of \IfFileExists +% \end{macrocode} % % \section{Initialization} \label{sec:init} % @@ -35833,22 +36064,7 @@ % \end{macrocode} % \end{macro} % -% \subsection{The page style and counters} -% We use the page style \pstyle{headings} by -% default and arabic page numbering. But if the \verb?article? -% class option is in effect, we will use the \pstyle{plain} style -% which is the default in the \verb?article? class. -% \changes{v3.6d}{2010/05/13}{When emulating the article class the -% plain page style should used instead of headings} -% \begin{macrocode} -\ifartopt -\pagestyle{plain} -\else -\pagestyle{headings} -\fi -\pagenumbering{arabic} - -% \end{macrocode} +% \subsection{Some counters} % We set the sectional counters to zero, the \verb?tocdepth? to % one (sections and above listed), the \verb?secnumdepth? to % two (sections and above numbered), and \cs{maxsecnumdepth} to @@ -36214,17 +36430,20 @@ % \begin{macro}{\@caption} % \changes{v1.61803}{2008/01/30}{Killed memoir's captioning when the caption % package is used (mempatch v4.9).} -% \changes{v3.6k}{2012/05/04}{Changed the warning text to be more informative.} +% \changes{v3.6k}{2012/05/04}{Changed the warning text to be more +% informative.} +% \changes{v3.7i}{2018/12/19}{Users still get spooked by the warning, +% tried to rewrite it in a better manner} % \begin{macrocode} %%% revert changes to captioning macros if the caption package is used. \AtBeginPackage{caption}{ \ClassWarningNoLine{memoir}{% - You are using the caption package with the memoir class. - To prepare we will now reset all captioning macros and - configurations to kernel defaults, and then let the - caption package take over. Please remember to use^^J - the caption package interfaces in order to^^J - configure your captions} + For the caption package to function properly with memoir, + we will now reset\string\caption\space and friends to + kernel defaults and then let the caption package take over. + Remember: all caption configuration now goves via the caption + package interface, not the interface from the memoir class. + } \long\def\@makecaption##1##2{% \vskip\abovecaptionskip @@ -36291,6 +36510,36 @@ % \end{macrocode} % +% +% +% +% \subsection{Default page style} +% We use the page style \pstyle{headings} by +% default and arabic page numbering. But if the \verb?article? +% class option is in effect, we will use the \pstyle{plain} style +% which is the default in the \verb?article? class. +% \changes{v3.6d}{2010/05/13}{When emulating the article class the +% plain page style should used instead of headings} +% \changes{v3.7i}{2019/01/07}{Moved here because +% \cs{newlistof}{...}{X}{...} also defines \cs{Xmark}, but using +% \cs{markboth}, and thus if \Lopt{oneside} is active \cs{lofmark} +% will still be using \cs{mathboth} and not \cs{markright} that the +% \pstyle{headings} style dictates} +% \begin{macrocode} +\ifartopt +\pagestyle{plain} +\else +\pagestyle{headings} +\fi +\pagenumbering{arabic} + +% \end{macrocode} + + + + + + % ^^A\subsection{Patch file} % ^^A % ^^A At the suggestion of Danie Els (\texttt{DanieEls@sun.ac.za}), Dan Leucking @@ -36425,10 +36674,10 @@ keyword "\\glossaryentry" % \newblock (Available from CTAN in % \texttt{/macros/latex/required/tools}) % -% \bibitem[Car04]{TEXTCASE} +% \bibitem[Car19]{TEXTCASE} % David Carlisle. % \newblock \emph{The \Lpack{textcase} package}. -% \newblock October, 2004. +% \newblock September, 2019. % \newblock (Available from CTAN in % \texttt{/macros/latex/contrib/textcase}) % @@ -36517,6 +36766,12 @@ keyword "\\glossaryentry" % \newblock (Available from CTAN as % \texttt{/macros/latex/base/classes.dtx}) % +% \bibitem[LPT19]{IFTEX} +% The \LaTeX{} Project Team. +% \newblock \emph{The iftex package}. +% \newblock November, 2019. +% \newblock (Available from CTAN in \texttt{/macros/latex/contrib/iftex}) +% % \bibitem[MC98]{ARRAY} % Frank Mittelbach and David Carlisle. % \newblock \emph{A new implementation of LaTeX's tabular and array diff --git a/Master/texmf-dist/source/latex/memoir/memoir.ins b/Master/texmf-dist/source/latex/memoir/memoir.ins index 39ae4a93ae3..9ab38716105 100644 --- a/Master/texmf-dist/source/latex/memoir/memoir.ins +++ b/Master/texmf-dist/source/latex/memoir/memoir.ins @@ -85,8 +85,8 @@ \Msg{***********************************************************} \Msg{*} \Msg{* To finish the installation you have to move the following} -\Msg{* files into a directory searched by LaTeX. See the FAQ on} -\Msg{* CTAN at /help/uk-tex-faq for more on this.} +\Msg{* files into a directory searched by LaTeX. See the FAQ} +\Msg{* at https://texfaq.org/ for more on this.} \Msg{*} \Msg{* \space\space memoir.cls} \Msg{* \space\space mem9.clo} diff --git a/Master/texmf-dist/source/latex/memoir/mempatch.dtx b/Master/texmf-dist/source/latex/memoir/mempatch.dtx index 23423d346e5..eeb291600c9 100644 --- a/Master/texmf-dist/source/latex/memoir/mempatch.dtx +++ b/Master/texmf-dist/source/latex/memoir/mempatch.dtx @@ -20,7 +20,7 @@ % % % \fi -% \CheckSum{614} +% \CheckSum{634} % % \def\dtxfile{\texttt{mempatch.dtx}} % \def\fileversion{v1.0} \def\filedate{2003/10/04} @@ -309,6 +309,7 @@ %% With thanks to Heiko Oberdiek, if you use hyperref dated 2006/11/15 %% or later, memhfixc will be automatically loaded after hyperref. %% +%% Version 1.18 2019/10/24 %% Version 1.17 2013/05/30 %% Version 1.16 2013/05/16 %% Version 1.15 2010/08/17 @@ -332,7 +333,7 @@ % % % \begin{macrocode} -\ProvidesPackage{memhfixc}[2013/05/30 v1.17 nameref/hyperref package fixes for memoir class] +\ProvidesPackage{memhfixc}[2019/10/24 v1.18 nameref/hyperref package fixes for memoir class] % \end{macrocode} % % \begin{macro}{\M@hfixcfinish} @@ -721,8 +722,12 @@ % % \begin{macro}{\contcaption} % Tweak the \cs{contcaption} macro. +% +% \changes{v1.18}{2019/10/24}{Added a \cs{par} to get rid of a +% sporadic space comming from \cs{refstepcounter} under hyperref} % \begin{macrocode} \renewcommand{\contcaption}{% + \par% \refstepcounter{memhycontfloat}% \addtocounter{\@captype}{\m@ne}\H@refstepcounter{\@captype}% \@contcaption\@captype} @@ -908,6 +913,31 @@ % \end{macrocode} % +% +% \subsection{Patch after \Lpack{hypcap}} +% +% The \Lpack{hypcap} package can help with some hyperref anchor placement in +% figure refences. But it also requires every figure or table to have +% a caption, thus it does not understand our \cmd{\contcaption} command. +% +% \changes{v3.7i}{2019/10/26}{added patch for \cmd{\contcaption} when +% \Lpack{hypcap} is loaded} +% \begin{macrocode} +\AtEndPackage{hypcap}{% + \long\def\@@contcaption##1##2{% + \par + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \global\@capstartfalse% added + \normalsize + \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##2}\par + \endgroup} +} +% \end{macrocode} +% % The end of the \Lpack{hyperref} related patches. % % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/memoir/mempatch.ins b/Master/texmf-dist/source/latex/memoir/mempatch.ins index 715c0cfc518..39c858e3d78 100644 --- a/Master/texmf-dist/source/latex/memoir/mempatch.ins +++ b/Master/texmf-dist/source/latex/memoir/mempatch.ins @@ -64,8 +64,8 @@ \Msg{***********************************************************} \Msg{*} \Msg{* To finish the installation you have to move the following} -\Msg{* files into a directory searched by LaTeX. See the FAQ on} -\Msg{* CTAN at /help/uk-tex-faq for more on this.} +\Msg{* files into a directory searched by LaTeX. See the FAQ} +\Msg{* at https://texfaq.org/ for more on this.} \Msg{*} \Msg{* \space\space memhfixc.sty} %\Msg{* \space\space mempatch.sty} diff --git a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty index bb898d7d9ea..e4e37f64f63 100644 --- a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty +++ b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty @@ -41,6 +41,7 @@ %% With thanks to Heiko Oberdiek, if you use hyperref dated 2006/11/15 %% or later, memhfixc will be automatically loaded after hyperref. %% +%% Version 1.18 2019/10/24 %% Version 1.17 2013/05/30 %% Version 1.16 2013/05/16 %% Version 1.15 2010/08/17 @@ -60,7 +61,7 @@ %% Version 1.1 2003/01/22 %% Version 1.0 2002/10/22 %% -\ProvidesPackage{memhfixc}[2013/05/30 v1.17 nameref/hyperref package fixes for memoir class] +\ProvidesPackage{memhfixc}[2019/10/24 v1.18 nameref/hyperref package fixes for memoir class] \let\M@hfixcfinish\relax \@ifclassloaded{memoir}{}% {\let\M@hfixcfinish\endinput @@ -250,6 +251,7 @@ \setcounter{memhycontfloat}{0} \renewcommand{\contcaption}{% + \par% \refstepcounter{memhycontfloat}% \addtocounter{\@captype}{\m@ne}\H@refstepcounter{\@captype}% \@contcaption\@captype} @@ -350,6 +352,19 @@ \@namedef{mem@pnmm@end@hook}{\hyper@linkend} \fi +\AtEndPackage{hypcap}{% + \long\def\@@contcaption##1##2{% + \par + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \global\@capstartfalse% added + \normalsize + \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##2}\par + \endgroup} +} \endinput %% %% End of file `memhfixc.sty'. diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls index 73adf32de65..ca0603a7bc7 100644 --- a/Master/texmf-dist/tex/latex/memoir/memoir.cls +++ b/Master/texmf-dist/tex/latex/memoir/memoir.cls @@ -28,8 +28,8 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{memoir}% - [2018/12/12 v3.7h configurable book, report, article document class] -\newcommand\memversion{v3.7h, 2018/12/12} + [2019/11/15 v3.7i configurable book, report, article document class] +\newcommand\memversion{v3.7i, 2019/11/15} \newcommand*{\@ptsize}{} \newcommand*{\@memptsize}{} \newlength{\onelineskip} @@ -135,12 +135,26 @@ \@namelet{ver@#1.\@pkgextension}\relax} \@onlypreamble\DisemulatePackage +\ifcsname InputIfFileExists \endcsname% looking for an explicit space + % here aka the robust version + \DeclareRobustCommand \InputIfFileExists[2]{% + \IfFileExists{#1}% + {% + \expandafter\@swaptwoargs\expandafter + {\@filef@und\m@matendf{#1}\killm@matf{#1}}{% + #2\@addtofilelist{#1}\m@matbeginf{#1}\@@input% + }% + }% + } +\else + % Old definition \renewcommand{\InputIfFileExists}[2]{% \IfFileExists{#1}% {#2\@addtofilelist{#1}\m@matbeginf{#1}% \@@input \@filef@und \m@matendf{#1}% \killm@matf{#1}}} +\fi \newcommand{\m@matbeginf}[1]{\@ifundefined{#1-m@mfb}{}% {\@nameuse{#1-m@mfb}}} @@ -217,11 +231,7 @@ \newcommand{\cmd}[1]{\cmdprint{#1}% \index{\expandafter\@gobble\string#1?\string\cmdprint{\string#1}}} -\RequirePackage{ifpdf}[2017/03/15] -\RequirePackage{ifetex} -\RequirePackage{ifxetex}[2010/09/12] -\RequirePackage{ifluatex}[2016/05/16] - +\RequirePackage{iftex}[2019/11/07] \edef\wo@dmacro{% \string m\string a\string c\string r\string o\string :% } @@ -406,6 +416,7 @@ \newcommand*{\stockaiv} {\stockheight=297mm \stockwidth=210mm} \newcommand*{\stockav} {\stockheight=210mm \stockwidth=148mm} \newcommand*{\stockavi} {\stockheight=148mm \stockwidth=105mm} +\newcommand*{\stockavii}{\stockheight=105mm \stockwidth=74mm} \newcommand*{\stockbo} {\stockheight=1414mm \stockwidth=1000mm} \newcommand*{\stockbi} {\stockheight=1000mm \stockwidth=707mm} @@ -414,6 +425,7 @@ \newcommand*{\stockbiv} {\stockheight=353mm \stockwidth=250mm} \newcommand*{\stockbv} {\stockheight=250mm \stockwidth=176mm} \newcommand*{\stockbvi} {\stockheight=176mm \stockwidth=125mm} +\newcommand*{\stockbvii}{\stockheight=125mm \stockwidth=88mm} \newcommand*{\pagedbill} {\paperheight=7in \paperwidth=3in} \newcommand*{\pagestatement} {\paperheight=8.5in \paperwidth=5.5in} @@ -450,6 +462,7 @@ \newcommand*{\pageaiv} {\paperheight=297mm \paperwidth=210mm} \newcommand*{\pageav} {\paperheight=210mm \paperwidth=148mm} \newcommand*{\pageavi} {\paperheight=148mm \paperwidth=105mm} +\newcommand*{\pageavii}{\paperheight=105mm \paperwidth=74mm} \newcommand*{\pagebo} {\paperheight=1414mm \paperwidth=1000mm} \newcommand*{\pagebi} {\paperheight=1000mm \paperwidth=707mm} @@ -458,6 +471,7 @@ \newcommand*{\pagebiv} {\paperheight=353mm \paperwidth=250mm} \newcommand*{\pagebv} {\paperheight=250mm \paperwidth=176mm} \newcommand*{\pagebvi} {\paperheight=176mm \paperwidth=125mm} +\newcommand*{\pagebvii}{\paperheight=125mm \paperwidth=88mm} \DeclareOption{a0paper}{\stockao} \DeclareOption{a1paper}{\stockai} @@ -466,6 +480,7 @@ \DeclareOption{a4paper}{\stockaiv} \DeclareOption{a5paper}{\stockav} \DeclareOption{a6paper}{\stockavi} +\DeclareOption{a7paper}{\stockavii} \DeclareOption{b0paper}{\stockbo} \DeclareOption{b1paper}{\stockbi} \DeclareOption{b2paper}{\stockbii} @@ -473,6 +488,7 @@ \DeclareOption{b4paper}{\stockbiv} \DeclareOption{b5paper}{\stockbv} \DeclareOption{b6paper}{\stockbvi} +\DeclareOption{b7paper}{\stockbvii} \DeclareOption{mcrownvopaper}{\stockmcrownvo} \DeclareOption{mlargecrownvopaper}{\stockmlargecrownvo} \DeclareOption{mdemyvopaper}{\stockmdemyvo} @@ -1857,22 +1873,55 @@ \fi} \newcommand\createmark[5]{% - \def\@tempa{00} + % \def\@tempa{00} + % \nametest{#3}{nonumber}% + % \ifsamename + % \def\@tempa{01}% + % \else + % \nametest{#3}{shownumber} + % \ifsamename\else + % \@memerror{Unknown numbering value `#3' for #1mark}% + % {I expected `shownumber' or `nonumber'.\MessageBreak + % I will assume you meant `shownumber'}% + % \fi + % \fi + % \expandafter\if\@tempa% compares the two \@tempa digits + % \@namedef{#1marksn}##1{##1}% + % \else + % \@namedef{#1marksn}{\@gobble}% + % \fi + \def\@tempa{1} \nametest{#3}{nonumber}% \ifsamename - \def\@tempa{01}% + \def\@tempa{0} \else \nametest{#3}{shownumber} - \ifsamename\else - \@memerror{Unknown numbering value `#3' for #1mark}% - {I expected `shownumber' or `nonumber'.\MessageBreak - I will assume you meant `shownumber'}% + \ifsamename + \def\@tempa{1} + \else + \nametest{#3}{notitle} + \ifsamename + \def\@tempa{2} + \else + \@memerror{Unknown numbering value `#3' for + #1mark,\MessageBreak + please use one of 'shownumber', 'nonumber' or 'notitle'}% + {I expected `shownumber', `nonumber' or 'notitle'.\MessageBreak + I will assume you meant `shownumber'}% + \fi \fi \fi - \expandafter\if\@tempa% compares the two \@tempa digits - \@namedef{#1marksn}##1{##1}% - \else + \@namedef{#1markst}##1{##1} + \ifcase\@tempa\relax + % nonumber \@namedef{#1marksn}{\@gobble}% + \or % 1 + % shownumber + \@namedef{#1marksn}##1{##1} + \or % 2, 2 implies shownumber + % shownumber + \@namedef{#1marksn}##1{##1} + \@namedef{#1markst}{\@gobble} \fi \nametest{#2}{left}% \ifsamename @@ -1886,7 +1935,11 @@ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi \fi - ##1}}{}}% + \@nameuse{#1markst}{##1}% + }% + }% + {}% just left + }% \else \nametest{#2}{right} \ifsamename @@ -1900,7 +1953,10 @@ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi% \fi% - ##1}}}% + \@nameuse{#1markst}{##1}% + }% + }% + }% \else \nametest{#2}{both}% \ifsamename\else @@ -1919,16 +1975,22 @@ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi \fi - ##1}}{% + \@nameuse{#1markst}{##1}% + }% + }{% \memUChead{% \ifnum \c@secnumdepth > \c@@memmarkcntra \if@mainmatter \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}% \fi \fi - ##1}}}% + \@nameuse{#1markst}{##1}% + }% + }% + }% \fi - \fi} + \fi +} \newcommand\addtopsmarks[3]{% \mem@ps@safe@change{#1}% @@ -5956,8 +6018,11 @@ \else\ifx\hline\LT@hline \let\@BTswitch\@BLTrule \else - \let\@BTswitch\@BTnormal - \fi\fi + \ifx\xltabular\undefined + \let\@BTswitch\@BTnormal + \else + \let\@BTswitch\@BLTrule + \fi\fi\fi \global\@thisrulewidth=#1\relax \ifnum\@thisruleclass=\tw@\vskip\@aboverulesep\else \ifnum\@lastruleclass=\z@\vskip\@aboverulesep\else @@ -6817,6 +6882,7 @@ \@contbotsubtrue \newcommand{\subcaption}{% + \par \bgroup \let\label=\memsub@label \ifdonemaincaption\else @@ -6859,6 +6925,9 @@ {\@memsubcap{sub\@captype}[\@empty]}} \newenvironment{subfloat}{}{} +\newcommand\mem@step@subcounter{% + \refstepcounter{sub\@captype}\@contkeep% +} \newcommand{\subbottom}{% \@contbotsubtrue \@memsubbody} @@ -6869,7 +6938,7 @@ \ifdonemaincaption\else \advance\csname c@\@captype\endcsname\@ne \fi - \refstepcounter{sub\@captype}\@contkeep% + % \refstepcounter{sub\@captype}\@contkeep% \leavevmode \@ifnextchar [% {\@memsubfig}% @@ -6883,7 +6952,7 @@ \bgroup \let\label=\memsub@label \@contset - \refstepcounter{sub\@captype}\@contkeep% + % \refstepcounter{sub\@captype}\@contkeep% \leavevmode \@ifnextchar [% {\@memsubfig}% @@ -6924,7 +6993,8 @@ \fi \setbox\@tempboxa \hbox{#4}% \@tempdima=\wd\@tempboxa - \vtop\bgroup + \vbox\bgroup% + \mem@step@subcounter% \vbox\bgroup \ifcase\@tempcnta \@minipagefalse @@ -7694,13 +7764,13 @@ \ensureonecol \par \begingroup - \@nameuse{@#2maketitle} + \phantomsection \if##1 \ifmem@em@starred@listof\else - \phantomsection \addcontentsline{toc}{chapter}{#3} \fi \fi + \@nameuse{@#2maketitle} \parskip\cftparskip \@nameuse{cft#2beforelisthook}% \@starttoc{#2}% @@ -8467,7 +8537,8 @@ \AtBeginDocument{% \def\@@@wrindexm@m#1#2{% \if@filesw - \immediate\write \@idxfile{\string\indexentry{#1}{#2}}% + %\immediate\write \@idxfile{\string\indexentry{#1}{#2}}% + \immediate@protected@write\@idxfile{}{\string\indexentry{#1}{#2}}% \fi \endgroup}% } @@ -9362,7 +9433,7 @@ \m@makefootfootmark{#1}% -> \footfootmark#1 \m@makemakefootmark{#1}% -> \makefootmark#1 \m@makefootmarkstyle{#1}% -> \footmarkstyle#1 - \@namedef{@makefntext#1}##1{\@nameuse{makefootmark#1} ##1}% + \@namelongdef{@makefntext#1}##1{\@nameuse{makefootmark#1} ##1}% \m@make@footstart{#1}% -> \@footstart#1 \m@make@footgroup{#1}% -> \@footgroup#1 \expandafter\newinsert\csname @mpfootins#1\endcsname% -> \@mpfootins#1 @@ -10473,17 +10544,19 @@ \typeout{Writing note file \jobname.ent}% \let\makepagenote\@empty} -\newcommand{\immediate@protected@write}[3]{% +\providecommand{\immediate@protected@write}[3]{% \begingroup #2% \let\protect\@unexpandable@protect - \edef\reserved@a{\immediate\write#1{#3}}% - \reserved@a + %\edef\reserved@a{\immediate\write#1{#3}}% + %\reserved@a + \immediate\write#1{#3}% \endgroup - \if@nobreak\ifvmode\nobreak\fi\fi} + %\if@nobreak\ifvmode\nobreak\fi\fi% +} \newcommand{\m@m@pnwrite}[3]{\immediate\write#1{#3}} -\newcommand{\m@m@pnwrited}[3]{\immediate\write#1{\detokenize{#3}}} +\newcommand{\m@m@pnwrited}[3]{\immediate\write#1{\detokenize{#3}\@percentchar}} \newcommand*{\pnchap}{\f@rtoc} \newcommand*{\pnschap}{\f@rbdy} @@ -10514,7 +10587,7 @@ \m@mmf@prepare% rerun \fi% \mem@pn@multiple@marker{\notenumintext{\thepagenote}}% - }{}% + }{\m@mmf@prepare}% \fi% \ifm@mpn@new@chap% \global\m@mpn@new@chapfalse% @@ -12843,6 +12916,19 @@ \AtEndDocument{\@memensuresigpages} +\expandafter\let\csname MemOrigMakeUppercase \expandafter\endcsname + \csname MakeUppercase \endcsname +\expandafter\let\csname MemOrigMakeLowercase \expandafter\endcsname + \csname MakeLowercase \endcsname +\def\MemRestoreOrigMakecase{ + \expandafter\let\csname MakeUppercase \expandafter\endcsname + \csname MemOrigMakeUppercase \endcsname + \expandafter\let\csname MakeLowercase \expandafter\endcsname + \csname MemOrigMakeLowercase \endcsname +} +\IfFileExists{textcase.sty}{ + \RequirePackage[overload]{textcase} + }{% resort to the %%%% Nearly a carbon copy from textcase.dtx by David Carlisle \def\@uclcnotmath#1#2#3#4{\begingroup #1% @@ -12881,6 +12967,7 @@ \@uclcnotmath{}{##2##1}\lowercase} \protected@edef\MakeTextLowercase#1{\MakeTextLowercase{#1}} %%%% End copy from textcase.dtx +} % end of \IfFileExists \newcommand*{\abstractname}{Abstract} \newcommand*{\contentsname}{Contents} \newcommand*{\listfigurename}{List of Figures} @@ -12912,13 +12999,6 @@ \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} -\ifartopt -\pagestyle{plain} -\else -\pagestyle{headings} -\fi -\pagenumbering{arabic} - \setcounter{part}{0} \setcounter{chapter}{0} \setcounter{tocdepth}{1} @@ -13056,12 +13136,12 @@ %%% revert changes to captioning macros if the caption package is used. \AtBeginPackage{caption}{ \ClassWarningNoLine{memoir}{% - You are using the caption package with the memoir class. - To prepare we will now reset all captioning macros and - configurations to kernel defaults, and then let the - caption package take over. Please remember to use^^J - the caption package interfaces in order to^^J - configure your captions} + For the caption package to function properly with memoir, + we will now reset\string\caption\space and friends to + kernel defaults and then let the caption package take over. + Remember: all caption configuration now goves via the caption + package interface, not the interface from the memoir class. + } \long\def\@makecaption##1##2{% \vskip\abovecaptionskip @@ -13106,6 +13186,14 @@ \AtBeginPackage{float}{\let\newfloat\relax} +\ifartopt +\pagestyle{plain} +\else +\pagestyle{headings} +\fi +\pagenumbering{arabic} + + \endinput %% %% End of file `memoir.cls'. |