diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-22 23:12:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-22 23:12:17 +0000 |
commit | 8720829c9cba68ab04a8d8e4f0e6e0fd31cabed7 (patch) | |
tree | c052f47a41e7ba8b85bba0b2ddcbfe5d5a97402c /Master/texmf-dist/tex/latex/memoir/memoir.cls | |
parent | dd62e466f5d1dbca765bf38bbaeb50611345fa6a (diff) |
memoir (22may13)
git-svn-id: svn://tug.org/texlive/trunk@30639 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/memoir/memoir.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/memoir/memoir.cls | 547 |
1 files changed, 372 insertions, 175 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls index bcd804795b5..c984946c539 100644 --- a/Master/texmf-dist/tex/latex/memoir/memoir.cls +++ b/Master/texmf-dist/tex/latex/memoir/memoir.cls @@ -8,7 +8,10 @@ %% %% Author: Peter Wilson (herries dot press at earthlink dot net) %% Herries Press -%% Copyright 2001--2009 Peter R. Wilson +%% Copyright 2001--2011 Peter R. Wilson +%% Copyright 2011--2013 Lars Madsen +%% Maintainer: Lars Madsen (daleif at imf dot au dot dk) +%% %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -19,14 +22,14 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2003/06/01 or later. %% -%% This work has the LPPL maintenance status "author-maintained". -%% (Note: Lars Madsen is gradually taking over maintenance) +%% This work has the LPPL maintenance status "maintained". %% %% This work consists of the files listed in the README file. %% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{memoir}% - [2011/03/06 v3.6j configurable book, report, article document class] + [2013/05/22 v3.7 configurable book, report, article document class] +\newcommand\memversion{v3.7, 2013/05/22} \newcommand*{\@ptsize}{} \newcommand*{\@memptsize}{} \newlength{\onelineskip} @@ -91,6 +94,17 @@ \newcommand{\memjustarg}[1]{#1} \newcommand{\memgobble}[1]{} +\newcommand\memsetmacroused[1]{% + \@namedef{mem@macro@used@\expandafter\@gobble\string#1}{00}} +\newcommand\memsetmacrounused[1]{% + \@namedef{mem@macro@used@\expandafter\@gobble\string#1}{01}} +\newcommand\memifmacroused[1]{% + \if\@nameuse{mem@macro@used@\expandafter\@gobble\string#1}% + \expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} + +\newcommand\memsetlengthmin[3]{\ifdim#2<#3\setlength{#1}{#2}\else\setlength{#1}{#3}\fi} +\newcommand\memsetlengthmax[3]{\ifdim#2>#3\setlength{#1}{#2}\else\setlength{#1}{#3}\fi} + \newcommand*{\@memfakeusepackage}[1]{% \@namelet{ver@#1.sty}\@empty} @@ -429,8 +443,8 @@ \newcommand*{\memRTLleftskip}{\leftskip} \newcommand*{\memRTLrightskip}{\rightskip} -\newcommand*{\memRTLvleftskip}{\leftskip} -\newcommand*{\memRTLvrightskip}{\rightskip} +\newcommand*{\memRTLvleftskip}{\vleftskip} +\newcommand*{\memRTLvrightskip}{\vrightskip} \newcommand*{\memRTLraggedright}{\raggedright} \newcommand*{\memRTLraggedleft}{\raggedleft} \newcommand*{\memRTLmainraggedright}{\raggedright} @@ -921,6 +935,7 @@ \setlength{\paperwidth}{\@tempdimb}} \newcommand{\settypeblocksize}[3]{% + \memsetmacroused\settypeblocksize% \setrectanglesize{#1}{#2}{#3}% \setlength{\textheight}{\@tempdima}% \setlength{\textwidth}{\@tempdimb}} @@ -932,6 +947,7 @@ \newlength{\spinemargin} \newlength{\foremargin} \newcommand{\setlrmargins}[3]{% + \memsetmacroused\setlrmargins% \advance\paperwidth -\binding \setfillsize{\paperwidth}{\textwidth}{#1}{#2}{#3}% \setlength{\textwidth}{\@tempdimc}% @@ -952,6 +968,7 @@ \newlength{\uppermargin} \newlength{\lowermargin} \newcommand{\setulmargins}[3]{% + \memsetmacroused\setulmargins% \setfillsize{\paperheight}{\textheight}{#1}{#2}{#3}% \setlength{\textheight}{\@tempdimc}% \setlength{\uppermargin}{\@tempdima}% @@ -979,6 +996,7 @@ \setlength{\columnseprule}{#2}} \newcommand{\setmarginnotes}[3]{% + \memsetmacroused\setmarginnotes% \setlength{\marginparsep}{#1}% \setlength{\marginparwidth}{#2}% \setlength{\marginparpush}{#3}} @@ -1094,6 +1112,39 @@ \setlength{\textheight}{\@tempcnta\baselineskip}% \addtolength{\textheight}{\topskip}} +\newcommand\mem@autoadjust@marginparwidth{% + \if@twocolumn + \memsetlengthmin\marginparwidth\spinemargin\foremargin + \else + \if@twoside + \ifcase\m@mmpar@margin\relax% 0 - left + \memsetlengthmin\marginparwidth\spinemargin\foremargin + \or% 1 - right + \memsetlengthmin\marginparwidth\spinemargin\foremargin + \or% 2 - outer + \setlength\marginparwidth{\foremargin} + \or% 3 - inner + \setlength\marginparwidth{\spinemargin} + \fi + \else % oneside + \ifnum\m@mmpar@margin=0% left + \setlength\marginparwidth{\spinemargin} + \else% right + \setlength\marginparwidth{\foremargin} + \fi + \fi + \fi + \addtolength\marginparwidth{-2\marginparsep} + \ifdim\marginparwidth<1pt\setlength\marginparwidth{1pt}\fi% +} + +\newcommand\mem@reset@used@macros{% + \memsetmacrounused\setmarginnotes + \memsetmacrounused\settypeblocksize + \memsetmacrounused\setulmargins + \memsetmacrounused\setlrmargins +} + \newcommand*{\checkthelayout}[1][classic]{% \@memnegtest{\trimedge} \@memnegtest{\trimtop} @@ -1230,7 +1281,10 @@ \@settopoint\textwidth \@settopoint\oddsidemargin \@settopoint\evensidemargin - \fixheaderwidths} + \fixheaderwidths + \memifmacroused\setmarginnotes{}{\mem@autoadjust@marginparwidth} + \mem@reset@used@macros +} \newcommand\settypeoutlayoutunit[1]{ \nametest{#1}{pt} @@ -1578,46 +1632,46 @@ \mem@ps@safe@change{#1}% \nametest{flushleft}{#2} \ifsamename - \@namedef{#1evenhpl}{\relax} \@namedef{#1evenhpr}{\hss} + \@namedef{#1evenheadpl}{\relax} \@namedef{#1evenheadpr}{\hss} \else \nametest{flushright}{#2} \ifsamename - \@namedef{#1evenhpl}{\hss} \@namedef{#1evenhpr}{\relax} + \@namedef{#1evenheadpl}{\hss} \@namedef{#1evenheadpr}{\relax} \else - \@namedef{#1evenhpl}{\hss} \@namedef{#1evenhpr}{\hss} + \@namedef{#1evenheadpl}{\hss} \@namedef{#1evenheadpr}{\hss} \fi \fi \nametest{flushleft}{#3} \ifsamename - \@namedef{#1oddhpl}{\relax} \@namedef{#1oddhpr}{\hss} + \@namedef{#1oddheadpl}{\relax} \@namedef{#1oddheadpr}{\hss} \else \nametest{flushright}{#3} \ifsamename - \@namedef{#1oddhpl}{\hss} \@namedef{#1oddhpr}{\relax} + \@namedef{#1oddheadpl}{\hss} \@namedef{#1oddheadpr}{\relax} \else - \@namedef{#1oddhpl}{\hss} \@namedef{#1oddhpr}{\hss} + \@namedef{#1oddheadpl}{\hss} \@namedef{#1oddheadpr}{\hss} \fi \fi \nametest{flushleft}{#4} \ifsamename - \@namedef{#1evenfpl}{\relax} \@namedef{#1evenfpr}{\hss} + \@namedef{#1evenfootpl}{\relax} \@namedef{#1evenfootpr}{\hss} \else \nametest{flushright}{#4} \ifsamename - \@namedef{#1evenfpl}{\hss} \@namedef{#1evenfpr}{\relax} + \@namedef{#1evenfootpl}{\hss} \@namedef{#1evenfootpr}{\relax} \else - \@namedef{#1evenfpl}{\hss} \@namedef{#1evenfpr}{\hss} + \@namedef{#1evenfootpl}{\hss} \@namedef{#1evenfootpr}{\hss} \fi \fi \nametest{flushleft}{#5} \ifsamename - \@namedef{#1oddfpl}{\relax} \@namedef{#1oddfpr}{\hss} + \@namedef{#1oddfootpl}{\relax} \@namedef{#1oddfootpr}{\hss} \else \nametest{flushright}{#5} \ifsamename - \@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\relax} + \@namedef{#1oddfootpl}{\hss} \@namedef{#1oddfootpr}{\relax} \else - \@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\hss} + \@namedef{#1oddfootpl}{\hss} \@namedef{#1oddfootpr}{\hss} \fi \fi} @@ -1680,7 +1734,7 @@ % #3 odd/even % #4 odd/even short (o,e) \@namedef{#1@#3#2}{% - \@nameuse{#1#3hpl}\hb@xt@\@nameuse{#1#2runwidth}{\m@mhe@dreset% + \@nameuse{#1#3#2pl}\hb@xt@\@nameuse{#1#2runwidth}{\m@mhe@dreset% \nametest{#2}{head}\ifsamename\let\mem@hfboxer\mem@hvboxm\else\let\mem@hfboxer\mem@fvboxm\fi% \mem@hfboxer{\nametest{#2}{foot}\ifsamename\@nameuse{#1#2rule}\fi% \hbox{% @@ -1700,7 +1754,7 @@ \@nameuse{#1ps#2strut}}}% }% \nametest{#2}{head}\ifsamename\@nameuse{#1#2rule}\fi% - }}\@nameuse{#1#3hpr}}% + }}\@nameuse{#1#3#2pr}}% \@namedef{@#3#2}{\@nameuse{#1@#3#2}}% } \newcommand{\makepagestyle}[1]{% @@ -1788,15 +1842,15 @@ \makeoddfoot{#1}{\@nameuse{#2ofootl}}% {\@nameuse{#2ofootc}}{\@nameuse{#2ofootr}}% \makerunningwidth{#1}[\@nameuse{#2footrunwidth}]{\@nameuse{#2headrunwidth}}% - \@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}% - \@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}% - \@namedef{#1evenhpr}{\@nameuse{#2evenhpr}}% - \@namedef{#1oddhpr}{\@nameuse{#2oddhpr}}% + \@namedef{#1evenheadpl}{\@nameuse{#2evenheadpl}}% + \@namedef{#1oddheadpl}{\@nameuse{#2oddheadpl}}% + \@namedef{#1evenheadpr}{\@nameuse{#2evenheadpr}}% + \@namedef{#1oddheadpr}{\@nameuse{#2oddheadpr}}% \makeheadfootvposition{#1}{\@nameuse{#2headvplacement}}{\@nameuse{#2footvplacement}}% - \@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}% - \@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}% - \@namedef{#1evenfpr}{\@nameuse{#2evenfpr}}% - \@namedef{#1oddfpr}{\@nameuse{#2oddfpr}}% + \@namedef{#1evenfootpl}{\@nameuse{#2evenfootpl}}% + \@namedef{#1oddfootpl}{\@nameuse{#2oddfootpl}}% + \@namedef{#1evenfootpr}{\@nameuse{#2evenfootpr}}% + \@namedef{#1oddfootpr}{\@nameuse{#2oddfootpr}}% \@namedef{#1headrule}{\@nameuse{#2headrule}}% \@namedef{#1footrule}{\@nameuse{#2footrule}}% \@namedef{#1headruleprefix}{\@nameuse{#2headruleprefix}}% @@ -1833,8 +1887,8 @@ \makeevenhead{simple}{\thepage}{}{} \makeoddhead{simple}{}{}{\thepage} -\newcommand*{\nouppercaseheads}{\let\memUChead\relax} -\newcommand*{\uppercaseheads}{\let\memUChead\MakeUppercase} +\newcommand*{\nouppercaseheads}{\def\memUChead{}} +\newcommand*{\uppercaseheads}{\def\memUChead{\MakeTextUppercase}} \uppercaseheads \newcommand*{\createplainmark}[3]{% @@ -2111,9 +2165,11 @@ \newcommand*{\showtextblocklocon}{\showtextblockloctrue} \newcommand*{\showtextblocklocoff}{\showtextblocklocfalse} +\newcommand\framepichook{} \newcommand*{\framepichead}{% \ifshowheadfootloc \begin{picture}(0,0) + \framepichook \unitlength 1pt \put(0,0){\line(1,0){\strip@pt\textwidth}} \end{picture}% @@ -2121,6 +2177,7 @@ \newcommand*{\framepictextfoot}{% \begin{picture}(0,0) + \framepichook \unitlength 1pt \ifshowheadfootloc \put(0,0){\line(1,0){\strip@pt\textwidth}} @@ -2464,7 +2521,7 @@ \par \vskip 1.5em} -\newenvironment{titlingpage}% +\newenvironment{mem@titlingpage}% {\let\footnoterule\relax \let\footnotesize\small \if@twocolumn @@ -2473,12 +2530,20 @@ \@restonecolfalse \fi \thispagestyle{titlingpage}% - \setcounter{page}{\@ne}% + \if\mem@titlpg@reset\setcounter{page}{\@ne}\fi% }{% \thispagestyle{titlingpage}% \if@restonecol \twocolumn \fi \if@twoside \cleardoublepage \else \clearpage \fi - \setcounter{page}{\@ne}} + \if\mem@titlpg@reset\setcounter{page}{\@ne}\fi} +\newenvironment{titlingpage}{% + \def\mem@titlpg@reset{00}% + \begin{mem@titlingpage}}{% + \end{mem@titlingpage}} +\newenvironment{titlingpage*}{% + \def\mem@titlpg@reset{01}% + \begin{mem@titlingpage}}{% + \end{mem@titlingpage}} \aliaspagestyle{titlingpage}{empty} \newcommand{\emptythanks}{\global\let\@thanks\@empty} @@ -2493,7 +2558,6 @@ \global\let\author\relax \global\let\date\relax \global\let\thanksmarkseries\relax - \global\let\thanksheadextra\relax \global\let\thanksfootextra\relax \global\let\thanksmark\relax \global\let\thanksgap\relax} @@ -2670,16 +2734,20 @@ \long\def\@book[#1]#2{% \M@gettitle{#1}% + \def\f@rtoc{#1}% + \@nameuse{book@f@rtoc@before@write@hook}% \phantomsection + \mempreaddbooktotochook \ifnum \c@secnumdepth >-3\relax \refstepcounter{book}% \addcontentsline{toc}{book}% - {\protect\booknumberline{\thebook}#1}% - \membookinfo{\thebook}{#1}{#2}% + {\protect\booknumberline{\thebook}\f@rtoc}% + \membookinfo{\thebook}{\f@rtoc}{#2}% \else - \addcontentsline{toc}{book}{#1}% - \membookinfo{}{#1}{#2}% + \addcontentsline{toc}{book}{\f@rtoc}% + \membookinfo{}{\f@rtoc}{#2}% \fi + \mempostaddbooktotochook \bookpagemark{#1}% {\centering \interlinepenalty \@M @@ -2692,6 +2760,9 @@ \printbooktitle{#2}\par}% \@endbook} +\newcommand\mempreaddbooktotochook{} +\newcommand\mempostaddbooktotochook{} + \long\def\@sbook#1{% \M@gettitle{#1}% \phantomsection @@ -2763,16 +2834,20 @@ \long\def\@part[#1]#2{% \M@gettitle{#1}% + \def\f@rtoc{#1}% + \@nameuse{part@f@rtoc@before@write@hook}% \phantomsection + \mempreaddparttotochook \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% \addcontentsline{toc}{part}% - {\protect\partnumberline{\thepart}#1}% - \mempartinfo{\thepart}{#1}{#2}% + {\protect\partnumberline{\thepart}\f@rtoc}% + \mempartinfo{\thepart}{\f@rtoc}{#2}% \else - \addcontentsline{toc}{part}{#1}% - \mempartinfo{}{#1}{#2}% + \addcontentsline{toc}{part}{\f@rtoc}% + \mempartinfo{}{\f@rtoc}{#2}% \fi + \mempostaddparttotochook \partmark{#1}% {\centering \interlinepenalty \@M @@ -2785,6 +2860,9 @@ \printparttitle{#2}\par}% \@endpart} +\newcommand\mempreaddparttotochook{} +\newcommand\mempostaddparttotochook{} + \long\def\@spart#1{% \M@gettitle{#1}% \phantomsection @@ -2886,6 +2964,8 @@ \fi \@afterheading \fi + \@nameuse{chapter@f@rtoc@before@write@hook}% + \mempreaddchaptertotochook% \ifm@m@And \ifanappendix \addcontentsline{toc}{appendix}{% @@ -2904,8 +2984,16 @@ \memchapinfo{}{\f@rtoc}{\f@rhdr}{#2}% \fi \fi - \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi} + \mempostaddchaptertotochook% + \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi% + \memendofchapterhook% +} +\newcommand\mempreaddchaptertotochook{} +\newcommand\mempostaddchaptertotochook{} +\newcommand\memendofchapterhook{} +\newcommand\settocpreprocessor[2]{% + \@namedef{#1@f@rtoc@before@write@hook}{#2}} \def\@makechapterhead#1{% \chapterheadstart% \vspace*{50\p@}% {%\parindent \z@ \raggedright \normalfont @@ -2993,20 +3081,20 @@ \newcommand{\chapterstyle}[1]{\@nameuse{chs@#1}} \makechapterstyle{default}{}% -%% \setlength{\beforechapskip}{50pt} -%% \def\chapterheadstart{\vspace*{\beforechapskip}} -%% \def\chapnamefont{\normalfont\huge\bfseries} -%% \def\printchaptername{\chapnamefont \@chapapp} -%% \def\chapternamenum{\space} -%% \def\chapnumfont{\normalfont\huge\bfseries} -%% \def\printchapternum{\chapnumfont \thechapter} -%% \setlength{\midchapskip}{20pt} -%% \def\afterchapternum{\par\nobreak\vskip \midchapskip} -%% \def\printchapternonum{} -%% \def\chaptitlefont{\normalfont\Huge\bfseries} -%% \def\printchaptertitle##1{\chaptitlefont ##1} -%% \setlength{\afterchapskip}{40pt} -%% \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}} + %% \setlength{\beforechapskip}{50pt} + %% \def\chapterheadstart{\vspace*{\beforechapskip}} + %% \def\chapnamefont{\normalfont\huge\bfseries} + %% \def\printchaptername{\chapnamefont \@chapapp} + %% \def\chapternamenum{\space} + %% \def\chapnumfont{\normalfont\huge\bfseries} + %% \def\printchapternum{\chapnumfont \thechapter} + %% \setlength{\midchapskip}{20pt} + %% \def\afterchapternum{\par\nobreak\vskip \midchapskip} + %% \def\printchapternonum{} + %% \def\chaptitlefont{\normalfont\Huge\bfseries} + %% \def\printchaptertitle##1{\chaptitlefont ##1} + %% \setlength{\afterchapskip}{40pt} + %% \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip} \chapterstyle{default} \makechapterstyle{section}{% @@ -3106,8 +3194,8 @@ \renewcommand*{\printchapternum}{} \renewcommand*{\afterchapternum}{} \renewcommand*{\printchaptertitle}[1]{% -%%% \raggedright\Large\scshape\MakeLowercase{##1}} - \memRTLraggedright\Large\scshape\MakeLowercase{##1}} + %%% \raggedright\Large\scshape\MakeLowercase{##1}} + \memRTLraggedright\Large\scshape\MakeTextLowercase{##1}} \renewcommand*{\afterchaptertitle}{% \vskip\onelineskip \hrule\vskip\onelineskip}} @@ -3313,7 +3401,7 @@ \renewcommand*{\printchaptername}{% \centerline{\chapnumfont{\@chapapp\ \thechapter}}} \renewcommand*{\chapternamenum}{} - \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeLowercase} + \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeTextLowercase} \renewcommand*{\printchapternum}{} \renewcommand*{\afterchapternum}{% \par\centerline{\parbox{0.5in}{\hrulefill}}\par} @@ -3322,7 +3410,7 @@ \parbox{0.5in}{}\par} \renewcommand*{\chaptitlefont}{\normalfont\large} \renewcommand*{\printchaptertitle}[1]{% - \centering \chaptitlefont\MakeUppercase{##1}}} + \centering \chaptitlefont\MakeTextUppercase{##1}}} \makechapterstyle{veelo}{% \setlength{\afterchapskip}{40pt} @@ -3332,7 +3420,7 @@ \renewcommand*{\chapnumfont}{\normalfont\HUGE} \renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright} \renewcommand*{\printchaptername}{% - \chapnamefont\MakeUppercase{\@chapapp}} + \chapnamefont\MakeTextUppercase{\@chapapp}} \renewcommand*{\chapternamenum}{} \setlength{\beforechapskip}{18mm}% \numberheight \setlength{\midchapskip}{\paperwidth}% \barlength @@ -3436,6 +3524,7 @@ \raggedbottomsectionfalse \newcommand*{\raggedbottomsection}{\raggedbottomsectiontrue} \newcommand*{\normalbottomsection}{\raggedbottomsectionfalse} +\newcommand*{\bottomsectionpenalty}{\z@} \newlength{\bottomsectionskip} \setlength{\bottomsectionskip}{10mm} @@ -3459,7 +3548,7 @@ \@nameuse{#1block}% \ifraggedbottomsection\if@nobreak\else \vskip\z@\@plus\bottomsectionskip - \penalty\z@ + \penalty\bottomsectionpenalty \vskip\z@\@plus -\bottomsectionskip \fi\fi \def\m@msecn@me{#1}% @@ -3894,7 +3983,7 @@ \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}% %%% \setsecheadstyle{\normalfont\raggedright\scshape\MakeLowercase}% - \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeLowercase}% + \setsecheadstyle{\normalfont\memRTLraggedright\scshape\MakeTextLowercase}% \setbeforesubsecskip{-1.0\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{1.0\onelineskip \@plus 0.1\onelineskip}% @@ -3903,7 +3992,7 @@ \setbeforesubsubsecskip{1.0\onelineskip \@plus 0.5\onelineskip \@minus 0.2\onelineskip}% \setaftersubsubsecskip{-1em}% - \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeLowercase}% + \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeTextLowercase}% \setbeforeparaskip{1.0\onelineskip \@plus 0.5\onelineskip \@minus 0.2\onelineskip}% \setafterparaskip{-1em}% @@ -3919,7 +4008,7 @@ \setbeforesecskip{-1.25\onelineskip \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{0.75\onelineskip \@plus 0.1\onelineskip}% - \setsecheadstyle{\normalfont\centering\MakeUppercase}% + \setsecheadstyle{\normalfont\centering\MakeTextUppercase}% \setbeforesubsecskip{-1.25\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.75\onelineskip \@plus 0.1\onelineskip}% @@ -3927,7 +4016,7 @@ \setbeforesubsubsecskip{-.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsubsecskip{.333\onelineskip \@plus 0.1\onelineskip}% - \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeLowercase}% + \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeTextLowercase}% \setbeforeparaskip{-.667\onelineskip \@plus -02.5\onelineskip \@minus -0.25\onelineskip}% \setafterparaskip{.333\onelineskip \@plus 0.1\onelineskip}% @@ -3936,18 +4025,18 @@ \setbeforesubparaskip{1.0\onelineskip \@plus 0.5\onelineskip \@minus 0.2\onelineskip}% \setaftersubparaskip{-1em}% - \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeLowercase}} + \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeTextLowercase}} \makeheadstyles{dowding}{% \chapterstyle{dowding} \setbeforesecskip{-2\onelineskip \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}% - \setsecheadstyle{\normalfont\centering\MakeUppercase}% + \setsecheadstyle{\normalfont\centering\MakeTextUppercase}% \setbeforesubsecskip{-1.2\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}% - \setsubsecheadstyle{\normalfont\scshape\centering\MakeLowercase}% + \setsubsecheadstyle{\normalfont\scshape\centering\MakeTextLowercase}% \setbeforesubsubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% @@ -3988,9 +4077,9 @@ \setsubparaheadstyle{\normalfont\normalsize\sffamily\bfseries}} \makeheadstyles{ntglike}{% - \renewcommand*{\partnamefont}{\Large\bfseries\MakeUppercase}% + \renewcommand*{\partnamefont}{\Large\bfseries\MakeTextUppercase}% \renewcommand*{\partnumfont}{\Large\bfseries}% - \renewcommand*{\parttitlefont}{\Large\MakeUppercase}% + \renewcommand*{\parttitlefont}{\Large\MakeTextUppercase}% \chapterstyle{ntglike} \setbeforesecskip{-2\onelineskip \@plus -1\onelineskip \@minus -.5\onelineskip}% @@ -4018,7 +4107,7 @@ \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}% %%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}% - \setsecheadstyle{\normalfont\memRTLraggedright\MakeUppercase}% + \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}% \setbeforesubsecskip{-1.2\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}% @@ -4045,7 +4134,7 @@ \@plus -0.5\onelineskip \@minus -.5\onelineskip}% \setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}% %%% \setsecheadstyle{\normalfont\raggedright\MakeUppercase}% - \setsecheadstyle{\normalfont\memRTLraggedright\MakeUppercase}% + \setsecheadstyle{\normalfont\memRTLraggedright\MakeTextUppercase}% \setbeforesubsecskip{-0.667\onelineskip \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% @@ -4055,7 +4144,7 @@ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}% \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}% %%% \setsubsubsecheadstyle{\normalfont\normalsize\raggedright\scshape\MakeLowercase}% - \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeLowercase}% + \setsubsubsecheadstyle{\normalfont\normalsize\memRTLraggedright\scshape\MakeTextLowercase}% \setbeforeparaskip{1.0\onelineskip \@plus 0.5\onelineskip \@minus 0.2\onelineskip}% \setafterparaskip{-1em}% @@ -4082,7 +4171,9 @@ \def\@apppage{% \@setuppart + \mempreaddapppagetotochook \addappheadtotoc + \mempostaddapppagetotochook \partmark{\appendixpagename}% \memapppageinfo{\appendixpagename}% {\centering @@ -4090,6 +4181,9 @@ \normalfont \printparttitle{\appendixpagename}\par}% \@endpart} +\newcommand\mempreaddapppagetotochook{} +\newcommand\mempostaddapppagetotochook{} + \def\@sapppage{% \@setuppart \partmark{\appendixpagename}% @@ -4153,12 +4247,6 @@ \fi }{} -\newcommand{\@formatsecmark@pp}[1]{% - \MakeUppercase{\appendixname\space - \ifnum \c@secnumdepth >\z@ - \thesection\quad - \fi - #1}} \newcommand*{\leadpagetoclevel}{chapter} \newcommand*{\newleadpage}[3][empty]{% \@namedef{#2}{\@ifstar{\dlfm@msapppage{#1}{#2}{#3}}% @@ -5213,7 +5301,7 @@ \if \@nextchar l\@ne \else \if \@nextchar r\tw@ \else \z@ \@chclass - \if\@nextchar |\@ne \else + \if\@nextchar |\@ne \else%| emacs \if \@nextchar !6 \else \if \@nextchar @7 \else \if \@nextchar <8 \else @@ -5420,7 +5508,7 @@ \def\newcolumntype#1{% \edef\NC@char{\string#1}% \@ifundefined{NC@find@\NC@char}% - {\@tfor\next:=<>clrmbp@!|\do{\if\noexpand\next\NC@char + {\@tfor\next:=<>clrmbp@!|\do{\if\noexpand\next\NC@char%|emacs \@memwarn{Redefining primitive column \NC@char}\fi}% \NC@list\expandafter{\the\NC@list\NC@do#1}}% {\@memwarn{Column \NC@char\space is already defined}}% @@ -6243,12 +6331,14 @@ \let\@memoldfloat\@float \renewcommand{\@float}[1]{\donemaincaptionfalse - \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}% + \@memresetsubcounter{#1}% \@memoldfloat{#1}} \let\@memolddblfloat\@dblfloat \renewcommand{\@dblfloat}[1]{\donemaincaptionfalse - \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}% + \@memresetsubcounter{#1}% \@memolddblfloat{#1}} +\newcommand{\@memresetsubcounter}[1]{% + \@ifundefined{c@sub#1}{}{\csname c@sub#1\endcsname = 0\relax}} \let\@memoldefloat\end@float \def\end@float{% @@ -6403,10 +6493,14 @@ \long\def\@makecaption#1#2{\let\@memtempa\relax \ifdim\prevdepth>-99\p@ \vskip\abovecaptionskip \else \def\@memtempa{\vbox to\topskip{}}\fi + \@@makecaption{#1}{#2}% + \vskip\belowcaptionskip} + +\long\def\@@makecaption#1#2{% \let\@contfnote\footnote \renewcommand{\footnote}[2][]{} \let\@contfmark\footnotemark \renewcommand{\footnotemark}[1][]{} \let\@contpnote\pagenote\renewcommand\pagenote[2][]{} - \sbox\@tempboxa{\@contnfont #1\@contdelim \@conttfont #2\@contfinal} + \sbox\@tempboxa{{\@contnfont #1\@contdelim}\@conttfont #2\@contfinal} \let\footnote\@contfnote \let\footnotemark\@contfmark \let\pagenote\@contpnote @@ -6444,7 +6538,7 @@ \par } % end of the \parbox \fi - \vskip\belowcaptionskip} + } \newcommand{\contcaption}{% \addtocounter{\@captype}{\m@ne}\refstepcounter{\@captype}% @@ -6728,7 +6822,7 @@ {\@memsubfloat{sub\@captype}[#1]}% {\@memsubfloat{sub\@captype}[\@empty #1][#1]}} -\def\@memsubfloat#1[#2][#3]#4{% +\long\def\@memsubfloat#1[#2][#3]#4{% \@tempcnta=\@ne \if@tightsubcap \if@minipage @@ -6797,7 +6891,7 @@ \newcommand{\@makesubfloatcaption}[2]{% \setbox\@tempboxa\hbox{% \@subcapsize - {\@subcaplabelfont #1}{\@subcapfont\ignorespaces #2}}% + {\@subcaplabelfont #1}{\@subcapfont\ignorespaces #2}\unskip}% \@tempdimb=-\subfloatcapmargin \multiply\@tempdimb\tw@ \advance\@tempdimb\@tempdima @@ -6820,10 +6914,10 @@ \addtolength{\@tempdimb}{-\wd\@tempboxa}% \usebox{\@tempboxa}% \memsubfig@captionpar{\@tempdimb}{% - {\@subcapfont\ignorespaces #2}}% + {\@subcapfont\ignorespaces #2}\unskip}% \else \memsubfig@captionpar{\@tempdimb}{{\@subcaplabelfont #1}% - {\@subcapfont\ignorespaces #2}}% + {\@subcapfont\ignorespaces #2}\unskip}% \fi} \newcommand{\memsubfig@captionpar}[2]{% @@ -7005,6 +7099,7 @@ \m@mscapend@fbox \refstepcounter\@captype \m@mscaplabel + \m@mscapcheckside %<--- added 2012/08/19 \begin{lrbox}{\m@mscap@capbox}% \begin{minipage}[c]{\sidecapwidth}% \sidecapstyle @@ -7014,7 +7109,7 @@ \m@mscapopboxes} \newcommand*{\m@mscapopboxes}{% \m@mcalcscapraise - \usebox{\m@mscap@fbox}\m@mscapcheckside + \usebox{\m@mscap@fbox}%\m@mscapcheckside \ifscapmargleft% \rlap{\kern-\m@mscaplkern \raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}% @@ -7173,6 +7268,25 @@ \end{lrbox}% \m@mscapopboxes} +\AtBeginDocument{ + \@ifpackageloaded{longtable}{ + \@ifpackageloaded{ltcaption}{}{% + \def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \let\@memtempa\relax% + % starred form -> #1 = \@gobble + \ifx#1\@gobble% + \let\@contnfont\@empty% + \let\@contdelim\@empty% + \@@makecaption{}{#3}% + \else% + \@@makecaption{#2}{#3}% + \fi% + \endgraf\vskip\belowcaptionskip}% + \hss}}} + } + }{} +} \newlength{\beforeepigraphskip} \setlength{\beforeepigraphskip}{.5\baselineskip} \newlength{\afterepigraphskip} @@ -7538,10 +7652,17 @@ \newcommand*{\cftparfillskip}{\parfillskip=0pt plus1fil} \newcommand*{\@cftn@me}{} +\newcommand\mem@cft@hb@xt@[2]{\hb@xt@#1{#2\hfil}} +\let\numberlinebox\mem@cft@hb@xt@ +\let\partnumberlinebox\mem@cft@hb@xt@ +\let\chapternumberlinebox\mem@cft@hb@xt@ +\let\booknumberlinebox\mem@cft@hb@xt@ + \newcommand*\numberlinehook[1]{} \renewcommand*{\numberline}[1]{% \numberlinehook{#1}% - \hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb} + %\hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb} + \numberlinebox\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum}\@cftasnumb} \newcommand{\@cftbsnum}{} \newcommand{\@cftasnum}{} \newcommand{\@cftasnumb}{} @@ -7568,7 +7689,7 @@ \parindent \@nameuse{cft#2indent}\relax\@afterindenttrue \interlinepenalty\@M \leavevmode - \settowidth{\@tempdima}{\@nameuse{cft#2font}\@nameuse{cft#2name}}% + \settowidth{\@tempdima}{\@nameuse{cft#2font}{\@nameuse{cft#2name}}}% \addtolength{\@tempdima}{\@nameuse{cft#2numwidth}}% \expandafter\let\expandafter\@cftbsnum\csname cft#2presnum\endcsname \expandafter\let\expandafter\@cftasnum\csname cft#2aftersnum\endcsname @@ -7576,7 +7697,7 @@ \expandafter\let\expandafter\@cftn@me\csname cft#2name\endcsname %%% \advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip \advance\memRTLleftskip\@tempdima \null\nobreak\hskip -\memRTLleftskip - {\@nameuse{cft#2font}##1}\nobreak + {\@nameuse{cft#2font}{##1}}\nobreak \@nameuse{cft#2fillnum}{##2}} \fi }% end of \l@#2 @@ -7651,7 +7772,7 @@ \let\@cftasnumb \cftbookaftersnumb %%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip \advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip - {\cftbookfont #1}% + {\cftbookfont {#1}}% \cftbookfillnum{#2}} \nobreak \global\@nobreaktrue @@ -7661,8 +7782,10 @@ \newcommand*\booknumberlinehook[1]{} \newcommand{\booknumberline}[1]{% \booknumberlinehook{#1}% - \hb@xt@\@tempdima{% - \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space} + % \hb@xt@\@tempdima{% + % \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space} + \booknumberlinebox\@tempdima{% + \cftbookname\@cftbsnum #1\@cftasnum}\@cftasnumb}%%\space} \newlength{\cftbeforebookskip} \setlength{\cftbeforebookskip}{2.25em \@plus\p@} @@ -7713,7 +7836,7 @@ \let\@cftasnumb \cftpartaftersnumb %%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip \advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip - {\cftpartfont #1}% + {\cftpartfont {#1}}% \cftpartfillnum{#2}} \nobreak \global\@nobreaktrue @@ -7726,8 +7849,10 @@ \newcommand*\partnumberlinehook[1]{} \newcommand{\partnumberline}[1]{% \partnumberlinehook{#1}% - \hb@xt@\@tempdima{% - \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space} + % \hb@xt@\@tempdima{% + % \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}%%\space} + \partnumberlinebox\@tempdima{% + \cftpartname\@cftbsnum #1\@cftasnum}\@cftasnumb}%%\space} \newlength{\cftbeforepartskip} \setlength{\cftbeforepartskip}{2.25em \@plus\p@} @@ -7777,7 +7902,7 @@ \addtolength{\@tempdima}{\cftchapternumwidth}% %%% \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip \advance\memRTLleftskip \@tempdima \null\nobreak\hskip -\memRTLleftskip - {\cftchapterfont #1}\nobreak + {\cftchapterfont {#1}}\nobreak \cftchapterfillnum{#2}} \fi} @@ -7795,7 +7920,9 @@ \newcommand*\chapternumberlinehook[1]{} \newcommand{\chapternumberline}[1]{% \chapternumberlinehook{#1}% - \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}% + % \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}% + % \@cftasnumb} + \chapternumberlinebox\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum}% \@cftasnumb} \newlength{\cftbeforechapterskip} @@ -7868,7 +7995,10 @@ \newcommand{\prechapterprecis}{% \vspace*{\prechapterprecisshift}% \begin{quote}\precisfont} -\newcommand*{\postchapterprecis}{\end{quote}} +\newcommand*{\postchapterprecis}{% + \end{quote}% + \par\m@mindentafterchapter% + \@afterheading} \newcommand{\precistocfont}{\normalfont\itshape} \newcommand{\precistocformat}{\noindent} @@ -8439,7 +8569,7 @@ \@namedef{memglsact#1}{@}% actual \@namedef{memglsnx#1}{}% no ref \@namedef{memglsn#1}{\thepage}% num by page - \@namedef{memglsnf#1}{|memjustarg}% no special number format + \@namedef{memglsnf#1}{|memjustarg}% no special number format | emacs \if@filesw \expandafter\newwrite\csname #1memglofile\endcsname \expandafter\immediate\openout \csname #1memglofile\endcsname #1.glo\relax \typeout{Writing glossary file #1.glo }% @@ -8638,6 +8768,14 @@ \fi \setmpbools} +\if@twocolumn\else + \if@twoside + \def\m@mmpar@margin{2} + \else + \def\m@mmpar@margin{1} + \fi +\fi + \newcommand*{\setmpbools}{% \if@twoside \@mparswitchtrue @@ -8876,6 +9014,7 @@ \renewcommand{\footnoterule}{% \kern-3\p@ + \normalcolor% added 2013/05/08 \hrule width .4\columnwidth \kern 2.6\p@} \skip\footins=\bigskipamount @@ -8905,14 +9044,16 @@ \ifhmode\spacefactor\@x@sf\fi \relax} -\newcommand{\mem@multiple@marker}[1]{% +\newcommand{\mem@pn@multiple@marker}[1]{% \leavevmode \ifhmode \edef\@x@sf{\the\spacefactor}% \m@mmf@check \nobreak \fi + \@nameuse{mem@pnmm@start@hook}% #1% + \@nameuse{mem@pnmm@end@hook}% \m@mmf@prepare \ifhmode\spacefactor\@x@sf\fi \relax} @@ -9009,6 +9150,7 @@ \newcommand*{\setfootnoterule}[4][]{% \def\footnoterule{\kern -#2\relax #1\relax + \normalcolor% added 2013/05/08 \hrule width #3\relax \kern #2\kern-#4}} \setfootnoterule{3pt}{0.4\columnwidth}{\normalrulethickness} @@ -10163,10 +10305,12 @@ \immediate\openout\@notefile=\jobname.ent \mempagenotestrue \DeclareRobustCommand\pagenote{\@bsphack\begingroup - % \@sanitize + \rem@special{\ }% <--- added + \@sanitize \m@m@wrpnote}% \DeclareRobustCommand\mem@footto@pagenote{\@bsphack\begingroup - % \@sanitize + \rem@special{\ }% <--- added + \@sanitize \def\mem@pn@step{01}% \m@m@wrpnote}% \typeout{Writing note file \jobname.ent}% @@ -10182,6 +10326,7 @@ \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*{\pnchap}{\f@rtoc} \newcommand*{\pnschap}{\f@rbdy} @@ -10190,6 +10335,14 @@ \setcounter{pagenoteshadow}{0} \newcommand\mem@pn@step{00} % i.e. true \newlength\mem@pn@lastkern +\newcommand\m@m@pnwrite@fourtharg[1]{\m@m@pnwrited\@notefile{}{{}}} +\newcommand\m@m@pnwrite@fourtharg@hyperref[1]{% + \@ifmtarg{#1}{% + \m@m@pnwrite\@notefile{}{{\Hy@pagenote@currentHref}}% + }{% + \m@m@pnwrited\@notefile{}{{}}% + }} + \newcommand{\m@m@wrpnote}[2][]{% \mem@pn@lastkern=\lastkern% \refstepcounter{pagenoteshadow}% @@ -10203,28 +10356,30 @@ \ifdim\mem@pn@lastkern=\multiplefootnotemarker% \m@mmf@prepare% rerun \fi% - \mem@multiple@marker{\notenumintext{\thepagenote}}% + \mem@pn@multiple@marker{\notenumintext{\thepagenote}}% }{}% \fi% - \ifm@mpn@new@chap - \global\m@mpn@new@chapfalse + \ifm@mpn@new@chap% + \global\m@mpn@new@chapfalse% \addtonotes{\string\pagenotesubhead{\@chapapp}{\thechapter}{\pnchap}}% - \fi - \ifm@mpn@new@schap - \global\m@mpn@new@schapfalse + \fi% + \ifm@mpn@new@schap% + \global\m@mpn@new@schapfalse% \addtonotes{\string\pagenotesubheadstarred{\@chapapp}{}{\pnschap}}% - \fi + \fi% + \m@m@pnwrite\@notefile{}% + {\string\startnoteentry{\thepagenote}}% + \m@m@pnwrited\@notefile{}{{#1}}% \m@m@pnwrite\@notefile{}% - {\string\startnoteentry{\thepagenote}{#1}% - {pagenote\thepagenoteshadow-\thesheetsequence}}% - \def\next{#2}% + {{pagenote\thepagenoteshadow-\thesheetsequence}}% + \m@m@pnwrite@fourtharg{#1}% \begingroup% \newlinechar='40% - \m@m@pnwrite\@notefile{}{\meaning\next}% + \m@m@pnwrited\@notefile{}{#2}% \endgroup% \m@m@pnwrite\@notefile{}% {\string\endnoteentry}% - \endgroup + \endgroup% \@esphack} \def\pagenote{\@bsphack\begingroup \@sanitize\m@m@pagenote} @@ -10249,9 +10404,8 @@ } \newcommand*{\foottopagenote}{% \let\memsavefootnote\footnote - % now also \footnotemark work + \counterwithout{footnote}{chapter} \letcountercounter{footnote}{pagenote} - % and this takes care of \footnotetext \renewcommand\footnotetext[2][]{\mem@footto@pagenote{##2}} \renewcommand{\footnote}[2][]{\pagenote{##2}} } @@ -10292,34 +10446,30 @@ \newcommand*{\mempnofilewarn}{% \ClassWarning{memoir}{There is no .ent file}} -\newcommand\startnoteentrystart[3]{% +\newcommand\startnoteentrystart[4]{% \prenoteinnotes% \noteidinnotes{#1}{#2}% + \@ifmtarg{#2}{\def\@currentlabel{#1}}{}% + \pagenoteanchor{#4}% \pageinnotes{#3}% \prenotetext% } \def\endnoteentryend{\postnotetext\postnoteinnotes} -\newcommand\mem@make@gt@safe{% - \edef\@tempa{`\string >}% - \ifnum\catcode\@tempa=12% - \let\@ResetGT\relax% - \else% - \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}% - \@makeother\>% - \fi% -} +\let\pagenoteanchor\@gobble +\newcommand\pagenotehyperanchor[1]{% + \expandafter\@ifmtarg\expandafter{#1}{}{% + \Hy@raisedlink{\hyper@@anchor{#1}{\relax}}}}% + \newcommand\mem@printpagenotes[1]{% \ifmempagenotes \notedivision \IfFileExists{\jobname.ent}{% \begingroup - \mem@make@gt@safe% - \def\startnoteentry####1####2####3####4>{% + \long\def\startnoteentry####1####2####3####4{% \begingroup - \@ResetGT - \startnoteentrystart{####1}{####2}{####3}% + \startnoteentrystart{####1}{####2}{####3}{####4}% } - \def\endnoteentry{\endnoteentryend\endgroup} + \long\def\endnoteentry{\endnoteentryend\endgroup} \immediate\closeout\@notefile \input{\jobname.ent}% \if#1\immediate\openout\@notefile=\jobname.ent\fi% @@ -12534,6 +12684,44 @@ \AtEndDocument{\@memensuresigpages} +%%%% Nearly a carbon copy from textcase.dtx by David Carlisle +\def\@uclcnotmath#1#2#3#4{\begingroup + #1% + \def\({$}\let\)\(% $ for emacs :-) + \def\NoCaseChange##1{\noexpand\NoCaseChange{\noexpand##1}}% + \@nonchangecase\label + \@nonchangecase\ref + \@nonchangecase\ensuremath + \def\cite##1##{\toks@{\noexpand\cite##1}\@citex}% + \def\@citex##1{\NoCaseChange{\the\toks@{##1}}}% + \def\reserved@a##1##2{\let#2\reserved@a}% + \expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}% + \protected@edef\reserved@a{\endgroup + \noexpand\@skipmath#3#4$\valign$}% + \reserved@a} +\def\@nonchangecase#1{\def#1##1{\NoCaseChange{#1{##1}}}} +\let\NoCaseChange\@firstofone +\def\@skipmath#1#2$#3${% + \@skip@nonchangecase#1#2\NoCaseChange\valign + \ifx\valign#3% + \else + $#3$% + \expandafter\@skipmath\expandafter#1% + \fi} +\def\@skip@nonchangecase#1#2\NoCaseChange#3{% + #1{#2}% + \ifx\valign#3% + \else + #3% + \expandafter\@skip@nonchangecase\expandafter#1% + \fi} +\DeclareRobustCommand\MakeTextUppercase{% + \@uclcnotmath{\def\i{I}\def\j{J}}{##1##2}\uppercase} +\protected@edef\MakeTextUppercase#1{\MakeTextUppercase{#1}} +\DeclareRobustCommand\MakeTextLowercase{% + \@uclcnotmath{}{##2##1}\lowercase} +\protected@edef\MakeTextLowercase#1{\MakeTextLowercase{#1}} +%%%% End copy from textcase.dtx \newcommand*{\abstractname}{Abstract} \newcommand*{\contentsname}{Contents} \newcommand*{\listfigurename}{List of Figures} @@ -12658,7 +12846,7 @@ \EmulatedPackage{abstract}[2008/07/23] \EmulatedPackage{appendix}[2008/07/23] -\EmulatedPackage{array}[2008/07/23] +\EmulatedPackage{array}[2008/09/09] \EmulatedPackage{booktabs}[2008/07/23] \EmulatedPackage{ccaption}[2008/07/23] \EmulatedPackage{changepage}[2008/07/23] @@ -12699,46 +12887,55 @@ %%% revert changes to captioning macros if the caption package is used. \AtBeginPackage{caption}{ -\ClassWarningNoLine{memoir}{% - You are using the caption package with the memoir \MessageBreak - class. This may cause unexpected or inconsistent \MessageBreak - results if you use any of memoir's captioning facilities} + \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 the + caption package interfaces in order to configure + your captions. + } -\long\def\@makecaption##1##2{% - \vskip\abovecaptionskip - \sbox\@tempboxa{##1: ##2}% - \ifdim \wd\@tempboxa >\hsize - ##1: ##2\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% - \fi - \vskip\belowcaptionskip} + \long\def\@makecaption##1##2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{##1: ##2}% + \ifdim \wd\@tempboxa >\hsize + ##1: ##2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} -\def\caption{% - \ifx\@captype\@undefined - \@latex@error{\noexpand\caption outside float}\@ehd - \expandafter\@gobble - \else - \refstepcounter\@captype - \expandafter\@firstofone - \fi - {\@dblarg{\@caption\@captype}}% -} + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + } -\long\def\@caption##1[##2]##3{% - \par - \addcontentsline{\csname ext@##1\endcsname}{##1}% + \long\def\@caption##1[##2]##3{% + \par + \addcontentsline{\csname ext@##1\endcsname}{##1}% {\protect\numberline{\csname the##1\endcsname}{\ignorespaces ##2}}% - \begingroup - \@parboxrestore - \if@minipage - \@setminipage - \fi - \normalsize - \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par - \endgroup} -} + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@##1\endcsname}{\ignorespaces ##3}\par + \endgroup} + + + \setlength\abovecaptionskip{10\p@} + \setlength\belowcaptionskip{0\p@} + +} % end \AtBeginPackage \AtBeginPackage{float}{\let\newfloat\relax} |