From 7e645bc833a21c442923fb45747b124201686005 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 16 May 2016 20:36:25 +0000 Subject: memoir (16may16) git-svn-id: svn://tug.org/texlive/trunk@41203 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/memoir/memoir.dtx | 126 ++++++++++++++++------- 1 file changed, 88 insertions(+), 38 deletions(-) (limited to 'Master/texmf-dist/source/latex/memoir/memoir.dtx') diff --git a/Master/texmf-dist/source/latex/memoir/memoir.dtx b/Master/texmf-dist/source/latex/memoir/memoir.dtx index ea366334874..7780157dded 100644 --- a/Master/texmf-dist/source/latex/memoir/memoir.dtx +++ b/Master/texmf-dist/source/latex/memoir/memoir.dtx @@ -4,7 +4,7 @@ % Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net % Maintainer: Lars Madsen (daleif at math dot au dot dk) % Copyright 2001--2010 Peter R. Wilson -% Copyright 2011--2013 Lars Madsen +% Copyright 2011-- Lars Madsen % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -20,7 +20,7 @@ % This work consists of the files listed in the README file. % % \fi -% \CheckSum{30752} +% \CheckSum{30773} % % \changes{v0.1}{2001/05/20}{First public alpha release} % \changes{v0.2}{2001/06/03}{First beta release} @@ -114,7 +114,7 @@ % \changes{v3.7d}{2015/04/23}{Misc. bugfixes} % \changes{v3.7e}{2015/07/08}{Per request from LaTeX Team, etex is not % autoloaded on newer kernels} -% +% \changes{v3.7f}{2016/05/16}{Maintenance, luatex85 and booktabs update} % % \def\dtxfile{memoir.dtx} % @@ -168,6 +168,7 @@ % \def\fileversion{v3.7c} \def\filedate{2015/03/05} % \def\fileversion{v3.7d} \def\filedate{2015/04/23} % \def\fileversion{v3.7e} \def\filedate{2015/07/08} +% \def\fileversion{v3.7f} \def\filedate{2016/05/16} % \title{The LaTeX \Lpack{memoir} class for configurable book % typesetting: Source code\thanks{This % file (\texttt{\dtxfile}) has version number \fileversion, last revised @@ -397,11 +398,11 @@ % Announce the name, option files and version for LaTeX2e files: % \begin{macrocode} %\ProvidesClass{memoir}% -% [2015/07/08 v3.7e configurable book, report, article document class] +% [2016/05/16 v3.7f configurable book, report, article document class] % \end{macrocode} % In the manual it is useful to know the current version. % \begin{macrocode} -%\newcommand\memversion{v3.7e, 2015/07/08} +%\newcommand\memversion{v3.7f, 2016/05/16} %<9pt>\ProvidesFile{mem9.clo}% %<9pt> [2008/01/30 v0.4 memoir class 9pt size option] %<10pt>\ProvidesFile{mem10.clo}% @@ -439,6 +440,7 @@ % things with \cs{@tempa}, \cs{@tempb} and \cs{@tempc}. I have now replaced % any use of these with \cs{@memtempa}, etc. % +% % In this part we define a few commands that are used later on. % % \begin{macro}{\@ptsize} @@ -1139,6 +1141,22 @@ % senseless for a class to attempt to take account of everything that might % be used with it. % +% Note (2016/05/16): Due to recent changes in Luatex, most notably the +% removal of several \cs{pdf...} macro, several PDF tests fail with +% LuaLaTeX. As a temporary measure the following is used to restore +% the old functionality when a newer LuaLaTeX is used. Code courtesy +% of David Carlisle. At some point we will include some of this into +% the class. +% \changes{v3.7f}{2016/05/16}{Temp measure to make the class work with +% updated luatex} +% \begin{macrocode} +\ifx\pdfextension\@undefined\else + \RequirePackage{luatex85} +\fi + +% \end{macrocode} +% +% % \begin{macro}{\ifpdf} % \begin{macro}{\pdftrue} % \begin{macro}{\pdffalse} @@ -6561,6 +6579,7 @@ % \end{macrocode} % The three \meta{marks} cases, \texttt{left}, \texttt{both} and % \texttt{right}; fails to \texttt{both}. +% \changes{v3.7f}{2015/08/25}{Sporious spaces} % \begin{macrocode} \nametest{#2}{left}% \ifsamename @@ -6579,7 +6598,7 @@ \nametest{#2}{right} \ifsamename \@namedef{#1mark}##1{% - \@setclcnt{#1}{@memmarkcntra} + \@setclcnt{#1}{@memmarkcntra}% \advance\c@@memmarkcntra\m@ne \markright{% \memUChead{% @@ -6598,7 +6617,7 @@ I will assume you meant `both'}% \fi \@namedef{#1mark}##1{% - \@setclcnt{#1}{@memmarkcntra} + \@setclcnt{#1}{@memmarkcntra}% \advance\c@@memmarkcntra\m@ne \markboth{% \memUChead{% @@ -17652,6 +17671,38 @@ % All the rules (except \cs{addlinespace}) share this code. % \begin{macrocode} \def\@BTrule[#1]{% +% \end{macrocode} +% Note (2016/05/16): code rearranged a bit to come back into sync with +% \Lpack{booktabs} v1.618033. +% +% \changes{v3.7f}{2016/05/16}{changed the order so the \cs{ifx} lines +% come first. From booktabs 2016/04/27 v1.618033} +% Now we work out, by a very nasty hack, if we're within a +% \texttt{longtable}. It's easy if \cs{longtable} isn't even defined: then we +% can't be. But it is not enough just to check if \texttt{longtable} is +% loaded --- we might be within an ordinary table rather than a +% longtable. So we look to see if \cs{hline} has been re-defined +% from its \LaTeX\ definition to be the same as +% \cs{LT@hline}. (Longtable currently does this redefinition when it opens a +% \texttt{longtable} environment, but not globally, so it is +% cleared it when the environment closes.) Another +% package could potentially do this! And \texttt{longtable} might change the +% way it implements this! So, it is not entirely safe, but I have +% found no better way so far. +% +% We set up \cs{@BTswitch} to call \cs{@BTnormal} or \cs{@BLTrule}, as +% appropriate, then call it. +% \begin{macrocode} + \ifx\longtable\undefined + \let\@BTswitch\@BTnormal + \else\ifx\hline\LT@hline + \let\@BTswitch\@BLTrule + \else + \let\@BTswitch\@BTnormal + \fi\fi +% \end{macrocode} +% On with the code +% \begin{macrocode} \global\@thisrulewidth=#1\relax % \end{macrocode} % Save the width argument (if the user didn't give one, then the @@ -17670,25 +17721,7 @@ % but if immediately after a % previous rule, insert a \cs{doublerulesep}. % -% Now we work out, by a very nasty hack, if we're within a -% \texttt{longtable}. It's easy if \cs{longtable} isn't even defined: then we -% can't be. But it is not enough just to check if \texttt{longtable} is -% loaded --- we might be within an ordinary table rather than a -% longtable. So we look to see if \cs{hline} has been re-defined -% from its \LaTeX\ definition to be the same as -% \cs{LT@hline}. (Longtable currently does this redefinition when it opens a -% \texttt{longtable} environment, but not globally, so it is -% cleared it when the environment closes.) Another -% package could potentially do this! And \texttt{longtable} might change the -% way it implements this! So, it is not entirely safe, but I have -% found no better way so far. - -% We set up \cs{@BTswitch} to call \cs{@BTnormal} or \cs{@BLTrule}, as -% appropriate, then call it. % \begin{macrocode} - \ifx\longtable\undefined\let\@BTswitch\@BTnormal\else - \ifx\hline\LT@hline\let\@BTswitch\@BLTrule - \else\let\@BTswitch\@BTnormal\fi\fi \@BTswitch} % \end{macrocode} @@ -17897,18 +17930,21 @@ % This code (called below) actually draws the rules. They are drawn % as boxes in text, rather than in a \cs{noalign} group, which permits % the left and right kerning. +% \changes{v3.7f}{2016/05/16}{Added \cs{kern}\cs{z@} to comply to +% latest booktabs updates. In Booktabs they were added to protect +% against unskips.} % \begin{macrocode} \def\@cmidrulea{% \multispan\@cmidla&\multispan\@cmidlb %% \unskip\hskip \cmrkern@l\leaders\bktabrule{\@thisrulewidth}\hfill \unskip\hskip \cmrkern@l{% - \CT@arc@\leaders\bktabrule{\@thisrulewidth}\hfill}% + \CT@arc@\leaders\bktabrule{\@thisrulewidth}\hfill\kern\z@}% \hskip \cmrkern@r\cr} \def\@cmidruleb{% \multispan\@cmidlb %% \unskip\hskip \cmrkern@l\leaders\bktabrule{\@thisrulewidth}\hfill \unskip\hskip \cmrkern@l{% - \CT@arc@\leaders\bktabrule{\@thisrulewidth}\hfill}% + \CT@arc@\leaders\bktabrule{\@thisrulewidth}\hfill\kern\z@}% \hskip \cmrkern@r\cr} % \end{macrocode} @@ -20820,12 +20856,27 @@ \fi \fi \else% oneside - \scapmarglefttrue - \ifnum\m@mscapmarg>\@ne - \ifnum\m@mscapmarg<\thr@@ - \scapmargleftfalse - \fi - \fi +% \end{macrocode} +% In oneside documents, inner and outer is the same as left and right. +% \changes{v3.7f}{2015/08/10}{Side caption placement bugfix for +% onesided docs. Related to \protect\url{http://tex.stackexchange.com/q/259324/3929}. +% } +% \begin{macrocode} + % \scapmarglefttrue% 0 and 3 + % \ifnum\m@mscapmarg>\@ne + % \ifnum\m@mscapmarg<\thr@@ + % \scapmargleftfalse + % \fi + % \fi + \ifcase\m@mscapmarg\relax% 0 + \scapmarglefttrue% + \or% 1 + \scapmargleftfalse% + \or% 2 + \scapmargleftfalse% + \or% 3 + \scapmarglefttrue% + \fi% \fi} % \end{macrocode} @@ -35530,7 +35581,7 @@ % v2.4b (2005) and c (2008) are some copyright years.} % \begin{macrocode} \EmulatedPackage{array}[2008/09/09] -\EmulatedPackage{booktabs}[2008/07/23] +\EmulatedPackage{booktabs}[2016/05/16] \EmulatedPackage{ccaption}[2008/07/23] \EmulatedPackage{changepage}[2008/07/23] \EmulatedPackage{chngcntr}[2008/07/23] @@ -35600,10 +35651,9 @@ 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 the - caption package interfaces in order to configure - your captions. - } + caption package take over. Please remember to use^^J + the caption package interfaces in order to^^J + configure your captions} \long\def\@makecaption##1##2{% \vskip\abovecaptionskip -- cgit v1.2.3