summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memoir.cls192
1 files changed, 131 insertions, 61 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls
index 0fb671d7dc5..4e2948001e5 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}%
- [2015/03/05 v3.7c configurable book, report, article document class]
-\newcommand\memversion{v3.7c, 2015/03/05}
+ [2015/04/23 v3.7d configurable book, report, article document class]
+\newcommand\memversion{v3.7d, 2015/04/23}
\newcommand*{\@ptsize}{}
\newcommand*{\@memptsize}{}
\newlength{\onelineskip}
@@ -1001,6 +1001,14 @@
\setlength{\marginparwidth}{#2}%
\setlength{\marginparpush}{#3}}
+\newcommand\setfootins[2]{
+ \setlength{\skip\footins}{#1}
+ \setlength{\skip\footinsv@r}{#1}
+ \setlength{\skip\@mpfootins}{#2}
+ % not explicitly used
+ \setlength{\skip\@mpfootinsv@r}{#2}
+}
+
\settrimmedsize{\stockheight}{\stockwidth}{*}
\settrims{\z@}{\z@}
@@ -1617,12 +1625,12 @@
\newcommand{\makeheadrule}[3]{%
\mem@ps@safe@change{#1}%
\@namedef{#1headrule}{%
- \@nameuse{#1headruleprefix}\hrule\@width #2\@height #3 \vskip-#3}}
+ \hrule\@width #2\@height #3 \vskip-#3}}
\newcommand{\makefootrule}[4]{%
\mem@ps@safe@change{#1}%
\@namedef{#1footrule}{%
\vskip-#4\vskip-#3%
- \@nameuse{#1footruleprefix}\hrule\@width #2\@height #3 \vskip #4}}
+ \hrule\@width #2\@height #3 \vskip #4}}
\newcommand\makeheadfootruleprefix[3]{%
\@namedef{#1headruleprefix}{#2}%
@@ -1736,7 +1744,12 @@
\@namedef{#1@#3#2}{%
\@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%
+ \mem@hfboxer{\nametest{#2}{foot}\ifsamename%
+ \begingroup% to prevent colors from bleeding into the footer
+ \@nameuse{#1#2ruleprefix}%
+ \@nameuse{#1#2rule}%
+ \endgroup%
+ \fi%
\hbox{%
\rlap{%
\parbox[\@nameuse{#1#2vplacement}]{\@nameuse{#1#2runwidth}}{%
@@ -1753,7 +1766,10 @@
\mem@ps@entry@wrap{\@nameuse{#1#4#2r}}%
\@nameuse{#1ps#2strut}}}%
}%
- \nametest{#2}{head}\ifsamename\@nameuse{#1#2rule}\fi%
+ \nametest{#2}{head}\ifsamename%
+ \@nameuse{#1#2ruleprefix}%
+ \@nameuse{#1#2rule}%
+ \fi%
}}\@nameuse{#1#3#2pr}}%
\@namedef{@#3#2}{\@nameuse{#1@#3#2}}%
}
@@ -6367,21 +6383,24 @@
\def\end@dblfloat{%
\@memlistsubcaptions{\@captype}\@memoldedblfloat}
-\@ifundefined{MEMOIROVERRIDE}{
-\AtBeginDocument{\@ifpackageloaded{fixltx2e}{%
- \def\end@dblfloat{%
- \if@twocolumn
- \@endfloatbox
- \ifnum\@floatpenalty<\z@
- \@largefloatcheck
- \global\dp\@currbox1sp %
- \@cons\@deferlist\@currbox
- \fi
- \ifnum\@floatpenalty=-\@Mii \@Esphack\fi
- \else
- \end@float
- \fi}}{}}
-}{\typeout{MEMOIROVERRIDE initiated, ignoring internal fixltx2e 'patch'}}
+\AtBeginDocument{%
+ \@ifpackageloaded{fixltx2e}{%
+ \@ifpackagelater{fixltx2e}{2014/01/01}{}{% package older than 2014/01/01
+ \def\end@dblfloat{%
+ \if@twocolumn
+ \@endfloatbox
+ \ifnum\@floatpenalty<\z@
+ \@largefloatcheck
+ \global\dp\@currbox1sp %
+ \@cons\@deferlist\@currbox
+ \fi
+ \ifnum\@floatpenalty=-\@Mii \@Esphack\fi
+ \else
+ \end@float
+ \fi}%
+ }
+ }{}
+}
\def\mem@fb@botlist{\@botlist}
\def\mem@fb@topblock{\suppressfloats[t]}
@@ -8529,14 +8548,18 @@
\vss}}
\renewcommand{\raggedbottom}{%
+ \def\mem@flshbot{01}%
\def\@textbottom{\vskip\z@ plus.0001fil}%
\let\@texttop\@mkidx}
\renewcommand{\flushbottom}{%
+ \def\mem@flshbot{00}%
\let\@textbottom\relax
\let\@texttop\@mkidx}
\let\@texttop\@mkidx
+\flushbottom
\newcommand*{\sloppybottom}{%
+ \def\mem@flshbot{01}%
\def\@textbottom{\vskip \z@ \@plus.0001fil \@minus .95\topskip}%
\topskip=1\topskip \@plus 0.625\topskip \@minus .95\topskip
\def\@texttop{\vskip \z@ \@plus -0.625\topskip \@minus -0.95\topskip}}
@@ -9453,7 +9476,9 @@
\newcommand{\m@make@footstart}[1]{%
\@namedef{@footstart#1}{%
- \vskip\bigskipamount
+ %\vskip\bigskipamount
+ \mem@if@flushbottomF\m@mopfn@bottom
+ \vskip\skip\csname footins#1\endcsname
\leftskip=\z@
\rightskip=\z@
\footnoterule}}
@@ -9874,36 +9899,72 @@
\setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
\setbox\@tempboxa\box\@cclv
\xdef\@deferlist{\@toplist\@botlist\@deferlist}%
- \global\let\@toplist\@empty
- \global\let\@botlist\@empty
- \global\@colroom\@colht
+ \global \let \@toplist \@empty
+ \global \let \@botlist \@empty
+ \global \@colroom \@colht
\ifx \@currlist\@empty
\else
- \@latexerr{Float(s) lost}\@ehb
- \global\let\@currlist\@empty
+ \@latexerr{Float(s) lost}\@ehb
+ \global \let \@currlist \@empty
\fi
\@makefcolumn\@deferlist
\@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
\if@twocolumn
\if@firstcolumn
- \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
- \global\let\@dbltoplist\@empty
- \global\@colht\textheight
+ \xdef\@deferlist{\@dbltoplist\@deferlist}%
+ \global \let \@dbltoplist \@empty
+ \global \@colht \textheight
\begingroup
- \@dblfloatplacement
- \@makefcolumn\@dbldeferlist
- \@whilesw\if@fcolmade \fi{\@outputpage
- \@makefcolumn\@dbldeferlist}%
- \endgroup
- \else
+ \@dblfloatplacement
+ \@makefcolumn\@deferlist
+ \@whilesw\if@fcolmade \fi{\@outputpage
+ \@makefcolumn\@deferlist}%
+ \endgroup
+ \else
\vbox{}\clearpage
\fi
\fi
+ \ifx\@deferlist\@empty \else\clearpage \fi
\else
\setbox\@cclv\vbox{\box\@cclv\vfil}%
\@makecol\@opcol
\clearpage
- \fi}
+ \fi
+ % older version
+ % \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
+ % \setbox\@tempboxa\box\@cclv
+ % \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
+ % \global\let\@toplist\@empty
+ % \global\let\@botlist\@empty
+ % \global\@colroom\@colht
+ % \ifx \@currlist\@empty
+ % \else
+ % \@latexerr{Float(s) lost}\@ehb
+ % \global\let\@currlist\@empty
+ % \fi
+ % \@makefcolumn\@deferlist
+ % \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
+ % \if@twocolumn
+ % \if@firstcolumn
+ % \xdef\@dbldeferlist{\@dbltoplist\@dbldeferlist}%
+ % \global\let\@dbltoplist\@empty
+ % \global\@colht\textheight
+ % \begingroup
+ % \@dblfloatplacement
+ % \@makefcolumn\@dbldeferlist
+ % \@whilesw\if@fcolmade \fi{\@outputpage
+ % \@makefcolumn\@dbldeferlist}%
+ % \endgroup
+ % \else
+ % \vbox{}\clearpage
+ % \fi
+ % \fi
+ % \else
+ % \setbox\@cclv\vbox{\box\@cclv\vfil}%
+ % \@makecol\@opcol
+ % \clearpage
+ % \fi
+}
\gdef\@doclearpage{\mem@doclearpage}
\newcommand*{\m@m@makecolfloats}{%
@@ -9929,6 +9990,7 @@
\@tempdima\dp\@cclv
\unvbox\@cclv
\vskip-\@tempdima
+ \mem@if@flushbottomF\m@mopfn@bottom
\vskip \skip\footins
\color@begingroup
\normalcolor
@@ -9940,6 +10002,7 @@
\setbox\@outputbox \vbox{%
\boxmaxdepth\@maxdepth
\unvbox\@outputbox
+ \mem@if@flushbottomF\m@mopfn@bottom
\vskip\skip\footins
\color@begingroup
\normalcolor
@@ -9954,30 +10017,30 @@
\unvbox\@outputbox}
\fi}
-\gdef\mem@makecol{%
- \m@m@makecolintro
- \ifvoid\footins
- \setbox\@outputbox \box\@cclv
- \else
- \m@mopfootnote
- \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
- \ifvoid\footins\else
- \m@mopfootnotebf
- \fi
- \m@mdoextrafeet
- \m@mopsidebar
- \m@m@makecoltext
- \global\maxdepth \@maxdepth}
+ % \gdef\mem@makecol{%
+ % \m@m@makecolintro
+ % \ifvoid\footins
+ % \setbox\@outputbox \box\@cclv
+ % \else
+ % \m@mopfootnote
+ % \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
+ % \ifvoid\footins\else
+ % \m@mopfootnotebf
+ % \fi
+ % \m@mdoextrafeet
+ % \m@mopsidebar
+ % \m@m@makecoltext
+ % \global\maxdepth \@maxdepth}
\gdef\mem@makecoldblf{%
\m@m@makecolintro
@@ -9996,6 +10059,13 @@
\newcommand{\feetbelowfloat}{\gdef\@makecol{\mem@makecolbf}}
\feetabovefloat
+\newcommand\feetatbottom{\def\m@mopfn@bottom{\vfill\relax}}
+\newcommand\feetbelowragged{\let\m@mopfn@bottom\relax}
+\feetbelowragged
+\newcommand\mem@if@flushbottomF[1]{%
+ \if\mem@flshbot\else#1\fi%
+}
+
% \gdef\@reinserts{%
% \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
% \m@mdodoreinextrafeet