diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/memoir/mempatch.sty | 608 |
1 files changed, 570 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/mempatch.sty b/Master/texmf-dist/tex/latex/memoir/mempatch.sty index c4b1916fd05..a3e4594b2d3 100644 --- a/Master/texmf-dist/tex/latex/memoir/mempatch.sty +++ b/Master/texmf-dist/tex/latex/memoir/mempatch.sty @@ -22,7 +22,7 @@ %% %% This work consists of the files listed in the README file. %% -\ProvidesFile{mempatch.sty}[2007/01/22 v4.8 Patches for memoir class v1.618] +\ProvidesFile{mempatch.sty}[2007/12/14 v4.9 Patches for memoir class v1.618] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Version 4.0 was released simultaneously with version 1.618 of memoir. @@ -49,6 +49,11 @@ %%% Version 4.7 fixes tiny bugs introduced in version 4.6 %%% %%% Version 4.8 fixes some more little bugs. +%%% +%%% Version 4.9 fixes yet more bugs. It also provides means of formatting +%%% page numbers in the ToC, etc., and improved control over line numbering +%%% for verses and boxed verbatims. +%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -581,6 +586,8 @@ \aliaspagestyle{book}{empty} \aliaspagestyle{afterbook}{empty} +\renewcommand{\midpartskip}{\par\vskip 2\onelineskip} + %%% The \book (and \book*) document division is one level higher than %%% a \cs{part}. It has the same kind of controls over its appearance in %%% the body of the document and in the ToC as \part has. @@ -595,7 +602,7 @@ \newcommand*{\toclevel@book}{-2} \newcommand*{\beforebookskip}{\null\vfil} -\newcommand*{\midbookskip}{\par \vskip 2\baselineskip} +\newcommand*{\midbookskip}{\par \vskip 2\onelineskip} \newcommand*{\afterbookskip}{\vfil\newpage} \newcommand*{\@setupbook}{% @@ -622,8 +629,8 @@ \newcommand*{\printbooknum}{\booknumfont \thebook} \newcommand{\printbooktitle}[1]{\booktitlefont #1} -\newcommand*{\membookinfo}[3]{} -\newcommand*{\membookstarinfo}[1]{} +\newcommand{\membookinfo}[3]{} +\newcommand{\membookstarinfo}[1]{} \long\def\@book[#1]#2{% \M@gettitle{#1}% @@ -725,8 +732,11 @@ \newcommand{\cftbookafterpnum}{} \newcommand{\cftbookfillnum}[1]{% {\cftbookleader}% - {\hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}}% +%%%% {\hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}}% + \cftbookformatpnum{#1}% \cftbookafterpnum\par} +\newcommand{\cftbookformatpnum}[1]{% + \hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}} \renewcommand*{\@setclcnt}[2]{% \@tempswafalse @@ -844,7 +854,7 @@ \fi \if@tempswa \@ifundefined{toclevel@#1}{% - @memwarn{Unknown toclevel for #1}% + \@memwarn{Unknown toclevel for #1}% }{% \setcounter{tocdepth}{\@nameuse{toclevel@#1}}% } @@ -1026,6 +1036,7 @@ \fi \setbox0=\vtop to 0pt{% \begin{minipage}[t]{\marginparwidth}% + \normalfont\normalsize \ifoddpage #2\else #1\fi% \end{minipage}% \vss}% @@ -1258,10 +1269,12 @@ \@namedef{cft#2pagefont}{\normalfont} \@namedef{cft#2afterpnum}{} \@namedef{cft#2toclevel@#2}{#4} + \@namedef{cft#2formatpnum}##1{% + \hb@xt@\@pnumwidth{\hfil\@nameuse{cft#2pagefont}##1}} \@namedef{cft#2fillnum}##1{% {\@nameuse{cft#2leader}}\nobreak - \hb@xt@\@pnumwidth{% - \hfil\@nameuse{cft#2pagefont}##1}\@nameuse{cft#2afterpnum}\par} + \@nameuse{cft#2formatpnum}{##1}% + \@nameuse{cft#2afterpnum}\par} }% end of \newlistentry \let\cftbeforesectionskip\relax @@ -1301,6 +1314,23 @@ \newlistentry[chapter]{table}{lot}{0} \cftsetindents{table}{0em}{2.3em} +\newcommand{\cftpartformatpnum}[1]{% + \hb@xt@\@pnumwidth{\hss {\cftpartpagefont #1}}} +\renewcommand{\cftpartfillnum}[1]{% + {\cftpartleader}{\cftpartformatpnum{#1}}% + \cftpartafterpnum\par} +\newcommand{\cftchapterformatpnum}[1]{% + \hb@xt@\@pnumwidth{\hfil{\cftchapterpagefont #1}}} +\renewcommand{\cftchapterfillnum}[1]{% + {\cftchapterleader}\nobreak\cftchapterformatpnum{#1}% + \cftchapterafterpnum\par} + +\DeclareRobustCommand{\cftpagenumberson}[1]{% + \@namedef{cft#1fillnum}##1{% + \@nameuse{cft#1leader}\nobreak + \@nameuse{cft#1formatpnum}{##1}% + \@nameuse{cft#1afterpnum}\par}} + \renewcommand*{\setrectanglesize}[3]{% \nametest{#1}{*}% \ifsamename % H = * @@ -1474,18 +1504,25 @@ \@memznegtest{\stockwidth} \@memznegtest{\paperwidth} \@memznegtest{\textwidth} - \@memznegtest{\spinemargin} - \@memznegtest{\foremargin} +%%% \@memznegtest{\spinemargin} + \@memnegtest{\spinemargin} +%%% \@memznegtest{\foremargin} + \@memnegtest{\foremargin} \@memznegtest{\marginparsep} \@memznegtest{\marginparwidth} \@memznegtest{\stockheight} \@memznegtest{\paperheight} \@memznegtest{\textheight} - \@memznegtest{\uppermargin} - \@memznegtest{\lowermargin} - \@memznegtest{\headheight} - \@memznegtest{\headsep} - \@memznegtest{\footskip} +%%% \@memznegtest{\uppermargin} + \@memnegtest{\uppermargin} +%%% \@memznegtest{\lowermargin} + \@memnegtest{\lowermargin} +%%% \@memznegtest{\headheight} + \@memnegtest{\headheight} +%%% \@memznegtest{\headsep} + \@memnegtest{\headsep} +%%% \@memznegtest{\footskip} + \@memnegtest{\footskip} \nametest{#1}{classic}% \ifsamename \m@mclassicht @@ -1628,7 +1665,7 @@ \parsepii = 0.1667\onelineskip \@plus \p@ \@minus \p@ \topsepii = \parsepi \topsepiii = \parsepii - \everylistparindent \z@} + \everylistparindent \listparindent} \defaultlists \newcommand*{\firmlists}{% @@ -1642,7 +1679,7 @@ \parsepii = 0.0833\onelineskip \@plus \p@ \@minus \p@ \topsepii = \parsepi \topsepiii = \parsepii - \everylistparindent\z@} + \everylistparindent\listparindent} \newcommand*{\m@mfirmlists}{ \setlength{\partopsep}{0.1\onelineskip \@plus 0.05\onelineskip @@ -1653,7 +1690,7 @@ \parsepii = 0.0833\onelineskip \@plus \p@ \@minus \p@ \topsepii = \parsepi \topsepiii = \parsepii - \everylistparindent\z@} + \everylistparindent\listparindent} \renewcommand*{\tightlists}{% \@ifstar{\m@mstightlists}{\m@mtightlists}} @@ -2562,25 +2599,31 @@ \makeevenfoot{plain}{}{\thepage}{} \makeoddfoot{plain}{}{\thepage}{} +\newcommand*{\nouppercaseheads}{% + \let\memUChead\relax} +\newcommand*{\uppercaseheads}{% + \let\memUChead\MakeUppercase} +\uppercaseheads + \if@twoside \makepagestyle{headings} \makepsmarks{headings}{% - \let\@mkboth\markboth +%%% \let\@mkboth\markboth \def\chaptermark##1{% - \markboth{\MakeUppercase{% + \markboth{\memUChead{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \@chapapp\ \thechapter. \ % \fi \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\tocmark{\markboth{\memUChead{\contentsname}}{\memUChead{\contentsname}}}% + \def\lofmark{\markboth{\memUChead{\listfigurename}}{\memUChead{\listfigurename}}}% + \def\lotmark{\markboth{\memUChead{\listtablename}}{\memUChead{\listtablename}}}% + \def\bibmark{\markboth{\memUChead{\bibname}}{\memUChead{\bibname}}}% + \def\indexmark{\markboth{\memUChead{\indexname}}{\memUChead{\indexname}}}% \def\sectionmark##1{% - \markright{\MakeUppercase{% + \markright{\memUChead{% \ifnum \c@secnumdepth > \z@ \thesection. \ % \fi @@ -2591,27 +2634,27 @@ \else \makepagestyle{headings} \makepsmarks{headings}{% - \let\@mkboth\markboth +%%% \let\@mkboth\markboth \def\chaptermark##1{% - \markright{\MakeUppercase{% + \markright{\memUChead{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \@chapapp\ \thechapter. \ % \fi \fi ##1}}}% - \def\tocmark{\markright{\MakeUppercase{\contentsname}}}% - \def\lofmark{\markright{\MakeUppercase{\listfigurename}}}% - \def\lotmark{\markright{\MakeUppercase{\listtablename}}}% - \def\bibmark{\markright{\MakeUppercase{\bibname}}}% - \def\indexmark{\markright{\MakeUppercase{\indexname}}}% + \def\tocmark{\markright{\memUChead{\contentsname}}}% + \def\lofmark{\markright{\memUChead{\listfigurename}}}% + \def\lotmark{\markright{\memUChead{\listtablename}}}% + \def\bibmark{\markright{\memUChead{\bibname}}}% + \def\indexmark{\markright{\memUChead{\indexname}}}% } \makeoddhead{headings}{\slshape\rightmark}{}{\thepage} \fi \makepagestyle{myheadings} \makepsmarks{myheadings}{% - \let\@mkboth\@gobbletwo +%%% \let\@mkboth\@gobbletwo \let\chaptermark\@gobble \let\sectionmark\@gobble \def\tocmark{}% @@ -2636,7 +2679,7 @@ \makeoddfoot{ruled}{}{}{\thepage} \makeheadrule{ruled}{\textwidth}{\normalrulethickness} \renewcommand*{\@ruledmarks}{% - \let\@mkboth\markboth +%%% \let\@mkboth\markboth \def\chaptermark##1{% \markboth{% \ifnum \c@secnumdepth >\m@ne @@ -2676,7 +2719,7 @@ \makeheadrule{companion}{\headwidth}{\normalrulethickness} \makeheadposition{companion}{flushright}{flushleft}{}{} \makepsmarks{companion}{% - \let\@mkboth\markboth +%%% \let\@mkboth\markboth \def\chaptermark##1{\markboth{##1}{##1}} % left mark & right marks \def\sectionmark##1{\markright{% \ifnum \c@secnumdepth>\z@ @@ -2779,6 +2822,7 @@ %% Stefano Bianchi, ctt 2003/12/09 `New chapter style: chapter vs chapter*' \makechapterstyle{bianchi}{% + \chapterstyle{default} \renewcommand*{\chapnamefont}{\normalfont\Large\sffamily\itshape} \renewcommand*{\chapnumfont}{\normalfont\huge} \renewcommand*{\printchaptername}{% @@ -2793,6 +2837,7 @@ \vphantom{\chapnumfont \textit{9}}\afterchapternum}} \makechapterstyle{bringhurst}{% + \chapterstyle{default} \renewcommand*{\chapterheadstart}{} \renewcommand*{\printchaptername}{} \renewcommand*{\chapternamenum}{} @@ -2804,10 +2849,12 @@ \vskip\onelineskip \hrule\vskip\onelineskip}} \makechapterstyle{brotherton}{% + \chapterstyle{default} \renewcommand*{\printchapternum}{\chapnumfont \ifanappendix \thechapter \else \numtoName{\c@chapter}\fi}} \makechapterstyle{chappell}{% + \chapterstyle{default} \setlength{\beforechapskip}{0pt} \renewcommand*{\chapnamefont}{\large\centering} \renewcommand*{\chapnumfont}{\large} @@ -2820,16 +2867,18 @@ \hrule\vskip\onelineskip \centering\chaptitlefont ##1}} \makechapterstyle{culver}{% + \chapterstyle{default} \chapterstyle{article}% -%%% \renewcommand*{\thechapter}{\Roman{chapter}} + \renewcommand*{\thechapter}{\Roman{chapter}} \renewcommand*{\printchapternum}{% center number/title - \centering\chapnumfont \thechapter\space}% + \centering\chapnumfont \thechapter\space\space}% \renewcommand*{\printchapternonum}{\centering} \renewcommand*{\clearforchapter}{}% no new page \aliaspagestyle{chapter}{headings}% no special pagestyle } \makechapterstyle{dash}{% + \chapterstyle{default} \setlength{\beforechapskip}{5\onelineskip} \renewcommand*{\printchaptername}{} \renewcommand*{\chapternamenum}{} @@ -2846,6 +2895,7 @@ \setlength{\afterchapskip}{2.5\onelineskip}} \makechapterstyle{demo2}{% + \chapterstyle{default} \renewcommand*{\printchaptername}{\centering} \renewcommand*{\printchapternum}{\chapnumfont \ifanappendix \thechapter \else \numtoName{\c@chapter}\fi} @@ -2861,7 +2911,27 @@ \vskip\topskip} \setlength{\beforechapskip}{2\onelineskip}} +\makechapterstyle{demo3}{% + \chapterstyle{default} + \renewcommand*{\printchaptername}{\centering} + \renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape} + \renewcommand*{\printchapternum}{\chapnumfont + \ifanappendix \thechapter \else \numtoName{\c@chapter}\fi} + \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily} + \renewcommand*{\printchaptertitle}[1]{% + \hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1} + \renewcommand*{\afterchaptertitle}{% + \vskip\onelineskip \hrule\vskip \afterchapskip} + \setlength{\beforechapskip}{0pt} + \setlength{\midchapskip}{2\onelineskip} + \setlength{\afterchapskip}{2\onelineskip} + \renewcommand*{\printchapternonum}{% + \vphantom{\chapnumfont One} + \afterchapternum% + \vskip\topskip}} + \makechapterstyle{ell}{% + \chapterstyle{default} \renewcommand*{\chapnumfont}{\normalfont\HUGE\sffamily} \renewcommand*{\chaptitlefont}{\normalfont\huge\sffamily} \settowidth{\chapindent}{\chapnumfont 111} @@ -2885,6 +2955,7 @@ %% Gerardo Garcia, ctt 2002/04/12, `Fancy Headings, Chapter Headings \makechapterstyle{ger}{% + \chapterstyle{default} \renewcommand*{\chapterheadstart}{\vspace*{\beforechapskip} \mbox{}\\\mbox{}\rule[0pt]{\textwidth}{0.4pt}\par} \setlength{\midchapskip}{20pt} @@ -2892,6 +2963,7 @@ \\\mbox{}\rule[5pt]{\textwidth}{0.4pt}}} \makechapterstyle{lyhne}{% needs graphicx package + \chapterstyle{default} \setlength{\beforechapskip}{1.5cm} \setlength{\afterchapskip}{1cm} \setlength{\midchapskip}{2cm} @@ -2908,6 +2980,7 @@ %% posted to ctt, December 2003 %%%% \usepackage{graphicx} \makechapterstyle{madsen}{% + \chapterstyle{default} \renewcommand*{\chapnamefont}{% \normalfont\Large\scshape\raggedleft} \renewcommand*{\chaptitlefont}{% @@ -2925,6 +2998,7 @@ \newcommand*{\colorchapnum}{} \newcommand*{\colorchaptitle}{} \makechapterstyle{pedersen}{% + \chapterstyle{default} \setlength{\beforechapskip}{-20pt} \setlength{\afterchapskip}{10pt} \renewcommand*{\chapnamefont}{\normalfont\LARGE\itshape} @@ -2942,6 +3016,7 @@ %% Thomas Dye's southall chapter style \makechapterstyle{southall}{% + \chapterstyle{default} \setlength{\afterchapskip}{5\baselineskip} \setlength{\beforechapskip}{36pt}% \headindent \setlength{\midchapskip}{\textwidth}% \rightblock @@ -2965,6 +3040,7 @@ \hrulefill \par\nobreak\noindent \vskip \afterchapskip}} \makechapterstyle{thatcher}{% + \chapterstyle{default} \renewcommand*{\chapterheadstart}{} \renewcommand*{\printchaptername}{% \centerline{\chapnumfont{\@chapapp\ \thechapter}}} @@ -2985,6 +3061,7 @@ %% will not display accurately. It requires the graphicx package. %%%% \usepackage{graphicx} \makechapterstyle{veelo}{% + \chapterstyle{default} \setlength{\afterchapskip}{40pt} \renewcommand*{\chapterheadstart}{\vspace*{40pt}} \renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt} @@ -3009,6 +3086,7 @@ \makeoddfoot{plain}{}{}{\thepage}} \makechapterstyle{verville}{% + \chapterstyle{default} \setlength{\beforechapskip}{0pt} \renewcommand*{\printchaptername}{} \renewcommand*{\printchapternum}{% @@ -3069,6 +3147,460 @@ \fi \fi} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%% Version 4.9 (2007/05/02 and later) + +\renewcommand{\newfloat}[4][\@empty]{% +%%%% \@namedef{ftype@#2}{\value{newflo@tctr}} +%%%% \addtocounter{newflo@tctr}{\value{newflo@tctr}} + \expandafter\edef\csname ftype@#2\endcsname{\the\c@newflo@tctr} + \advance\c@newflo@tctr \c@newflo@tctr + \@ifundefined{c@#2}{% counter is not defined + \ifx \@empty#1\relax + \newcounter{#2} + \else + \newcounter{#2}[#1] + \expandafter\edef\csname the#2\endcsname{% + \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}} + \fi}{} + \setcounter{#2}{0} + + \@namedef{ext@#2}{#3} % file extension + \@ifundefined{c@#3depth}{\newcounter{#3depth}}{} + \setcounter{#3depth}{1} + + \@namedef{fps@#2}{tbp} % position + \@namedef{fnum@#2}{#4~\@nameuse{the#2}} % caption naming + \@namedef{fleg#2}{#4} % legend naming + \@namedef{flegtoc#2}##1{} % legend name in ToC + + \newenvironment{#2}{\@float{#2}}{\end@float} + \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat} +} % end \newfloat + +%%%% fix figure and table settings. +\def\ftype@figure{1} +\def\ftype@table{2} +\setcounter{newflo@tctr}{4} + +\newcommand*{\@@m@mline}{\hb@xt@\linewidth} + +\renewcommand*{\setupboxverb@line}{% + \par + \ifbvperpage + \output=\expandafter{\expandafter\boxverb@split \the\output} + \fi + \def\verbatim@processline{\leavevmode + \b@vdocount% + \bvleftsidehook\vbox{\advance% \hsize-.8\p@% changed to \linewidth + \linewidth-.8\p@ + \@@line + {\b@vdooutside\strut\kern\bvboxsep% + \b@vdoinside% + \ift@bs + \tabverbatim@processline + \else + \the\verbatim@line + \fi + \hss}% + \kern\bvboxsep}\bvrightsidehook\par}} +\renewcommand*{\boxedverbatim}{\begingroup + \let\@@line\@@m@mline%%% new in v4.9 + \setupboxverb@line + \@verbatim + \setupbox@verb + \verbatim@start} + +\renewcommand*{\bvtoprulehook}{\hrule width\linewidth \nobreak \vskip -0.1pt} +\renewcommand*{\bvendrulehook}{\hrule width\linewidth} +\renewcommand*{\bvendofpage}{\hrule width\linewidth\kern-0.4pt} + +\newdimen\prechapterprecisshift +\ifartopt + \prechapterprecisshift=0pt +\else + \prechapterprecisshift=-2\baselineskip +\fi +\newcommand*{\precisfont}{\normalfont\itshape} +\renewcommand*{\prechapterprecis}{% + \vspace*{\prechapterprecisshift}% + \begin{quote}\precisfont} + +\newcommand*{\m@mopsidebar}{% + \ifvoid\sideins\else + \setbox\@outputbox \vbox{% + \sidecontents + \unvbox\@outputbox} + \fi} + +\gdef\mem@makecol{% + \m@m@makecolintro + \ifvoid\footins + \setbox\@outputbox \box\@cclv + \else + \setbox\@outputbox \vbox{% + \boxmaxdepth\@maxdepth + \@tempdima\dp\@cclv + \unvbox\@cclv + \vskip-\@tempdima + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule + \unvbox\footins + \color@endgroup + } + \fi + \m@mdoextrafeet + \m@m@makecolfloats + \m@mopsidebar + \m@m@makecoltext + \global\maxdepth \@maxdepth} + +\gdef\mem@makecolbf{% + \m@m@makecolintro + \setbox\@outputbox \box\@cclv + \m@m@makecolfloats + \m@mopsidebar + \ifvoid\footins + \else + \setbox\@outputbox \vbox{% + \boxmaxdepth\@maxdepth + \unvbox\@outputbox + \vskip \skip\footins + \color@begingroup + \normalcolor + \footnoterule + \unvbox\footins + \color@endgroup + }% + \fi + \m@m@makecoltext + \global\maxdepth \@maxdepth} + +\gdef\@reinserts{% + \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi + \m@mdodoreinextrafeet + \ifvbox\@kludgeins\insert\@kludgeins{\unvbox\@kludgeins}\fi + \ifvoid\sideins\else\insert\sideins{\unvbox\sideins}\fi +} + +\newcommand*{\setfloatlocations}[2]{\@namedef{fps@#1}{#2}} + +\renewcommand*{\setsecnumdepth}[1]{% + \ifx\@nodocument\relax% after the preamble + \@setclcnt{#1}{secnumdepth}% + \else + \@setclcnt{#1}{secnumdepth}% + \@setclcnt{#1}{maxsecnumdepth}% + \fi} +\setsecnumdepth{section} + +\renewcommand*{\addappheadtotoc}{% + \phantomsection\addcontentsline{toc}{chapter}{\appendixtocname}} + +\renewcommand{\memcaptioninfo}[4]{} +\renewcommand{\memlegendinfo}[1]{} +\renewcommand{\memnamedlegendinfo}[3]{} +\renewcommand{\membitwonumcaptioninfo}[7]{} +\renewcommand{\membionenumcaptioninfo}[7]{} +\renewcommand{\membicaptioninfo}[6]{} + +\renewcommand{\mempartinfo}[3]{} +\renewcommand{\mempartstarinfo}[1]{} +\renewcommand{\memchapinfo}[4]{} +\renewcommand{\memchapstarinfo}[2]{} +\renewcommand{\memappchapinfo}[4]{} +\renewcommand{\memappchapstarinfo}[2]{} +\renewcommand{\memsecinfo}[5]{} +\renewcommand{\memsecstarinfo}[2]{} + +\renewcommand{\mempoeminfo}[1]{} +\renewcommand{\mempoemstarinfo}[1]{} +\renewcommand{\memPoemTitleinfo}[4]{} +\renewcommand{\memPoemTitlestarinfo}[2]{} + +\renewcommand{\memapppageinfo}[1]{} +\renewcommand{\memapppagestarinfo}[1]{} +\renewcommand{\memleadpageinfo}[3]{} +\renewcommand{\memleadpagestarinfo}[2]{} + +\renewcommand*{\@vslnumright}{% + \hfill\rlap{\kern\vrightskip\kern\rightmargin% + \vlvnumfont\getthelinenumber{poemline}}} +\renewcommand*{\@vslnumleft}{% + \hfill\rlap{\kern-\textwidth\kern-\vrightskip% + \vlvnumfont\getthelinenumber{poemline}}} + +\newcounter{memfvsline} + \c@memfvsline=\z@ +\newcommand*{\setverselinenums}[2]{% + \c@poemline #1\relax \advance\c@poemline \m@ne + \refstepcounter{poemline}% + \ifnum\z@<\linemodnum% we are printing line numbers + \@tempcnta #2\relax + \divide\@tempcnta\linemodnum + \multiply\@tempcnta\linemodnum + \c@memfvsline #2\relax + \advance\c@memfvsline-\@tempcnta + \fi} +\renewcommand*{\getthelinenumber}[1]{ + \ifnum\@ne>\linemodnum% no line numbers + \else + \ifnum\@ne=\linemodnum% every line numbered + \@nameuse{the#1}% + \else + \@tempcnta=\@nameuse{c@#1}% + \advance\@tempcnta -\c@memfvsline + \divide\@tempcnta \linemodnum + \multiply\@tempcnta \linemodnum + \advance\@tempcnta \c@memfvsline + \ifnum\@tempcnta=\@nameuse{c@#1}\@nameuse{the#1}\fi + \fi + \fi} + +\newcounter{memfbvline} + \c@memfbvline=\z@ +\newcommand*{\setbvlinenums}[2]{% + \c@bvlinectr #1\relax \advance\c@bvlinectr \m@ne + \ifnum\z@<\linemodnum% we are printing lines + \@tempcnta #2\relax + \divide\@tempcnta\linemodnum + \multiply\@tempcnta\linemodnum + \c@memfbvline #2\relax + \advance\c@memfbvline-\@tempcnta + \fi} +\newcommand*{\getthebvlinenumber}[1]{% + \ifnum\@ne>\linemodnum% no line numbers + \else + \ifnum\@ne=\linemodnum% every line numbered + \@nameuse{the#1}% + \else + \@tempcnta=\@nameuse{c@#1}% + \advance\@tempcnta-\c@memfbvline + \divide\@tempcnta \linemodnum + \multiply\@tempcnta \linemodnum + \advance\@tempcnta \c@memfbvline + \ifnum\@tempcnta=\@nameuse{c@#1}\@nameuse{the#1}\fi + \fi + \fi} + +\renewcommand*{\theb@vlinenumber}{\getthebvlinenumber{bvlinectr}} + +%%% \ifetex is TRUE if etex is used instead of tex as the basis. +\newif\ifetex + \etexfalse +\ifx\eTeXversion\@undefined\else + \ifx\eTeXversion\relax\else + \ifnum\eTeXversion>0\relax + \etextrue + \fi + \fi +\fi + +\ifetex + \renewcommand*{\killm@matf}[1]{% + \ifnum 6=\currentgrouptype + \ifvmode + \expandafter\expandafter\expandafter\@firstoftwo + \expandafter\expandafter\expandafter\noalign + \fi + \fi + \@firstofone + {\@namelet{#1-m@mfb}\relax + \@namelet{#1-m@mfe}\relax + }% + } +\fi + +%%% kill \newfloat if the float package is used. +\AtBeginPackage{float}{\let\newfloat\relax} + +%%% 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 memoir's captioning facilities} + +\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}} +} + +\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} +} + +%%% Use this to check if XeTeX is being used. +\newif\ifxetex +\expandafter\ifx\csname XeTeXrevision\endcsname\relax + \xetexfalse +\else + \xetextrue +\fi + +\def\bs{\texttt{\char`\\}} +\ifx\l@nohyphenation\undefined + \newlanguage\l@nohyphenation +\fi +\DeclareRobustCommand{\meta}[1]{% + \ensuremath\langle + \ifmmode \expandafter \nfss@text \fi + {% + \meta@font@select + \edef\meta@hyphen@restore + {\hyphenchar\the\font\the\hyphenchar\font}% + \hyphenchar\font\m@ne + \language\l@nohyphenation + #1\/% + \meta@hyphen@restore + }\ensuremath\rangle +} +\def\meta@font@select{\itshape} + +\DeclareRobustCommand{\marg}[1]{% + {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}} +\DeclareRobustCommand{\oarg}[1]{% + {\ttfamily\char`\[}\meta{#1}{\ttfamily\char`\]}} +\DeclareRobustCommand{\parg}[1]{% + {\ttfamily\char`\(}\meta{#1}{\ttfamily\char`\)}} +\DeclareRobustCommand{\cs}[1]{\texttt{\char`\\#1}} +%%%%\providecommand*{\cmd}[1]{\cs{\expandafter\cmd@to@cs\string#1}} +%%%% \def\cmd@to@cs#1#2{\char\number`#2\relax} +\newcommand{\cmdprint}[1]{\texttt{\string#1}} +\newcommand{\cmd}[1]{\cmdprint{#1}% + \index{\expandafter\@gobble\string#1?\string\cmdprint{\string#1}}} + +\renewcommand*{\copypagestyle}[2]{% + \makepagestyle{#1}% + \makeevenhead{#1}{\@nameuse{#2eheadl}}% + {\@nameuse{#2eheadc}}{\@nameuse{#2eheadr}}% + \makeoddhead{#1}{\@nameuse{#2oheadl}}% + {\@nameuse{#2oheadc}}{\@nameuse{#2oheadr}}% + \makeevenfoot{#1}{\@nameuse{#2efootl}}% + {\@nameuse{#2efootc}}{\@nameuse{#2efootr}}% + \makeoddfoot{#1}{\@nameuse{#2ofootl}}% + {\@nameuse{#2ofootc}}{\@nameuse{#2ofootr}}% + \makerunningwidth{#1}{\@nameuse{#2runwidth}}% +%%%% corrected these elements + \@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}% + \@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}% + \@namedef{#1evenhpr}{\@nameuse{#2evenhpr}}% + \@namedef{#1oddhpr}{\@nameuse{#2oddhpr}}% +%%%% added these elements + \@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}% + \@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}% + \@namedef{#1evenfpr}{\@nameuse{#2evenfpr}}% + \@namedef{#1oddfpr}{\@nameuse{#2oddfpr}}% +%%%% back to the original + \@namedef{#1headrule}{\@nameuse{#2headrule}}% + \@namedef{#1footrule}{\@nameuse{#2footrule}}% + \makepsmarks{#1}{\@nameuse{#2pshook}}% +} + +\newcommand*{\@ivpt}{4} +\newcommand*{\@xxxvipt}{36} +\newcommand*{\@xviiilpt}{48} +\newcommand*{\@lxpt}{60} +\newcommand*{\@lxxiipt}{72} + +\newcommand*{\extendedfontsizes}{% +\ifcase\@ptsize % 0=10pt + \or % 11pt + \renewcommand*{\HUGE}{\@setfontsize\HUGE\@xxxvipt{48}} + \or % 12pt + \renewcommand*{\Huge}{\@setfontsize\Huge\@xxxvipt{48}} + \renewcommand*{\HUGE}{\@setfontsize\HUGE\@xviiilpt{60}} + \or \or % 14pt + \renewcommand*{\huge}{\@setfontsize\huge\@xxxvipt{48}} + \renewcommand*{\Huge}{\@setfontsize\Huge\@xviiilpt{60}} + \renewcommand*{\HUGE}{\@setfontsize\HUGE\@lxpt{72}} + \or \or \or % 17pt + \renewcommand*{\LARGE}{\@setfontsize\LARGE\@xxxvipt{44}} + \renewcommand*{\huge}{\@setfontsize\huge\@xviiilpt{60}} + \renewcommand*{\Huge}{\@setfontsize\Huge\@lxpt{72}} + \renewcommand*{\HUGE}{\@setfontsize\HUGE\@lxxiipt{90}} + \or \or % 9pt + \renewcommand*{\miniscule}{\@setfontsize\miniscule\@ivpt{5}} +\fi} + +\renewcommand*{\@smemmain}{% + \@mainmattertrue + \setcounter{secnumdepth}{\value{maxsecnumdepth}} + \ifartopt + \if@twoside + \cleardoublepage + \else + \clearpage + \fi + \else + \cleardoublepage + \counterwithin{figure}{chapter} + \counterwithin{table}{chapter} + \fi} + +%%% +%%% Following code suggested by Lars Madsen +%%% Command inserted in a `List of' holding a hook for extra code +\newcommand*{\cftinsert}[1]{\@nameuse{cftinsert#1}} +%%% Create a hook to be executed in a `List of'. Since we use \@nameuse +%%% it does not matter if the hook does not exist +\newcommand{\cftinsertcode}[2]{\@namedef{cftinsert#1}{#2}} +%%% Insert a hook into the `List of' file +\newcommand*{\cftinserthook}[2]{% + \addtocontents{#1}{\protect\cftinsert\protect{#1\protect}}} +%%% +%%% Use like this: +%%% \cftinsertcode{A}{% +%%% \renewcommand*{\cftchapterfont}{\normalfont\scshape} +%%% ... +%%% } +%%% \cftinsertcode{F}{...} +%%% \cftinsertcode{G}{...} +%%% ... +%%% \frontmatter +%%% \tableofcontents +%%% \cftinserthook{lof}{G} +%%% \listoffigures +%%% \chapter{...} +%%% ... +%%% \mainmatter +%%% \cftinserthook{lof}{F} +%%% \cftinserthook{toc}{A} +%%% \chapter{...} +%%% + +\newcommand*{\toclevel@part}{-1} +\newcommand*{\toclevel@chapter}{0} + \endinput %% %% End of file `mempatch.sty'. |