summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/memoir
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-02 14:38:57 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-06-02 14:38:57 +0000
commit82d52884d37b1a23afa751837ee5df24e03a99a4 (patch)
tree48ee8859c29f8239296f846b3b26a8d249ea5576 /Master/texmf-dist/tex/latex/memoir
parent968c2c8410e2d768d324c6f06c6a92395b77cf16 (diff)
memoir v1.61803
git-svn-id: svn://tug.org/texlive/trunk@8483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/memoir')
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem10.clo23
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem11.clo27
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem12.clo28
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem14.clo31
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem17.clo51
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem20.clo105
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem25.clo105
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem30.clo105
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem36.clo105
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem48.clo105
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem60.clo105
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mem9.clo29
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memhfixc.sty2
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memoir.cls4927
-rw-r--r--Master/texmf-dist/tex/latex/memoir/mempatch.sty3613
15 files changed, 4356 insertions, 5005 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/mem10.clo b/Master/texmf-dist/tex/latex/memoir/mem10.clo
index 811775fa1a6..3f027da924c 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem10.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem10.clo
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -24,8 +24,7 @@
%% This work consists of the files listed in the README file.
%%
\ProvidesFile{mem10.clo}%
- [2002/07/27 v0.2 memoir class 10pt size option]
-
+ [2008/01/30 v0.3 memoir class 10pt size option]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt\@xiipt
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
@@ -60,15 +59,15 @@
}%
\belowdisplayskip \abovedisplayskip
}
-\newcommand{\miniscule}{\@setfontsize\miniscule\@vpt{6}}
-\newcommand{\tiny}{\@setfontsize\tiny\@vipt{7}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt{8}}
-\newcommand{\large}{\@setfontsize\large\@xipt{13.6}}
-\newcommand{\Large}{\@setfontsize\Large\@xiipt{14.5}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xivpt{18}}
-\newcommand{\huge}{\@setfontsize\huge\@xviipt{22}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxpt{25}}
-\newcommand{\HUGE}{\@setfontsize\HUGE\@xxvpt{30}}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@vpt{6}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@vipt{7}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@viipt{8}}
+\newcommand*{\large}{\@setfontsize\large\@xipt{13.6}}
+\newcommand*{\Large}{\@setfontsize\Large\@xiipt{14.5}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xivpt{18}}
+\newcommand*{\huge}{\@setfontsize\huge\@xviipt{22}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@xxpt{25}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@xxvpt{30}}
\setlength{\onelineskip}{\@xiipt\p@}
\if@twocolumn
\setlength\parindent{1em}
diff --git a/Master/texmf-dist/tex/latex/memoir/mem11.clo b/Master/texmf-dist/tex/latex/memoir/mem11.clo
index 3c0e3c5df1d..cb102d7cda8 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem11.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem11.clo
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -24,8 +24,7 @@
%% This work consists of the files listed in the README file.
%%
\ProvidesFile{mem11.clo}%
- [2002/07/27 v0.2 memoir class 11pt size option]
-
+ [2008/01/30 v0.3 memoir class 11pt size option]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{13.6}%
\abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
@@ -60,15 +59,19 @@
}%
\belowdisplayskip \abovedisplayskip
}
-\newcommand{\miniscule}{\@setfontsize\miniscule\@vipt{7}}
-\newcommand{\tiny}{\@setfontsize\tiny\@viipt{8}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}}
-\newcommand{\large}{\@setfontsize\large\@xiipt{14.5}}
-\newcommand{\Large}{\@setfontsize\Large\@xivpt{18}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{22}}
-\newcommand{\huge}{\@setfontsize\huge\@xxpt{25}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{30}}
-\let\HUGE=\Huge
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@vipt{7}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@viipt{8}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}}
+\newcommand*{\large}{\@setfontsize\large\@xiipt{14.5}}
+\newcommand*{\Large}{\@setfontsize\Large\@xivpt{18}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xviipt{22}}
+\newcommand*{\huge}{\@setfontsize\huge\@xxpt{25}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@xxvpt{30}}
+\ifextrafontsizes
+ \newcommand*{\HUGE}{\@setfontsize\HUGE\@xxxpt{37}}
+\else
+ \let\HUGE=\Huge
+\fi
\setlength{\onelineskip}{13.6\p@}
\if@twocolumn
\setlength\parindent{1em}
diff --git a/Master/texmf-dist/tex/latex/memoir/mem12.clo b/Master/texmf-dist/tex/latex/memoir/mem12.clo
index cb4ab1725a7..6e57f173bd2 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem12.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem12.clo
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -24,8 +24,7 @@
%% This work consists of the files listed in the README file.
%%
\ProvidesFile{mem12.clo}%
- [2004/03/12 v0.3 memoir class 12pt size option]
-
+ [2008/01/30 v0.4 memoir class 12pt size option]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{14.5}%
\abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
@@ -60,15 +59,20 @@
}%
\belowdisplayskip \abovedisplayskip
}
-\newcommand{\miniscule}{\@setfontsize\miniscule\@viipt{8}}
-\newcommand{\tiny}{\@setfontsize\tiny\@viiipt{9.5}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@ixpt\@xpt}
-\newcommand{\large}{\@setfontsize\large\@xivpt{18}}
-\newcommand{\Large}{\@setfontsize\Large\@xviipt{22}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xxpt{25}}
-\newcommand{\huge}{\@setfontsize\huge\@xxvpt{30}}
-\let\Huge=\huge
-\let\HUGE=\huge
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@viipt{8}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@viiipt{9.5}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@ixpt\@xpt}
+\newcommand*{\large}{\@setfontsize\large\@xivpt{18}}
+\newcommand*{\Large}{\@setfontsize\Large\@xviipt{22}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xxpt{25}}
+\newcommand*{\huge}{\@setfontsize\huge\@xxvpt{30}}
+\ifextrafontsizes
+ \newcommand*{\Huge}{\@setfontsize\Huge\@xxxpt{37}}
+ \newcommand*{\HUGE}{\@setfontsize\HUGE\@xxxvipt{45}}
+\else
+ \let\Huge=\huge
+ \let\HUGE=\huge
+\fi
\setlength{\onelineskip}{14.5\p@}
\if@twocolumn
\setlength\parindent{1em}
diff --git a/Master/texmf-dist/tex/latex/memoir/mem14.clo b/Master/texmf-dist/tex/latex/memoir/mem14.clo
index fb1187d1a92..b35db348909 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem14.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem14.clo
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -24,8 +24,7 @@
%% This work consists of the files listed in the README file.
%%
\ProvidesFile{mem14.clo}%
- [2004/03/12 v0.3 memoir class 14pt size option]
-
+ [2008/01/30 v0.4 memoir class 14pt size option]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xivpt{17.5}%
\abovedisplayskip 14\p@ \@plus3\p@ \@minus8\p@
@@ -60,15 +59,21 @@
}%
\belowdisplayskip \abovedisplayskip
}
-\newcommand{\miniscule}{\@setfontsize\miniscule\@viiipt{9.5}}
-\newcommand{\tiny}{\@setfontsize\tiny\@ixpt{10}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@xpt{12}}
-\newcommand{\large}{\@setfontsize\large\@xviipt{22}}
-\newcommand{\Large}{\@setfontsize\Large\@xxpt{25}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xxvpt{30}}
-\let\huge=\LARGE
-\let\Huge=\LARGE
-\let\HUGE=\LARGE
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@viiipt{9.5}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@ixpt{10}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xpt{12}}
+\newcommand*{\large}{\@setfontsize\large\@xviipt{22}}
+\newcommand*{\Large}{\@setfontsize\Large\@xxpt{25}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xxvpt{30}}
+\ifextrafontsizes
+ \newcommand*{\huge}{\@setfontsize\Huge\@xxxpt{37}}
+ \newcommand*{\Huge}{\@setfontsize\Huge\@xxxvipt{45}}
+ \newcommand*{\HUGE}{\@setfontsize\HUGE\@xlviiipt{60}}
+\else
+ \let\huge=\LARGE
+ \let\Huge=\LARGE
+ \let\HUGE=\LARGE
+\fi
\setlength{\onelineskip}{17.5\p@}
\if@twocolumn
\setlength\parindent{1em}
@@ -84,7 +89,7 @@
\setlength\footskip{.4in}
\setlength\maxdepth{.5\topskip}
\setlength\@maxdepth\maxdepth
-\setlength\footnotesep{10.0\p@} %% ????????
+\setlength\footnotesep{9.5\p@}
\setlength{\skip\footins}{13\p@ \@plus 4\p@ \@minus 2\p@}
\setlength\floatsep {14\p@ \@plus 4\p@ \@minus 4\p@}
\setlength\textfloatsep{20\p@ \@plus 4\p@ \@minus 4\p@}
diff --git a/Master/texmf-dist/tex/latex/memoir/mem17.clo b/Master/texmf-dist/tex/latex/memoir/mem17.clo
index 7950e67dc83..4157a346a45 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem17.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem17.clo
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -24,8 +24,7 @@
%% This work consists of the files listed in the README file.
%%
\ProvidesFile{mem17.clo}%
- [2004/03/12 v0.2 memoir class 17pt size option]
-
+ [2008/01/30 v0.3 memoir class 17pt size option]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xviipt{22}%
\abovedisplayskip 15\p@ \@plus4\p@ \@minus8\p@
@@ -60,36 +59,42 @@
}%
\belowdisplayskip \abovedisplayskip
}
-\newcommand{\miniscule}{\@setfontsize\miniscule\@ixpt{10}}
-\newcommand{\tiny}{\@setfontsize\tiny\@xpt{12}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@xipt{13.6}}
-\newcommand{\large}{\@setfontsize\large\@xxpt{25}}
-\newcommand{\Large}{\@setfontsize\Large\@xxvpt{30}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xxvpt{30}}
-\let\LARGE=\Large
-\let\huge=\Large
-\let\Huge=\Large
-\let\HUGE=\Large
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@ixpt{10}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xpt{12}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xipt{13.6}}
+\newcommand*{\large}{\@setfontsize\large\@xxpt{25}}
+\newcommand*{\Large}{\@setfontsize\Large\@xxvpt{30}}
+\ifextrafontsizes
+ \newcommand*{\LARGE}{\@setfontsize\LARGE\@xxxpt{37}}
+ \newcommand*{\huge}{\@setfontsize\huge\@xxxvipt{45}}
+ \newcommand*{\Huge}{\@setfontsize\Huge\@xlviiipt{60}}
+ \newcommand*{\HUGE}{\@setfontsize\HUGE\@lxpt{72}}
+\else
+ \let\LARGE=\Large
+ \let\huge=\Large
+ \let\Huge=\Large
+ \let\HUGE=\Large
+\fi
\setlength{\onelineskip}{22\p@}
\if@twocolumn
\setlength\parindent{1em}
\else
\setlength\parindent{1.5em}
\fi
-\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}
-\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@}
-\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}
+\setlength\smallskipamount{4\p@ \@plus1\p@ \@minus1\p@}
+\setlength\medskipamount{8\p@ \@plus2\p@ \@minus2\p@}
+\setlength\bigskipamount{17\p@ \@plus4\p@ \@minus4\p@}
\setlength\headheight{22\p@}
\setlength\headsep{.30in}
\setlength\topskip{14.4\p@}
\setlength\footskip{.4in}
\setlength\maxdepth{.5\topskip}
\setlength\@maxdepth\maxdepth
-\setlength\footnotesep{12\p@} %% ????????
-\setlength{\skip\footins}{14\p@ \@plus 5\p@ \@minus 3\p@}
+\setlength\footnotesep{10.15\p@}
+\setlength{\skip\footins}{16\p@ \@plus 5\p@ \@minus 3\p@}
\setlength\floatsep {15\p@ \@plus 4\p@ \@minus 4\p@}
-\setlength\textfloatsep{25\p@ \@plus 5\p@ \@minus 5\p@}
-\setlength\intextsep {16\p@ \@plus 5\p@ \@minus 5\p@}
+\setlength\textfloatsep{25\p@ \@plus 4\p@ \@minus 5\p@}
+\intextsep \floatsep
\setlength\dblfloatsep {15\p@ \@plus 4\p@ \@minus 4\p@}
\setlength\dbltextfloatsep{25\p@ \@plus 5\p@ \@minus 5\p@}
\setlength\@fptop{0\p@ \@plus 1fil}
@@ -101,11 +106,11 @@
\setlength\lxvchars{444\p@} %
\setlength\xlvchars{312\p@} %
\if@twocolumn
- \setlength\marginparsep{10\p@}
+ \setlength\marginparsep{1em}
\else
- \setlength\marginparsep{7\p@}
+ \setlength\marginparsep{0.7em}
\fi
-\setlength{\marginparpush}{10\p@}
+ \setlength\marginparpush{0.5em}
\endinput
%%
%% End of file `mem17.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem20.clo b/Master/texmf-dist/tex/latex/memoir/mem20.clo
new file mode 100644
index 00000000000..3786c4b6b78
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memoir/mem20.clo
@@ -0,0 +1,105 @@
+%%
+%% This is file `mem20.clo',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoir.dtx (with options: `20pt')
+%%
+%% Author: Peter Wilson (herries dot press at earthlink dot net)
+%% Herries Press
+%% Copyright 2001--2008 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% 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".
+%%
+%% This work consists of the files listed in the README file.
+%%
+\ProvidesFile{mem20.clo}%
+ [2008/01/31 v0.1 memoir class 20pt size option]
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@xxpt{25}%
+ \abovedisplayskip 20\p@ \@plus5\p@ \@minus9\p@
+ \abovedisplayshortskip \z@ \@plus5\p@
+ \belowdisplayshortskip 12.5\p@ \@plus6\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\newcommand{\small}{%
+ \@setfontsize\small\@xviipt{22}%
+ \abovedisplayskip 17\p@ \@plus4\p@ \@minus8\p@
+ \abovedisplayshortskip \z@ \@plus4\p@
+ \belowdisplayshortskip 11\p@ \@plus4\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 14\p@ \@plus5\p@ \@minus7\p@
+ \parsep 7\p@ \@plus2\p@ \@minus3\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@xivpt{17.5}%
+ \abovedisplayskip 14\p@ \@plus3\p@ \@minus8\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 7\p@ \@plus3.5\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 12\p@ \@plus4\p@ \@minus6\p@
+ \parsep 6\p@ \@plus2\p@ \@minus3\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@xpt{12}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xipt{13.6}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xiipt{14.5}}
+\newcommand*{\large}{\@setfontsize\large\@xxvpt{30}}
+\newcommand*{\Large}{\@setfontsize\Large\@xxxpt{37}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xxxvipt{45}}
+\newcommand*{\huge}{\@setfontsize\huge\@xlviiipt{60}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@lxpt{72}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@lxxiipt{86}}
+\setlength{\onelineskip}{25\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{1.5em}
+\fi
+\setlength\smallskipamount{5\p@ \@plus1\p@ \@minus1\p@}
+\setlength\medskipamount{10\p@ \@plus2\p@ \@minus2\p@}
+\setlength\bigskipamount{20\p@ \@plus4\p@ \@minus4\p@}
+\setlength\headheight{25\p@}
+\setlength\headsep{36\p@}
+\setlength\topskip{20\p@}
+\setlength\footskip{50\p@}
+\setlength\maxdepth{.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\footnotesep{12.6\p@}
+\setlength{\skip\footins}{19\p@ \@plus 7\p@ \@minus 3\p@}
+\setlength\floatsep {20\p@ \@plus 4\p@ \@minus 4\p@}
+\setlength\textfloatsep{36\p@ \@plus 4\p@ \@minus 8\p@}
+\intextsep \floatsep
+\dblfloatsep \floatsep
+\dbltextfloatsep \textfloatsep
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{17\p@ \@plus 2fil}
+\@fpbot \@fptop
+\@dblfptop \@fptop
+\@dblfpsep \@fpsep
+\@dblfpbot \@dblfptop
+\setlength\lxvchars{528\p@} %
+\setlength\xlvchars{365\p@} %
+\if@twocolumn
+ \setlength\marginparsep{1em}
+\else
+ \setlength\marginparsep{0.7em}
+\fi
+ \setlength\marginparpush{0.5em}
+\endinput
+%%
+%% End of file `mem20.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem25.clo b/Master/texmf-dist/tex/latex/memoir/mem25.clo
new file mode 100644
index 00000000000..71a4a878e2a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memoir/mem25.clo
@@ -0,0 +1,105 @@
+%%
+%% This is file `mem25.clo',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoir.dtx (with options: `25pt')
+%%
+%% Author: Peter Wilson (herries dot press at earthlink dot net)
+%% Herries Press
+%% Copyright 2001--2008 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% 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".
+%%
+%% This work consists of the files listed in the README file.
+%%
+\ProvidesFile{mem25.clo}%
+ [2008/01/31 v0.1 memoir class 25pt size option]
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@xxvpt{30}%
+ \abovedisplayskip 25\p@ \@plus6\p@ \@minus10\p@
+ \abovedisplayshortskip \z@ \@plus6\p@
+ \belowdisplayshortskip 15\p@ \@plus7.5\p@ \@minus4\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\newcommand{\small}{%
+ \@setfontsize\small\@xxpt{25}%
+ \abovedisplayskip 20\p@ \@plus5\p@ \@minus9\p@
+ \abovedisplayshortskip \z@ \@plus5\p@
+ \belowdisplayshortskip 12.5\p@ \@plus6\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 16\p@ \@plus5\p@ \@minus8\p@
+ \parsep 8\p@ \@plus3\p@ \@minus4\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@xviipt{22}%
+ \abovedisplayskip 17\p@ \@plus4\p@ \@minus8\p@
+ \abovedisplayshortskip \z@ \@plus4\p@
+ \belowdisplayshortskip 11\p@ \@plus4\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 14\p@ \@plus5\p@ \@minus7\p@
+ \parsep 7\p@ \@plus2\p@ \@minus3\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@xipt{13.6}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xiipt{14.5}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xivpt{17.5}}
+\newcommand*{\large}{\@setfontsize\large\@xxxpt{37}}
+\newcommand*{\Large}{\@setfontsize\Large\@xxxvipt{45}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xlviiipt{60}}
+\newcommand*{\huge}{\@setfontsize\huge\@lxpt{72}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@lxxiipt{86}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@lxxxivpt{100}}
+\setlength{\onelineskip}{30\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{1.5em}
+\fi
+\setlength\smallskipamount{6\p@ \@plus1\p@ \@minus1\p@}
+\setlength\medskipamount{12\p@ \@plus2\p@ \@minus2\p@}
+\setlength\bigskipamount{24\p@ \@plus4\p@ \@minus4\p@}
+\setlength\headheight{30\p@}
+\setlength\headsep{45\p@}
+\setlength\topskip{25\p@}
+\setlength\footskip{62\p@}
+\setlength\maxdepth{.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\footnotesep{15.4\p@}
+\setlength{\skip\footins}{24\p@ \@plus 8\p@ \@minus 4\p@}
+\setlength\floatsep {24\p@ \@plus 4\p@ \@minus 4\p@}
+\setlength\textfloatsep{43\p@ \@plus 4\p@ \@minus 8\p@}
+\intextsep \floatsep
+\dblfloatsep \floatsep
+\dbltextfloatsep \textfloatsep
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{21\p@ \@plus 2fil}
+\@fpbot \@fptop
+\@dblfptop \@fptop
+\@dblfpsep \@fpsep
+\@dblfpbot \@dblfptop
+\setlength\lxvchars{626\p@} %
+\setlength\xlvchars{438\p@} %
+\if@twocolumn
+ \setlength\marginparsep{1em}
+\else
+ \setlength\marginparsep{0.7em}
+\fi
+ \setlength\marginparpush{0.5em}
+\endinput
+%%
+%% End of file `mem25.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem30.clo b/Master/texmf-dist/tex/latex/memoir/mem30.clo
new file mode 100644
index 00000000000..b897f005e95
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memoir/mem30.clo
@@ -0,0 +1,105 @@
+%%
+%% This is file `mem30.clo',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoir.dtx (with options: `30pt')
+%%
+%% Author: Peter Wilson (herries dot press at earthlink dot net)
+%% Herries Press
+%% Copyright 2001--2008 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% 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".
+%%
+%% This work consists of the files listed in the README file.
+%%
+\ProvidesFile{mem30.clo}%
+ [2008/01/31 v0.1 memoir class 30pt size option]
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@xxxpt{37}%
+ \abovedisplayskip 30\p@ \@plus7\p@ \@minus11\p@
+ \abovedisplayshortskip \z@ \@plus7\p@
+ \belowdisplayshortskip 18\p@ \@plus9\p@ \@minus4\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\newcommand{\small}{%
+ \@setfontsize\small\@xxvpt{30}%
+ \abovedisplayskip 25\p@ \@plus6\p@ \@minus10\p@
+ \abovedisplayshortskip \z@ \@plus6\p@
+ \belowdisplayshortskip 15\p@ \@plus7.5\p@ \@minus4\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 20\p@ \@plus7\p@ \@minus10\p@
+ \parsep 10\p@ \@plus4\p@ \@minus5\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@xxpt{25}%
+ \abovedisplayskip 20\p@ \@plus5\p@ \@minus9\p@
+ \abovedisplayshortskip \z@ \@plus5\p@
+ \belowdisplayshortskip 12.5\p@ \@plus6\p@ \@minus3\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 16\p@ \@plus5\p@ \@minus8\p@
+ \parsep 8\p@ \@plus3\p@ \@minus4\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@xiipt{14.5}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xivpt{17.5}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xviipt{22}}
+\newcommand*{\large}{\@setfontsize\large\@xxxvipt{45}}
+\newcommand*{\Large}{\@setfontsize\Large\@xlviiipt{60}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@lxpt{72}}
+\newcommand*{\huge}{\@setfontsize\huge\@lxxiipt{86}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@lxxxivpt{100}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@xcvipt{116}}
+\setlength{\onelineskip}{37\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{1.5em}
+\fi
+\setlength\smallskipamount{5\p@ \@plus1\p@ \@minus1\p@}
+\setlength\medskipamount{10\p@ \@plus2\p@ \@minus2\p@}
+\setlength\bigskipamount{20\p@ \@plus4\p@ \@minus4\p@}
+\setlength\headheight{37\p@}
+\setlength\headsep{54\p@}
+\setlength\topskip{30\p@}
+\setlength\footskip{75\p@}
+\setlength\maxdepth{.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\footnotesep{17.5\p@}
+\setlength{\skip\footins}{29\p@ \@plus 10\p@ \@minus 5\p@}
+\setlength\floatsep {30\p@ \@plus 6\p@ \@minus 6\p@}
+\setlength\textfloatsep{54\p@ \@plus 6\p@ \@minus 12\p@}
+\intextsep \floatsep
+\dblfloatsep \floatsep
+\dbltextfloatsep \textfloatsep
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{26\p@ \@plus 2fil}
+\@fpbot \@fptop
+\@dblfptop \@fptop
+\@dblfpsep \@fpsep
+\@dblfpbot \@dblfptop
+\setlength\lxvchars{748\p@} %
+\setlength\xlvchars{518\p@} %
+\if@twocolumn
+ \setlength\marginparsep{1em}
+\else
+ \setlength\marginparsep{0.7em}
+\fi
+ \setlength\marginparpush{0.5em}
+\endinput
+%%
+%% End of file `mem30.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem36.clo b/Master/texmf-dist/tex/latex/memoir/mem36.clo
new file mode 100644
index 00000000000..127c50a08dc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memoir/mem36.clo
@@ -0,0 +1,105 @@
+%%
+%% This is file `mem36.clo',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoir.dtx (with options: `36pt')
+%%
+%% Author: Peter Wilson (herries dot press at earthlink dot net)
+%% Herries Press
+%% Copyright 2001--2008 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% 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".
+%%
+%% This work consists of the files listed in the README file.
+%%
+\ProvidesFile{mem36.clo}%
+ [2008/01/31 v0.1 memoir class 36pt size option]
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@xxxvipt{45}%
+ \abovedisplayskip 36\p@ \@plus8\p@ \@minus12\p@
+ \abovedisplayshortskip \z@ \@plus8\p@
+ \belowdisplayshortskip 22\p@ \@plus11\p@ \@minus5\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\newcommand{\small}{%
+ \@setfontsize\small\@xxxpt{37}%
+ \abovedisplayskip 30\p@ \@plus7\p@ \@minus11\p@
+ \abovedisplayshortskip \z@ \@plus7\p@
+ \belowdisplayshortskip 18\p@ \@plus9\p@ \@minus4\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 24\p@ \@plus8\p@ \@minus12\p@
+ \parsep 12\p@ \@plus4\p@ \@minus6\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@xxvpt{30}%
+ \abovedisplayskip 25\p@ \@plus6\p@ \@minus10\p@
+ \abovedisplayshortskip \z@ \@plus6\p@
+ \belowdisplayshortskip 15\p@ \@plus7.5\p@ \@minus4\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 20\p@ \@plus7\p@ \@minus10\p@
+ \parsep 10\p@ \@plus4\p@ \@minus5\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@xivpt{17.5}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xviipt{22}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xxpt{25}}
+\newcommand*{\large}{\@setfontsize\large\@xlviiipt{60}}
+\newcommand*{\Large}{\@setfontsize\Large\@lxpt{72}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@lxxiipt{86}}
+\newcommand*{\huge}{\@setfontsize\huge\@lxxxivpt{100}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@xcvipt{116}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@cviiipt{132}}
+\setlength{\onelineskip}{45\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{1.5em}
+\fi
+\setlength\smallskipamount{9\p@ \@plus2\p@ \@minus2\p@}
+\setlength\medskipamount{18\p@ \@plus4\p@ \@minus4\p@}
+\setlength\bigskipamount{36\p@ \@plus8\p@ \@minus8\p@}
+\setlength\headheight{45\p@}
+\setlength\headsep{65\p@}
+\setlength\topskip{36\p@}
+\setlength\footskip{90\p@}
+\setlength\maxdepth{.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\footnotesep{21\p@}
+\setlength{\skip\footins}{35\p@ \@plus 12\p@ \@minus 6\p@}
+\setlength\floatsep {36\p@ \@plus 8\p@ \@minus 8\p@}
+\setlength\textfloatsep{65\p@ \@plus 8\p@ \@minus 16\p@}
+\intextsep \floatsep
+\dblfloatsep \floatsep
+\dbltextfloatsep \textfloatsep
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{31\p@ \@plus 2fil}
+\@fpbot \@fptop
+\@dblfptop \@fptop
+\@dblfpsep \@fpsep
+\@dblfpbot \@dblfptop
+\setlength\lxvchars{891\p@} %
+\setlength\xlvchars{617\p@} %
+\if@twocolumn
+ \setlength\marginparsep{1em}
+\else
+ \setlength\marginparsep{0.7em}
+\fi
+ \setlength\marginparpush{0.5em}
+\endinput
+%%
+%% End of file `mem36.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem48.clo b/Master/texmf-dist/tex/latex/memoir/mem48.clo
new file mode 100644
index 00000000000..f142c60dd9a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memoir/mem48.clo
@@ -0,0 +1,105 @@
+%%
+%% This is file `mem48.clo',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoir.dtx (with options: `48pt')
+%%
+%% Author: Peter Wilson (herries dot press at earthlink dot net)
+%% Herries Press
+%% Copyright 2001--2008 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% 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".
+%%
+%% This work consists of the files listed in the README file.
+%%
+\ProvidesFile{mem48.clo}%
+ [2008/01/31 v0.1 memoir class 48pt size option]
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@xlviiipt{60}%
+ \abovedisplayskip 48\p@ \@plus9\p@ \@minus13\p@
+ \abovedisplayshortskip \z@ \@plus9\p@
+ \belowdisplayshortskip 30\p@ \@plus15\p@ \@minus7\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\newcommand{\small}{%
+ \@setfontsize\small\@xxxvipt{45}%
+ \abovedisplayskip 36\p@ \@plus8\p@ \@minus12\p@
+ \abovedisplayshortskip \z@ \@plus8\p@
+ \belowdisplayshortskip 22\p@ \@plus11\p@ \@minus5\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 30\p@ \@plus10\p@ \@minus15\p@
+ \parsep 15\p@ \@plus5\p@ \@minus7\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@xxxpt{37}%
+ \abovedisplayskip 30\p@ \@plus7\p@ \@minus11\p@
+ \abovedisplayshortskip \z@ \@plus7\p@
+ \belowdisplayshortskip 18\p@ \@plus9\p@ \@minus4\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 24\p@ \@plus8\p@ \@minus12\p@
+ \parsep 12\p@ \@plus4\p@ \@minus6\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@xviipt{22}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xxpt{25}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xxvpt{30}}
+\newcommand*{\large}{\@setfontsize\large\@lxpt{72}}
+\newcommand*{\Large}{\@setfontsize\Large\@lxxiipt{86}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@lxxxivpt{100}}
+\newcommand*{\huge}{\@setfontsize\huge\@xcvipt{116}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@cviiipt{132}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@cxxpt{144}}
+\setlength{\onelineskip}{60\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{1.5em}
+\fi
+\setlength\smallskipamount{12\p@ \@plus3\p@ \@minus3\p@}
+\setlength\medskipamount{24\p@ \@plus6\p@ \@minus6\p@}
+\setlength\bigskipamount{48\p@ \@plus12\p@ \@minus12\p@}
+\setlength\headheight{60\p@}
+\setlength\headsep{86\p@}
+\setlength\topskip{48\p@}
+\setlength\footskip{120\p@}
+\setlength\maxdepth{.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\footnotesep{25.9\p@}
+\setlength{\skip\footins}{47\p@ \@plus 16\p@ \@minus 8\p@}
+\setlength\floatsep {48\p@ \@plus 12\p@ \@minus 12\p@}
+\setlength\textfloatsep{87\p@ \@plus 12\p@ \@minus 24\p@}
+\intextsep \floatsep
+\dblfloatsep \floatsep
+\dbltextfloatsep \textfloatsep
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{42\p@ \@plus 2fil}
+\@fpbot \@fptop
+\@dblfptop \@fptop
+\@dblfpsep \@fpsep
+\@dblfpbot \@dblfptop
+\setlength\lxvchars{1177\p@} %
+\setlength\xlvchars{815\p@} %
+\if@twocolumn
+ \setlength\marginparsep{1em}
+\else
+ \setlength\marginparsep{0.7em}
+\fi
+ \setlength\marginparpush{0.5em}
+\endinput
+%%
+%% End of file `mem48.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem60.clo b/Master/texmf-dist/tex/latex/memoir/mem60.clo
new file mode 100644
index 00000000000..d347d83bf59
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/memoir/mem60.clo
@@ -0,0 +1,105 @@
+%%
+%% This is file `mem60.clo',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoir.dtx (with options: `60pt')
+%%
+%% Author: Peter Wilson (herries dot press at earthlink dot net)
+%% Herries Press
+%% Copyright 2001--2008 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% 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".
+%%
+%% This work consists of the files listed in the README file.
+%%
+\ProvidesFile{mem60.clo}%
+ [2008/01/31 v0.1 memoir class 60pt size option]
+\renewcommand{\normalsize}{%
+ \@setfontsize\normalsize\@lxpt{72}%
+ \abovedisplayskip 60\p@ \@plus10\p@ \@minus14\p@
+ \abovedisplayshortskip \z@ \@plus10\p@
+ \belowdisplayshortskip 36\p@ \@plus18\p@ \@minus9\p@
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}
+\normalsize
+\newcommand{\small}{%
+ \@setfontsize\small\@xlviiipt{60}%
+ \abovedisplayskip 48\p@ \@plus9\p@ \@minus13\p@
+ \abovedisplayshortskip \z@ \@plus9\p@
+ \belowdisplayshortskip 30\p@ \@plus15\p@ \@minus7\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 40\p@ \@plus13\p@ \@minus20\p@
+ \parsep 20\p@ \@plus6\p@ \@minus10\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand{\footnotesize}{%
+ \@setfontsize\footnotesize\@xxxvipt{45}%
+ \abovedisplayskip 36\p@ \@plus8\p@ \@minus12\p@
+ \abovedisplayshortskip \z@ \@plus8\p@
+ \belowdisplayshortskip 22\p@ \@plus11\p@ \@minus5\p@
+ \def\@listi{\leftmargin\leftmargini
+ \topsep 30\p@ \@plus10\p@ \@minus15\p@
+ \parsep 15\p@ \@plus5\p@ \@minus7\p@
+ \itemsep \parsep}%
+ \belowdisplayskip \abovedisplayskip
+}
+\newcommand*{\miniscule}{\@setfontsize\miniscule\@xxpt{25}}
+\newcommand*{\tiny}{\@setfontsize\tiny\@xxvpt{30}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@xxxpt{37}}
+\newcommand*{\large}{\@setfontsize\large\@lxxiipt{86}}
+\newcommand*{\Large}{\@setfontsize\Large\@lxxxivpt{100}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xcvipt{116}}
+\newcommand*{\huge}{\@setfontsize\huge\@cviiipt{132}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@cxxpt{144}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@cxxxiipt{162}}
+\setlength{\onelineskip}{72\p@}
+\if@twocolumn
+ \setlength\parindent{1em}
+\else
+ \setlength\parindent{1.5em}
+\fi
+\setlength\smallskipamount{15\p@ \@plus4\p@ \@minus4\p@}
+\setlength\medskipamount{30\p@ \@plus8\p@ \@minus8\p@}
+\setlength\bigskipamount{60\p@ \@plus16\p@ \@minus16\p@}
+\setlength\headheight{72\p@}
+\setlength\headsep{108\p@}
+\setlength\topskip{60\p@}
+\setlength\footskip{150\p@}
+\setlength\maxdepth{.5\topskip}
+\setlength\@maxdepth\maxdepth
+\setlength\footnotesep{31.5\p@}
+\setlength{\skip\footins}{59\p@ \@plus 20\p@ \@minus 10\p@}
+\setlength\floatsep {60\p@ \@plus 16\p@ \@minus 16\p@}
+\setlength\textfloatsep{104\p@ \@plus 16\p@ \@minus 32\p@}
+\intextsep \floatsep
+\dblfloatsep \floatsep
+\dbltextfloatsep \textfloatsep
+\setlength\@fptop{0\p@ \@plus 1fil}
+\setlength\@fpsep{50\p@ \@plus 2fil}
+\@fpbot \@fptop
+\@dblfptop \@fptop
+\@dblfpsep \@fpsep
+\@dblfpbot \@dblfptop
+\setlength\lxvchars{1463\p@} %
+\setlength\xlvchars{1014\p@} %
+\if@twocolumn
+ \setlength\marginparsep{1em}
+\else
+ \setlength\marginparsep{0.7em}
+\fi
+ \setlength\marginparpush{0.5em}
+\endinput
+%%
+%% End of file `mem60.clo'.
diff --git a/Master/texmf-dist/tex/latex/memoir/mem9.clo b/Master/texmf-dist/tex/latex/memoir/mem9.clo
index 1e307793dc0..757eec97763 100644
--- a/Master/texmf-dist/tex/latex/memoir/mem9.clo
+++ b/Master/texmf-dist/tex/latex/memoir/mem9.clo
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -24,8 +24,7 @@
%% This work consists of the files listed in the README file.
%%
\ProvidesFile{mem9.clo}%
- [2004/03/12 v0.3 memoir class 9pt size option]
-
+ [2008/01/30 v0.4 memoir class 9pt size option]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@ixpt\@xpt
\abovedisplayskip 9\p@ \@plus 2\p@ \@minus 4.5\p@
@@ -60,15 +59,19 @@
}%
\belowdisplayskip \abovedisplayskip
}
-\newcommand{\miniscule}{\@setfontsize\miniscule\@vpt{6}}
-\newcommand{\tiny}{\@setfontsize\tiny\@vpt{6}}
-\newcommand{\scriptsize}{\@setfontsize\scriptsize\@vipt{7}}
-\newcommand{\large}{\@setfontsize\large\@xpt{12}}
-\newcommand{\Large}{\@setfontsize\Large\@xipt{13.6}}
-\newcommand{\LARGE}{\@setfontsize\LARGE\@xiipt{14.5}}
-\newcommand{\huge}{\@setfontsize\huge\@xivpt{18}}
-\newcommand{\Huge}{\@setfontsize\Huge\@xviipt{22}}
-\newcommand{\HUGE}{\@setfontsize\HUGE\@xxpt{25}}
+\ifextrafontsizes
+ \newcommand*{\miniscule}{\@setfontsize\miniscule\@ivpt{5}}
+\else
+ \newcommand*{\miniscule}{\@setfontsize\miniscule\@vpt{6}}
+\fi
+\newcommand*{\tiny}{\@setfontsize\tiny\@vpt{6}}
+\newcommand*{\scriptsize}{\@setfontsize\scriptsize\@vipt{7}}
+\newcommand*{\large}{\@setfontsize\large\@xpt{12}}
+\newcommand*{\Large}{\@setfontsize\Large\@xipt{13.6}}
+\newcommand*{\LARGE}{\@setfontsize\LARGE\@xiipt{14.5}}
+\newcommand*{\huge}{\@setfontsize\huge\@xivpt{18}}
+\newcommand*{\Huge}{\@setfontsize\Huge\@xviipt{22}}
+\newcommand*{\HUGE}{\@setfontsize\HUGE\@xxpt{25}}
\setlength{\onelineskip}{\@xpt\p@}
\if@twocolumn
\setlength\parindent{1em}
@@ -84,7 +87,7 @@
\setlength\footskip{.33in}
\setlength\maxdepth{.5\topskip}
\setlength\@maxdepth\maxdepth
-\setlength\footnotesep{6.0\p@} %% ????????
+\setlength\footnotesep{5.6\p@}
\setlength{\skip\footins}{8\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
diff --git a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
index a5a7f719e4f..b88f00c052c 100644
--- a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
+++ b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
@@ -7,7 +7,7 @@
%% mempatch.dtx (with options: `hyper')
%%
%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%% Copyright 2001 --- 2006 Peter R. Wilson
+%% Copyright 2001 --- 2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls
index a39967ed2be..f1c5e71d68a 100644
--- a/Master/texmf-dist/tex/latex/memoir/memoir.cls
+++ b/Master/texmf-dist/tex/latex/memoir/memoir.cls
@@ -8,7 +8,7 @@
%%
%% Author: Peter Wilson (herries dot press at earthlink dot net)
%% Herries Press
-%% Copyright 2001--2005 Peter R. Wilson
+%% Copyright 2001--2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -25,12 +25,14 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{memoir}%
- [2005/09/25 v1.618 configurable document class]
-\newcommand{\@ptsize}{}
+ [2008/05/26 v1.61803 configurable book, report, article document class]
+\newcommand*{\@ptsize}{}
+\newcommand*{\@memptsize}{}
\newlength{\onelineskip}
\newlength{\lxvchars}
\newlength{\xlvchars}
\newcount\@memcnta
+\newcounter{@memmarkcntra}
\newif\if@restonecol
\newif\if@openright
\@openrighttrue
@@ -44,6 +46,9 @@
\newif\if@memoldfont
\@memoldfontfalse
+\newif\ifextrafontsizes
+ \extrafontsizesfalse
+
\newcommand*{\@memerror}{\ClassError{memoir}}
\newcommand*{\@memwarn}{\ClassWarning{memoir}}
@@ -76,6 +81,8 @@
\expandafter\let\csname #1\endcsname}
\newcommand{\@namelongdef}[1]{%
\long\expandafter\def\csname #1\endcsname}
+\newcommand{\@nameedef}[1]{%
+ \expandafter\protected@edef\csname #1\endcsname}
\newcommand{\memjustarg}[1]{#1}
\newcommand{\memgobble}[1]{}
@@ -105,6 +112,92 @@
\@onlypreamble\EmulatedPackageWithOptions
\@onlypreamble\@emulated@package
+\newcommand*{\DisemulatePackage}[1]{%
+ \@namelet{ver@#1.\pkgextension}\relax}
+\@onlypreamble\DisemulatePackage
+
+\renewcommand{\InputIfFileExists}[2]{%
+ \IfFileExists{#1}%
+ {#2\@addtofilelist{#1}\m@matbeginf{#1}%
+ \@@input \@filef@und
+ \m@matendf{#1}%
+ \killm@matf{#1}}}
+
+\newcommand{\m@matbeginf}[1]{\@ifundefined{#1-m@mfb}{}%
+ {\@nameuse{#1-m@mfb}}}
+\newcommand{\m@matendf}[1]{\@ifundefined{#1-m@mfe}{}%
+ {\@nameuse{#1-m@mfe}}}
+
+\newcommand*{\killm@matf}[1]{%
+ \@namelet{#1-m@mfb}\relax
+ \@namelet{#1-m@mfe}\relax}
+
+\newcommand{\AtBeginFile}[2]{\@ifundefined{#1-m@mfb}%
+ {\@namedef{#1-m@mfb}{#2}}%
+ {\expandafter\addtodef\csname #1-m@mfb\endcsname{}{#2}}}
+\newcommand{\AtEndFile}[2]{\@ifundefined{#1-m@mfe}%
+ {\@namedef{#1-m@mfe}{#2}}%
+ {\expandafter\addtodef\csname #1-m@mfe\endcsname{}{#2}}}
+
+\newcommand{\AtBeginPackage}[2]{%
+ \AtBeginFile{#1.\@pkgextension}{#2}}
+\newcommand{\AtEndPackage}[2]{%
+ \AtEndFile{#1.\@pkgextension}{#2}}
+\newcommand{\RequireAtEndPackage}[2]{%
+ \@ifpackageloaded{#1}{#2}%
+ {\AtEndFile{#1.\@pkgextension}{#2}}}
+
+\newcommand{\AtBeginClass}[2]{%
+ \AtBeginFile{#1.\@clsextension}{#2}}
+\newcommand{\AtEndClass}[2]{%
+ \AtEndFile{#1.\@clsextension}{#2}}
+\newcommand{\RequireAtEndClass}[2]{%
+ \@ifclassloaded{#1}{#2}%
+ {\AtEndFile{#1.\@clsextension}{#2}}}
+
+\newcommand{\phantomsection}{}
+
+ \renewcommand*{\nofiles}{%
+ \@fileswfalse% flag for suppressing \immediate \writes
+ \typeout{No auxiliary output files.^^J}%
+ \long\def\protected@write##1##2##3%
+ {\write\m@ne{}\if@nobreak\ifvmode\nobreak\fi\fi}%
+ }
+
+\newcommand*{\memsetcounter}[2]{\setcounter{#1}{#2}}
+\AtBeginDocument{\immediate\write\@mainaux{%
+ \string\providecommand*{\string\memsetcounter}[2]{}}}
+
+\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}}
+\newcommand{\cmdprint}[1]{\texttt{\string#1}}
+\newcommand{\cmd}[1]{\cmdprint{#1}%
+ \index{\expandafter\@gobble\string#1?\string\cmdprint{\string#1}}}
+
\newif\ifpdf
\ifx\pdfoutput\undefined
\else
@@ -116,16 +209,33 @@
\fi
\fi
\fi
-%%\@memfakeusepackage{ifpdf}
-\newcommand{\phantomsection}{}
+\newif\ifetex
+ \etexfalse
+\ifx\eTeXversion\@undefined\else
+ \ifx\eTeXversion\relax\else
+ \ifnum\eTeXversion>0\relax
+ \etextrue
+ \fi
+ \fi
+\fi
- \renewcommand*{\nofiles}{%
- \@fileswfalse% flag for suppressing \immediate \writes
- \typeout{No auxiliary output files.^^J}%
- \long\def\protected@write##1##2##3%
- {\write\m@ne{}\if@nobreak\ifvmode\nobreak\fi\fi}%
- }
+\newif\ifxetex
+\@ifundefined{XeTeXrevision}{\xetexfalse}{\xetextrue}
+\def\RequireXeTeX{%
+ \ifxetex\else
+ \@memerror{XeTeX is required to process this document}%
+ {Try again with xelatex, not (pdf)latex.\MessageBreak
+ Or try removing any XeTeX package(s).}
+ \fi}
+
+\newif\ifluatex
+ \luatexfalse
+\ifx\luatexversion\@undefined\else
+ \ifx\luatexversion\relax
+ \luatextrue
+ \fi
+\fi
\edef\wo@dmacro{%
\string m\string a\string c\string r\string o\string :%
@@ -267,54 +377,148 @@
\newlength{\trimtop}
\newlength{\trimedge}
-\DeclareOption{a3paper}
- {\setlength\stockheight {420mm}%
- \setlength\stockwidth {297mm}}
-\DeclareOption{a4paper}
- {\setlength\stockheight {297mm}%
- \setlength\stockwidth {210mm}}
-\DeclareOption{a5paper}
- {\setlength\stockheight {210mm}%
- \setlength\stockwidth {148mm}}
-\DeclareOption{a6paper}
- {\setlength\stockheight {148mm}%
- \setlength\stockwidth {105mm}}
-\DeclareOption{b3paper}
- {\setlength\stockheight {500mm}%
- \setlength\stockwidth {353mm}}
-\DeclareOption{b4paper}
- {\setlength\stockheight {353mm}%
- \setlength\stockwidth {250mm}}
-\DeclareOption{b5paper}
- {\setlength\stockheight {250mm}%
- \setlength\stockwidth {176mm}}
-\DeclareOption{b6paper}
- {\setlength\stockheight {176mm}%
- \setlength\stockwidth {125mm}}
-\DeclareOption{letterpaper}
- {\setlength\stockheight {11in}%
- \setlength\stockwidth {8.5in}}
-\DeclareOption{legalpaper}
- {\setlength\stockheight {14in}%
- \setlength\stockwidth {8.5in}}
-\DeclareOption{executivepaper}
- {\setlength\stockheight {10.5in}%
- \setlength\stockwidth {7.25in}}
+\newcommand*{\stockdbill} {\stockheight=7in \stockwidth=3in}
+\newcommand*{\stockstatement} {\stockheight=8.5in \stockwidth=5.5in}
+\newcommand*{\stockexecutive} {\stockheight=10.5in \stockwidth=7.25in}
+\newcommand*{\stockletter} {\stockheight=11in \stockwidth=8.5in}
+\newcommand*{\stockold} {\stockheight=12in \stockwidth=9in}
+\newcommand*{\stocklegal} {\stockheight=14in \stockwidth=8.5in}
+\newcommand*{\stockledger} {\stockheight=17in \stockwidth=11in}
+\newcommand*{\stockbroadsheet}{\stockheight=22in \stockwidth=17in}
+
+\newcommand*{\stockpottvo} {\stockheight=6.25in \stockwidth=4in}
+\newcommand*{\stockfoolscapvo} {\stockheight=6.75in \stockwidth=4.25in}
+\newcommand*{\stockcrownvo} {\stockheight=7.5in \stockwidth=5in}
+\newcommand*{\stockpostvo} {\stockheight=8in \stockwidth=5in}
+\newcommand*{\stocklargecrownvo}{\stockheight=8in \stockwidth=5.25in}
+\newcommand*{\stocklargepostvo} {\stockheight=8.25in \stockwidth=5.25in}
+\newcommand*{\stocksmalldemyvo} {\stockheight=8.5in \stockwidth=5.675in}
+\newcommand*{\stockdemyvo} {\stockheight=8.75in \stockwidth=5.675in}
+\newcommand*{\stockmediumvo} {\stockheight=9in \stockwidth=5.75in}
+\newcommand*{\stocksmallroyalvo}{\stockheight=9.25in \stockwidth=6.175in}
+\newcommand*{\stockroyalvo} {\stockheight=10in \stockwidth=6.25in}
+\newcommand*{\stocksuperroyalvo}{\stockheight=10.25in \stockwidth=6.75in}
+\newcommand*{\stockimperialvo} {\stockheight=11in \stockwidth=7.5in}
+
+\newcommand*{\stockmcrownvo} {\stockheight=186mm \stockwidth=123mm}
+\newcommand*{\stockmlargecrownvo} {\stockheight=198mm \stockwidth=129mm}
+\newcommand*{\stockmdemyvo} {\stockheight=216mm \stockwidth=138mm}
+\newcommand*{\stockmsmallroyalvo} {\stockheight=234mm \stockwidth=156mm}
+
+\newcommand*{\stockaiii}{\stockheight=420mm \stockwidth=297mm}
+\newcommand*{\stockaiv} {\stockheight=297mm \stockwidth=210mm}
+\newcommand*{\stockav} {\stockheight=210mm \stockwidth=148mm}
+\newcommand*{\stockavi} {\stockheight=148mm \stockwidth=105mm}
+
+\newcommand*{\stockbiii}{\stockheight=500mm \stockwidth=353mm}
+\newcommand*{\stockbiv} {\stockheight=353mm \stockwidth=250mm}
+\newcommand*{\stockbv} {\stockheight=250mm \stockwidth=176mm}
+\newcommand*{\stockbvi} {\stockheight=176mm \stockwidth=125mm}
+
+\newcommand*{\pagedbill} {\pageheight=7in \pagewidth=3in}
+\newcommand*{\pagestatement} {\pageheight=8.5in \pagewidth=5.5in}
+\newcommand*{\pageexecutive} {\pageheight=10.5in \pagewidth=7.25in}
+\newcommand*{\pageletter} {\pageheight=11in \pagewidth=8.5in}
+\newcommand*{\pageold} {\pageheight=12in \pagewidth=9in}
+\newcommand*{\pagelegal} {\pageheight=14in \pagewidth=8.5in}
+\newcommand*{\pageledger} {\pageheight=17in \pagewidth=11in}
+\newcommand*{\pagebroadsheet}{\pageheight=22in \pagewidth=17in}
+
+\newcommand*{\pagepottvo} {\pageheight=6.25in \pagewidth=4in}
+\newcommand*{\pagefoolscapvo} {\pageheight=6.75in \pagewidth=4.25in}
+\newcommand*{\pagecrownvo} {\pageheight=7.5in \pagewidth=5in}
+\newcommand*{\pagepostvo} {\pageheight=8in \pagewidth=5in}
+\newcommand*{\pagelargecrownvo}{\pageheight=8in \pagewidth=5.25in}
+\newcommand*{\pagelargepostvo} {\pageheight=8.25in \pagewidth=5.25in}
+\newcommand*{\pagesmalldemyvo} {\pageheight=8.5in \pagewidth=5.675in}
+\newcommand*{\pagedemyvo} {\pageheight=8.75in \pagewidth=5.675in}
+\newcommand*{\pagemediumvo} {\pageheight=9in \pagewidth=5.75in}
+\newcommand*{\pagesmallroyalvo}{\pageheight=9.25in \pagewidth=6.175in}
+\newcommand*{\pageroyalvo} {\pageheight=10in \pagewidth=6.25in}
+\newcommand*{\pagesuperroyalvo}{\pageheight=10.25in \pagewidth=6.75in}
+\newcommand*{\pageimperialvo} {\pageheight=11in \pagewidth=7.5in}
+
+\newcommand*{\pagemcrownvo} {\pageheight=186mm \pagewidth=123mm}
+\newcommand*{\pagemlargecrownvo} {\pageheight=198mm \pagewidth=129mm}
+\newcommand*{\pagemdemyvo} {\pageheight=216mm \pagewidth=138mm}
+\newcommand*{\pagemsmallroyalvo} {\pageheight=234mm \pagewidth=156mm}
+
+\newcommand*{\pageaiii}{\pageheight=420mm \pagewidth=297mm}
+\newcommand*{\pageaiv} {\pageheight=297mm \pagewidth=210mm}
+\newcommand*{\pageav} {\pageheight=210mm \pagewidth=148mm}
+\newcommand*{\pageavi} {\pageheight=148mm \pagewidth=105mm}
+
+\newcommand*{\pagebiii}{\pageheight=500mm \pagewidth=353mm}
+\newcommand*{\pagebiv} {\pageheight=353mm \pagewidth=250mm}
+\newcommand*{\pagebv} {\pageheight=250mm \pagewidth=176mm}
+\newcommand*{\pagebvi} {\pageheight=176mm \pagewidth=125mm}
+
+\DeclareOption{a3paper}{\stockaiii}
+\DeclareOption{a4paper}{\stockaiv}
+\DeclareOption{a5paper}{\stockav}
+\DeclareOption{a6paper}{\stockavi}
+\DeclareOption{b3paper}{\stockbiii}
+\DeclareOption{b4paper}{\stockbiv}
+\DeclareOption{b5paper}{\stockbv}
+\DeclareOption{b6paper}{\stockbvi}
+\DeclareOption{mcrownvopaper}{\stockmcrownvo}
+\DeclareOption{mlargecrownvopaper}{\stockmlargecrownvo}
+\DeclareOption{mdemyvopaper}{\stockmdemyvo}
+\DeclareOption{msmallroyalvopaper}{\stockmsmallroyalvo}
+
+\DeclareOption{dbillpaper}{\stockdbill}
+\DeclareOption{statementpaper}{\stockstatement}
+\DeclareOption{executivepaper}{\stockexecutive}
+\DeclareOption{letterpaper}{\stockletter}
+\DeclareOption{oldpaper}{\stockold}
+\DeclareOption{legalpaper}{\stocklegal}
+\DeclareOption{ledgerpaper}{\stockledger}
+\DeclareOption{broadsheetpaper}{\stockbroadsheet}
+
+\DeclareOption{pottvopaper}{\stockpottvo}
+\DeclareOption{foolscapvopaper}{\stockfoolscapvo}
+\DeclareOption{crownvopaper}{\stockcrownvo}
+\DeclareOption{postvopaper}{\stockpostvo}
+\DeclareOption{largecrownvopaper}{\stocklargecrownvo}
+\DeclareOption{largepostvopaper}{\stocklargepostvo}
+\DeclareOption{smalldemyvopaper}{\stocksmalldemyvo}
+\DeclareOption{demyvopaper}{\stockdemyvo}
+\DeclareOption{mediumvopaper}{\stockmediumvo}
+\DeclareOption{smallroyalvopaper}{\stocksmallroyalvo}
+\DeclareOption{royalvopaper}{\stockroyalvo}
+\DeclareOption{superroyalvopaper}{\stocksuperroyalvo}
+\DeclareOption{imperialvopaper}{\stockimperialvo}
+
\DeclareOption{ebook}
{\setlength\stockheight {9in}%
\setlength\stockwidth {6in}}
+
\DeclareOption{landscape}
{\setlength\@tempdima {\stockheight}
\setlength\stockheight{\stockwidth}
\setlength\stockwidth {\@tempdima}}
-\renewcommand{\@ptsize}{0}
-\DeclareOption{9pt}{\renewcommand{\@ptsize}{9}}
-\DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
-\DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
-\DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
-\DeclareOption{14pt}{\renewcommand{\@ptsize}{4}}
-\DeclareOption{17pt}{\renewcommand{\@ptsize}{7}}
+\renewcommand*{\@ptsize}{0}
+\renewcommand*{\@memptsize}{10}
+\DeclareOption{9pt}{\renewcommand*{\@ptsize}{9}\renewcommand*{\@memptsize}{9}}
+\DeclareOption{10pt}{\renewcommand*{\@ptsize}{0}\renewcommand*{\@memptsize}{10}}
+\DeclareOption{11pt}{\renewcommand*{\@ptsize}{1}\renewcommand*{\@memptsize}{11}}
+\DeclareOption{12pt}{\renewcommand*{\@ptsize}{2}\renewcommand*{\@memptsize}{12}}
+\DeclareOption{14pt}{\renewcommand*{\@ptsize}{4}\renewcommand*{\@memptsize}{14}}
+\DeclareOption{17pt}{\renewcommand*{\@ptsize}{7}\renewcommand*{\@memptsize}{17}}
+\DeclareOption{20pt}{\renewcommand*{\@ptsize}{20}\renewcommand*{\@memptsize}{20}}
+\DeclareOption{25pt}{\renewcommand*{\@ptsize}{25}\renewcommand*{\@memptsize}{25}}
+\DeclareOption{30pt}{\renewcommand*{\@ptsize}{30}\renewcommand*{\@memptsize}{30}}
+\DeclareOption{36pt}{\renewcommand*{\@ptsize}{36}\renewcommand*{\@memptsize}{36}}
+\DeclareOption{48pt}{\renewcommand*{\@ptsize}{48}\renewcommand*{\@memptsize}{48}}
+\DeclareOption{60pt}{\renewcommand*{\@ptsize}{60}\renewcommand*{\@memptsize}{60}}
+
+\newif\if@nyptsizeopt
+ \@nyptsizeoptfalse
+\providecommand*{\anyptfilebase}{mem}
+\providecommand*{\anyptsize}{10}
+\DeclareOption{*pt}{\@nyptsizeopttrue}
+
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\DeclareOption{onecolumn}{\@twocolumnfalse}
@@ -343,9 +547,6 @@
\artoptfalse
\DeclareOption{article}{\artopttrue}
-\DeclareOption{subfigure}{%
- \ClassWarningNoLine{memoir}{The subfigure option is not required}}
-
\DeclareOption{openright}{\@openrighttrue}
\DeclareOption{openany}{\@openrightfalse}
\DeclareOption{openleft}{\@openlefttrue}
@@ -366,11 +567,10 @@
\listparindent \itemindent
\parsep \z@
}%
- \renewcommand\newblock{\par}}%
-}
+ \renewcommand\newblock{\par}}}
-\DeclareOption{oldfontcommands}{%
- \@memoldfonttrue}
+\DeclareOption{oldfontcommands}{\@memoldfonttrue}
+\DeclareOption{extrafontsizes}{\extrafontsizestrue}
\ExecuteOptions{final,letterpaper,10pt,onecolumn,openright,twoside}
\ProcessOptions
@@ -394,11 +594,56 @@
\fi
\fi
-\ifnum\@ptsize = 9\relax
- \input{mem\@ptsize.clo}
+\newcommand*{\@ivpt}{4}
+\newcommand*{\@xxxpt}{30}
+\newcommand*{\@xxxvipt}{36}
+\newcommand*{\@xlviiipt}{48}
+\newcommand*{\@lxpt}{60}
+\newcommand*{\@lxxiipt}{72}
+\newcommand*{\@lxxxivpt}{84}
+\newcommand*{\@xcvipt}{96}
+\newcommand*{\@cviiipt}{108}
+\newcommand*{\@cxxpt}{120}
+\newcommand*{\@cxxxiipt}{132}
+
+\providecommand*{\memfontfamily}{lmr}
+\providecommand*{\memfontenc}{T1}
+\providecommand*{\memfontpack}{lmodern}
+
+\if@nyptsizeopt
+ \newcommand*{\@nyptclofile}{\anyptfilebase\anyptsize.clo}
+ \IfFileExists{\@nyptclofile}{\def\@memptsize{\anyptsize}}{%
+ \@memerror{You have used the `*pt' option but \MessageBreak
+ file \@nyptclofile\space can't be found}%
+ {I'll use mem10.clo instead}
+ \renewcommand*{\@nyptclofile}{mem10.clo}%
+ \def\@memptsize{10}%
+ }
+ \renewcommand*{\@ptsize}{\@memptsize}
+ \usefont{\memfontenc}{\memfontfamily}{m}{n}
+ \input{\@nyptclofile}
+ \usepackage{\memfontpack}\usepackage[\memfontenc]{fontenc}
\else
- \input{mem1\@ptsize.clo}
+ \ifextrafontsizes
+ \usefont{\memfontenc}{\memfontfamily}{m}{n}
+ \input{mem\@memptsize.clo}
+ \usepackage{\memfontpack}\usepackage[\memfontenc]{fontenc}
+ \else
+ \ifnum\@memptsize > 17\relax
+ \@memerror{The `extrafontsizes' option is required to use \MessageBreak
+ the `\@memptsize pt' option}%
+ {The 17pt option will be used instead}
+ \input{mem17.clo}
+ \else
+ \ifnum\@ptsize = 9\relax
+ \input{mem\@ptsize.clo}
+ \else
+ \input{mem1\@ptsize.clo}
+ \fi
+ \fi
+ \fi
\fi
+
\newcommand{\captionsize}{\normalsize}
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
@@ -409,14 +654,14 @@
\@highpenalty 301
\clubpenalty 1000
\widowpenalty 1000
-\newcommand{\setlxvchars}[1][\normalfont]{\begingroup
+\newcommand*{\setlxvchars}[1][\normalfont]{\begingroup
#1
\settowidth{\lxvchars}{abcdefghijklmnopqrstuvwxyz}%
\setlength{\lxvchars}{2.042\lxvchars}%
\addtolength{\lxvchars}{33.41pt}%
\global\lxvchars=\lxvchars
\endgroup}
-\newcommand{\setxlvchars}[1][\normalfont]{\begingroup
+\newcommand*{\setxlvchars}[1][\normalfont]{\begingroup
#1
\settowidth{\xlvchars}{abcdefghijklmnopqrstuvwxyz}%
\setlength{\xlvchars}{1.415\xlvchars}%
@@ -424,24 +669,24 @@
\global\xlvchars=\xlvchars
\endgroup}
-\newcommand{\setrectanglesize}[3]{%
+\newcommand*{\setrectanglesize}[3]{%
\nametest{#1}{*}%
\ifsamename % H = *
\nametest{#2}{*}%
\ifsamename % W = *
\@memerror{%
The combination of argument values is ambiguous.\MessageBreak
- The lengths will be set to zero}{\@ehd}
- \@tempdima = \z@
- \@tempdimb = \z@
+ The lengths will be set to zero}{\@ehd}%
+ \setlength{\@tempdima}{0pt}%
+ \setlength{\@tempdimb}{0pt}%
\else % W
\nametest{#3}{*}%
\ifsamename % r = *
- \@tempdimb = #2\relax
- \@tempdima = \@tempdimb
+ \setlength{\@tempdimb}{#2}%
+ \setlength{\@tempdima}{\@tempdimb}%
\else % r
- \@tempdimb = #2\relax
- \@tempdima = #3\@tempdimb
+ \setlength{\@tempdimb}{#2}%
+ \setlength{\@tempdima}{#3\@tempdimb}%
\fi
\fi
\else % H
@@ -449,20 +694,19 @@
\ifsamename % W = *
\nametest{#3}{*}%
\ifsamename % r = *
- \@tempdima = #1\relax
- \@tempdimb = \@tempdima
+ \setlength{\@tempdima}{#1}%
+ \setlength{\@tempdimb}{\@tempdima}%
\else % r
- \@tempdima = #1\relax
- \@tempdimb = #3\@tempdima
+ \setlength{\@tempdima}{#1}%
+ \setlength{\@tempdimb}{#3\@tempdima}%
\fi
\else % W
- \@tempdima = #1\relax
- \@tempdimb = #2\relax
+ \setlength{\@tempdima}{#1}%
+ \setlength{\@tempdimb}{#2}%
\fi
- \fi
-}
+ \fi}
-\newcommand{\setfillsize}[5]{%
+\newcommand*{\setfillsize}[5]{%
\nametest{#2}{*}%
\ifsamename % C = *
\nametest{#3}{*}%
@@ -472,21 +716,21 @@
\@memerror{%
The combination of argument values is ambiguous.\MessageBreak
The lengths will be set to zero}{\@ehd}
- \@tempdima = \z@
- \@tempdimb = \z@
- \@tempdimc = \z@
+ \setlength{\@tempdima}{0pt}%
+ \setlength{\@tempdimb}{0pt}%
+ \setlength{\@tempdimc}{0pt}%
\else % R
\nametest{#5}{*}%
\ifsamename % r = *
- \@tempdimb = #4\relax
- \@tempdima = \@tempdimb
- \@tempdimc = #1\relax
+ \setlength{\@tempdimb}{#4}%
+ \setlength{\@tempdima}{\@tempdimb}%
+ \setlength{\@tempdimc}{#1}%
\advance\@tempdimc -\@tempdima
\advance\@tempdimc -\@tempdimb
\else % r
- \@tempdimb = #4\relax
- \@tempdima = #5\@tempdimb
- \@tempdimc = #1\relax
+ \setlength{\@tempdimb}{#4}%
+ \setlength{\@tempdima}{#5\@tempdimb}%
+ \setlength{\@tempdimc}{#1}%
\advance\@tempdimc -\@tempdima
\advance\@tempdimc -\@tempdimb
\fi
@@ -496,22 +740,22 @@
\ifsamename % R = *
\nametest{#5}{*}%
\ifsamename % r = *
- \@tempdima = #3\relax
- \@tempdimb = \@tempdima
- \@tempdimc = #1\relax
+ \setlength{\@tempdima}{#3}%
+ \setlength{\@tempdimb}{\@tempdima}
+ \setlength{\@tempdimc}{#1}%
\advance\@tempdimc -\@tempdima
\advance\@tempdimc -\@tempdimb
\else % r
- \@tempdima = #3\relax
- \@tempdimb = #5\@tempdima
- \@tempdimc = #1\relax
+ \setlength{\@tempdima}{#3}%
+ \setlength{\@tempdimb}{#5\@tempdima}
+ \setlength{\@tempdimc}{#1}%
\advance\@tempdimc -\@tempdima
\advance\@tempdimc -\@tempdimb
\fi
\else % R
- \@tempdima = #3\relax
- \@tempdimb = #4\relax
- \@tempdimc = #1\relax
+ \setlength{\@tempdima}{#3}%
+ \setlength{\@tempdimb}{#4}%
+ \setlength{\@tempdimc}{#1}%
\advance\@tempdimc -\@tempdima
\advance\@tempdimc -\@tempdimb
\fi
@@ -523,17 +767,17 @@
\ifsamename % R = *
\nametest{#5}{*}%
\ifsamename % r = *
- \@tempdimc = #2\relax
- \@tempdima = #1\relax
+ \setlength{\@tempdimc}{#2}%
+ \setlength{\@tempdima}{#1}%
\advance\@tempdima -\@tempdimc
\@tempdima = 0.5\@tempdima
\@tempdimb = \@tempdima
\else % r (CODE PERHAPS FIXED)
- \@tempdimc = #2\relax % C
- \@tempdimb = #1\relax % T
+ \setlength{\@tempdimc}{#2} % C
+ \setlength{\@tempdimb}{#1} % T
\advance\@tempdimb -\@tempdimc % T - C
\@tempdima = 1000sp
- \@tempdima = #5\@tempdima % 1000r sp
+ \setlength{\@tempdima}{#5\@tempdima} % 1000r sp
\advance\@tempdima by 1000sp % 1000(1+r)sp
\@tempcnta = \@tempdima % 1000(1+r)
\@tempdima = \@tempdimb % T - C
@@ -542,31 +786,30 @@
\advance\@tempdimb by -\@tempdima % = R
\fi
\else % R
- \@tempdimc = #2\relax
- \@tempdimb = #4\relax
- \@tempdima = #1\relax
+ \setlength{\@tempdimc}{#2}%
+ \setlength{\@tempdimb}{#4}%
+ \setlength{\@tempdima}{#1}%
\advance\@tempdima -\@tempdimc
\advance\@tempdima -\@tempdimb
\fi
\else % L
\nametest{#4}{*}%
\ifsamename % R = *
- \@tempdimc = #2\relax
- \@tempdima = #3\relax
- \@tempdimb = #1\relax
+ \setlength{\@tempdimc}{#2}%
+ \setlength{\@tempdima}{#3}%
+ \setlength{\@tempdimb}{#1}%
\advance\@tempdimb -\@tempdimc
\advance\@tempdimb -\@tempdima
\else % R
\@memerror{%
The combination of argument values is ambiguous.\MessageBreak
The lengths will be set to zero}{\@ehd}%
- \@tempdima = \z@
- \@tempdimb = \z@
- \@tempdimc = #2\relax
+ \setlength{\@tempdima}{0pt}%
+ \setlength{\@tempdimb}{0pt}%
+ \setlength{\@tempdimc}{#2}%
\fi
\fi
- \fi
-}
+ \fi}
\newcommand{\setstocksize}[2]{%
\setlength{\stockheight}{#1}%
@@ -716,30 +959,78 @@
\@memerror{\protect#1\space is negative}{\@ehd}%
\fi}
-\newcommand{\checkthelayout}{%
+\newcommand*{\m@mclassicht}{%
+ \setlength{\@tempdima}{\textheight}%
+ \divide\@tempdima \baselineskip
+ \@tempcnta=\@tempdima
+ \setlength{\textheight}{\@tempcnta\baselineskip}%
+ \addtolength{\textheight}{\topskip}}
+
+\newcommand*{\m@mlinesht}{%
+ \setlength{\@tempdima}{\textheight}%
+ \advance\@tempdima -\baselineskip
+ \divide\@tempdima \baselineskip
+ \@tempcnta=\@tempdima
+ \setlength{\textheight}{\@tempcnta\baselineskip}%
+ \addtolength{\textheight}{\topskip}}
+
+\newcommand*{\m@mnearestht}{%
+ \setlength{\@tempdima}{\textheight}%
+ \advance\@tempdima -\topskip
+ \advance\@tempdima 0.5\baselineskip
+ \divide\@tempdima \baselineskip
+ \@tempcnta=\@tempdima
+ \setlength{\textheight}{\@tempcnta\baselineskip}%
+ \addtolength{\textheight}{\topskip}}
+
+\newcommand*{\checkthelayout}[1][classic]{%
\@memnegtest{\trimedge}
\@memnegtest{\trimtop}
\@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}
-
- \@tempdima = \textheight
- \divide\@tempdima \baselineskip
- \@tempcnta=\@tempdima
- \setlength{\textheight}{\@tempcnta\baselineskip}
- \addtolength{\textheight}{\topskip}
+%%% \@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
+ \else
+ \nametest{#1}{lines}%
+ \ifsamename
+ \m@mlinesht
+ \else
+ \nametest{#1}{nearest}%
+ \ifsamename
+ \m@mnearestht
+ \else
+ \nametest{#1}{fixed}
+ \ifsamename
+ \else% not classic, lines, nearest, or fixed
+ \@memerror{Optional argument is not one of:\MessageBreak
+ classic, fixed, lines, or nearest. \MessageBreak
+ I will assume the default}%
+ {\@ehc}%
+ \fi
+ \fi
+ \fi
+ \fi
\setulmargins{\uppermargin}{*}{*}
\@tempdimb = -1pt
\@tempdima=\stockwidth
@@ -809,9 +1100,9 @@
is too large for \protect\lowermargin\space
by \the\@tempdima}%
{\@ehd}
- \fi
-}
-\newcommand{\fixthelayout}{%
+ \fi}
+
+\newcommand*{\fixthelayout}{%
\topmargin = \trimtop
\advance\topmargin \uppermargin
\advance\topmargin -\headsep
@@ -827,10 +1118,9 @@
\advance\evensidemargin -1in\relax
\@settopoint\textwidth
\@settopoint\oddsidemargin
- \@settopoint\evensidemargin
-}
+ \@settopoint\evensidemargin}
-\newcommand{\typeoutlayout}{%
+\newcommand*{\typeoutlayout}{%
\typeout{}
\typeout{******************************************************}
\typeout{Stock height and width:
@@ -853,12 +1143,19 @@
\the\columnsep\space and \the\columnseprule}
\typeout{Marginparsep and marginparwidth:
\the\marginparsep\space and \the\marginparwidth}
+ \typeout{Sidecapsep and sidecapwidth:
+ \the\sidecapsep\space and \the\sidecapwidth}
+ \typeout{Sidebarhsep and sidebarwidth:
+ \the\sidebarhsep\space and \the\sidebarwidth}
+ \typeout{Sidebarvsep and sidebartopsep:
+ \the\sidebarvsep\space and \the\sidebartopsep}
+ \typeout{Sidebarheight:
+ \the\dimen\sideins}
\typeout{******************************************************}
- \typeout{}
-}
+ \typeout{}}
-\newcommand{\checkandfixthelayout}{%
- \checkthelayout
+\newcommand*{\checkandfixthelayout}[1][classic]{%
+ \checkthelayout[#1]%
\fixthelayout
\typeoutlayout}
@@ -902,6 +1199,44 @@
\typeout{}
}
+%%%% s = w/#1, t = 1.5s, e = 2s, f = 3s
+\newcommand*{\medievalpage}[1][9]{%
+ \spinemargin=\paperwidth
+ \divide\spinemargin #1\relax
+ \uppermargin = 1.5\spinemargin
+ \setlrmarginsandblock{\spinemargin}{*}{2}
+ \setulmarginsandblock{\uppermargin}{*}{2}}
+
+\newcommand*{\isopage}[1][9]{%
+ \spinemargin=\paperwidth
+ \divide\spinemargin #1\relax
+ \uppermargin=\paperheight
+ \divide\uppermargin #1\relax
+ \setlrmarginsandblock{\spinemargin}{*}{2}
+ \setulmarginsandblock{\uppermargin}{*}{2}}
+
+%%% s = w/#1, t = s, e = 2s, f = e
+\newcommand*{\semiisopage}[1][9]{%
+ \spinemargin=\paperwidth
+ \divide\spinemargin #1\relax
+ \uppermargin=\spinemargin
+ \setlrmarginsandblock{\spinemargin}{*}{2}
+ \setulmarginsandblock{\uppermargin}{*}{2}}
+
+\newcommand*{\setpagebl}[3]{%
+ \settrimmedsize{#1}{#2}{#3}
+ \trimtop=\stockheight \advance\trimtop -\paperheight
+ \trimedge=\stockwidth \advance\trimedge -\paperwidth}
+\newcommand*{\setpageml}[3]{%
+ \settrimmedsize{#1}{#2}{#3}
+ \trimtop=\stockheight \advance\trimtop -\paperheight
+ \advance\trimtop -0.5\trimtop
+ \trimedge=\stockwidth \advance\trimedge -\paperwidth}
+\newcommand*{\setpagetl}[3]{%
+ \settrimmedsize{#1}{#2}{#3}
+ \trimtop=0pt
+ \trimedge=\stockwidth \advance\trimedge -\paperwidth}
+
\setcounter{topnumber}{3}
\renewcommand{\topfraction}{.85}
\setcounter{bottomnumber}{2}
@@ -941,13 +1276,11 @@
\newcommand{\footruleskip}{0.3\normalbaselineskip}
\newcommand{\makeheadrule}[3]{%
\@namedef{#1headrule}{%
- \hrule\@width #2\@height #3 \vskip-#3}
-}
+ \hrule\@width #2\@height #3 \vskip-#3}}
\newcommand{\makefootrule}[4]{%
\@namedef{#1footrule}{%
\vskip-#4\vskip-#3
- \hrule\@width #2\@height #3 \vskip #4}
-}
+ \hrule\@width #2\@height #3 \vskip #4}}
\newcommand{\makeheadposition}[5]{%
\nametest{flushleft}{#2}
@@ -993,14 +1326,9 @@
\else
\@namedef{#1oddfpl}{\hss} \@namedef{#1oddfpr}{\hss}
\fi
- \fi
-}
+ \fi}
\newcommand{\makepsmarks}[2]{\@namedef{#1pshook}{#2}}
-%%%% \newcommand{\makepshook}[2]{%
-%%%% \@memwarn{\protect\makepshook\space is deprecated.\MessageBreak
-%%%% Use \protect\makepsmarks\space instead}
-%%%% \@namedef{#1pshook}{#2}}
\newcommand*{\m@mhe@dreset}{\def\baselinestretch{1}\normalsize}
@@ -1015,7 +1343,7 @@
\centering\@nameuse{#1eheadc}\strut}\hfill
\llap{\parbox[b]{\@nameuse{#1runwidth}}{%
\raggedleft\@nameuse{#1eheadr}\strut}}}%
- \@nameuse{#1headrule}}}\@nameuse{#1evenhpr}}
+ \@nameuse{#1headrule}}}\@nameuse{#1evenhpr}}%
\@namedef{#1@oddhead}{%
\@nameuse{#1oddhpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
\vbox{\hbox{%
@@ -1025,7 +1353,7 @@
\centering\@nameuse{#1oheadc}\strut}\hfill
\llap{\parbox[b]{\@nameuse{#1runwidth}}{%
\raggedleft\@nameuse{#1oheadr}\strut}}}%
- \@nameuse{#1headrule}}}\@nameuse{#1oddhpr}}
+ \@nameuse{#1headrule}}}\@nameuse{#1oddhpr}}%
\@namedef{#1@evenfoot}{%
\@nameuse{#1evenfpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
\vbox{\@nameuse{#1footrule}\hbox{%
@@ -1035,7 +1363,7 @@
\centering\@nameuse{#1efootc}\strut}\hfill
\llap{\parbox[b]{\@nameuse{#1runwidth}}{%
\raggedleft\@nameuse{#1efootr}\strut}}}%
- }}\@nameuse{#1evenfpr}}
+ }}\@nameuse{#1evenfpr}}%
\@namedef{#1@oddfoot}{%
\@nameuse{#1oddfpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
\vbox{\@nameuse{#1footrule}\hbox{%
@@ -1045,23 +1373,21 @@
\centering\@nameuse{#1ofootc}\strut}\hfill
\llap{\parbox[b]{\@nameuse{#1runwidth}}{%
\raggedleft\@nameuse{#1ofootr}\strut}}}%
- }}\@nameuse{#1oddfpr}}
- \def\@evenhead{\@nameuse{#1@evenhead}}
- \def\@oddhead{\@nameuse{#1@oddhead}}
- \def\@evenfoot{\@nameuse{#1@evenfoot}}
- \def\@oddfoot{\@nameuse{#1@oddfoot}}
- \@nameuse{#1pshook}
- }
- \makeevenhead{#1}{}{}{}
- \makeoddhead{#1}{}{}{}
- \makeevenfoot{#1}{}{}{}
- \makeoddfoot{#1}{}{}{}
- \makerunningwidth{#1}{\textwidth}
- \makeheadposition{#1}{}{}{}{}
- \makeheadrule{#1}{\textwidth}{0pt}
- \makefootrule{#1}{\textwidth}{\footruleheight}{\footruleskip}
- \makepsmarks{#1}{}
-}
+ }}\@nameuse{#1oddfpr}}%
+ \def\@evenhead{\@nameuse{#1@evenhead}}%
+ \def\@oddhead{\@nameuse{#1@oddhead}}%
+ \def\@evenfoot{\@nameuse{#1@evenfoot}}%
+ \def\@oddfoot{\@nameuse{#1@oddfoot}}%
+ \@nameuse{#1pshook}}%
+ \makeevenhead{#1}{}{}{}%
+ \makeoddhead{#1}{}{}{}%
+ \makeevenfoot{#1}{}{}{}%
+ \makeoddfoot{#1}{}{}{}%
+ \makerunningwidth{#1}{\textwidth}%
+ \makeheadposition{#1}{}{}{}{}%
+ \makeheadrule{#1}{\textwidth}{0pt}%
+ \makefootrule{#1}{\textwidth}{\footruleheight}{\footruleskip}%
+ \makepsmarks{#1}{}}
\newcommand{\aliaspagestyle}[2]{%
\@namedef{ps@#1}{\@nameuse{ps@#2}}}
@@ -1079,84 +1405,202 @@
\makerunningwidth{#1}{\@nameuse{#2runwidth}}%
\@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}%
\@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}%
+ \@namedef{#1evenhpr}{\@nameuse{#2evenhpr}}%
+ \@namedef{#1oddhpr}{\@nameuse{#2oddhpr}}%
\@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}%
\@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}%
+ \@namedef{#1evenfpr}{\@nameuse{#2evenfpr}}%
+ \@namedef{#1oddfpr}{\@nameuse{#2oddfpr}}%
\@namedef{#1headrule}{\@nameuse{#2headrule}}%
\@namedef{#1footrule}{\@nameuse{#2footrule}}%
- \makepsmarks{#1}{\@nameuse{#2pshook}}%
-}
+ \makepsmarks{#1}{\@nameuse{#2pshook}}}
\newcommand{\ifonlyfloats}[2]{\if@fcolmade #1\else #2\fi}
\newcommand{\mergepagefloatstyle}[3]{%
- \@nameuse{ps@#3} \@nameuse{ps@#2}
- \@namedef{ps@#1}{
+ \@nameuse{ps@#3}\@nameuse{ps@#2}%
+ \@namedef{ps@#1}{%
\def\@evenhead{\ifonlyfloats{\@nameuse{#3@evenhead}}%
- {\@nameuse{#2@evenhead}}}
+ {\@nameuse{#2@evenhead}}}%
\def\@oddhead{\ifonlyfloats{\@nameuse{#3@oddhead}}%
- {\@nameuse{#2@oddhead}}}
+ {\@nameuse{#2@oddhead}}}%
\def\@evenfoot{\ifonlyfloats{\@nameuse{#3@evenfoot}}%
- {\@nameuse{#2@evenfoot}}}
+ {\@nameuse{#2@evenfoot}}}%
\def\@oddfoot{\ifonlyfloats{\@nameuse{#3@oddfoot}}%
- {\@nameuse{#2@oddfoot}}}
- \@namedef{#1pshook}{\@nameuse{#2pshook}}
+ {\@nameuse{#2@oddfoot}}}%
+ \@namedef{#1pshook}{\@nameuse{#2pshook}}%
}}
+
\makepagestyle{empty}
\makepagestyle{plain}
\makeevenfoot{plain}{}{\thepage}{}
\makeoddfoot{plain}{}{\thepage}{}
+\newcommand*{\nouppercaseheads}{\let\memUChead\relax}
+\newcommand*{\uppercaseheads}{\let\memUChead\MakeUppercase}
+\uppercaseheads
+
+\newcommand*{\createplainmark}[3]{%
+ \nametest{#2}{left}%
+ \ifsamename
+ \@namedef{#1mark}{\markboth{\memUChead{#3}}{}}%
+ \else
+ \nametest{#2}{right}%
+ \ifsamename
+ \@namedef{#1mark}{\markright{\memUChead{#3}}}%
+ \else
+ \nametest{#2}{both}%
+ \ifsamename\else
+ \@memerror{%
+ Unknown mark setting type `#2' for #1mark}{%
+ I expected `left', `both' or `right'. \MessageBreak
+ I will assume you meant `both'}%
+ \fi
+ \@namedef{#1mark}{\markboth{\memUChead{#3}}{\memUChead{#3}}}%
+ \fi
+ \fi}
+
+\newcommand\createmark[5]{%
+ \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
+ \nametest{#2}{left}%
+ \ifsamename
+ \@namedef{#1mark}##1{%
+ \@setclcnt{#1}{@memmarkcntra}%
+ \advance\c@@memmarkcntra\m@ne
+ \markboth{%
+ \memUChead{%
+ \ifnum \c@secnumdepth > \c@@memmarkcntra
+ \if@mainmatter
+ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}%
+ \fi
+ \fi
+ ##1}}{}}%
+ \else
+ \nametest{#2}{right}
+ \ifsamename
+ \@namedef{#1mark}##1{%
+ \@setclcnt{#1}{@memmarkcntra}
+ \advance\c@@memmarkcntra\m@ne
+ \markright{%
+ \memUChead{%
+ \ifnum \c@secnumdepth > \c@@memmarkcntra
+ \if@mainmatter%
+ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}%
+ \fi%
+ \fi%
+ ##1}}}%
+ \else
+ \nametest{#2}{both}%
+ \ifsamename\else
+ \@memerror{%
+ Unknown mark setting type `#2' for #1mark}{%
+ I expected `left', `both' or `right'. \MessageBreak
+ I will assume you meant `both'}%
+ \fi
+ \@namedef{#1mark}##1{%
+ \@setclcnt{#1}{@memmarkcntra}
+ \advance\c@@memmarkcntra\m@ne
+ \markboth{%
+ \memUChead{%
+ \ifnum \c@secnumdepth > \c@@memmarkcntra
+ \if@mainmatter
+ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}%
+ \fi
+ \fi
+ ##1}}{%
+ \memUChead{%
+ \ifnum \c@secnumdepth > \c@@memmarkcntra
+ \if@mainmatter
+ \@nameuse{#1marksn}{#4\@nameuse{the#1}#5}%
+ \fi
+ \fi
+ ##1}}}%
+ \fi
+ \fi}
+
+\newcommand\addtopsmarks[3]{%
+ \expandafter\addtodef\expandafter{\csname #1pshook\endcsname}{#2}{#3}}
\if@twoside
\makepagestyle{headings}
\makepsmarks{headings}{%
- \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
- ##1}}}%
+ ##1}}}}
+ \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}
}
\makeevenhead{headings}{\thepage}{}{\slshape\leftmark}
\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}
\else
\makepagestyle{headings}
\makepsmarks{headings}{%
- \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}}}}
+ \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}
}
\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}
\fi
\makepagestyle{myheadings}
\makepsmarks{myheadings}{%
- \let\@mkboth\@gobbletwo
\let\chaptermark\@gobble
\let\sectionmark\@gobble
\def\tocmark{}%
@@ -1164,7 +1608,7 @@
\def\lotmark{}%
\def\bibmark{}%
\def\indexmark{}%
- }
+ \def\glossarymark{}}
\makeevenhead{myheadings}{\thepage}{}{\slshape\leftmark}
\makeoddhead{myheadings}{\slshape\rightmark}{}{\thepage}
@@ -1181,7 +1625,6 @@
\makeoddfoot{ruled}{}{}{\thepage}
\makeheadrule{ruled}{\textwidth}{\normalrulethickness}
\newcommand{\@ruledmarks}{%
- \let\@mkboth\markboth
\def\chaptermark##1{%
\markboth{%
\ifnum \c@secnumdepth >\m@ne
@@ -1196,7 +1639,18 @@
\def\lotmark{\markboth{\listtablename}{}}
\def\bibmark{\markboth{\bibname}{}}
\def\indexmark{\markboth{\indexname}{}}
-}
+ \def\glossarymark{\markboth{\glossaryname}{}}
+}
+\renewcommand*{\@ruledmarks}{%
+ \nouppercaseheads
+ \createmark{chapter}{left}{shownumber}{}{. \space}
+ \createmark{section}{right}{shownumber}{}{. \space}
+ \createplainmark{toc}{both}{\contentsname}
+ \createplainmark{lof}{both}{\listfigurename}
+ \createplainmark{lot}{both}{\listtablename}
+ \createplainmark{bib}{both}{\bibname}
+ \createplainmark{index}{both}{\indexname}
+ \createplainmark{glossary}{both}{\glossaryname}}
\makepsmarks{ruled}{\@ruledmarks}
\makeevenhead{ruled}{\scshape\leftmark}{}{}
\makeoddhead{ruled}{}{}{\rightmark}
@@ -1221,7 +1675,6 @@
\makeheadrule{companion}{\headwidth}{\normalrulethickness}
\makeheadposition{companion}{flushright}{flushleft}{}{}
\makepsmarks{companion}{%
- \let\@mkboth\markboth
\def\chaptermark##1{\markboth{##1}{##1}} % left mark & right marks
\def\sectionmark##1{\markright{%
\ifnum \c@secnumdepth>\z@
@@ -1232,8 +1685,17 @@
\def\lofmark{\markboth{\listfigurename}{\listfigurename}}
\def\lotmark{\markboth{\listtablename}{\listtablename}}
\def\bibmark{\markboth{\bibname}{\bibname}}
- \def\indexmark{\markboth{\indexname}{\indexname}}
-}
+ \def\indexmark{\markboth{\indexname}{\indexname}}}
+\makepsmarks{companion}{%
+ \nouppercaseheads
+ \createmark{chapter}{both}{nonumber}{}{}
+ \createmark{section}{right}{shownumber}{}{. \space}
+ \createplainmark{toc}{both}{\contentsname}
+ \createplainmark{lof}{both}{\listfigurename}
+ \createplainmark{lot}{both}{\listtablename}
+ \createplainmark{bib}{both}{\bibname}
+ \createplainmark{index}{both}{\indexname}
+ \createplainmark{glossary}{both}{\glossaryname}}
\makeevenhead{companion}{\normalfont\bfseries\thepage}{}%
{\normalfont\bfseries\leftmark}
\makeoddhead{companion}{\normalfont\bfseries\rightmark}{}%
@@ -1251,6 +1713,155 @@
\newcommand{\savepagenumber}{\global\c@storedpagenumber \c@page}
\newcommand{\restorepagenumber}{\global\c@page \c@storedpagenumber}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand*{\setSpacing}[1]{%
+ \def\baselinestretch{#1}%
+ \@currsize}
+
+\newcommand*{\setSingleSpace}[1]{%
+ \def\m@m@singlespace{#1}}
+\setSingleSpace{1}
+
+\newcommand*{\SingleSpacing}{%
+ \setSpacing{\m@m@singlespace}%
+ \vskip\baselineskip% correction for coming into single spacing
+}
+\SingleSpacing
+
+\newcommand*{\OnehalfSpacing}{
+ \setSpacing{1.25}% default (10pt)
+ \ifcase \@ptsize \relax % 10pt
+ \setSpacing{1.25}%
+ \or% 11pt
+ \setSpacing{1.213}%
+ \or% 12pt
+ \setSpacing{1.241}%
+ \or\or% 14pt
+ \setSpacing{1.20}%
+ \or\or\or% 17pt
+ \setSpacing{1.16}%
+ \or\or% 9pt
+ \setSpacing{1.35}%
+ \else% the extended sizes
+ \setSpacing{1.16}%
+ \fi}
+
+\newcommand*{\DoubleSpacing}{
+ \setSpacing{1.667}% default (10pt)
+ \ifcase \@ptsize \relax % 10pt
+ \setSpacing{1.667}%
+ \or% 11pt
+ \setSpacing{1.618}%
+ \or% 12pt
+ \setSpacing{1.655}%
+ \or\or% 14pt
+ \setSpacing{1.60}%
+ \or\or\or% 17pt
+ \setSpacing{1.545}%
+ \or\or% 9pt
+ \setSpacing{1.8}%
+ \else% larger sizes
+ \setSpacing{1.5}%
+ \fi}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check what this does!!!!!!!!
+\renewcommand*{\@setsize}[4]{%
+ \@nomath#1%
+ \let\@currsize#1%
+ \baselineskip #2%
+ \baselineskip \baselinestretch\baselineskip
+ \parskip \baselinestretch\parskip
+ \setbox\strutbox \hbox{%
+ \vrule height.7\baselineskip
+ depth .3\baselineskip
+ width \z@}%
+ \skip\footins \baselinestretch\skip\footins
+ \normalbaselineskip\baselineskip#3#4}
+
+\newenvironment{SingleSpace}{%
+ \vskip\baselineskip
+ \setSpacing{\m@m@singlespace}%
+ \vskip -\baselineskip
+}{\par}
+
+\newenvironment{SingleSpace*}{%
+%% \vskip\baselineskip
+ \setSpacing{\m@m@singlespace}%
+ \vskip 0.5\baselineskip
+}{\vskip -0.5\baselineskip}
+
+\newcommand*{\m@mrestore@spacing}{%
+ \par
+ \vskip \parskip
+ \vskip \baselineskip
+ \endgroup
+ \vskip -\parskip
+ \vskip -\baselineskip}
+
+\newenvironment{Spacing}[1]{%
+ \par
+ \begingroup
+ \setSpacing{#1}}{\m@mrestore@spacing}
+
+\newenvironment{OnehalfSpace}{%
+ \begingroup
+ \OnehalfSpacing}{\m@mrestore@spacing}
+
+\newenvironment{DoubleSpace}{%
+ \begingroup
+ \DoubleSpacing}{\m@mrestore@spacing}
+
+\newcommand*{\memdskipstretch}{0.0}
+\newcommand*{\setDisplayskipStretch}[1]{%
+ \renewcommand*{\memdskipstretch}{#1}}
+\newcommand*{\noDisplayskipStretch}{\setDisplayskipStretch{0.0}}
+
+\newcommand*{\memdskips}{%
+ \advance\abovedisplayskip \memdskipstretch\abovedisplayskip
+ \advance\belowdisplayskip \memdskipstretch\belowdisplayskip
+ \advance\abovedisplayshortskip \memdskipstretch\abovedisplayshortskip
+ \advance\belowdisplayshortskip \memdskipstretch\belowdisplayshortskip}
+\everydisplay\expandafter{%
+ \the\everydisplay
+ \memdskips}
+
+\let\m@m@xfloat\@xfloat
+\def\@xfloat #1[#2]{%
+ \m@m@xfloat #1[#2]%
+ \def\baselinestretch{\m@m@singlespace}%
+ \normalsize}
+
+\newdimen\memPD
+\newenvironment{vminipage}{%
+ \par
+ \@ifnextchar[%]
+ \@ivminipage
+ {\@iiiminipage t\relax[s]}
+}{%
+ \par\global\memPD=\prevdepth
+ \endminipage
+ \par
+ \kern-\memPD% no pagebreak allowed here
+ \hbox{\vrule depth \memPD width \z@}}
+
+ \def\@ivminipage[#1]{%
+ \@ifnextchar[%]
+ {\@iiminipage{t}}{\@iiiminipage{t}\relax[s]}}
+\newif\ifm@mnzpskip
+\newcommand*{\traditionalparskip}{%
+ \parskip \z@
+ \m@mnzpskipfalse}
+\newskip\m@mabparskip
+\newcommand*{\abnormalparskip}[1]{%
+ \setlength{\parskip}{#1}\m@mabparskip=#1\relax
+ \m@mnzpskiptrue}
+\newcommand*{\nonzeroparskip}{\abnormalparskip{%
+ 0.5\baselineskip
+ \@plus .1\baselineskip \@minus .1\baselineskip% NTG
+%% 0.5/baselineskip \@plus 2pt% RF
+}}
+\traditionalparskip
+
\newcommand{\pretitle}[1]{\def\@bspretitle{#1}}
\newcommand{\posttitle}[1]{\def\@bsposttitle{#1}}
\newcommand{\preauthor}[1]{\def\@bspreauthor{#1}}
@@ -1281,12 +1892,6 @@
\newcommand{\thanksheadextra}[2]{%
\def\@bsthanksheadpre{#1}%
\def\@bsthanksheadpost{#2}}
-%%%% \newcommand{\thanksfootextra}[2]{%
-%%%% \@memwarn{Use \protect\thanksmarkstyle\space instead of
-%%%% \protect\thanksfootextra}%
-%%%% \def\thanksfootpre{#1}%
-%%%% \def\thanksfootpost{#2}
-
\DeclareRobustCommand{\thanksmark}[1]{\footnotemark[#1]}
\newcommand{\thanksgap}[1]{\hspace{#1}}
\newcommand{\tamark}{\@thefnmark}
@@ -1414,8 +2019,7 @@
\global\let\thanksheadextra\relax
\global\let\thanksfootextra\relax
\global\let\thanksmark\relax
- \global\let\thanksgap\relax
-}
+ \global\let\thanksgap\relax}
\newcommand{\keepthetitle}{%
\@bsmtitlempty
@@ -1425,15 +2029,13 @@
\global\let\@thanks\@empty
\global\let\@title\@empty
\global\let\@author\@empty
- \global\let\@date\@empty
-}
+ \global\let\@date\@empty}
\newcommand{\killtitle}{%
\keepthetitle
\global\let\thetitle\relax
\global\let\theauthor\relax
- \global\let\thedate\relax
-}
+ \global\let\thedate\relax}
\addtoiargdef{\title}{%
\begingroup\let\footnote\@gobble}{%
@@ -1462,105 +2064,7 @@
\protected@xdef\thedate{#1}
\endgroup\endgroup}
-\newif\if@bsonecol
- \@bsonecoltrue
-\newif\ifadd@bstotoc
- \add@bstotocfalse
-\newif\ifnumber@bs
- \number@bsfalse
-\newif\if@bsrunin
- \@bsruninfalse
-
-\newcommand{\abstractcol}{\@bsonecolfalse}
-\newcommand{\abstractintoc}{\add@bstotoctrue}
-\newcommand{\abstractnum}{\number@bstrue\@bsruninfalse}
-\newcommand{\abstractrunin}{\@bsrunintrue\number@bsfalse}
-
-\newcommand{\abstractnamefont}{\normalfont\small\bfseries}
-\newcommand{\abstracttextfont}{\normalfont\small}
-
-\newcommand{\absnamepos}{center}
-\newlength{\abstitleskip} \setlength{\abstitleskip}{-0.5em}
-\newlength{\absleftindent}
-\newdimen\abs@leftindent
- \abs@leftindent=\leftmargin
-\newlength{\absrightindent}
-\newlength{\absparindent}
-\newlength{\absparsep}
-
-\newcommand{\abslabeldelim}[1]{\def\@bslabeldelim{#1}}
-\abslabeldelim{}
-\newcommand{\@bsrunintitle}{%
- \hspace*{\abstitleskip}{\abstractnamefont\abstractname\@bslabeldelim}}
-
-\newcommand{\setup@bstract}{%
- \if@twocolumn
- \if@bsonecol
- \abs@leftindent=\absleftindent
- \else
- \abs@leftindent=\z@
- \renewcommand{\abstractnamefont}{\normalfont\Large\bfseries}
- \renewcommand{\abstracttextfont}{\normalfont}
- \renewcommand{\absnamepos}{flushleft}
- \setlength{\abstitleskip}{-2ex}
- \fi
- \else
- \abs@leftindent=\absleftindent
- \fi
- \setlength{\absrightindent}{\absleftindent}
-}
-
-\AtBeginDocument{\setlength{\absparindent}{\parindent}
- \setlength{\absparsep}{\parskip}}
-
-\newenvironment{@bstr@ctlist}{%
- \list{}{%
- %%\topsep \z@
- \partopsep \z@
- \listparindent \absparindent
- \itemindent \listparindent
- \leftmargin \abs@leftindent
- \rightmargin \absrightindent
- \parsep \absparsep}%
- \item\relax}
- {\endlist}
-
-\newcommand{\put@bsintoc}{%
- \ifadd@bstotoc
- \ifnumber@bs\else
- \phantomsection
- \addcontentsline{toc}{chapter}{\abstractname}
- \fi
- \fi}
-
-\newcommand{\num@bs}{\chapter{\abstractname}}
-
-\newenvironment{abstract}{%
- \setup@bstract
- \if@bsrunin\else
- \ifnumber@bs \num@bs \else
- \begin{\absnamepos}\abstractnamefont\abstractname\end\absnamepos%
- \vspace{\abstitleskip}%
- \fi
- \fi
- \put@bsintoc%
- \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
- {\par\end{@bstr@ctlist}}
-
-\newenvironment{onecolabstract}{%
- \begin{@twocolumnfalse}\begin{abstract}}{%
- \end{abstract}\end{@twocolumnfalse}}
-
-\addtoiargdef{\thanks}{}{%
- \protected@xdef\@bs@thanks{\@bs@thanks
- \protect\footnotetext[\the\c@footnote]{#1}}%
-}
-\let\@bs@thanks\@empty
-
-\newcommand{\saythanks}{\begingroup
- \renewcommand{\thefootnote}{\fnsymbol{footnote}}\@bs@thanks
- \endgroup\global\let\@bs@thanks\@empty}
-
+\newcommand*{\bookpagemark}[1]{}
\newcommand*{\partmark}[1]{}
\newcommand*{\chaptermark}[1]{}
@@ -1569,23 +2073,25 @@
\newcommand*{\glossarymark}{}
\setcounter{secnumdepth}{2}
-\newcounter{part}
-\newcounter{chapter}
+\newcounter{book} \setcounter{book}{0}
+\newcounter{part} \setcounter{part}{0}
+\newcounter{chapter} \setcounter{chapter}{0}
\newcounter{section}[chapter]
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]
-\renewcommand{\thepart}{\@Roman\c@part}
-\renewcommand{\thechapter}{\@arabic\c@chapter}
-\renewcommand{\thesection}{\thechapter.\@arabic\c@section}
-\renewcommand{\thesubsection}{%
+\renewcommand*{\thebook}{\@Roman\c@book}
+\renewcommand*{\thepart}{\@Roman\c@part}
+\renewcommand*{\thechapter}{\@arabic\c@chapter}
+\renewcommand*{\thesection}{\thechapter.\@arabic\c@section}
+\renewcommand*{\thesubsection}{%
\thesection.\@arabic\c@subsection}
-\renewcommand{\thesubsubsection}{%
+\renewcommand*{\thesubsubsection}{%
\thesubsection.\@arabic\c@subsubsection}
-\renewcommand{\theparagraph}{%
+\renewcommand*{\theparagraph}{%
\thesubsubsection.\@arabic\c@paragraph}
-\renewcommand{\thesubparagraph}{%
+\renewcommand*{\thesubparagraph}{%
\theparagraph.\@arabic\c@subparagraph}
\newcommand{\@chapapp}{\chaptername}
@@ -1603,11 +2109,15 @@
\newcommand{\mainmatter}{%
\@ifstar{\@smemmain}{\@memmain}}
-\newcommand{\@smemmain}{
+\newcommand*{\@smemmain}{%
\@mainmattertrue
\setcounter{secnumdepth}{\value{maxsecnumdepth}}
\ifartopt
- \clearpage
+ \if@twoside
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
\else
\cleardoublepage
\counterwithin{figure}{chapter}
@@ -1635,11 +2145,104 @@
\setcounter{table}{0}
\fi}
+\newcommand*{\theHbook}{\arabic{book}}
+\newcommand*{\toclevel@book}{-2}
+
+\newcommand*{\book}{%
+ \@setupbook
+ \secdef\@book\@sbook}
+\newcommand*{\beforebookskip}{\null\vfil}
+\newcommand*{\midbookskip}{\par\vskip 2\onelineskip}
+\newcommand*{\afterbookskip}{\vfil\newpage}
+
+\newcommand{\@setupbook}{%
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \thispagestyle{book}%
+ \if@twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \beforebookskip}
+
+\newcommand*{\booknamefont}{\normalfont\huge\bfseries}
+\newcommand*{\booknumfont}{\normalfont\huge\bfseries}
+\newcommand*{\booktitlefont}{\normalfont\Huge\bfseries}
+
+\newcommand*{\printbookname}{\booknamefont \bookname}
+\newcommand*{\booknamenum}{\space}
+\newcommand*{\printbooknum}{\booknumfont \thebook}
+\newcommand*{\printbooktitle}[1]{\booktitlefont #1}
+
+\newcommand{\membookinfo}[3]{}
+\newcommand{\membookstarinfo}[1]{}
+
+\long\def\@book[#1]#2{%
+ \M@gettitle{#1}%
+ \phantomsection
+ \ifnum \c@secnumdepth >-3\relax
+ \refstepcounter{book}%
+ \addcontentsline{toc}{book}%
+ {\protect\booknumberline{\thebook}#1}%
+ \membookinfo{\thebook}{#1}{#2}%
+ \else
+ \addcontentsline{toc}{book}{#1}%
+ \membookinfo{}{#1}{#2}%
+ \fi
+ \bookpagemark{#1}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >-3\relax
+ \printbookname \booknamenum \printbooknum
+ \midbookskip
+ \fi
+ \printbooktitle{#2}\par}%
+ \@endbook}
+
+\long\def\@sbook#1{%
+ \M@gettitle{#1}%
+ \phantomsection
+ \membookstarinfo{#1}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \printbooktitle{#1}\par}%
+ \@endbook}
+
+\newif\ifm@mnobooknewpage
+ \m@mnobooknewpagefalse
+\newcommand*{\bookblankpage}{\m@mnobooknewpagefalse}
+\newcommand*{\nobookblankpage}{\m@mnobooknewpagetrue}
+
+\def\@endbook{\afterbookskip
+ \ifm@mnobooknewpage
+ \else
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{afterbook}%
+ \newpage
+ \fi
+ \fi
+ \fi
+ \if@tempswa
+ \twocolumn
+ \fi}
+
+\aliaspagestyle{book}{empty}
+\aliaspagestyle{afterbook}{empty}
+
\newcommand{\part}{%
\@setuppart
\secdef\@part\@spart}
\newcommand{\beforepartskip}{\null\vfil}
-\newcommand{\midpartskip}{\par\vskip 20pt}
+\newcommand{\midpartskip}{\par\vskip 2\onelineskip}
\newcommand{\afterpartskip}{\vfil\newpage}
\newcommand{\@setuppart}{%
@@ -1666,11 +2269,12 @@
\newcommand{\printpartnum}{\partnumfont \thepart}
\newcommand{\printparttitle}[1]{\parttitlefont #1}
-\newcommand*{\mempartinfo}[3]{}
-\newcommand*{\mempartstarinfo}[1]{}
+\newcommand{\mempartinfo}[3]{}
+\newcommand{\mempartstarinfo}[1]{}
\long\def\@part[#1]#2{%
\M@gettitle{#1}%
+ \phantomsection
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}%
@@ -1691,8 +2295,9 @@
\printparttitle{#2}\par}%
\@endpart}
-\def\@spart#1{%
+\long\def\@spart#1{%
\M@gettitle{#1}%
+ \phantomsection
\mempartstarinfo{#1}%
{\centering
\interlinepenalty \@M
@@ -1700,18 +2305,28 @@
\printparttitle{#1}\par}%
\@endpart}
+\newif\ifm@mnopartnewpage
+ \m@mnopartnewpagefalse
+\newcommand*{\partblankpage}{\m@mnopartnewpagefalse}
+\newcommand*{\nopartblankpage}{\m@mnopartnewpagetrue}
+
\def\@endpart{\afterpartskip
- \if@twoside
- \if@openright
- \null
- \thispagestyle{empty}%
- \newpage
+ \ifm@mnopartnewpage
+ \else
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{afterpart}%
+ \newpage
+ \fi
\fi
\fi
\if@tempswa
\twocolumn
\fi}
+\aliaspagestyle{afterpart}{empty}
+
\newcommand\chapter{%
\ifartopt\par\else
\clearforchapter
@@ -1727,12 +2342,19 @@
}
\def\m@m@empty{\@empty}
-\newcommand*{\memchapinfo}[4]{}
-\newcommand*{\memchapstarinfo}[2]{}
-\newcommand*{\memappchapinfo}[4]{}
-\newcommand*{\memappchapstarinfo}[2]{}
+\newcommand{\memchapinfo}[4]{}
+\newcommand{\memchapstarinfo}[2]{}
+\newcommand{\memappchapinfo}[4]{}
+\newcommand{\memappchapstarinfo}[2]{}
+
+\newif\ifm@mpn@new@chap
+ \m@mpn@new@chapfalse
+\newif\ifm@mpn@new@schap
+ \m@mpn@new@schapfalse
\def\@chapter[#1]#2{%
+ \m@mpn@new@chaptrue
+ \def\f@rbdy{#2}%
\ifx\ch@pt@c\@empty % no optional args
\def\f@rtoc{#2}%
\def\f@rhdr{#2}%
@@ -1753,11 +2375,12 @@
\ifm@m@And
\refstepcounter{chapter}%
\fi
- \chaptermark{\f@rhdr}
\ifartopt
\@makechapterhead{#2}%
\@afterheading
+ \chaptermark{\f@rhdr}%
\else
+ \chaptermark{\f@rhdr}
\insertchapterspace
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
@@ -1784,8 +2407,7 @@
\memchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
\fi
\fi
- \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi
-}
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi}
\def\@makechapterhead#1{%
\chapterheadstart% \vspace*{50\p@}%
@@ -1801,34 +2423,35 @@
\afterchaptertitle % \par\nobreak \vskip 40\p@
}}
-\newcommand{\insertchapterspace}{%
+\newcommand*{\insertchapterspace}{%
\addtocontents{lof}{\protect\addvspace{10pt}}%
- \addtocontents{lot}{\protect\addvspace{10pt}}%
-}
+ \addtocontents{lot}{\protect\addvspace{10pt}}}
-\newcommand{\@chs@def@ult}{%
- \def\chapterheadstart{\vspace*{\beforechapskip}}
- \def\printchaptername{\chapnamefont \@chapapp}
- \def\chapternamenum{\space}
- \def\printchapternum{\chapnumfont \thechapter}
- \def\afterchapternum{\par\nobreak\vskip \midchapskip}
- \def\printchapternonum{}
- \def\printchaptertitle##1{\chaptitlefont ##1}
- \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
-}
-
-\newcommand{\chapnamefont}{\normalfont\huge\bfseries}
-\newcommand{\chapnumfont}{\normalfont\huge\bfseries}
-\newcommand{\chaptitlefont}{\normalfont\Huge\bfseries}
\newlength{\beforechapskip}\setlength{\beforechapskip}{50pt}
\newlength{\midchapskip}\setlength{\midchapskip}{20pt}
\newlength{\afterchapskip}\setlength{\afterchapskip}{40pt}
+\newcommand{\@chs@def@ult}{%
+ \def\chapterheadstart{\vspace*{\beforechapskip}}%
+ \def\printchaptername{\chapnamefont \@chapapp}%
+ \def\chapternamenum{\space}%
+ \def\printchapternum{\chapnumfont \thechapter}%
+ \def\afterchapternum{\par\nobreak\vskip \midchapskip}%
+ \def\printchapternonum{}%
+ \def\printchaptertitle##1{\chaptitlefont ##1}%
+ \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}%
+ \def\chapnamefont{\normalfont\huge\bfseries}%
+ \def\chapnumfont{\normalfont\huge\bfseries}%
+ \def\chaptitlefont{\normalfont\Huge\bfseries}%
+ \setlength{\beforechapskip}{50pt}%
+ \setlength{\midchapskip}{20pt}%
+ \setlength{\afterchapskip}{40pt}}
+
\newcommand{\@m@mschapter}[2][\@empty]{%
\@schapter{#2}%
\ifx \@empty#1
\def\f@rhdr{#2}%
- \else % opt arg
+ \else% opt arg
\def\f@rhdr{#1}%
\setcounter{secnumdepth}{-10}%
\chaptermark{#1}%
@@ -1838,101 +2461,465 @@
\memappchapstarinfo{\f@rhdr}{#2}%
\else
\memchapstarinfo{\f@rhdr}{#2}%
- \fi}
+ \fi
+ \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{#2}\fi}
\newcommand{\@schapter}[1]{%
+ \m@mpn@new@schaptrue
+ \def\f@rbdy{#1}%
\ifartopt
\@makeschapterhead{#1}%
- \@afterheading
\else
\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\fi
- \@afterheading
\fi
- \M@gettitle{#1}}
+ \@afterheading}
\def\@makeschapterhead#1{%
\chapterheadstart
{\parindent \z@ \raggedright \normalfont
\printchapternonum
\interlinepenalty\@M
- \printchaptertitle{#1}
- \afterchaptertitle
- }
+ \printchaptertitle{#1}%
+ \afterchaptertitle}%
}
\newcommand{\makechapterstyle}[2]{\@namedef{chs@#1}{\@chs@def@ult #2}}
\newcommand{\chapterstyle}[1]{\@nameuse{chs@#1}}
-\makechapterstyle{default}{%
- \renewcommand{\chapnamefont}{\normalfont\huge\bfseries}
- \renewcommand{\chapnumfont}{\normalfont\huge\bfseries}
- \renewcommand{\chaptitlefont}{\normalfont\Huge\bfseries}
- \setlength{\beforechapskip}{50pt}
- \setlength{\midchapskip}{20pt}
- \setlength{\afterchapskip}{40pt}
-}
+\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}}
\chapterstyle{default}
\makechapterstyle{section}{%
+ \chapterstyle{default}
\renewcommand{\printchaptername}{}
\renewcommand{\chapternamenum}{}
\renewcommand{\chapnumfont}{\normalfont\Huge\bfseries}
\renewcommand{\printchapternum}{\chapnumfont \thechapter\space}
- \renewcommand{\afterchapternum}{}
-}
+ \renewcommand{\afterchapternum}{}}
\makechapterstyle{article}{%
- \renewcommand{\chapterheadstart}{\vspace{\beforechapskip}}
+ \chapterstyle{default}
\setlength{\beforechapskip}{3.5ex \@plus 1ex \@minus .2ex}
+ \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
\setlength{\afterchapskip}{2.3ex \@plus .2ex}
\renewcommand{\printchaptername}{}
\renewcommand{\chapternamenum}{}
\renewcommand{\chaptitlefont}{\normalfont\Large\bfseries}
- \renewcommand{\chapnumfont}{\normalfont\Large\bfseries}
+ \renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand{\printchapternum}{\chapnumfont \thechapter\quad}
- \renewcommand{\afterchapternum}{}
-}
+ \renewcommand{\afterchapternum}{}}
+
+\makechapterstyle{reparticle}{%
+ \chapterstyle{default}
+ \setlength{\beforechapskip}{3.5ex \@plus 1ex \@minus .2ex}
+ \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
+ \setlength{\afterchapskip}{2.3ex \@plus .2ex}
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\chaptitlefont}{\normalfont\Large\bfseries}
+ \renewcommand*{\chapnumfont}{\chaptitlefont}
+ \renewcommand*{\printchapternum}{\@hangfrom{\chapnumfont \thechapter\quad}}%
+ \renewcommand*{\afterchapternum}{}}
+
+\newcommand*{\reparticle}{%
+ \chapterstyle{reparticle}
+ \setsecheadstyle{\normalfont\large\bfseries\raggedright}
+ \setsubsecheadstyle{\normalfont\bfseries\raggedright}}
\makechapterstyle{hangnum}{%
- \renewcommand{\chapnumfont}{\chaptitlefont}
+ \chapterstyle{default}
+ \renewcommand*{\chapnumfont}{\chaptitlefont}
\settowidth{\chapindent}{\chapnumfont 999}
- \renewcommand{\printchaptername}{}
- \renewcommand{\chapternamenum}{}
- \renewcommand{\printchapternum}{%
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{%
\noindent\llap{\makebox[\chapindent][l]{\chapnumfont \thechapter}}}
- \renewcommand{\afterchapternum}{}
-}
+ \renewcommand*{\afterchapternum}{}}
\newlength{\chapindent}
\makechapterstyle{companion}{%
- \renewcommand{\chapnamefont}{\normalfont\LARGE\scshape}
- \renewcommand{\printchaptername}{\raggedleft\chapnamefont \@chapapp}
- \renewcommand{\chapnumfont}{\normalfont\Huge}
+ \chapterstyle{default}
+ \renewcommand*{\chapnamefont}{\normalfont\LARGE\scshape}
+ \renewcommand*{\printchaptername}{\raggedleft\chapnamefont \@chapapp}
+ \renewcommand*{\chapnumfont}{\normalfont\Huge}
\setlength{\chapindent}{\marginparsep}
\addtolength{\chapindent}{\marginparwidth}
- \renewcommand{\printchaptertitle}[1]{%
+ \renewcommand*{\printchaptertitle}[1]{%
\begin{adjustwidth}{}{-\chapindent}
\raggedleft \chaptitlefont ##1\par\nobreak
- \end{adjustwidth}}
-}
-
-\makechapterstyle{demo}{
- \renewcommand{\printchaptername}{\centering}
- \renewcommand{\printchapternum}{\chapnumfont \numtoName{\c@chapter}}
- \renewcommand{\chaptitlefont}{\normalfont\Huge\sffamily}
- \renewcommand{\printchaptertitle}[1]{%
+ \end{adjustwidth}}}
+
+\makechapterstyle{demo}{%
+ \chapterstyle{default}
+ \renewcommand*{\printchaptername}{\centering}
+ \renewcommand*{\printchapternum}{\chapnumfont \numtoName{\c@chapter}}
+ \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand*{\printchaptertitle}[1]{%
\hrule\vskip\onelineskip \raggedleft \chaptitlefont ##1}
- \renewcommand{\afterchaptertitle}%
- {\vskip\onelineskip \hrule\vskip \afterchapskip}
-}
+ \renewcommand*{\afterchaptertitle}%
+ {\vskip\onelineskip \hrule\vskip \afterchapskip}}
+
+\makechapterstyle{bianchi}{%
+ \chapterstyle{default}
+ \renewcommand*{\chapnamefont}{\normalfont\Large\sffamily\itshape}
+ \renewcommand*{\chapnumfont}{\normalfont\huge}
+ \renewcommand*{\printchaptername}{%
+ \chapnamefont\centering\@chapapp}
+ \renewcommand*{\printchapternum}{\chapnumfont \textit{\thechapter}}
+ \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \centering \chaptitlefont\textbf{##1}\par}
+ \renewcommand*{\afterchaptertitle}{\vskip\onelineskip \hrule\vskip
+ \afterchapskip}
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\chapnumfont \textit{9}}\afterchapternum}}
+
+\makechapterstyle{bringhurst}{%
+ \chapterstyle{default}
+ \renewcommand*{\chapterheadstart}{}
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{}
+ \renewcommand*{\afterchapternum}{}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \raggedright\Large\scshape\MakeLowercase{##1}}
+ \renewcommand*{\afterchaptertitle}{%
+ \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}
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\printchaptername \chapnumfont 1}
+ \afterchapternum
+ \vskip \onelineskip \vskip -\topskip}
+ \renewcommand*{\chaptitlefont}{\Large\itshape}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hrule\vskip\onelineskip \centering\chaptitlefont ##1}}
+
+\makechapterstyle{culver}{%
+ \chapterstyle{default}
+ \chapterstyle{article}%
+ \renewcommand*{\thechapter}{\Roman{chapter}}
+ \renewcommand*{\printchapternum}{% center number/title
+ \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}{}
+ \renewcommand*{\chapnumfont}{\normalfont\large}
+ \settoheight{\midchapskip}{\chapnumfont 1}
+ \renewcommand*{\printchapternum}{\centering \chapnumfont
+ \rule[0.5\midchapskip]{1em}{0.4pt} \thechapter\
+ \rule[0.5\midchapskip]{1em}{0.4pt}}
+ \renewcommand*{\afterchapternum}{\par\nobreak\vskip 0.5\onelineskip}
+ \renewcommand*{\printchapternonum}{\centering
+ \vphantom{\chapnumfont 1}\afterchapternum}
+ \renewcommand*{\chaptitlefont}{\normalfont\Large}
+ \renewcommand*{\printchaptertitle}[1]{\centering \chaptitlefont ##1}
+ \setlength{\afterchapskip}{2.5\onelineskip}}
+
+\makechapterstyle{demo2}{%
+ \chapterstyle{default}
+ \renewcommand*{\printchaptername}{\centering}
+ \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}{3\baselineskip}
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\chapnumfont One}
+ \afterchapternum%
+ \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}
+ \renewcommand*{\chapterheadstart}{\begingroup
+ \vspace*{\beforechapskip}%
+ \begin{adjustwidth}{}{-\chapindent}%
+ \hrulefill
+ \smash{\rule{0.4pt}{15mm}}
+ \end{adjustwidth}\endgroup}
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{%
+ \begin{adjustwidth}{}{-\chapindent}
+ \hfill
+ \raisebox{10mm}[0pt][0pt]{\chapnumfont \thechapter}%
+ \hspace*{1em}
+ \end{adjustwidth}\vspace*{-3.0\onelineskip}}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \vskip\onelineskip
+ \raggedleft {\chaptitlefont ##1}\par\nobreak}}
+
+\makechapterstyle{ger}{%
+ \chapterstyle{default}
+ \renewcommand*{\chapterheadstart}{\vspace*{\beforechapskip}
+ \mbox{}\\\mbox{}\rule[0pt]{\textwidth}{0.4pt}\par}
+ \setlength{\midchapskip}{20pt}
+ \renewcommand*{\printchaptertitle}[1]{\chaptitlefont ##1
+ \\\mbox{}\rule[5pt]{\textwidth}{0.4pt}}}
+
+\makechapterstyle{lyhne}{% needs graphicx package
+ \chapterstyle{default}
+ \setlength{\beforechapskip}{1.5cm}
+ \setlength{\afterchapskip}{1cm}
+ \setlength{\midchapskip}{2cm}
+ \renewcommand*{\chapnamefont}{\normalfont\normalsize\scshape\raggedleft}
+ \renewcommand*{\chaptitlefont}{\normalfont\normalsize\bfseries\sffamily\raggedleft}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{\makebox[0pt][l]{\hspace{0.2em}%
+ \resizebox{!}{2ex}{\chapnamefont\bfseries\sffamily\thechapter}}}
+ \renewcommand*{\afterchapternum}{\par\hspace{1.5cm}\hrule\vspace{0.2cm}}
+ \renewcommand*{\printchapternonum}{\vphantom{\chapnamefont 1}\afterchapternum}
+ \renewcommand*{\afterchaptertitle}{\vskip 0.2cm
+ \hrule\vskip\afterchapskip}}
+
+\makechapterstyle{madsen}{% requires graphicx package
+ \chapterstyle{default}
+ \renewcommand*{\chapnamefont}{%
+ \normalfont\Large\scshape\raggedleft}
+ \renewcommand*{\chaptitlefont}{%
+ \normalfont\Huge\bfseries\sffamily\raggedleft}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{%
+ \makebox[0pt][l]{\hspace{0.4em}
+ \resizebox{!}{4ex}{%
+ \chapnamefont\bfseries\sffamily\thechapter}
+ }%
+ }%
+ \renewcommand*{\afterchapternum}{%
+ \par\hspace{1.5cm}\hrule\vskip\midchapskip}}
+
+\newcommand*{\colorchapnum}{}
+\newcommand*{\colorchaptitle}{}
+\makechapterstyle{pedersen}{%
+ \chapterstyle{default}
+ \setlength{\beforechapskip}{-20pt}
+ \setlength{\afterchapskip}{10pt}
+ \renewcommand*{\chapnamefont}{\normalfont\LARGE\itshape}
+ \renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape\colorchapnum}
+ \renewcommand*{\chaptitlefont}{\normalfont\huge\itshape\colorchaptitle}
+ \renewcommand*{\afterchapternum}{}
+ \renewcommand*{\printchaptername}{}
+ \setlength{\midchapskip}{20mm}% was \numberheight
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\printchapternum}{%
+ \sidebar{\raisebox{0pt}[0pt][0pt]{\makebox[0pt][l]{%
+ \resizebox{!}{\midchapskip}{\chapnumfont\thechapter}}}}}
+ \renewcommand*{\printchaptertitle}[1]{\chaptitlefont ##1}}
+
+%% Thomas Dye's southall chapter style
+\makechapterstyle{southall}{%
+ \chapterstyle{default}
+ \setlength{\afterchapskip}{5\baselineskip}
+ \setlength{\beforechapskip}{36pt}% \headindent
+ \setlength{\midchapskip}{\textwidth}% \rightblock
+ \addtolength{\midchapskip}{-\beforechapskip}
+ \renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
+ \renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
+ \renewcommand*{\chapnumfont}{\chaptitlefont}
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\afterchapternum}{}
+ \renewcommand*{\printchapternum}{%
+ \begin{minipage}[t][\baselineskip][b]{\beforechapskip}
+ {\vspace{0pt}\chapnumfont%%%\figureversion{lining}
+ \thechapter}
+ \end{minipage}}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \hfill\begin{minipage}[t]{\midchapskip}
+ {\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
+ \renewcommand*{\afterchaptertitle}{%
+ \par\vspace{\baselineskip}%
+ \hrulefill \par\nobreak\noindent \vskip \afterchapskip}}
+
+\makechapterstyle{thatcher}{%
+ \chapterstyle{default}
+ \renewcommand*{\chapterheadstart}{}
+ \renewcommand*{\printchaptername}{%
+ \centerline{\chapnumfont{\@chapapp\ \thechapter}}}
+ \renewcommand*{\chapternamenum}{}
+ \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeLowercase}
+ \renewcommand*{\printchapternum}{}
+ \renewcommand*{\afterchapternum}{%
+ \par\centerline{\parbox{0.5in}{\hrulefill}}\par}
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\chapnumfont \@chapapp 1}\par
+ \parbox{0.5in}{}\par}
+ \renewcommand*{\chaptitlefont}{\normalfont\large}
+ \renewcommand*{\printchaptertitle}[1]{%
+ \centering \chaptitlefont\MakeUppercase{##1}}}
+
+\makechapterstyle{veelo}{%
+ \setlength{\afterchapskip}{40pt}
+ \renewcommand*{\chapterheadstart}{\vspace*{40pt}}
+ \renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
+ \renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
+ \renewcommand*{\chapnumfont}{\normalfont\HUGE}
+ \renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
+ \renewcommand*{\printchaptername}{%
+ \chapnamefont\MakeUppercase{\@chapapp}}
+ \renewcommand*{\chapternamenum}{}
+ \setlength{\beforechapskip}{18mm}% \numberheight
+ \setlength{\midchapskip}{\paperwidth}% \barlength
+ \addtolength{\midchapskip}{-\textwidth}
+ \addtolength{\midchapskip}{-\spinemargin}
+ \renewcommand*{\printchapternum}{%
+ \makebox[0pt][l]{%
+ \hspace{.8em}%
+ \resizebox{!}{\beforechapskip}{\chapnumfont \thechapter}%
+ \hspace{.8em}%
+ \rule{\midchapskip}{\beforechapskip}%
+ }%
+ }%
+ \makeoddfoot{plain}{}{}{\thepage}}
+
+\makechapterstyle{verville}{%
+ % \chapterstyle{default}
+ \setlength{\beforechapskip}{0pt}
+ \renewcommand*{\printchaptername}{}
+ \renewcommand*{\printchapternum}{%
+ \hrule \vskip 0.5\onelineskip
+ \Huge \centering \thechapter.\ }
+ \renewcommand*{\printchapternonum}{%
+ \hrule \vskip 0.5\onelineskip
+ \Huge \centering}
+ \renewcommand*{\afterchapternum}{}
+ \setlength{\midchapskip}{0pt}
+ \renewcommand*{\printchaptertitle}[1]{%
+ ##1 \par
+ \vskip 0.5\onelineskip
+ \hrule}}
+
+\makechapterstyle{crosshead}{%
+ \setlength{\beforechapskip}{2\onelineskip}%
+ \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}%
+ \setlength{\afterchapskip}{2\onelineskip \@plus .2\onelineskip
+ \@minus 0.2\onelineskip}%
+ \renewcommand*{\printchaptername}{}%
+ \renewcommand*{\chapternamenum}{}%
+ \renewcommand*{\chapnumfont}{\normalfont\LARGE\bfseries}%
+ \renewcommand*{\chaptitlefont}{\chapnumfont}%
+ \renewcommand*{\printchapternum}{%
+ \centering\chapnumfont \thechapter\quad}%
+ \renewcommand{\afterchapternum}{}%
+ \renewcommand*{\printchapternonum}{\centering}}
+
+\makechapterstyle{dowding}{%
+ \setlength{\beforechapskip}{2\onelineskip}%
+ \setlength{\afterchapskip}{1.5\onelineskip \@plus .1\onelineskip
+ \@minus 0.167\onelineskip}%
+ \renewcommand*{\chapnamefont}{\normalfont}%
+ \renewcommand*{\chapnumfont}{\chapnamefont}%
+ \renewcommand*{\printchapternum}{\centering\chapnumfont \ifanappendix \thechapter
+ \else \numtoName{\c@chapter}\fi}%
+ \renewcommand*{\chaptitlefont}{\normalfont\itshape\huge\centering}%
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\printchaptername}\vskip\midchapskip}}
+
+\makechapterstyle{komalike}{%
+ \setlength{\beforechapskip}{2\onelineskip}%
+ \setlength{\afterchapskip}{1.5\onelineskip \@plus .1\onelineskip
+ \@minus 0.167\onelineskip}%
+ \renewcommand*{\printchaptername}{}%
+ \renewcommand*{\chapternamenum}{}%
+ \renewcommand*{\chapnumfont}{\normalfont\LARGE\sffamily\bfseries}%
+ \renewcommand*{\printchapternum}{\chapnumfont \thechapter\space}%
+ \renewcommand*{\afterchapternum}{}%
+ \renewcommand*{\chaptitlefont}{\normalfont\LARGE\sffamily\bfseries}}
+
+\makechapterstyle{ntglike}{%
+ \setlength{\beforechapskip}{50pt \@plus 20pt}%
+ \renewcommand*{\chapnamefont}{\normalfont\Large\bfseries}%
+ \renewcommand*{\chapnumfont}{\normalfont\Large\bfseries}%
+ \renewcommand*{\chaptitlefont}{\normalfont\Large\bfseries}}
+
+\makechapterstyle{tandh}{%
+ \setlength{\beforechapskip}{1\onelineskip}%
+ \setlength{\afterchapskip}{2\onelineskip \@plus .1\onelineskip
+ \@minus 0.167\onelineskip}%
+ \renewcommand*{\printchaptername}{}%
+ \renewcommand*{\chapternamenum}{}%
+ \renewcommand*{\chapnumfont}{\normalfont\huge\bfseries}%
+ \renewcommand*{\printchapternum}{\chapnumfont \thechapter\quad}%
+ \renewcommand*{\afterchapternum}{}%
+ \renewcommand*{\chaptitlefont}{\chapnumfont\raggedright}}
+
+\makechapterstyle{wilsondob}{%
+ \setlength{\beforechapskip}{2\onelineskip}%
+ \setlength{\afterchapskip}{4\onelineskip \@plus .1\onelineskip
+ \@minus 0.167\onelineskip}%
+ \renewcommand*{\printchaptername}{}%
+ \renewcommand*{\chapternamenum}{}%
+ \renewcommand*{\chapnumfont}{\normalfont\Huge\itshape}%
+ \renewcommand*{\printchapternum}{\raggedleft\chapnumfont \thechapter\quad}%
+ \renewcommand*{\afterchapternum}{}%
+ \renewcommand*{\chaptitlefont}{\chapnumfont}%
+ \renewcommand*{\printchapternonum}{\raggedleft}}
\newif\ifraggedbottomsection
\raggedbottomsectionfalse
+\newcommand*{\raggedbottomsection}{\raggedbottomsectiontrue}
+\newcommand*{\normalbottomsection}{\raggedbottomsectionfalse}
+
\newlength{\bottomsectionskip}
\setlength{\bottomsectionskip}{10mm}
@@ -1948,8 +2935,8 @@
\@ifnextchar[{#1[{#2}]}%
{#1[{#2}][{#2}]}}
-\newcommand*{\memsecinfo}[5]{}
-\newcommand*{\memsecstarinfo}[2]{}
+\newcommand{\memsecinfo}[5]{}
+\newcommand{\memsecstarinfo}[2]{}
\renewcommand{\@startsection}[6]{%
\ifraggedbottomsection\if@nobreak\else
@@ -2013,7 +3000,7 @@
\let\@mem@old@ssect\@ssect
\def\@ssect#1#2#3#4#5{%
\M@gettitle{#5}%
- \memsecstarinfo{#1}{\m@msecn@me}{#5}%
+ \memsecstarinfo{\m@msecn@me}{#5}%
\@mem@old@ssect{#1}{#2}{#3}{#4}{#5}}
\newcommand{\section}{%
@@ -2160,15 +3147,17 @@
\newcommand{\fancybreak}{\@ifstar{\@sfbreak}{\@fbreak}}
\newcommand{\@fbreak}[1]{\par
\penalty -100
- \noindent\parbox{\linewidth}{\centering #1}\null
- \penalty -20
+ \noindent\parbox{\linewidth}{\centering #1}%%\null
+ \par
+%% \penalty -20
%% \vskip -\onelineskip
\@afterindentfalse
\@afterheading}
\newcommand{\@sfbreak}[1]{\par
\penalty -100
- \noindent\parbox{\linewidth}{\centering #1}\null
- \penalty -20
+ \noindent\parbox{\linewidth}{\centering #1}%%\null
+ \par
+%% \penalty -20
%% \vskip -\onelineskip
\@afterindenttrue
\@afterheading}
@@ -2255,6 +3244,261 @@
\newcommand*{\noprelistbreak}{\@nobreaktrue\nopagebreak}
+\newcommand{\makeheadstyles}[2]{%
+ \@namedef{hds@#1}{\@hds@def@ult #2}}
+\newcommand*{\headstyles}[1]{\@nameuse{hds@#1}}
+\newcommand*{\@hds@def@ult}{%
+ \renewcommand*{\beforebookskip}{\null\vfil}%
+ \renewcommand*{\midbookskip}{\par\vskip 20pt}%
+ \renewcommand*{\afterbookskip}{\vfil\newpage}%
+ \renewcommand*{\booknamefont}{\normalfont\huge\bfseries}%
+ \renewcommand*{\booknumfont}{\normalfont\huge\bfseries}%
+ \renewcommand*{\booktitlefont}{\normalfont\Huge\bfseries}%
+ \renewcommand*{\printbookname}{\booknamefont \bookname}%
+ \renewcommand*{\booknamenum}{\space}%
+ \renewcommand*{\printbooknum}{\booknumfont \thebook}%
+ \renewcommand*{\printbooktitle}[1]{\booktitlefont{##1}}%
+ \renewcommand*{\beforepartskip}{\null\vfil}%
+ \renewcommand*{\midpartskip}{\par\vskip 20pt}%
+ \renewcommand*{\afterpartskip}{\vfil\newpage}%
+ \renewcommand*{\partnamefont}{\normalfont\huge\bfseries}%
+ \renewcommand*{\partnumfont}{\normalfont\huge\bfseries}%
+ \renewcommand*{\parttitlefont}{\normalfont\Huge\bfseries}%
+ \renewcommand*{\printpartname}{\partnamefont \partname}%
+ \renewcommand*{\partnamenum}{\space}%
+ \renewcommand*{\printpartnum}{\partnumfont \thepart}%
+ \renewcommand*{\printparttitle}[1]{\parttitlefont{##1}}%
+ \@chs@def@ult% default chapterstyle
+ \setsechook{}
+ \setsecindent{\z@}%
+ \setbeforesecskip{-3.5ex \@plus -1ex \@minus -.2ex}%
+ \setaftersecskip{2.3ex \@plus .2ex}%
+ \setsecheadstyle{\Large\bfseries\raggedright}%
+ \setsubsechook{}%
+ \setsubsecindent{\z@}%
+ \setbeforesubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}%
+ \setaftersubsecskip{1.5ex \@plus .2ex}%
+ \setsubsecheadstyle{\large\bfseries\raggedright}%
+ \setsubsubsechook{}%
+ \setsubsubsecindent{\z@}%
+ \setbeforesubsubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}%
+ \setaftersubsubsecskip{1.5ex \@plus .2ex}%
+ \setsubsubsecheadstyle{\normalsize\bfseries\raggedright}%
+ \setparahook{}%
+ \setparaindent{\z@}%
+ \setbeforeparaskip{3.25ex \@plus 1ex \@minus .2ex}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalsize\bfseries}%
+ \setsubparahook{}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{3.25ex \@plus 1ex \@minus .2ex}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalsize\bfseries}}
+
+\makeheadstyles{default}{}
+\headstyles{default}
+
+\newcommand*{\addperiod}[1]{#1.}
+
+\makeheadstyles{memman}{%
+ \renewcommand*{\booknamefont}{\normalfont\huge\sffamily}
+ \renewcommand*{\booknumfont}{\normalfont\huge\sffamily}
+ \renewcommand*{\booktitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand*{\midbookskip}{\par\vskip 2\onelineskip}%
+ \renewcommand*{\partnamefont}{\normalfont\huge\sffamily}
+ \renewcommand*{\partnumfont}{\normalfont\huge\sffamily}
+ \renewcommand*{\parttitlefont}{\normalfont\Huge\sffamily}
+ \renewcommand*{\midpartskip}{\par\vskip 2\onelineskip}%
+ \chapterstyle{demo3}
+ \setbeforesecskip{-1.333\onelineskip
+ \@plus -0.5\onelineskip \@minus -.5\onelineskip}%
+ \setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}%
+ \setsecheadstyle{\normalfont\scshape\raggedright}%
+ \setbeforesubsecskip{-0.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsecheadstyle{\normalfont\bfseries\raggedright}%
+ \setbeforesubsubsecskip{-0.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\itshape\raggedright}%
+ \setbeforeparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\itshape\addperiod}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\itshape\addperiod}}
+
+\makeheadstyles{bringhurst}{%
+\chapterstyle{bringhurst}
+ \setbeforesecskip{-1\onelineskip
+ \@plus -0.5\onelineskip \@minus -.5\onelineskip}%
+ \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
+ \setsecheadstyle{\normalfont\raggedright\scshape\MakeLowercase}%
+ \setbeforesubsecskip{-1.0\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsecskip{1.0\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsecheadstyle{\sethangfrom{\noindent ####1}\normalfont\itshape\raggedright}%
+ \setbeforesubsubsecskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubsubsecskip{-1em}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\scshape\MakeLowercase}%
+ \setbeforeparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\itshape\addperiod}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\itshape\addperiod}}
+
+\makeheadstyles{crosshead}{%
+ \chapterstyle{crosshead}
+ \setbeforesecskip{-1.25\onelineskip
+ \@plus -0.5\onelineskip \@minus -.5\onelineskip}%
+ \setaftersecskip{0.75\onelineskip \@plus 0.1\onelineskip}%
+ \setsecheadstyle{\normalfont\centering\MakeUppercase}%
+ \setbeforesubsecskip{-1.25\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsecskip{0.75\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsecheadstyle{\normalfont\centering\bfseries}%
+ \setbeforesubsubsecskip{-.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsubsecskip{.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\centering\scshape\MakeLowercase}%
+ \setbeforeparaskip{-.667\onelineskip
+ \@plus -02.5\onelineskip \@minus -0.25\onelineskip}%
+ \setafterparaskip{.333\onelineskip \@plus 0.1\onelineskip}%
+ \setparaheadstyle{\normalfont\normalsize\centering\itshape}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\scshape\MakeLowercase}}
+
+\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}%
+ \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}%
+ \setbeforesubsubsecskip{-0.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\centering\itshape}%
+ \setbeforeparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\itshape\addperiod}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\itshape\addperiod}}
+
+\makeheadstyles{komalike}{%
+ \renewcommand*{\partnamefont}{\huge\sffamily\bfseries}%
+ \renewcommand*{\partnumfont}{\huge\sffamily\bfseries}%
+ \renewcommand*{\parttitlefont}{\huge\sffamily\bfseries}%
+ \chapterstyle{komalike}
+ \setbeforesecskip{-3.5ex \@plus -1ex \@minus -.2ex}%
+ \setaftersecskip{2.3ex \@plus .2ex}%
+ \setsecheadstyle{\normalfont\Large\sffamily\bfseries\raggedright}%
+ \setbeforesubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}%
+ \setaftersubsecskip{1.5ex \@plus .2ex}%
+ \setsubsecheadstyle{\normalfont\large\sffamily\bfseries\raggedright}%
+ \setbeforesubsubsecskip{-3.25ex \@plus -1ex \@minus -.2ex}%
+ \setaftersubsubsecskip{1.5ex \@plus .2ex}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\sffamily\bfseries\raggedright}%
+ \setbeforeparaskip{3.25ex \@plus 1ex \@minus .2ex}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\sffamily\bfseries}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{3.25ex \@plus 1ex \@minus .2ex}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\sffamily\bfseries}}
+
+\makeheadstyles{ntglike}{%
+ \renewcommand*{\partnamefont}{\Large\bfseries\MakeUppercase}%
+ \renewcommand*{\partnumfont}{\Large\bfseries}%
+ \renewcommand*{\parttitlefont}{\Large\MakeUppercase}%
+ \chapterstyle{ntglike}
+ \setbeforesecskip{-2\onelineskip
+ \@plus -1\onelineskip \@minus -.5\onelineskip}%
+ \setaftersecskip{0.5\onelineskip}%
+ \setsecheadstyle{\normalfont\large\bfseries}%
+ \setbeforesubsecskip{-1\onelineskip
+ \@plus -.5\onelineskip \@minus -.25\onelineskip}%
+ \setaftersubsecskip{0.01\onelineskip}%
+ \setsubsecheadstyle{\normalfont\normalsize\bfseries}%
+ \setbeforesubsubsecskip{-1\onelineskip
+ \@plus -.5\onelineskip \@minus -.25\onelineskip}%
+ \setaftersubsubsecskip{0.01\onelineskip}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\slshape}%
+ \setbeforeparaskip{3.25ex \@plus 1ex \@minus .2ex}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\slshape}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{3.25ex \@plus 1ex \@minus .2ex}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\slshape}}
+
+\makeheadstyles{tandh}{%
+ \chapterstyle{tandh}
+ \setbeforesecskip{-2\onelineskip
+ \@plus -0.5\onelineskip \@minus -.5\onelineskip}%
+ \setaftersecskip{1\onelineskip \@plus 0.1\onelineskip}%
+ \setsecheadstyle{\normalfont\raggedright\MakeUppercase}%
+ \setbeforesubsecskip{-1.2\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsecskip{0.8\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsecheadstyle{\normalfont\Large\itshape\raggedright}%
+ \setbeforesubsubsecskip{-0.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\bfseries\raggedright}%
+ \setbeforeparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\itshape\addperiod}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\itshape\addperiod}}
+
+\makeheadstyles{wilsondob}{%
+ \chapterstyle{wilsondob}
+ \setbeforesecskip{-1.333\onelineskip
+ \@plus -0.5\onelineskip \@minus -.5\onelineskip}%
+ \setaftersecskip{0.667\onelineskip \@plus 0.1\onelineskip}%
+ \setsecheadstyle{\normalfont\raggedright\MakeUppercase}%
+ \setbeforesubsecskip{-0.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsecheadstyle{\normalfont\Large\itshape\raggedright}%
+ \setbeforesubsubsecskip{-0.667\onelineskip
+ \@plus -0.25\onelineskip \@minus -0.25\onelineskip}%
+ \setaftersubsubsecskip{0.333\onelineskip \@plus 0.1\onelineskip}%
+ \setsubsubsecheadstyle{\normalfont\normalsize\raggedright\scshape\MakeLowercase}%
+ \setbeforeparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setafterparaskip{-1em}%
+ \setparaheadstyle{\normalfont\normalsize\itshape\addperiod}%
+ \setsubparaindent{\parindent}%
+ \setbeforesubparaskip{1.0\onelineskip
+ \@plus 0.5\onelineskip \@minus 0.2\onelineskip}%
+ \setaftersubparaskip{-1em}%
+ \setsubparaheadstyle{\normalfont\normalsize\itshape\addperiod}}
+
\newif\ifanappendix
\anappendixfalse
\newcommand{\appendix}{\par
@@ -2266,8 +3510,8 @@
\newcommand{\appendixpage}{%
\@ifstar{\@sapppage}{\@apppage}}
-\newcommand*{\memapppageinfo}[1]{}
-\newcommand*{\memapppagestarinfo}[1]{}
+\newcommand{\memapppageinfo}[1]{}
+\newcommand{\memapppagestarinfo}[1]{}
\def\@apppage{%
\@setuppart
@@ -2289,7 +3533,8 @@
\printparttitle{\appendixpagename}\par}%
\@endpart}
-\def\addappheadtotoc{\addcontentsline{toc}{chapter}{\appendixtocname}}
+\def\addappheadtotoc{%
+ \phantomsection\addcontentsline{toc}{chapter}{\appendixtocname}}
\newcounter{@ppsavesec}
\newcounter{@ppsaveapp}
\setcounter{@ppsaveapp}{0}
@@ -2326,6 +3571,8 @@
\newif\ifnamesubappendix
\namesubappendixfalse
+\newcommand*{\namedsubappendices}{\namesubappendixtrue}
+\newcommand*{\unnamedsubappendices}{\namesubappendixfalse}
\newenvironment{subappendices}{%
\@resets@ppsub
@@ -2430,6 +3677,32 @@
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newdimen\everylistparindent
+ \everylistparindent \z@
+\renewcommand*{\list}[2]{%
+ \ifnum \@listdepth >5\relax
+ \@toodeep
+ \else
+ \global\advance\@listdepth\@ne
+ \fi
+ \rightmargin\z@
+ \listparindent\everylistparindent
+ \itemindent\z@
+ \csname @list\romannumeral\the\@listdepth\endcsname
+ \def\@itemlabel{#1}%
+ \let\makelabel\@mklab
+ \@nmbrlistfalse
+ #2\relax
+ \@trivlist
+ \parskip\parsep
+ \parindent\listparindent
+ \advance\linewidth -\rightmargin
+ \advance\linewidth -\leftmargin
+ \advance\@totalleftmargin \leftmargin
+ \parshape \@ne \@totalleftmargin \linewidth
+ \ignorespaces}
+
\newlength{\parsepi}
\newlength{\topsepi}
\newlength{\itemsepi}
@@ -2437,71 +3710,114 @@
\newlength{\topsepii}
\newlength{\topsepiii}
-\newcommand{\defaultlists}{% %% initialise for 10pt
- \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
- \parsepi= 4\p@ \@plus2\p@ \@minus\p@
- \topsepi= 8\p@ \@plus2\p@ \@minus4\p@
- \itemsepi= 4\p@ \@plus2\p@ \@minus\p@
- \parsepii= 2\p@ \@plus\p@ \@minus\p@
- \topsepii= 4\p@ \@plus2\p@ \@minus\p@
- \topsepiii= 2\p@ \@plus\p@ \@minus\p@
-\ifcase\@ptsize % 0 = 10pt
-\or % 1 = 11pt
- \setlength\partopsep{3\p@ \@plus 1\p@ \@minus 1\p@}
- \parsepi= 4.5\p@ \@plus2\p@ \@minus\p@
- \topsepi= 9\p@ \@plus3\p@ \@minus5\p@
- \itemsepi= 4.5\p@ \@plus2\p@ \@minus\p@
- \parsepii= 2\p@ \@plus\p@ \@minus\p@
- \topsepii= 4.5\p@ \@plus2\p@ \@minus\p@
- \topsepiii= 2\p@ \@plus\p@ \@minus\p@
-\or % 2 = 12pt
- \setlength\partopsep{3\p@ \@plus 2\p@ \@minus 2\p@}
- \parsepi= 5\p@ \@plus2.5\p@ \@minus\p@
- \topsepi= 10\p@ \@plus4\p@ \@minus6\p@
- \itemsepi= 5\p@ \@plus2.5\p@ \@minus\p@
- \parsepii= 2.5\p@ \@plus\p@ \@minus\p@
- \topsepii= 5\p@ \@plus2.5\p@ \@minus\p@
- \topsepiii= 2.5\p@ \@plus\p@ \@minus\p@
-\or % 3 = 13pt %% not available
-\or % 4 = 14pt
- \setlength\partopsep{4\p@ \@plus 2\p@ \@minus 2\p@}
- \parsepi= 6\p@ \@plus2.5\p@ \@minus\p@
- \topsepi= 12\p@ \@plus4\p@ \@minus6\p@
- \itemsepi= 6\p@ \@plus2.5\p@ \@minus\p@
- \parsepii= 3\p@ \@plus\p@ \@minus\p@
- \topsepii= 6\p@ \@plus2.5\p@ \@minus\p@
- \topsepiii= 3\p@ \@plus\p@ \@minus\p@
-\or % 5 = 15pt %% not available
-\or % 6 = 16pt %% not available
-\or % 7 = 17pt
- \setlength\partopsep{5\p@ \@plus 2\p@ \@minus 2\p@}
- \parsepi= 7\p@ \@plus3\p@ \@minus\p@
- \topsepi= 14\p@ \@plus6\p@ \@minus8\p@
- \itemsepi= 7\p@ \@plus3\p@ \@minus\p@
- \parsepii= 3\p@ \@plus\p@ \@minus\p@
- \topsepii= 7\p@ \@plus3\p@ \@minus\p@
- \topsepiii= 3.5\p@ \@plus\p@ \@minus\p@
-\or % 8 = 18pt %% not available
-\or % 9 = 9pt
- \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
- \parsepi= 3.5\p@ \@plus2\p@ \@minus\p@
- \topsepi= 7\p@ \@plus3\p@ \@minus5\p@
- \itemsepi= 3.5\p@ \@plus2\p@ \@minus\p@
- \parsepii= 2\p@ \@plus\p@ \@minus\p@
- \topsepii= 4\p@ \@plus2\p@ \@minus\p@
- \topsepiii= 2\p@ \@plus\p@ \@minus\p@
-\fi
-}
+\newlength{\itemsepii}
+\newlength{\itemsepiii}
+\newlength{\partopsepii}
+\newlength{\partopsepiii}
+\newcommand*{\setnzplist}{%
+ \partopsep \p@ \@plus\z@ \@minus\p@
+ \topsepi\z@
+ \parsepi\parskip
+ \itemsepi\z@
+ \topsepii\z@
+ \parsepii\parskip
+ \itemsepii\z@
+ \topsepiii\z@
+%% \parsepiii\parskip
+ \itemsepiii\z@}
+
+\newcommand*{\defaultlists}{%
+ \setlength{\partopsep}{0.2\onelineskip \@plus 0.1\onelineskip
+ \@minus 0.1\onelineskip}%
+ \parsepi = 0.3333\onelineskip \@plus 0.1667\onelineskip \@minus \p@
+ \itemsepi = \parsepi
+ \topsepi = 0.6667\onelineskip \@plus 0.3333\onelineskip
+ \@minus 0.2\onelineskip
+ \parsepii = 0.1667\onelineskip \@plus \p@ \@minus \p@
+ \topsepii = \parsepi
+ \topsepiii = \parsepii
+ \everylistparindent \listparindent
+ \itemsepii\parsepii
+ \itemsepiii\topsepiii
+ \partopsepiii \p@ \@plus\z@ \@minus\p@
+ \ifm@mnzpskip
+ \setnzplist
+ \fi}
+\defaultlists
-\newcommand{\tightlists}{%
- \setlength\partopsep{0.5\onelineskip \@plus 0\p@ \@minus 0\p@}
- \parsepi= \parskip
- \itemsepi = \p@ \@plus\p@ \@minus\p@
- \topsepi = 0.5\parskip
- \parsepii = \parskip
- \topsepii = 0.5\parskip
- \topsepiii = 0.5\parskip
-}
+\newcommand*{\firmlists}{%
+ \@ifstar{\m@msfirmlists}{\m@mfirmlists}}
+
+\newcommand*{\m@msfirmlists}{
+ \setlength{\partopsep}{\z@ \@plus \p@ \@minus \p@}%
+ \parsepi = 0.1667\onelineskip \@plus 0.0833\onelineskip \@minus \p@
+ \itemsepi = \parsepi
+ \topsepi = \parsepi
+ \parsepii = 0.0833\onelineskip \@plus \p@ \@minus \p@
+ \topsepii = \parsepi
+ \topsepiii = \parsepii
+ \everylistparindent\listparindent}
+
+\newcommand*{\m@mfirmlists}{
+ \setlength{\partopsep}{0.1\onelineskip \@plus 0.05\onelineskip
+ \@minus 0.05\onelineskip}%
+ \parsepi = 0.1667\onelineskip \@plus 0.0833\onelineskip \@minus \p@
+ \itemsepi = \parsepi
+ \topsepi = \parsepi
+ \parsepii = 0.0833\onelineskip \@plus \p@ \@minus \p@
+ \topsepii = \parsepi
+ \topsepiii = \parsepii
+ \everylistparindent\listparindent}
+
+\newcommand*{\tightlists}{%
+ \@ifstar{\m@mstightlists}{\m@mtightlists}}
+
+\newcommand*{\m@mstightlists}{%
+ \setlength{\partopsep}{\z@ \@plus \p@ \@minus \p@}%
+ \parsepi = \z@ \@plus \p@ \@minus \p@
+ \itemsepi = \parsepi
+ \topsepi = \z@ \@plus \p@ \@minus \p@
+ \parsepii = \z@ \@plus \p@ \@minus \p@
+ \topsepii = \parsepi
+ \topsepiii = \parsepii
+ \everylistparindent\parindent
+ \ifm@mnzpskip
+ \setnzplist
+ \partopsepiii\partopsep
+ \fi}
+
+\newcommand*{\m@mtightlists}{%
+ \setlength{\partopsep}{0.5\onelineskip \@plus \p@ \@minus \p@}%
+ \parsepi = \z@ \@plus \p@ \@minus \p@
+ \itemsepi = \parsepi
+ \topsepi = \z@ \@plus \p@ \@minus \p@
+ \parsepii = \z@ \@plus \p@ \@minus \p@
+ \topsepii = \parsepi
+ \topsepiii = \parsepii
+ \everylistparindent\parindent
+ \ifm@mnzpskip
+ \setnzplist
+ \partopsepiii\partopsep
+ \fi}
+
+\newcommand{\firmlist}{%
+ \setlength{\itemsep}{0.5\itemsep}\setlength{\parskip}{0.5\parskip}}
+\newcommand{\tightlist}{%
+ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
+
+\newskip\m@msavetopsep
+\newskip\m@msavepartopsep
+\newcommand*{\savetrivseps}{%
+ \m@msavetopsep\topsep
+ \m@msavepartopsep\partopsep}
+\newcommand*{\restoretrivseps}{%
+ \topsep\m@msavetopsep
+ \partopsep\m@msavepartopsep}
+\savetrivseps
+
+\newcommand*{\zerotrivseps}{%
+ \topsep\z@
+ \partopsep\z@}
\def\@listi{\leftmargin\leftmargini
\parsep\parsepi
@@ -2516,15 +3832,17 @@
\advance\labelwidth-\labelsep
\topsep\topsepii
\parsep\parsepii
- \itemsep\parsep}
+ \itemsep\parsepii}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii
\advance\labelwidth-\labelsep
\topsep\topsepiii
\parsep\z@
- \partopsep \p@ \@plus\z@ \@minus\p@
- \itemsep\topsep}
+%%% \itemsep\topsep
+%%% \partopsep \p@ \@plus\z@ \@minus\p@
+ \itemsep\itemsepiii
+ \partopsep\partopsepiii}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv
@@ -2538,25 +3856,6 @@
\labelwidth\leftmarginvi
\advance\labelwidth-\labelsep}
-\newcommand{\firmlist}{%
- \setlength{\itemsep}{0.5\itemsep}\setlength{\parskip}{0.5\parskip}}
-\newcommand{\tightlist}{%
- \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
-
-\newskip\m@msavetopsep
-\newskip\m@msavepartopsep
-\newcommand*{\savetrivseps}{%
- \m@msavetopsep\topsep
- \m@msavepartopsep\partopsep}
-\newcommand*{\restoretrivseps}{%
- \topsep\m@msavetopsep
- \partopsep\m@msavepartopsep}
-\savetrivseps
-
-\newcommand*{\zerotrivseps}{%
- \topsep\z@
- \partopsep\z@}
-
\renewcommand{\theenumi}{\@arabic\c@enumi}
\renewcommand{\theenumii}{\@alph\c@enumii}
\renewcommand{\theenumiii}{\@roman\c@enumiii}
@@ -2662,14 +3961,157 @@
\let\makelabel\symbollabel}}%
{\endlist}
\newcommand{\symboldef}[2]{\item[#1] #2}
+\newif\if@bsonecol
+ \@bsonecoltrue
+\newif\ifadd@bstotoc
+ \add@bstotocfalse
+\newif\ifnumber@bs
+ \number@bsfalse
+\newif\if@bsrunin
+ \@bsruninfalse
+
+\newcommand{\abstractcol}{\@bsonecolfalse}
+\newcommand{\abstractintoc}{\add@bstotoctrue}
+\newcommand{\abstractnum}{\number@bstrue\@bsruninfalse}
+\newcommand{\abstractrunin}{\@bsrunintrue\number@bsfalse}
+
+\newcommand{\abstractnamefont}{\normalfont\small\bfseries}
+\newcommand{\abstracttextfont}{\normalfont\small}
+\newcommand{\abscolnamefont}{\normalfont\Large\bfseries}
+\newcommand{\abscoltextfont}{\normalfont}
+
+\newcommand{\absnamepos}{center}
+\newlength{\abstitleskip} \setlength{\abstitleskip}{-0.5em}
+\newlength{\absleftindent}
+ \absleftindent=\leftmargin
+\newdimen\abs@leftindent
+ \abs@leftindent=\leftmargin
+\newlength{\absrightindent}
+ \absrightindent=\leftmargin
+\newlength{\absparindent}
+\newlength{\absparsep}
+
+\newcommand{\abslabeldelim}[1]{\def\@bslabeldelim{#1}}
+\abslabeldelim{}
+\newcommand{\@bsrunintitle}{%
+ \hspace*{\abstitleskip}{\abstractnamefont\abstractname\@bslabeldelim}}
+
+\newcommand{\setup@bstract}{%
+ \abs@leftindent=\absleftindent
+ \if@twocolumn
+ \if@bsonecol
+ \else
+ \abs@leftindent=\z@
+ \absrightindent=\z@
+ \renewcommand*{\abstractnamefont}{\abscolnamefont}
+ \renewcommand*{\abstracttextfont}{\abscoltextfont}
+ \renewcommand*{\absnamepos}{flushleft}
+ \setlength{\abstitleskip}{-2ex}
+ \fi
+ \fi}
+
+\AtBeginDocument{\setlength{\absparindent}{\parindent}
+ \setlength{\absparsep}{\parskip}}
+
+\newenvironment{@bstr@ctlist}{%
+ \list{}{%
+ %%\topsep \z@
+ \partopsep \z@
+ \listparindent \absparindent
+ \itemindent \listparindent
+ \leftmargin \abs@leftindent
+ \rightmargin \absrightindent
+ \parsep \absparsep}%
+ \item\relax}
+ {\endlist}
+
+\newcommand{\put@bsintoc}{%
+ \ifadd@bstotoc
+ \ifnumber@bs\else
+ \phantomsection
+ \addcontentsline{toc}{chapter}{\abstractname}
+ \fi
+ \fi}
+
+\newcommand{\num@bs}{\chapter{\abstractname}}
+
+\newenvironment{abstract}{%
+ \setup@bstract
+ \if@bsrunin\else
+ \ifnumber@bs \num@bs \else
+ \begin{\absnamepos}\abstractnamefont\abstractname\end\absnamepos%
+ \vspace{\abstitleskip}%
+ \fi
+ \fi
+ \put@bsintoc%
+ \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
+ {\par\end{@bstr@ctlist}}
+
+\newenvironment{onecolabstract}{%
+ \begin{@twocolumnfalse}\begin{abstract}}{%
+ \end{abstract}\end{@twocolumnfalse}}
+
+\addtoiargdef{\thanks}{}{%
+ \protected@xdef\@bs@thanks{\@bs@thanks
+ \protect\footnotetext[\the\c@footnote]{#1}}%
+}
+\let\@bs@thanks\@empty
+
+\newcommand{\saythanks}{\begingroup
+ \renewcommand{\thefootnote}{\fnsymbol{footnote}}\@bs@thanks
+ \endgroup\global\let\@bs@thanks\@empty}
+
\newcounter{vslineno}
\newcounter{poemline}
\newcounter{modulo@vs}
+\newcounter{memfvsline}
-\newcommand{\poemlines}[1]{\linenumberfrequency{#1}%
- \@memwarn{Use \string\linenumberfrequency\space
- instead of \string\poemlines}%
-}
+%%%\newcommand{\poemlines}[1]{\linenumberfrequency{#1}%
+%%% \@memwarn{Use \string\linenumberfrequency\space
+%%% instead of \string\poemlines}}
+
+\newcommand{\linenumberfont}[1]{\def\vlvnumfont{#1}}
+%%% \linenumberfont{\small\rmfamily}
+
+\newif\ifbvcountlines% TRUE to print line numbers of (boxed) verbatim lines
+ \bvcountlinesfalse
+
+\newcommand{\linenumberfrequency}[1]{%
+ \ifnum #1< \@ne
+ \def\linemodnum{0\relax}
+ \bvcountlinesfalse
+ \else
+ \def\linemodnum{#1\relax}
+ \bvcountlinestrue
+ \fi}
+
+%%%%\linenumberfrequency{0}
+
+\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}
+
+\newcommand{\getthelinenumber}[2]{%
+ \ifnum\@ne>\linemodnum% no line numbers
+ \else
+ \ifnum\@ne=\linemodnum% every line numbered
+ \@nameuse{the#1}%
+ \else
+ \@tempcnta=\@nameuse{c@#1}%
+ \advance\@tempcnta -\@nameuse{c@#2}%
+ \divide\@tempcnta \linemodnum
+ \multiply\@tempcnta \linemodnum
+ \advance\@tempcnta \@nameuse{c@#2}%
+ \ifnum\@tempcnta=\@nameuse{c@#1}\@nameuse{the#1}\fi
+ \fi
+ \fi}
\newif\ifaltindent
\altindentfalse
@@ -2698,7 +4140,7 @@
\newdimen\vleftmargin
\vleftmargin=\leftmargini
-\newcommand{\verselinebreak}[1][\z@]{\newline\hspace*{#1}}
+\newcommand{\verselinebreak}[1][\z@]{\newline\hspace*{#1}\ignorespaces}
\newcommand{\incr@vsline}{%
\refstepcounter{poemline}%
@@ -2707,14 +4149,23 @@
\newcommand{\@vsifbang}[1]{\@ifnextchar !{\@firstoftwo{#1}}}
\newcommand{\@vsifgt}[1]{\@ifnextchar >{\@firstoftwo{#1}}}
+\newcommand*{\verselinenumbersright}{\def\@vstypelinenum{\@vslnumright}}
+\newcommand*{\verselinenumbersleft}{\def\@vstypelinenum{\@vslnumleft}}
+\verselinenumbersright
+
+\newcommand*{\@vslnumright}{%
+ \hfill\rlap{\kern\vrightskip\kern\rightmargin%
+ \vlvnumfont\getthelinenumber{poemline}{memfvsline}}}
+\newcommand*{\@vslnumleft}{%
+ \hfill\rlap{\kern-\textwidth\kern-\vrightskip%
+ \vlvnumfont\getthelinenumber{poemline}{memfvsline}}}
\newcommand{\@vscentercr}{%
\ifhmode \unskip\else \@nolnerr\fi
- \hfill\rlap{\kern\vrightskip\kern\rightmargin%
- \vlvnumfont\getthelinenumber{poemline}}%
+ \@vstypelinenum%
\@vsifgt{\verselinebreak}{%
- \incr@vsline
- \par\@ifstar{\nobreak\@vsxcentercr}{%
- \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}}}}
+ \incr@vsline
+ \par\@ifstar{\nobreak\@vsxcentercr}{%
+ \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}}}}
\newcommand{\@vsxcentercr}{\addvspace{-\parskip}%
\@ifnextchar[ {\@vsicentercr}{\start@vsline}}
\def\@vsicentercr[#1]{\vskip #1\ignorespaces \start@vsline}
@@ -2759,9 +4210,6 @@
\setcounter{vslineno}{1}}%
{\altindentfalse}
-\newcommand{\@nameedef}[1]{
- \expandafter\protected@edef\csname #1\endcsname}
-
\newif\ifbounderror
\bounderrorfalse
\newif\ifinteger
@@ -2773,8 +4221,7 @@
\@nameedef{#1-high}{#3}%
\ifnum #3<#2
\@memerror{Limits for array #1 are in reverse order}{\@ehc}%
- \fi
-}
+ \fi}
\newcommand{\stringtoarray}[2]{%
\def\@vsarrayname{#1}%
@@ -2786,8 +4233,7 @@
}{%
\c@chrsinstr \@ne
\expandafter\@vsstringtoarray \the@vsstring\@vsend
- }
-}
+ }}
\def\@vsstringtoarray #1#2\@vsend{%
\@namedef{\@vsarrayname-\the\c@chrsinstr}{#1}
@@ -2800,18 +4246,14 @@
\@vsstringtoarray #2\@vsend%
}%
}
- \@vsinext
-}
+ \@vsinext}
\newcommand{\setarrayelement}[3]{%
\checkarrayindex{#1}{#2}%
- \@nameedef{#1-#2}{#3}%
-}
-
+ \@nameedef{#1-#2}{#3}}
\newcommand{\getarrayelement}[3]{%
\checkarrayindex{#1}{#2}%
- \protected@edef#3{\@nameuse{#1-#2}}%
-}
+ \protected@edef#3{\@nameuse{#1-#2}}}
\newcommand{\checkarrayindex}[2]{%
\bounderrorfalse
@@ -2832,22 +4274,19 @@
\@memerror{Index #2 outside limits for array #1}{\@ehc}%
\fi
\bounderrortrue
- \fi
-}
+ \fi}
\newcommand{\arraytostring}[2]{%
\def#2{}%
\c@chrsinstr = \@nameuse{#1-low}%
- \@vsarraytostring{#1}{#2}%
-}
+ \@vsarraytostring{#1}{#2}}
\newcommand{\@vsarraytostring}[2]{%
\ifnum\c@chrsinstr>\@nameuse{#1-high}\else
\protected@edef#2{#2\@nameuse{#1-\thechrsinstr}}%
\advance\c@chrsinstr\@ne%
\@vsarraytostring{#1}{#2}%
- \fi%
-}
+ \fi}
\newcommand{\checkifinteger}[1]{%
\protected@edef\@vsa{#1}%
@@ -2855,13 +4294,11 @@
\integertrue%
\else
\integerfalse%
- \fi%
-}
+ \fi}
\newcommand{\gobm}[1]{#1}
\newcommand{\indentpattern}[1]{%
\stringtoarray{Array@vs}{#1}}
-
\newcommand{\get@vsindent}{%
\getarrayelement{Array@vs}{\number\value{vslineno}}{\@vspat}%
\ifbounderror
@@ -2904,8 +4341,8 @@
\secdef\@vsptitle\@vssptitle}
\newcommand{\poemtoc}{section}
-\newcommand*{\mempoeminfo}[1]{}
-\newcommand*{\mempoemstarinfo}[1]{}
+\newcommand{\mempoeminfo}[1]{}
+\newcommand{\mempoemstarinfo}[1]{}
\long\def\@vsptitle[#1]#2{%
\phantomsection
@@ -2959,8 +4396,8 @@
\@ifnextchar[{\@PoemTitle}{\@PoemTitle[]}%
}
-\newcommand*{\memPoemTitleinfo}[4]{}
-\newcommand*{\memPoemTitlestarinfo}[2]{}
+\newcommand{\memPoemTitleinfo}[4]{}
+\newcommand{\memPoemTitlestarinfo}[2]{}
\def\@PoemTitle[#1]#2{%
\phantomsection
@@ -2996,8 +4433,7 @@
\addcontentsline{toc}{\poemtoc}{\poemf@rtoc}%
\memPoemTitleinfo{}{\poemf@rtoc}{\poemf@rhdr}{#2}%
\fi
- \ifheadnameref\M@gettitle{\poemf@rhdr}\else\M@gettitle{\poemf@rtoc}\fi
-}
+ \ifheadnameref\M@gettitle{\poemf@rhdr}\else\M@gettitle{\poemf@rtoc}\fi}
\def\@makePoemTitlehead#1{{%
\PoemTitleheadstart
@@ -3010,8 +4446,7 @@
\fi
\interlinepenalty\@M
\printPoemTitletitle{#1}%
- \afterPoemTitle
- }}
+ \afterPoemTitle}}
\newcommand{\@PTchs@def@ult}{%
\def\PoemTitleheadstart{\vspace{\beforePoemTitleskip}}
@@ -3019,8 +4454,7 @@
\def\afterPoemTitlenum{\par\nobreak\vskip \midPoemTitleskip}
\def\printPoemTitlenonum{}
\def\printPoemTitletitle##1{\PoemTitlefont ##1}
- \def\afterPoemTitle{\par\nobreak\vskip \afterPoemTitleskip}
-}
+ \def\afterPoemTitle{\par\nobreak\vskip \afterPoemTitleskip}}
\@PTchs@def@ult
\newcommand*{\PoemTitlenumfont}{\normalfont\large\centering}
@@ -3041,8 +4475,7 @@
\fi
\poemtitlestarmark{\poemf@rhdr}%
\poemtitlestarpstyle
- \memPoemTitlestarinfo{\poemf@rhdr}{#2}%
-}
+ \memPoemTitlestarinfo{\poemf@rhdr}{#2}}
\newcommand{\@sPoemTitle}[1]{%
\@makesPoemTitlehead{#1}%
@@ -3063,6 +4496,11 @@
\setlength\doublerulesep{2\p@}
\setlength\tabbingsep{\labelsep}
+\newcommand{\@minipagerestore}{%
+ \let\@verbfootnotetext\@verbmpfootnotetext
+ \m@mdoextrafeetmini
+ \ifm@mnzpskip \parskip=\m@mabparskip\fi}
+
\skip\@mpfootins = \skip\footins
\setlength\fboxsep{3\p@}
@@ -3170,8 +4608,8 @@
\d@llarend \hfil \or
\hskip1sp\d@llarbegin \insert@column \d@llarend \hfil \or
\hfil\hskip1sp\d@llarbegin \insert@column \d@llarend \or
- $\vcenter
- \@startpbox{\@nextchar}\insert@column \@endpbox $\or
+ $\vcenter%$
+ \@startpbox{\@nextchar}\insert@column \@endpbox $\or%$
\vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
\vbox \@startpbox{\@nextchar}\insert@column \@endpbox
\fi}\prepnext@tok}
@@ -3262,7 +4700,7 @@
\let\d@llarbegin\begingroup
\let\d@llarend\endgroup
\def\array{\col@sep\arraycolsep
- \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\gdef\@halignto{}%
+ \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\gdef\@halignto{}%$
\@tabarray}
\def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}}
\let\@@array\@array
@@ -3272,13 +4710,13 @@
\xdef\@halignto{to\the\dimen@}\@tabular}
\def\@tabular{%
\leavevmode
- \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup
+ \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup%$
\let\d@llarend\endgroup
\@tabarray}
\def\endarray{\crcr \egroup \egroup \@arrayright \gdef\@preamble{}}
\let\@arrayleft\@empty
\let\@arrayright\@empty
-\def\endtabular{\endarray $\egroup}
+\def\endtabular{\endarray $\egroup}%$
\expandafter\let\csname endtabular*\endcsname=\endtabular
\let\@ampacol=\relax \let\@expast=\relax
\let\@arrayclassiv=\relax \let\@arrayclassz=\relax
@@ -3382,10 +4820,10 @@
{#2}{#3}{#1}}
\def\DC@centre#1#2#3{%
\let\DC@end\DC@endcentre
- \uppercase{\def~}{$\egroup\setbox\tw@=\hbox\bgroup${#2}}%
+ \uppercase{\def~}{$\egroup\setbox\tw@=\hbox\bgroup${#2}}%$
\setbox\tw@=\hbox{${\phantom{{#2}}}$}%
- \setbox\z@=\hbox\bgroup$\mathcode`#1="8000 }
-\def\DC@endcentre{$\egroup
+ \setbox\z@=\hbox\bgroup$\mathcode`#1="8000 }%$
+\def\DC@endcentre{$\egroup%$
\ifdim \wd\z@>\wd\tw@
\setbox\tw@=\hbox to\wd\z@{\unhbox\tw@\hfill}%
\else
@@ -3405,8 +4843,8 @@
\dimen@\count@\dimen@ii
\setbox\z@\hbox{${#2}$}\advance\dimen@\wd\z@
\setbox\tw@\hbox to\dimen@{}%
- \setbox\z@\hbox\DC@rl$\mathcode`#1="8000 }
-\def\DC@endright{$\hfil\egroup\box\z@\box\tw@}
+ \setbox\z@\hbox\DC@rl$\mathcode`#1="8000 }%$
+\def\DC@endright{$\hfil\egroup\box\z@\box\tw@}%$
\newcolumntype{D}[3]{>{\DC@{#1}{#2}{#3}}c<{\DC@end}}
%%%%%%%%%% end Dcolumn package code %%%%%%%%%%%%%%%%%%%%%
@@ -3761,6 +5199,21 @@
%%\@memfakeusepackage{booktabs}
+\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
+
\newskip\ctableftskip \ctableftskip=\fill
\newskip\ctabrightskip \ctabrightskip=\fill
@@ -3858,8 +5311,7 @@
\def\ctabsetlines{%
\let\hline\m@mhline
- \let\@BTnormal\m@m@BTnormal
-}
+ \let\@BTnormal\m@m@BTnormal}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\abovecolumnspenalty
@@ -3918,8 +5370,7 @@
\the\crtok
\else
&\global\advance\@cellstogo\m@ne
- \fi
- }
+ \fi}%
\ifdim #1 > \z@
\TX@col@width=#1
\divide\TX@col@width \TX@cols
@@ -3927,8 +5378,8 @@
\TX@col@width=\@mincolumnwidth
\fi
\penalty\abovecolumnspenalty
- \noindent % usually not a paragraph
- \def\@preamble{}
+ \noindent% usually not a paragraph
+ \def\@preamble{}%
\begingroup
\let\@sharp\relax
\ifnum\@cellsincolumn>\@ne
@@ -3952,8 +5403,7 @@
\tabskip\ctabrightskip\cr
\@for\@tempa:=#5\do{
\@tempa\unskip\space\@endcolumnactions}%
- \the\crtok \egroup \par \endgroup
-}
+ \the\crtok \egroup \par \endgroup}
\newcommand*{\linespercol}{%
\@cellsincolumn=\@linestogo
@@ -3965,8 +5415,7 @@
\ifnum \@tempcnta>\z@
\advance\@cellsincolumn \@ne
\fi
- \global\@cellstogo=\@cellsincolumn
-}
+ \global\@cellstogo=\@cellsincolumn}
\newcommand{\autorows}[5][0pt]{\par\begingroup
\ctabsetlines
@@ -4021,7 +5470,7 @@
\penalty\abovecolumnspenalty
\noindent % usually not a paragraph
\vskip -\z@ % don't know why we need this, but looks bad without it
- \def\@preamble{}
+ \def\@preamble{}%
\begingroup
\let\@sharp\relax
\ifnum\TX@cols>\@ne
@@ -4056,15 +5505,16 @@
\@for\@tempa:=#5\do{%
\@tempa\unskip\space\@endcolumnactions}%
%% \the\crtok \postautotab \the\crtok \egroup \endgroup \par
- \the\crtok \egroup \endgroup \par
-}
+ \the\crtok \egroup \endgroup \par}
\newcounter{newflo@tctr}
\setcounter{newflo@tctr}{1}
\newcommand{\newfloat}[4][\@empty]{%
- \@namedef{ftype@#2}{\value{newflo@tctr}}
- \addtocounter{newflo@tctr}{\value{newflo@tctr}}
+%%% \@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}
@@ -4075,7 +5525,7 @@
\fi}{}
\setcounter{#2}{0}
- \@namedef{ext@#2}{#3} % file extension
+ \@namedef{ext@#2}{#3}% file extension
\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}
\setcounter{#3depth}{1}
@@ -4088,6 +5538,8 @@
\newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}
} % end \newfloat
+\newcommand*{\setfloatlocations}[2]{\@namedef{fps@#1}{#2}}
+
\newcommand{\newsubfloat}[1]{%
\newlistentry[#1]{sub#1}{\@nameuse{ext@#1}}{1}
\@namedef{ext@sub#1}{\csname ext@#1\endcsname}
@@ -4096,8 +5548,7 @@
\if@tightsubcap\hskip\subfloatlabelskip\else\space\fi}
\@namedef{@@thesub#1}{\@nameuse{thesub#1}}
\@namedef{p@sub#1}{\csname the#1\endcsname}
- \@namedef{toclevel@sub#1}{1}
-}
+ \@namedef{toclevel@sub#1}{1}}
\newif\ifdonemaincaption
\donemaincaptionfalse
@@ -4145,15 +5596,15 @@
\newcommand{\captiontitlefont}[1]{\def\@conttfont{#1}}
\captiontitlefont{}
-\newcommand{\flushleftright}{%
+\newcommand*{\flushleftright}{%
\leftskip\z@ \rightskip\z@
- \parfillskip=\z@ plus 1fil}
-\newcommand{\centerlastline}{%
- \leftskip=\z@ plus 1fil
+ \parfillskip\@flushglue}
+\newcommand*{\centerlastline}{%
+ \parfillskip=\z@ plus 2fil
\rightskip=\z@ plus -1fil
- \parfillskip=\z@ plus 2fil}
+ \leftskip\@flushglue}
-\newcommand{\captionstyle}[1]{\def\@contcstyle{#1}}
+\newcommand*{\captionstyle}[1]{\def\@contcstyle{#1}}
\captionstyle{}
\renewcommand{\captionstyle}{%
@@ -4187,6 +5638,9 @@
\newcommand{\midbicaption}[1]{\def\@contmidbi{#1}}
\midbicaption{}
+\newcommand*{\captiontitlefinal}[1]{\def\@contfinal{#1}}
+ \captiontitlefinal{}
+
\newlength{\abovecaptionskip}
\setlength{\abovecaptionskip}{0.5\onelineskip}
\newlength{\belowcaptionskip}
@@ -4195,7 +5649,7 @@
\let\@memoldcaption\caption
\def\caption{\donemaincaptiontrue\@memoldcaption}
-\newcommand*{\memcaptioninfo}[4]{}
+\newcommand{\memcaptioninfo}[4]{}
\let\@memold@caption\@caption
\long\def\@caption#1[#2]#3{%
@@ -4208,7 +5662,7 @@
\else \def\@memtempa{\vbox to\topskip{}}\fi
\let\@contfnote\footnote \renewcommand{\footnote}[2][]{}
\let\@contfmark\footnotemark \renewcommand{\footnotemark}[1][]{}
- \sbox\@tempboxa{\@contnfont #1\@contdelim \@conttfont #2}
+ \sbox\@tempboxa{\@contnfont #1\@contdelim \@conttfont #2\@contfinal}
\let\footnote\@contfnote
\let\footnotemark\@contfmark
\ifdim\wd\@tempboxa<\linewidth \centering \fi
@@ -4221,19 +5675,19 @@
\sbox\@tempboxa{\@contnfont #1\@contdelim}
\@contpre%
{\@contcstyle\hangindent=\wd\@tempboxa
- \noindent\box\@tempboxa\@memtempa \@conttfont #2\par}
+ \noindent\box\@tempboxa\@memtempa \@conttfont #2\@contfinal\par}
\else
\if@contindent
\@contpre%
{\@contnfont #1\@contdelim}\@memtempa
{\@contcstyle\hangindent=\@contindw
- \hangafter=\@ne\@conttfont #2\par}% <- v1.4
+ \hangafter=\@ne\@conttfont #2\@contfinal\par}% <- v1.4
\else
\@contpre%
{\@contnfont #1\@contdelim}\@memtempa
{\ifdim\wd\@tempboxa<\linewidth
\@contcshortstyle\else \@contcstyle\fi% <- v1.4
- \@conttfont #2\par}
+ \@conttfont #2\@contfinal\par}
\fi
\fi
\@contpost
@@ -4267,7 +5721,7 @@
\@memlistsubcaptions{#1}%
\fi}
-\newcommand*{\memlegendinfo}[1]{}
+\newcommand{\memlegendinfo}[1]{}
\newcommand{\legend}[1]{%
\M@gettitle{#1}%
\memlegendinfo{#1}%
@@ -4283,7 +5737,7 @@
\endgroup}
\newcommand{\namedlegend}{\@dblarg{\@legend\@captype}}
-\newcommand*{\memnamedlegendinfo}[3]{}
+\newcommand{\memnamedlegendinfo}[3]{}
\long\def\@legend#1[#2]#3{%
\M@gettitle{#2}%
@@ -4306,9 +5760,9 @@
\newcommand{\providefixedcaption}[3][\caption]{%
\providecommand{#2}{\def\@captype{#3}#1}}
-\newcommand*{\membitwonumcaptioninfo}[7]{}
-\newcommand*{\membionenumcaptioninfo}[7]{}
-\newcommand*{\membicaptioninfo}[6]{}
+\newcommand{\membitwonumcaptioninfo}[7]{}
+\newcommand{\membionenumcaptioninfo}[7]{}
+\newcommand{\membicaptioninfo}[6]{}
\newcommand{\bitwonumcaption}[6][\@empty]{%
\begingroup
@@ -4328,8 +5782,7 @@
{\def\m@mscapii{#5}\caption[#5]{#6}}%
\membitwonumcaptioninfo{\@captype}{\@nameuse{the\@captype}}%
{\m@mscapi}{#3}{#4}{\m@mscapii}{#6}%
- \endgroup
-}
+ \endgroup}
\newcommand{\bionenumcaption}[6][\@empty]{%
\begingroup
@@ -4354,8 +5807,7 @@
{\protect\numberline{}{\ignorespaces #5}}}%
\membionenumcaptioninfo{\@captype}{\@nameuse{the\@captype}}%
{\m@mscapi}{#3}{#4}{\m@mscapii}{#6}%
- \endgroup
-}
+ \endgroup}
\newcommand{\bicaption}[5][\@empty]{%
\begingroup
@@ -4373,8 +5825,7 @@
\contcaption{#5}%
\membicaptioninfo{\@captype}{\@nameuse{the\@captype}}%
{\m@mscapi}{#3}{#4}{#5}%
- \endgroup
-}
+ \endgroup}
\newcommand{\bicontcaption}[3]{%
\begingroup
@@ -4385,8 +5836,7 @@
\expandafter\renewcommand\csname \@captype name\endcsname{\@memtempc}%
\@contmidbi
\contcaption{#3}%
- \endgroup
-}
+ \endgroup}
\newcommand{\subcaptionstyle}[1]{\def\@contsubcstyle{#1}}
\subcaptionstyle{}
@@ -4692,6 +6142,282 @@
\newcommand*{\ssc@ref}[1]{\ref{sub@#1}}
\newcommand*{\sc@ref}[1]{{\@subcaplabelfont\ref{sub@#1}}}
+\newsavebox{\m@mscap@capbox}
+\newsavebox{\m@mscap@fbox}
+
+\newdimen\sidecapsep
+ \sidecapsep=\marginparsep
+\newdimen\sidecapwidth
+ \sidecapwidth=\marginparwidth
+\newcommand*{\setsidecaps}[2]{%
+ \setlength{\sidecapsep}{#1}\@memznegtest{\sidecapsep}%
+ \setlength{\sidecapwidth}{#2}\@memznegtest{\sidecapwidth}}
+
+\newdimen\m@m@tempdima
+\newdimen\m@mscapraise
+\newdimen\sidecapraise
+ \sidecapraise \z@
+
+\newcommand*{\setsidecappos}[1]{%
+ \def\m@mscappos{#1}\def\@tempb{t}%
+ \ifx\@tempb\m@mscappos
+ \else
+ \def\@tempb{b}%
+ \ifx\@tempb\m@mscappos
+ \else
+ \def\@tempb{c}%
+ \ifx\@tempb\m@mscappos
+ \else
+ \@memerror{Argument to \string\setsidecappos\space is not t or c or b.
+ \MessageBreak Set to c}{\@ehc}%
+ \def\m@mscappos{c}%
+ \fi
+ \fi
+ \fi}
+\setsidecappos{c}
+
+\newcommand{\sidecapmargin}[1]{%
+ \def\@tempa{#1}\def\@tempb{left}%
+ \ifx\@tempb\@tempa
+ \def\m@mscapmarg{0}% left
+ \else
+ \def\@tempb{right}%
+ \ifx\@tempb\@tempa
+ \def\m@mscapmarg{1}% right
+ \else
+ \def\@tempb{outer}%
+ \ifx\@tempb\@tempa
+ \def\m@mscapmarg{2}% outer
+ \else
+ \def\@tempb{inner}%
+ \ifx\@tempb\@tempa
+ \def\m@mscapmarg{3}% inner
+ \else
+ \@memerror{Unrecognized argument for \string\sidecapmargin}%
+ {\@ehc}%
+ \def\m@mscapmarg{-1}% error
+ \fi
+ \fi
+ \fi
+ \fi}
+\sidecapmargin{left}
+
+\newif\ifscapmargleft
+
+\def\sidecapfloatwidth{\linewidth}
+\newdimen\m@mscapmainwidth
+
+\newdimen\m@mscaplkern
+\newcommand*{\setm@mscaplkern}{%
+ \m@mscaplkern=\sidecapwidth
+ \advance\m@mscaplkern \sidecapsep
+ \advance\m@mscaplkern \m@mscapmainwidth}
+
+\newcommand*{\sidecapstyle}{%
+%%% \captionnamefont{\bfseries}%
+ \ifscapmargleft
+ \captionstyle{\raggedleft}%
+ \else
+ \captionstyle{\raggedright}%
+ \fi}
+
+\newcommand*{\sidecaption}{%
+ \@ifnextchar [{\@sidecaption}{\@sidecaption[]}}
+\def\@sidecaption[#1]#2{%
+ \@ifnextchar [{\@@sidecaption{#1}{#2}}{\@@sidecaption{#1}{#2}[]}}
+\def\@@sidecaption#1#2[#3]{%
+ \ifx\@empty#1\@empty
+ \def\m@mscap@fortoc{#2}%
+ \else
+ \def\m@mscap@fortoc{#1}%
+ \fi
+ \def\m@mscap@forcap{#2}%
+ \ifx\@empty#3\@empty
+ \def\m@mscaplabel{}%
+ \else
+ \def\m@mscaplabel{\@bsphack\label{#3}\@esphack}%
+ \fi
+ \m@mscapstart@fbox}
+
+\newcommand*{\m@mscapstart@fbox}{%
+ \setlength{\m@mscapmainwidth}{\sidecapfloatwidth}%
+ \setm@mscaplkern
+ \begin{lrbox}{\m@mscap@fbox}%
+ \begin{minipage}[c]{\m@mscapmainwidth}}
+\newcommand*{\m@mscapend@fbox}{%
+ \end{minipage}%
+ \end{lrbox}}
+
+\def\endsidecaption{%
+ \m@mscapend@fbox
+ \refstepcounter\@captype
+ \m@mscaplabel
+ \begin{lrbox}{\m@mscap@capbox}%
+ \begin{minipage}[c]{\sidecapwidth}%
+ \sidecapstyle
+ \@caption\@captype[\m@mscap@fortoc]{\m@mscap@forcap}
+ \end{minipage}%
+ \end{lrbox}%
+ \m@mscapopboxes}
+\newcommand*{\m@mscapopboxes}{%
+ \m@mcalcscapraise
+ \usebox{\m@mscap@fbox}\m@mscapcheckside
+ \ifscapmargleft%
+ \rlap{\kern-\m@mscaplkern
+ \raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
+ \else%
+ \rlap{\kern\sidecapsep
+ \raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
+ \fi
+ \gdef\m@mscapthisside{}}
+
+\newcommand*{\m@mcalcscapraise}{%
+ \def\@tempb{t}%
+ \ifx\m@mscappos\@tempb
+ \settoheight{\m@m@tempdima}{\strut\usebox{\m@mscap@capbox}}%
+ \settoheight{\m@mscapraise}{\usebox{\m@mscap@fbox}}%
+ \advance\m@mscapraise -\m@m@tempdima
+ \advance\m@mscapraise 0.5ex
+ \else
+ \def\@tempb{b}%
+ \ifx\m@mscappos\@tempb
+ \settodepth{\m@m@tempdima}{\usebox{\m@mscap@fbox}}%
+ \settodepth{\m@mscapraise}{\strut\usebox{\m@mscap@capbox}}%
+ \advance\m@mscapraise -\m@m@tempdima
+ \else
+ \m@mscapraise=\z@
+ \advance\m@mscapraise 0.25ex
+ \fi
+ \fi
+ \advance\m@mscapraise \sidecapraise}
+
+\newcommand*{\m@mscapcheckside}{%
+ \if@twocolumn
+ \ifdim\hsize=\textwidth% float*
+ \m@mscapcheckregside
+ \else
+ \if@firstcolumn
+ \scapmarglefttrue
+ \else
+ \scapmargleftfalse
+ \fi
+ \fi
+ \else
+ \m@mscapcheckregside
+ \fi
+ \m@mscapthisside}
+\newcommand*{\m@mscapcheckregside}{%
+ \if@twoside
+ \checkoddpage
+ \ifnum\m@mscapmarg<\@ne% % left
+ \scapmarglefttrue
+ \else
+ \ifnum\m@mscapmarg=\@ne% % right
+ \scapmargleftfalse
+ \else
+ \ifnum\m@mscapmarg=\tw@% % outer
+ \scapmarglefttrue
+ \ifoddpage
+ \scapmargleftfalse
+ \fi
+ \else% % inner
+ \scapmargleftfalse
+ \ifoddpage
+ \scapmarglefttrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \else% oneside
+ \scapmarglefttrue
+ \ifnum\m@mscapmarg>\@ne
+ \ifnum\m@mscapmarg<\thr@@
+ \scapmargleftfalse
+ \fi
+ \fi
+ \fi}
+
+\newcommand*{\overridescapmargin}[1]{%
+ \def\@tempb{#1}\def\@tempa{left}%
+ \ifx\@tempa\@tempb
+ \def\m@mscapthisside{\scapmarglefttrue}%
+ \else
+ \def\@tempa{right}%
+ \ifx\@tempa\@tempb
+ \def\m@mscapthisside{\scapmargleftfalse}%
+ \else
+ \@memerror{Argument to \string\overridescapmargin\space neither
+ left nor right}{\@ehc}%
+ \def\m@mscapthisside{}%
+ \fi
+ \fi}
+\newcommand*{\m@mscapthisside}{}
+
+\newcommand*{\sidecontcaption}{%
+ \@sidecontcaption}
+\def\@sidecontcaption#1{%
+ \@ifnextchar [{\@@sidecontcaption{#1}}{\@@sidecontcaption{#1}[]}}
+\def\@@sidecontcaption#1[#2]{%
+ \def\m@mscap@forcap{#1}%
+ \ifx\@empty#2\@empty
+ \def\m@mscaplabel{}%
+ \else
+ \def\m@mscaplabel{\@bsphack\label{#2}\@esphack}%
+ \fi
+ \m@mscapstart@fbox}
+
+\def\endsidecontcaption{%
+ \m@mscapend@fbox
+ \addtocounter{\@captype}{\m@ne}\refstepcounter\@captype
+ \m@mscaplabel
+ \begin{lrbox}{\m@mscap@capbox}%
+ \begin{minipage}[c]{\sidecapwidth}%
+ \sidecapstyle
+ \@contcaption\@captype{\m@mscap@forcap}
+ \end{minipage}%
+ \end{lrbox}%
+ \m@mscapopboxes}
+
+\newcommand*{\sidenamedlegend}{%
+ \@ifnextchar [{\@sidenamedlegend}{\@sidenamedlegend[]}}
+\def\@sidenamedlegend[#1]#2{%
+ \@@sidenamedlegend{#1}{#2}}
+\def\@@sidenamedlegend#1#2{%
+ \ifx\@empty#1\@empty
+ \def\m@mscap@fortoc{#2}%
+ \else
+ \def\m@mscap@fortoc{#1}%
+ \fi
+ \def\m@mscap@forcap{#2}%
+ \def\m@mscaplabel{}%
+ \m@mscapstart@fbox}
+
+\def\endsidenamedlegend{%
+ \m@mscapend@fbox
+ \begin{lrbox}{\m@mscap@capbox}%
+ \begin{minipage}[c]{\sidecapwidth}%
+ \sidecapstyle
+ \@legend\@captype[\m@mscap@fortoc]{\m@mscap@forcap}
+ \end{minipage}%
+ \end{lrbox}%
+ \m@mscapopboxes}
+
+\newcommand*{\sidelegend}{%
+ \@@sidelegend}
+\def\@@sidelegend#1{%
+ \def\m@mscap@forcap{#1}%
+ \m@mscapstart@fbox}
+
+\def\endsidelegend{%
+ \m@mscapend@fbox
+ \begin{lrbox}{\m@mscap@capbox}%
+ \begin{minipage}[c]{\sidecapwidth}%
+ \sidecapstyle
+ \legend{\m@mscap@forcap}
+ \end{minipage}%
+ \end{lrbox}%
+ \m@mscapopboxes}
+
\newlength{\beforeepigraphskip}
\setlength{\beforeepigraphskip}{.5\baselineskip}
\newlength{\afterepigraphskip}
@@ -4711,13 +6437,14 @@
\newcommand{\@epirule}{\rule[.5ex]{\epigraphwidth}{\epigraphrule}}
\newcommand{\@epitext}[1]{%
- \begin{minipage}{\epigraphwidth}\begin{\textflush} #1\\
+ \begin{minipage}{\epigraphwidth}\begin{\textflush} #1\par
\ifdim\epigraphrule>\z@ \@epirule \else \vspace*{1ex} \fi
\end{\textflush}\end{minipage}}
\newcommand{\@episource}[1]{%
\begin{minipage}{\epigraphwidth}
- \begin{\sourceflush} #1\end{\sourceflush}
- \end{minipage}}
+ \begin{\sourceflush} #1\par
+ \end{\sourceflush}\end{minipage}}
+
\newcommand{\epigraph}[2]{\vspace{\beforeepigraphskip}
{\epigraphsize\begin{\epigraphflush}\begin{minipage}{\epigraphwidth}
\@epitext{#1}\\ \@episource{#2}
@@ -4902,16 +6629,19 @@
\providecommand{\eminnershape}{\upshape}
\DeclareTextFontCommand{\emph}{\em}
-\newcommand{\fref}[1]{\figurerefname~\ref{#1}}
-\newcommand{\tref}[1]{\tablerefname~\ref{#1}}
-\newcommand{\pref}[1]{\pagerefname~\pageref{#1}}
-\newcommand{\Pref}[1]{\partrefname\ref{#1}}
-\newcommand{\Cref}[1]{\chapterrefname\ref{#1}}
-\newcommand{\Sref}[1]{\sectionrefname\ref{#1}}
+\newcommand*{\fref}[1]{\figurerefname~\ref{#1}}
+\newcommand*{\tref}[1]{\tablerefname~\ref{#1}}
+\newcommand*{\pref}[1]{\pagerefname~\pageref{#1}}
+\newcommand*{\Aref}[1]{\appendixrefname\ref{#1}}
+\newcommand*{\Bref}[1]{\bookrefname\ref{#1}}
+\newcommand*{\Pref}[1]{\partrefname\ref{#1}}
+\newcommand*{\Cref}[1]{\chapterrefname\ref{#1}}
+\newcommand*{\Sref}[1]{\sectionrefname\ref{#1}}
\newif\ifheadnameref
- \headnamereffalse
-
+\newcommand*{\headnameref}{\headnamereftrue}
+\newcommand*{\tocnameref}{\headnamereffalse}
+ \tocnameref
\newcommand{\theTitleReference}[2]{#2}
\let\@mem@old@label\label
@@ -4945,25 +6675,6 @@
\newcommand*{\namerefon}{\let\M@gettitle\@mem@@gettitle}
\newcommand*{\namerefoff}{\let\M@gettitle\@gobble}
\namerefon
-\let\M@old@caption\@caption
-\long\def\@caption#1[#2]#3{\M@gettitle{#2}\M@old@caption{#1}[{#2}]{#3}}
-
-\let\M@oldlegend\legend
-\long\def\legend#1{\M@gettitle{#1}\M@oldlegend{#1}}
-\let\M@old@legend\@legend
-\long\def\@legend#1[#2]#3{\M@gettitle{#2}\M@old@legend{#1}[{#2}]{#3}}
-
-\let\M@old@vsptitle\@vsptitle
-\long\def\@vsptitle[#1]#2{\M@gettitle{#1}\M@old@vsptitle[{#1}]{#2}}
-\let\M@old@vssptitle\@vssptitle
-\long\def\@vssptitle#1{\M@gettitle{#1}\M@old@vssptitle{#1}}
-
-%%%\let\M@old@spart\@spart
-%%%\def\@spart#1{\M@gettitle{#1}\M@old@spart{#1}}
-%%%\let\M@old@part\@part
-%%%\def\@part[#1]{\M@gettitle{#1}\M@old@part[{#1}]}
-
-
\newcommand{\@pnumwidth}{1.55em}
\newcommand{\@tocrmarg} {2.55em}
\newcommand{\@dotsep}{4.5}
@@ -5005,12 +6716,14 @@
\@nameuse{@#2maketitle}
\phantomsection
\addcontentsline{toc}{chapter}{#3}
+\parskip\cftparskip
\@starttoc{#2}%
\endgroup
\restorefromonecol}
\@namedef{@#2maketitle}{%
\@nameuse{#2headstart}
- {\parindent\z@ \parskip\cftparskip
+ {\parindent\z@
+%%%% \parskip\cftparskip
\interlinepenalty\@M
\@nameuse{print#2nonum}%
\@nameuse{print#2title}{#3}%
@@ -5038,16 +6751,18 @@
\endgroup}
\newlistof{tableofcontents}{toc}{\contentsname}
-\newcommand{\setpnumwidth}[1]{\renewcommand{\@pnumwidth}{#1}}
-\newcommand{\setrmarg}[1]{\renewcommand{\@tocrmarg}{#1}}
+\newcommand*{\setpnumwidth}[1]{\renewcommand{\@pnumwidth}{#1}}
+\newcommand*{\setrmarg}[1]{\renewcommand{\@tocrmarg}{#1}}
\providecommand{\cftdot}{.}
\providecommand{\cftdotfill}[1]{%
\leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill}
\providecommand{\cftdotsep}{4.5}
\newcommand{\cftnodots}{2000}
-\newcommand{\cftparfillskip}{\parfillskip=0pt plus1fil}
-\renewcommand{\numberline}[1]{%
- \hb@xt@\@tempdima{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
+\newcommand*{\cftparfillskip}{\parfillskip=0pt plus1fil}
+\newcommand*{\@cftn@me}{}
+
+\renewcommand*{\numberline}[1]{%
+ \hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
\newcommand{\@cftbsnum}{}
\newcommand{\@cftasnum}{}
\newcommand{\@cftasnumb}{}
@@ -5061,7 +6776,6 @@
\expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}}
\fi}{}
\setcounter{#2}{0}
-
\@namedef{l@#2}##1##2{%
\ifnum \@nameuse{c@#3depth} > #4\relax
\vskip \@nameuse{cftbefore#2skip}
@@ -5071,10 +6785,12 @@
\parindent \@nameuse{cft#2indent}\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
- \@tempdima \@nameuse{cft#2numwidth}\relax
+ \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
\expandafter\let\expandafter\@cftasnumb\csname cft#2aftersnumb\endcsname
+ \expandafter\let\expandafter\@cftn@me\csname cft#2name\endcsname
\advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip
{\@nameuse{cft#2font}##1}\nobreak
\@nameuse{cft#2fillnum}{##2}}
@@ -5102,6 +6818,7 @@
\setlength{\@nameuse{cft#2numwidth}}{6.0em}
\fi
\@namedef{cft#2font}{\normalfont}
+ \@namedef{cft#2name}{}
\@namedef{cft#2presnum}{}
\@namedef{cft#2aftersnum}{}
\@namedef{cft#2aftersnumb}{}
@@ -5110,23 +6827,85 @@
\@namedef{cft#2pagefont}{\normalfont}
\@namedef{cft#2afterpnum}{}
\@namedef{toclevel@#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}
+%%% \hb@xt@\@pnumwidth{%
+%%% \hfil\@nameuse{cft#2pagefont}##1}
+ \@nameuse{cft#2formatpnum}{##1}%
+ \@nameuse{cft#2afterpnum}\par}
} % end \newlistentry
-\newcommand{\cftsetindents}[3]{%
+\newcommand*{\cftsetindents}[3]{%
\setlength{\@nameuse{cft#1indent}}{#2}
- \setlength{\@nameuse{cft#1numwidth}}{#3}
-}
+ \setlength{\@nameuse{cft#1numwidth}}{#3}}
+
+\newcommand*{\cftbookname}{}
+
+\newcommand*{\cftbookbreak}{\addpenalty{-\@highpenalty}%
+ \addvspace{\cftbeforebookskip}}
+\newcommand*{\l@book}[2]{%
+ \ifnum\c@tocdepth >-3\relax
+%% \addpenalty{-\@highpenalty}%
+ \cftbookbreak
+%% \addvspace{\cftbeforebookskip}%
+ \begingroup
+ {\leftskip \cftbookindent\relax
+ \rightskip \@tocrmarg
+ \parfillskip -\rightskip
+ \parindent \cftbookindent\relax\@afterindenttrue
+ \interlinepenalty\@M
+ \leavevmode
+ \settowidth{\@tempdima}{\cftbookfont\cftbookname}%
+ \addtolength{\@tempdima}{\cftbooknumwidth}%
+ \let\@cftbsnum \cftbookpresnum
+ \let\@cftasnum \cftbookaftersnum
+ \let\@cftasnumb \cftbookaftersnumb
+ \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
+ {\cftbookfont #1}%
+ \cftbookfillnum{#2}}
+ \nobreak
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \endgroup
+ \fi}
+\newcommand{\booknumberline}[1]{%
+ \hb@xt@\@tempdima{%
+ \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb\space}
+
+\newlength{\cftbeforebookskip}
+ \setlength{\cftbeforebookskip}{2.25em \@plus\p@}
+\newdimen\cftbookindent
+ \setlength{\cftbookindent}{0em}
+\newdimen\cftbooknumwidth
+ \setlength{\cftbooknumwidth}{1.5em}
+\newcommand*{\cftbookfont}{\large\bfseries}
+\newcommand*{\cftbookpresnum}{}
+\newcommand*{\cftbookaftersnum}{}
+\newcommand*{\cftbookaftersnumb}{}
+\newcommand*{\cftbookleader}{%
+ \large\bfseries\cftdotfill{\cftbookdotsep}}
+\newcommand*{\cftbookdotsep}{\cftnodots}
+\newcommand*{\cftbookpagefont}{\large\bfseries}
+\newcommand{\cftbookafterpnum}{}
+\newcommand{\cftbookfillnum}[1]{%
+ {\cftbookleader}%
+%%%% {\hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}}%
+ \cftbookformatpnum{#1}%
+ \cftbookafterpnum\par}
+\newcommand{\cftbookformatpnum}[1]{%
+ \hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}}
\newcommand*{\cftpartname}{}
+\newcommand*{\cftpartbreak}{\addpenalty{-\@highpenalty}%
+ \addvspace{\cftbeforepartskip}}
\newcommand*{\l@part}[2]{%
\ifnum \c@tocdepth >-2\relax
- \addpenalty{-\@highpenalty}%
- \addvspace{\cftbeforepartskip}%
+%%% \addpenalty{-\@highpenalty}%
+%%% \addvspace{\cftbeforepartskip}%
+ \cftpartbreak
\begingroup
{\leftskip \cftpartindent\relax
\rightskip \@tocrmarg
@@ -5148,9 +6927,11 @@
\endgroup
\fi}
+\newcommand*{\toclevel@part}{-1}
+
\newcommand{\partnumberline}[1]{%
\hb@xt@\@tempdima{%
- \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
+ \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb\space}
\newlength{\cftbeforepartskip}
\setlength{\cftbeforepartskip}{2.25em \@plus\p@}
@@ -5167,9 +6948,11 @@
\newcommand{\cftpartdotsep}{\cftnodots}
\newcommand{\cftpartpagefont}{\large\bfseries}
\newcommand{\cftpartafterpnum}{}
+ \newcommand*{\cftpartformatpnum}[1]{%
+ \hb@xt@\@pnumwidth{\hss {\cftpartpagefont #1}}}
\newcommand{\cftpartfillnum}[1]{%
{\cftpartleader}%
- {\hb@xt@\@pnumwidth{\hss {\cftpartpagefont #1}}}%
+ {\cftpartformatpnum{#1}}%
\cftpartafterpnum\par}
\newcommand*{\cftchaptername}{}
@@ -5199,6 +6982,8 @@
\newcommand*{\l@chapter}[2]{%
\l@chapapp{#1}{#2}{\cftchaptername}}
+\newcommand*{\toclevel@chapter}{0}
+
\newcommand*{\cftappendixname}{}
\newcommand*{\l@appendix}[2]{%
@@ -5224,9 +7009,11 @@
\newcommand{\cftchapterdotsep}{\cftnodots}
\newcommand{\cftchapterpagefont}{\bfseries}
\newcommand{\cftchapterafterpnum}{}
- \newcommand{\cftchapterfillnum}[1]{
+ \newcommand*{\cftchapterformatpnum}[1]{%
+ \hb@xt@\@pnumwidth{\hfil\cftchapterpagefont #1}}
+ \newcommand*{\cftchapterfillnum}[1]{
{\cftchapterleader}\nobreak
- \hb@xt@\@pnumwidth{\hfil\cftchapterpagefont #1}%
+ \cftchapterformatpnum{#1}%
\cftchapterafterpnum\par}
\newcommand{\cftchapterbreak}{\addpenalty{-\@highpenalty}}
@@ -5241,12 +7028,12 @@
\newlistentry[paragraph]{subparagraph}{toc}{4}
\cftsetindents{subparagraph}{12.0em}{6.0em}
-\newcommand{\@cftl@subfigtab}{
+\newcommand*{\@cftl@subfigtab}{
\newlistentry[figure]{subfigure}{lof}{1}
\cftsetindents{subfigure}{2.3em}{2.5em}
\newlistentry[table]{subtable}{lot}{1}
- \cftsetindents{subtable}{2.3em}{2.5em}
-}
+ \cftsetindents{subtable}{2.3em}{2.5em}}
+\renewcommand*{\@cftl@subfigtab}{}
\AtBeginDocument{\@ifpackageloaded{subfigure}{\@cftl@subfigtab}{}}
@@ -5256,19 +7043,26 @@
\DeclareRobustCommand{\cftpagenumberson}[1]{%
\@namedef{cft#1fillnum}##1{%
- {\@nameuse{cft#1leader}}\nobreak
- \hb@xt@\@pnumwidth{%
- \hfil\@nameuse{cft#1pagefont}##1}\@nameuse{cft#1afterpnum}\par}}
+ \@nameuse{cft#1leader}\nobreak
+ \@nameuse{cft#1formatpnum}{##1}%
+ \@nameuse{cft#1afterpnum}\par}}
\newcommand{\chapterprecis}[1]{%
\chapterprecishere{#1}
\chapterprecistoc{#1}}
\newcommand{\chapterprecishere}[1]{%
\prechapterprecis #1\postchapterprecis}
+\newdimen\prechapterprecisshift
+\ifartopt
+ \prechapterprecisshift=0pt
+\else
+ \prechapterprecisshift=-2\baselineskip
+\fi
+\newcommand*{\precisfont}{\normalfont\itshape}
\newcommand{\prechapterprecis}{%
- \vspace*{-2\baselineskip}%
- \begin{quote}\normalfont\itshape}
-\newcommand{\postchapterprecis}{\end{quote}}
+ \vspace*{\prechapterprecisshift}%
+ \begin{quote}\precisfont}
+\newcommand*{\postchapterprecis}{\end{quote}}
\newcommand{\precistocfont}{\normalfont\itshape}
\newcommand{\chapterprecistoc}[1]{%
@@ -5286,127 +7080,159 @@
\addtocontents{#1}%
{\protect\contentsline{#2}{\protect\numberline{#3}%
{\protect\ignorespaces #4}}{#5}}}
-\newcommand{\@setclcnt}[2]{
+\newcommand*{\cftinsert}[1]{\@nameuse{cftinsert#1}}
+\newcommand{\cftinsertcode}[2]{\@namedef{cftinsert#1}{#2}}
+\newcommand*{\cftinserthook}[2]{%
+ \addtocontents{#1}{\protect\cftinsert\protect{#2\protect}}}
+
+\newcommand*{\@setclcnt}[2]{%
\@tempswafalse
- \nametest{#1}{none}
+ \nametest{#1}{none}%
+ \ifsamename
+ \setcounter{#2}{-10}%
+ \@tempswatrue
+ \fi
+ \nametest{#1}{book}%
\ifsamename
- \setcounter{#2}{-10}
+ \setcounter{#2}{-2}%
\@tempswatrue
\fi
- \nametest{#1}{part}
+ \nametest{#1}{part}%
\ifsamename
- \setcounter{#2}{-1}
+ \setcounter{#2}{-1}%
\@tempswatrue
\fi
- \nametest{#1}{chapter}
+ \nametest{#1}{chapter}%
\ifsamename
- \setcounter{#2}{0}
+ \setcounter{#2}{0}%
\@tempswatrue
\fi
- \nametest{#1}{section}
+ \nametest{#1}{section}%
\ifsamename
- \setcounter{#2}{1}
+ \setcounter{#2}{1}%
\@tempswatrue
\fi
- \nametest{#1}{subsection}
+ \nametest{#1}{subsection}%
\ifsamename
- \setcounter{#2}{2}
+ \setcounter{#2}{2}%
\@tempswatrue
\fi
- \nametest{#1}{subsubsection}
+ \nametest{#1}{subsubsection}%
\ifsamename
- \setcounter{#2}{3}
+ \setcounter{#2}{3}%
\@tempswatrue
\fi
- \nametest{#1}{paragraph}
+ \nametest{#1}{paragraph}%
\ifsamename
- \setcounter{#2}{4}
+ \setcounter{#2}{4}%
\@tempswatrue
\fi
- \nametest{#1}{subparagraph}
+ \nametest{#1}{subparagraph}%
\ifsamename
- \setcounter{#2}{5}
+ \setcounter{#2}{5}%
\@tempswatrue
\fi
- \nametest{#1}{all}
+ \nametest{#1}{all}%
\ifsamename
- \setcounter{#2}{50}
+ \setcounter{#2}{50}%
\@tempswatrue
\fi
- \if@tempswa\else
+ \if@tempswa\else
\@memerror{%
Unknown document division name (#1)
}{%
- I'll ignore it.
- Type \space <return> and I'll continue.\MessageBreak
- If you haven't mistyped the name then use
- \protect\setcounter\space instead.}
- \fi
-}
-\newcommand{\settocdepth}[1]{%
+ I'll ignore it.
+ Type \space <return> and I'll continue.\MessageBreak
+ If you haven't mistyped the name then use
+ \protect\setcounter\space instead.}%
+ \fi}
+
+\newcommand*{\settocdepth}[1]{%
\@tempswafalse
- \nametest{#1}{none}
+ \nametest{#1}{none}%
+ \ifsamename
+ \addtocontents{toc}{\changetocdepth{-10}}%
+ \@tempswatrue
+ \fi
+ \nametest{#1}{book}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{-10}}
+ \addtocontents{toc}{\changetocdepth{-2}}%
\@tempswatrue
\fi
- \nametest{#1}{part}
+ \nametest{#1}{part}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{-1}}
+ \addtocontents{toc}{\changetocdepth{-1}}%
\@tempswatrue
\fi
- \nametest{#1}{chapter}
+ \nametest{#1}{chapter}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{0}}
+ \addtocontents{toc}{\changetocdepth{0}}%
\@tempswatrue
\fi
- \nametest{#1}{section}
+ \nametest{#1}{section}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{1}}
+ \addtocontents{toc}{\changetocdepth{1}}%
\@tempswatrue
\fi
- \nametest{#1}{subsection}
+ \nametest{#1}{subsection}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{2}}
+ \addtocontents{toc}{\changetocdepth{2}}%
\@tempswatrue
\fi
- \nametest{#1}{subsubsection}
+ \nametest{#1}{subsubsection}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{3}}
+ \addtocontents{toc}{\changetocdepth{3}}%
\@tempswatrue
\fi
- \nametest{#1}{paragraph}
+ \nametest{#1}{paragraph}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{4}}
+ \addtocontents{toc}{\changetocdepth{4}}%
\@tempswatrue
\fi
- \nametest{#1}{subparagraph}
+ \nametest{#1}{subparagraph}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{5}}
+ \addtocontents{toc}{\changetocdepth{5}}%
\@tempswatrue
\fi
- \nametest{#1}{all}
+ \nametest{#1}{all}%
\ifsamename
- \addtocontents{toc}{\changetocdepth{50}}
+ \addtocontents{toc}{\changetocdepth{50}}%
\@tempswatrue
\fi
- \if@tempswa\else
+ \if@tempswa
+ \@ifundefined{toclevel@#1}{%
+ \@memwarn{Unknown toclevel for #1}%
+ }{%
+ \setcounter{tocdepth}{\@nameuse{toclevel@#1}}%
+ }
+ \else
\@memerror{%
Unknown document division name (#1)
}{%
- I'll ignore it. Type \space <return> and I'll continue.}
- \fi
-}
+ I'll ignore it.
+ Type \space <return> and I'll continue.}%
+ \fi}
+
+\newcommand*{\toclevel@none}{-10}
+\newcommand*{\toclevel@all}{50}
+
\DeclareRobustCommand{\changetocdepth}[1]{\setcounter{tocdepth}{#1}}
\newcommand{\maxtocdepth}[1]{%
\@setclcnt{#1}{tocdepth}}
-\newcommand{\setsecnumdepth}[1]{%\leavevmode%
- \@setclcnt{#1}{secnumdepth}}
\newcounter{maxsecnumdepth}
\newcommand{\maxsecnumdepth}[1]{%
\@setclcnt{#1}{secnumdepth}\@setclcnt{#1}{maxsecnumdepth}}
+\newcommand{\setsecnumdepth}[1]{%
+ \ifx\@nodocument\relax% after the preamble
+ \@setclcnt{#1}{secnumdepth}%
+ \else
+ \@setclcnt{#1}{secnumdepth}%
+ \@setclcnt{#1}{maxsecnumdepth}%
+ \fi}
+\setsecnumdepth{section}
+
\newdimen\bibindent
\setlength\bibindent{1.5em}
\newlength{\bibitemsep}
@@ -5475,7 +7301,11 @@
\newif\ifonecolindex
\onecolindexfalse
+\newcommand*{\onecolindex}{\onecolindextrue}
+\newcommand*{\twocolindex}{\onecolindexfalse}
+
\newenvironment{theindex}{%
+ \clearforchapter
\if@twocolumn
\@restonecolfalse
\else
@@ -5496,11 +7326,13 @@
\phantomsection
\addcontentsline{toc}{chapter}{\indexname}%
\fi
- \thispagestyle{chapter}\parindent\z@
+ \thispagestyle{indextitlepagestyle}\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem}%
{\if@restonecol\onecolumn\else\twocolumn\fi}
+\aliaspagestyle{indextitlepagestyle}{chapter}
+
\newif\ifnoindexintoc
\newcommand*{\indexintoc}{\noindexintocfalse}
\newcommand*{\noindexintoc}{\noindexintoctrue}
@@ -5535,9 +7367,13 @@
\newcommand{\printindex}[1][\jobname]{\@input@{#1.ind}}
\newif\ifreportnoidxfile
- \reportnoidxfilefalse
+\newcommand*{\reportnoidxfile}{\reportnoidxfiletrue}
+\newcommand*{\ignorenoidxfile}{\reportnoidxfilefalse}
+ \ignorenoidxfile
\newif\ifshowindexmark
- \showindexmarkfalse
+\newcommand*{\showindexmarks}{\showindexmarktrue}
+\newcommand*{\hideindexmarks}{\showindexmarkfalse}
+ \hideindexmarks
\def\@index[#1]{%
\@ifundefined{#1@idxfile}%
@@ -5630,6 +7466,32 @@
\newif\ifmemhyperindex
\memhyperindextrue
+\newif\ifm@mxindy
+\m@mxindyfalse
+\newcommand*{\xindyindex}{\m@mxindytrue}
+\def\@@wrspindexhyp#1|#2|#3\\{%
+ \ifshowindexmark\@showidx{#1}\fi
+ \ifx\\#2\\%
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}%
+ \ifm@mxindy{#1}\else{#1|hyperspindexpage(\thepage)}\fi
+ {\@nameuse{the\@sptheidx}}}%
+ \else
+ \def\Hy@temp@A{#2}%
+ \ifx\Hy@temp@A\HyInd@ParenLeft
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}%
+ \ifm@mxindy{#1|#2}\else{#1|#2hyperspindexpage(\thepage)}\fi
+ {\@nameuse{the\@sptheidx}}}%
+ \else
+ \protected@write\@auxout{}%
+ {\string\@@wrindexm@m{\@idxfile}{#1|#2}%
+ {\@nameuse{the\@sptheidx}}}%
+ \fi
+ \fi
+ \endgroup
+ \@esphack}
+
\AtBeginDocument{%
\@ifpackageloaded{hyperref}{}{\memhyperindexfalse}%
\ifmemhyperindex\else
@@ -5682,8 +7544,7 @@
#1\relax
\vrule \@height \z@ \@depth .3\normalbaselineskip \@width \z@\relax
}%
- \ifhmode\penalty\@M \hskip\z@skip\fi
-}
+ \ifhmode\penalty\@M \hskip\z@skip\fi}
\newcommand{\@leftidx}{\hskip-\marginparsep \hskip-\marginparwidth}
\newcommand{\@rightidx}{\hskip\columnwidth \hskip\marginparsep}
@@ -5701,8 +7562,7 @@
\fi
\box\@indexbox
}%
- \vss
-}}
+ \vss}}
\renewcommand{\raggedbottom}{%
\def\@textbottom{\vskip\z@ plus.0001fil}%
@@ -5712,8 +7572,15 @@
\let\@texttop\@mkidx}
\let\@texttop\@mkidx
+\newcommand*{\sloppybottom}{%
+ \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}}
+
\newif\ifonecolglossary
\onecolglossarytrue
+\newcommand*{\onecolglossary}{\onecolglossarytrue}
+\newcommand*{\twocolglossary}{\onecolglossaryfalse}
\newenvironment{theglossary}{%
\if@twocolumn
@@ -5875,17 +7742,17 @@
\newcommand{\parnopar}{\parfillskip=0pt\par\parskip=0pt\noindent}
-\newlength{\sideparvshift}
- \setlength{\sideparvshift}{-2.08ex}% seems to work for all font sizes
-
\newif\ifreversesidepar
\reversesidepartrue
\newif\ifsideparswitch
\sideparswitchfalse
\if@twoside \sideparswitchtrue \fi
+\newlength{\sideparvshift}
+%%%% \setlength{\sideparvshift}{-2.08ex}% seems to work for all font sizes
+
\newcommand{\sidepar}{\@dblarg{\@sidepar}}
-\long\def\@sidepar[#1]#2{\@bsphack\leavevmode\vadjust{% %
+\long\def\@sidepar[#1]#2{\@bsphack\strut\vadjust{%
\checkoddpage
\ifsideparswitch
\ifreversesidepar
@@ -5899,41 +7766,79 @@
\oddpagetrue
\ifreversesidepar
\oddpagefalse
- \fi
+ \fi
\fi
\rlap{\kern-\parindent
\if@twocolumn
- \if@firstcolumn % put at left
- \kern -\marginparsep \kern -\marginparwidth % at left
- \else % put at right
- \kern \columnwidth \kern \marginparsep % at right
+ \if@firstcolumn% put at left
+ \kern -\marginparsep \kern -\marginparwidth
+ \else% put at right
+ \kern \columnwidth \kern \marginparsep
\fi
\else
- \ifoddpage % put at right
- \kern \textwidth \kern \marginparsep % at right
- \else % put at left
- \kern -\marginparsep \kern -\marginparwidth % at left
+ \ifoddpage% put at right
+ \kern \textwidth \kern \marginparsep
+ \else% put at left
+ \kern -\marginparsep \kern -\marginparwidth
\fi
\fi
- \vbox to 0pt{%
- \kern \sideparvshift% % vertical shift to align top text lines
- \begin{minipage}{\marginparwidth}%
- \ifoddpage #2\else #1\fi%
+ \setbox0=\vtop to 0pt{%
+ \begin{minipage}[t]{\marginparwidth}%
+ \normalfont\normalsize
+ \ifoddpage #2\else #1\fi%
\end{minipage}%
- \vss}}}\@esphack}
+ \vss}%
+ \vtop to 0pt{\kern\sideparvshift% default should be 0pt
+ \kern-\dp\strutbox
+ \kern-\ht0
+ \box0 \vss}}}%
+ \@esphack}
+\setlength{\sideparvshift}{0pt}
\newinsert\sideins
\skip\sideins=0pt
\count\sideins=0
-\newcommand{\setsidebarheight}[1]{\dimen\sideins= #1}
- \setsidebarheight{20\onelineskip}
-
-\newlength{\sidebarhsep} \setlength{\sidebarhsep}{\marginparsep}
-\newlength{\sidebarvsep} \setlength{\sidebarvsep}{2\onelineskip}
-\newlength{\sidebarwidth} \setlength{\sidebarwidth}{\marginparwidth}
+\newlength{\sidebartopsep}
+ \setlength{\sidebartopsep}{0pt}
+\newcommand{\setsidebarheight}[1]{%
+ \setlength{\dimen\sideins}{#1}%
+ \advance\dimen\sideins-\topskip
+ \advance\dimen\sideins\ht\strutbox}
+
+\newlength{\sidebarhsep}
+\newlength{\sidebarvsep}
+\newlength{\sidebarwidth}
+\newcommand{\sidebarfont}{}
+\newcommand*{\setsidebars}[6]{%
+ \nametest{#1}{*}\ifsamename\else
+ \setlength{\sidebarhsep}{#1}\@memznegtest{\sidebarhsep}%
+ \fi
+ \nametest{#2}{*}\ifsamename\else
+ \setlength{\sidebarwidth}{#2}\@memznegtest{\sidebarwidth}%
+ \fi
+ \nametest{#3}{*}\ifsamename\else
+ \setlength{\sidebarvsep}{#3}\@memnegtest{\sidebarvsep}%
+ \fi
+ \nametest{#4}{*}\ifsamename\else
+ \setlength{\sidebartopsep}{#4}%
+ \fi
+ \nametest{#5}{*}\ifsamename\else
+ \def\sidebarfont{#5}%
+ \fi
+ \nametest{#6}{*}\ifsamename\else
+ \setsidebarheight{#6}%
+ \ifdim\dimen\sideins>\z@\else
+ \@memerror{\protect\sidebarheight\space is zero or negative}{\@ehd}%
+ \fi
+ \fi}
+\setsidebars{\marginparsep}% sidebarhsep
+ {\marginparwidth}% sidebarwidth
+ {\onelineskip}% sidebarvsep
+ {0pt}% sidebartopsep
+ {\normalsize\normalfont}% sidebarfont
+ {\textheight}% sidebarheight
-\newcommand{\sidebarfont}{\normalfont}
\newcommand{\sidebarform}{\rightskip=\z@ \@plus 2em}
\newif\ifsidebaroneside
@@ -5964,168 +7869,74 @@
\fi}
%%%% default outer
\gdef\m@msidebar@margin{2}
-\newcommand{\sidecontents}{{%
+\newcommand*{\m@sideb@left}{%
+ \@tempdimc \sidebarwidth
+ \advance\@tempdimc\sidebarhsep
+ \kern-\@tempdimc}
+\newcommand*{\m@sideb@right}{%
+ \@tempdimc \columnwidth% or \hsize
+ \advance\@tempdimc\sidebarhsep
+ \kern\@tempdimc}
+
+\newcommand{\sidecontents}{\hbox to \z@{%
\if@twocolumn% %% put outside nearest column
\if@firstcolumn% %% move to left
- \setlength{\@tempdimc}{\sidebarwidth}%
- \advance\@tempdimc\sidebarhsep
- \moveleft\@tempdimc
+ \m@sideb@left
\else% %% move to right
- \setlength{\@tempdimc}{\columnwidth}%
- \advance\@tempdimc\sidebarhsep
- \moveright\@tempdimc
+ \m@sideb@right
\fi
\else% %% put into foremargin?
\ifsidebaroneside% %% put into right hand margin
- \setlength{\@tempdimc}{\hsize}%
- \advance\@tempdimc\sidebarhsep
- \moveright\@tempdimc
- \else% %% ???
+ \m@sideb@right
+ \else% %% pick the margin
\ifcase\m@msidebar@margin% 0 to left
- \setlength{\@tempdimc}{\sidebarwidth}%
- \advance\@tempdimc\sidebarhsep
- \moveleft\@tempdimc
+ \m@sideb@left
\or% 1 to right
- \setlength{\@tempdimc}{\hsize}%
- \advance\@tempdimc\sidebarhsep
- \moveright\@tempdimc
+ \m@sideb@right
\or% 2 to outer
\ifodd\c@page% %% move to right
- \setlength{\@tempdimc}{\hsize}%
- \advance\@tempdimc\sidebarhsep
- \moveright\@tempdimc
+ \m@sideb@right
\else% %% move to left
- \setlength{\@tempdimc}{\sidebarwidth}%
- \advance\@tempdimc\sidebarhsep
- \moveleft\@tempdimc
+ \m@sideb@left
\fi
\or% 3 to inner
\ifodd\c@page% %% move to left
- \setlength{\@tempdimc}{\sidebarwidth}%
- \advance\@tempdimc\sidebarhsep
- \moveleft\@tempdimc
+ \m@sideb@left
\else% %% move to right
- \setlength{\@tempdimc}{\hsize}%
- \advance\@tempdimc\sidebarhsep
- \moveright\@tempdimc
+ \m@sideb@right
\fi
\fi
\fi
\fi
\vtop to0pt{%
- \vskip\onelineskip
+ \normalsize\normalfont\sidebarfont% select font so we know the strut size
+ \vskip\topskip \vskip-\ht\strutbox
+ \vskip\sidebartopsep% extra vertical shift
\unvbox\sideins \vss}%
-}}
+ \hss}}
\newcommand{\sidebar}[1]{%
\insert\sideins{%
- \splittopskip\sidebarvsep\relax
- \hsize \sidebarwidth
- \@parboxrestore % <- added in v1.4
- \sidebarform \sidebarfont
- \noindent\vbox to \sidebarvsep{}\ignorespaces #1%
- \ifhmode\unskip\strut\fi\par}}
-
-\let\memold@makecol\@makecol
-\gdef\mem@makecol{%
- \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
- \ifvoid\sideins\else %%% start of change
- \setbox\@outputbox \vbox{%
- \sidecontents
- \unvbox\@outputbox
- }
- \fi %%% end of change
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \boxmaxdepth \maxdepth
- \@texttop
- \dimen@ \dp\@outputbox
- \unvbox \@outputbox
- \vskip -\dimen@
- \@textbottom
- }%
- \fi
- \global \maxdepth \@maxdepth
-}
-
-\newif\if@mem@nofoot
-\newcommand*{\@mem@testifnofoot}{%
- \@mem@nofoottrue
- \ifvoid\footins\else\@mem@nofootfalse\fi
- \ifvoid\footinsv@r\else\@mem@nofootfalse\fi
- \ifvoid\sideins\else\@mem@nofootfalse\fi
- \@mem@extranofeet}
-\newcommand*{\@mem@extranofeet}{}
-
-\let\memold@doclearpage\@doclearpage
-\newcommand{\mem@doclearpage}{%
-%%%% \typeout{Redefining @doclearpage}
- \@mem@testifnofoot
- \if@mem@nofoot
- \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
+ \hsize\sidebarwidth
+ \@parboxrestore
+ \sidebarform \normalsize\normalfont\sidebarfont
+ \splittopskip=\ht\strutbox
+ \splitmaxdepth=\dp\strutbox % doesn't do anything useful
+ \allowbreak
+ \prevdepth=\dp\strutbox % supersedes a "top-strut"
+ \vskip-\parskip
+ #1%
+ \ifvmode\else
+ \unskip\@finalstrut\strutbox
+ \fi\par
+ \ifdim\prevdepth>\dp\strutbox \prevdepth=\dp\strutbox \fi
+ \ifdim\prevdepth>99\p@
+ \nobreak
+ \vskip-\prevdepth
+ \allowbreak
+ \vskip\dp\strutbox
\fi
- \else
- \setbox\@cclv\vbox{\box\@cclv\vfil}%
- \@makecol\@opcol
- \clearpage
- \fi
-}
-
-\let\memold@reinserts\@reinserts
-\gdef\mem@reinserts{%
- \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
- \ifvbox\@kludgeins\insert\@kludegins{\unvbox\@kludgeins}\fi
- \ifvoid\sideins\else\sidecontents\fi
-}
-
-\gdef\@makecol{\mem@makecol}
-\gdef\@doclearpage{\mem@doclearpage}
+ \vskip\sidebarvsep}}
\renewcommand{\footnoterule}{%
\kern-3\p@
@@ -6146,9 +7957,20 @@
\spacefactor\@x@sf\relax
\fi}
+\renewcommand{\@footnotetext}[1]{\insert\footins{%
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font% <- v1.6180 addition
+ \foottextfont
+ \@preamfntext
+ \hsize\columnwidth
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
+ \@finalstrut\strutbox}%
+ \color@endgroup}\m@mmf@prepare}
\let\m@mold@footnotetext\@footnotetext
-\renewcommand{\@footnotetext}[1]{%
- \rest@font\m@mold@footnotetext{#1}\m@mmf@prepare}
\renewcommand*{\@footnotemark}{%
\leavevmode
\ifhmode
@@ -6232,6 +8054,7 @@
\def\@foot{%
\strut\egroup
%%%% \color@endgroup
+ \m@mmf@prepare
}
\long\def\@verbmpfootnotetext{%
@@ -6248,84 +8071,13 @@
\futurelet\next\fo@t
}
-\def\@minipagerestore{\let\@verbfootnotetext\@verbmpfootnotetext}
-
%%%%%%%%%%%%%% major extension to footnoting
-\newcommand{\m@m@makecolfloats}{%
- \xdef\@freelist{\@freelist\@midlist}%
- \global\let\@midlist\@empty
- \@combinefloats}
-\newcommand{\m@m@makecoltext}{%
- \ifvbox\@kludgeins
- \@makespecialcolbox
- \else
- \setbox\@outputbox \vbox to\@colht{%
- \@texttop
- \dimen@ \dp\@outputbox
- \unvbox \@outputbox
- \vskip -\dimen@
- \@textbottom}%
- \fi}
-
-\newcommand{\m@m@makecolintro}{}
-
-\gdef\mem@makecol{%
- \m@m@makecolintro
- \ifvoid\footins
- \setbox\@outputbox \box\@cclv
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \@tempdima\dp\@cclv
- \unvbox\@cclv
- \vskip \skip\footins
- \color@begingroup
- \normalcolor
- \footnoterule
- \unvbox \footins
- \color@endgroup
- }%
- \fi
- \m@mdoextrafeet
- \ifvoid\sideins\else
- \setbox\@outputbox \vbox{%
- \sidecontents
- \unvbox\@outputbox}%
- \fi
- \m@m@makecolfloats
- \m@m@makecoltext
- \global \maxdepth \@maxdepth}
-
-\gdef\mem@makecolbf{%
- \m@m@makecolintro
- \setbox\@outputbox \box\@cclv
- \m@m@makecolfloats
- \ifvoid\footins
- \else
- \setbox\@outputbox \vbox{%
- \boxmaxdepth\@maxdepth
- \unvbox\@outputbox
- \vskip \skip\footins
- \color@begingroup
- \normalcolor
- \footnoterule
- \unvbox \footins
- \color@endgroup
- }%
- \fi
- \m@mdoextrafeet
- \ifvoid\sideins\else
- \setbox\@outputbox \vbox{%
- \sidecontents
- \unvbox\@outputbox}%
- \fi
- \m@m@makecoltext
- \global \maxdepth \@maxdepth}
-
-\newcommand{\feetabovefloat}{\gdef\@makecol{\mem@makecol}}
-\newcommand{\feetbelowfloat}{\gdef\@makecol{\mem@makecolbf}}
-\feetabovefloat
+\newcommand*{\setfootnoterule}[4][]{%
+ \def\footnoterule{\kern -#2\relax #1\relax
+ \hrule width #3\relax
+ \kern #2\kern-#4}}
+\setfootnoterule{3pt}{0.4\columnwidth}{\normalrulethickness}
\newcommand{\m@mdoextrafeet}{\extrafeetins}
\newcommand*{\extrafeetins}{%
@@ -6336,11 +8088,6 @@
\extrafeetinshook}}
\newcommand{\extrafeetinshook}{}
-\gdef \@reinserts{%
- \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
- \m@mdodoreinextrafeet
- \ifvoid\sideins\else\sidecontents\fi
- \ifvbox\@kludgeins\insert\@kludgeins{\unvbox\@kludgeins}\fi}
\newcommand{\m@mdodoreinextrafeet}{%
\ifvoid\footinsv@r\else\insert\footinsv@r{\unvbox\footinsv@r}\fi
\extrafeetreinshook}
@@ -6356,35 +8103,26 @@
\splitmaxdepth=\dp\strutbox
\@parboxrestore}
-\renewcommand{\@footnotetext}[1]{\insert\footins{%
- \foottextfont
- \@preamfntext
- \hsize\columnwidth
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark}%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
- \@finalstrut\strutbox}%
- \color@endgroup}\m@mmf@prepare}
\renewcommand{\@mpfootnotetext}[1]{%
\global\setbox\@mpfootins\vbox{%
\unvbox\@mpfootins
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
\foottextfont \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
+ \reset@font% <- v1.6180 addition
\@makefntext{%
- \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
+ \@finalstrut\strutbox}%
\color@endgroup}}
-\let\m@mold@footnotetext\@footnotetext
\let\m@mold@mpfootnotetext\@mpfootnotetext
\newcommand{\m@mdoextrafeetmini}{%
\extrafeetminihook}
\newcommand{\extrafeetminihook}{}
-\renewcommand{\@minipagerestore}{\m@mdoextrafeetmini}
+%%%%\renewcommand{\@minipagerestore}{\m@mdoextrafeetmini}
\newcommand{\extrafeetendmini}{%
\ifvoid\@mpfootinsv@r\else
@@ -6488,14 +8226,16 @@
\newcommand{\m@make@footnotetext}[1]{%
\@namelongdef{@footnotetext#1}##1{%
\insert\@nameuse{footins#1}{%
- \@nameuse{foottextfont#1}%
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\hsize\columnwidth
\protected@edef\@currentlabel{%
\csname p@footnote#1\endcsname\@nameuse{@thefnmark#1}}%
\color@begingroup
\@nameuse{@makefntext#1}{%
- \rule\z@\footnotesep\ignorespaces##1\@finalstrut\strutbox}%
+ \rule\z@\footnotesep\ignorespaces{\@nameuse{foottextfont#1} ##1}%
+ \@finalstrut\strutbox}%
\color@endgroup}%
\m@mmf@prepare}}
@@ -6503,12 +8243,15 @@
\@namelongdef{@mpfootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}%
- \@nameuse{foottextfont#1} \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}%
\color@begingroup
\@nameuse{@makefntext#1}{%
- \rule\z@\footnotesep\ignorespaces##1\@finalstrut\strutbox}%
+ \rule\z@\footnotesep\ignorespaces{\@nameuse{foottextfont#1} ##1}%
+ \@finalstrut\strutbox}%
\color@endgroup}%
\m@mmf@prepare}}
@@ -6659,7 +8402,8 @@
\let\mp@footgroupv@r\@mptwocol@footgroupv@r}
\newcommand{\@twocolfootnotetext}[1]{\insert\footinsv@r{%
- \foottextfont
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\foottextfont
\@preamfntext
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark}%
@@ -6682,7 +8426,9 @@
\newcommand{\@mptwocolfootnotetext}[1]{%
\global\setbox\@mpfootinsv@r\vbox{%
\unvbox\@mpfootinsv@r
- \foottextfont \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
@@ -6708,8 +8454,9 @@
\newcommand{\m@make@twocolfootnotetext}[1]{%
\@namelongdef{@twocolfootnotetext#1}##1{%
- \insert\@nameuse{footins#1}{
- \@nameuse{foottextfont#1}%
+ \insert\@nameuse{footins#1}{%
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\protected@edef\@currentlabel{%
\csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}%
@@ -6722,13 +8469,14 @@
\@namelongdef{@mptwocolfootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}
- \@nameuse{foottextfont#1} \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}%
\color@begingroup
\@nameuse{@twocolfootfmt#1}{##1}%
- \color@endgroup}%
- \m@mmf@prepare}}
+ \color@endgroup}\m@mmf@prepare}}
\newcommand{\m@make@twocolfootfmt}[1]{%
\@namedef{@twocolfootfmt#1}##1{%
@@ -6758,14 +8506,14 @@
\let\mp@footgroupv@r\@mpthreecol@footgroupv@r}
\newcommand{\@threecolfootnotetext}[1]{\insert\footinsv@r{%
- \foottextfont
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\foottextfont
\@preamfntext
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark}%
\color@begingroup
\@threecolfootfmt{#1}%
- \color@endgroup}%
- \m@mmf@prepare}
+ \color@endgroup}\m@mmf@prepare}
\newcommand{\@preamthreefmt}{%
\hsize .3\hsize
@@ -6781,13 +8529,14 @@
\newcommand{\@mpthreecolfootnotetext}[1]{%
\global\setbox\@mpfootinsv@r\vbox{%
\unvbox\@mpfootinsv@r
- \foottextfont \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
\@threecolfootfmt{#1}%
- \color@endgroup}%
- \m@mmf@prepare}
+ \color@endgroup}\m@mmf@prepare}
\newcommand{\threecolumnfootstyle}[1]{%
\m@make@threecolfootnotetext{#1}%
@@ -6807,27 +8556,28 @@
\newcommand{\m@make@threecolfootnotetext}[1]{%
\@namelongdef{@threecolfootnotetext#1}##1{%
- \insert\@nameuse{footins#1}{
- \@nameuse{foottextfont#1}%
+ \insert\@nameuse{footins#1}{%
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\protected@edef\@currentlabel{%
\csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}%
\color@begingroup
\@nameuse{@threecolfootfmt#1}{##1}%
- \color@endgroup}%
- \m@mmf@prepare}}
+ \color@endgroup}\m@mmf@prepare}}
\newcommand{\m@make@mpthreecolfootnotetext}[1]{%
\@namelongdef{@mpthreecolfootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}
- \@nameuse{foottextfont#1} \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}%
\color@begingroup
\@nameuse{@threecolfootfmt#1}{##1}%
- \color@endgroup}%
- \m@mmf@prepare}}
+ \color@endgroup}\m@mmf@prepare}}
\newcommand{\m@make@threecolfootfmt}[1]{%
\@namelongdef{@threecolfootfmt#1}##1{%
@@ -6896,7 +8646,8 @@
\xdef\footfudgefactor{\expandafter\strip@pt\dimen0 }}}
\newcommand{\@parafootnotetext}[1]{\insert\footinsv@r{
- \foottextfont
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\foottextfont
\@preamfntext
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark}%
@@ -6904,8 +8655,7 @@
\color@begingroup
\noindent \@parafootfmt{#1}%
\color@endgroup}%
- \m@mungebox}%
- \m@mmf@prepare}
+ \m@mungebox}\m@mmf@prepare}
\newcommand{\@parafootfmt}[1]{%
\parindent=\z@
@@ -6915,15 +8665,16 @@
\newcommand{\@mpparafootnotetext}[1]{%
\global\setbox\@mpfootinsv@r\vbox{%
\unvbox\@mpfootinsv@r
- \foottextfont \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\foottextfont
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote\endcsname\@thefnmark}%
\setbox0=\vbox{\hsize=\maxdimen
\color@begingroup
\noindent \@parafootfmt{#1}%
\color@endgroup}%
- \m@mungebox}%
- \m@mmf@prepare}
+ \m@mungebox}\m@mmf@prepare}
\newcommand{\paragraphfootstyle}[1]{%
\m@make@parafootnotetext{#1}%
@@ -6950,7 +8701,8 @@
\newcommand{\m@make@parafootnotetext}[1]{%
\@namelongdef{@parafootnotetext#1}##1{%
\insert\@nameuse{footins#1}{
- \@nameuse{foottextfont#1}%
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\protected@edef\@currentlabel{%
\csname p@footnote#1\endcsname \@nameuse{@thefnmark#1}}%
@@ -6958,22 +8710,22 @@
\color@begingroup
\noindent \@nameuse{@parafootfmt#1}{##1}%
\color@endgroup}%
- \m@mungebox}%
- \m@mmf@prepare}}
+ \m@mungebox}\m@mmf@prepare}}
\newcommand{\m@make@mpparafootnotetext}[1]{%
\@namelongdef{@mpparafootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}
- \@nameuse{foottextfont#1} \hsize\columnwidth \@parboxrestore
+ \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \reset@font\@nameuse{foottextfont#1}%
+ \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}}%
\setbox0=\vbox{\hsize=\maxdimen
\color@begingroup
\noindent \@nameuse{@parafootfmt#1}{##1}%
\color@endgroup}%
- \m@mungebox}%
- \m@mmf@prepare}}
+ \m@mungebox}\m@mmf@prepare}}
\newcommand{\m@make@parafootfmt}[1]{%
\@namelongdef{@parafootfmt#1}##1{%
@@ -7007,7 +8759,276 @@
\vskip\skip\@nameuse{footins#1}%
\footnoterule}}
+\newif\if@mem@nofoot
+\newcommand*{\@mem@testifnofoot}{%
+ \@mem@nofoottrue
+ \ifvoid\footins\else\@mem@nofootfalse\fi
+ \ifvoid\footinsv@r\else\@mem@nofootfalse\fi
+ \ifvoid\sideins\else\@mem@nofootfalse\fi
+ \@mem@extranofeet}
+\newcommand*{\@mem@extranofeet}{}
+
+\let\memold@doclearpage\@doclearpage
+\newcommand{\mem@doclearpage}{%
+ \@mem@testifnofoot
+ \if@mem@nofoot
+ \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}{%
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global\let\@midlist\@empty
+ \@combinefloats}
+\newcommand*{\m@m@makecoltext}{%
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht{%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\dimen@
+ \@textbottom}%
+ \fi}
+
+\newcommand*{\m@m@makecolintro}{}
+
+\newcommand*{\m@mopfootnote}{\setbox\@outputbox \vbox{%
+ \boxmaxdepth\@maxdepth
+ \@tempdima\dp\@cclv
+ \unvbox\@cclv
+ \vskip-\@tempdima
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup}}
+
+\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
+ \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@mopfootnote
+ \fi
+ \m@mdoextrafeet
+ \m@mopsidebar
+ \m@m@makecoltext
+ \global \maxdepth \@maxdepth}
+
+\gdef\mem@makecoldblf{%
+ \m@m@makecolintro
+ \setbox\@outputbox \box\@cclv
+ \m@m@makecolfloats
+ \m@mopsidebar% <- added
+ \ifvoid\footins
+ \else
+ \m@mopfootnote
+ \fi
+ \m@mdoextrafeet
+ \m@m@makecoltext
+ \global \maxdepth \@maxdepth}
+
+\newcommand{\feetabovefloat}{\gdef\@makecol{\mem@makecol}}
+\newcommand{\feetbelowfloat}{\gdef\@makecol{\mem@makecolbf}}
+\feetabovefloat
+
+\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}
+
+\newif\ifm@mpnpageopt
+ \m@mpnpageoptfalse
+\newif\ifm@mpncontopt
+ \m@mpncontoptfalse
+\newcounter{pagenote}[chapter]
+\renewcommand{\thepagenote}{\arabic{pagenote}}
+\setcounter{pagenote}{0}
+
+\newcommand*{\notepageref}{\m@mpnpageopttrue}
+\@onlypreamble\notepageref
+\newcommand*{\continuousnotenums}{%
+ \counterwithout{pagenote}{chapter}
+ \renewcommand{\thepagenote}{\arabic{pagenote}}}
+\@onlypreamble\continuousnotenums
+
+\newif\ifmempagenotes
+ \mempagenotesfalse
+
+\newcommand*{\makepagenote}{%
+ \newwrite\@notefile
+ \immediate\openout\@notefile=\jobname.ent
+ \mempagenotestrue
+ \def\pagenote{\@bsphack\begingroup
+ \@sanitize
+ \m@m@wrpnote}%
+ \typeout{Writing note file \jobname.ent}%
+ \let\makepagenote\@empty}
+
+\newcommand{\immediate@protected@write}[3]{%
+ \begingroup
+ #2%
+ \let\protect\@unexpandable@protect
+ \edef\reserved@a{\immediate\write#1{#3}}%
+ \reserved@a
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi}
+
+\let\m@m@pnwrite\immediate@protected@write
+\AtBeginDocument{%
+ \ifm@mpnpageopt
+ \let\m@m@pnwrite\protected@write
+ \fi}
+
+\newcommand*{\pnchap}{\f@rtoc}
+\newcommand*{\pnschap}{\f@rbdy}
+
+\newcommand{\m@m@wrpnote}[2][]{%
+ \@ifmtarg{#1}{\refstepcounter{pagenote}%
+ \notenumintext{\thepagenote}}{}%
+ \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
+ \addtonotes{\string\pagenotesubhead{\@chapapp}{}{\pnschap}}%
+ \fi
+ \m@m@pnwrite\@notefile{}
+ {\string\noteentry{\thepagenote}{#1}{#2}{\thepage}}%
+ \endgroup
+ \@esphack}
+
+\def\pagenote{\@bsphack\begingroup \@sanitize\m@m@pagenote}
+\newcommand{\m@m@pagenote}[2][]{\endgroup\@esphack}
+
+\newcommand*{\pagetofootnote}{%
+ \let\memsavepagenote\pagenote
+ \renewcommand{\pagenote}[2][]{\footnote{##2}}}
+\newcommand*{\foottopagenote}{%
+ \let\memsavefootnote\footnote
+ \renewcommand*{\footnote}[2][]{\pagenote{##2}}}
+
+\newcommand{\addtonotes}[1]{\ifmempagenotes
+ \IfFileExists{\jobname.ent}{\m@m@pnwrite\@notefile{}{#1}}{\mempnofilewarn}%
+\fi}
+
+\newcommand{\notenumintext}[1]{%
+ \textsuperscript{#1}}
+\newcommand{\notenuminnotes}[1]{%
+ {\normalfont #1.}\space}
+\newcommand{\noteentry}[4]{%
+ \prenoteinnotes
+ \noteidinnotes{#1}{#2}\pageinnotes{#4}\noteinnotes{#3}%
+ \postnoteinnotes}
+
+\newcommand{\idtextinnotes}[1]{%
+ [#1]\space}
+\newcommand{\noteidinnotes}[2]{%
+ \@ifmtarg{#2}{%
+ \notenuminnotes{#1}}{\idtextinnotes{#2}}}
+\newcommand{\pageinnotes}[1]{%
+ \ifm@mpnpageopt \printpageinnotes{#1}\fi}
+\newcommand*{\printpageinnotes}[1]{%
+ (\pagerefname\ #1)\space}
+\newcommand{\noteinnotes}[1]{#1}
+
+\newcommand{\prenoteinnotes}{\par\noindent}
+\newcommand{\postnoteinnotes}{\par}
+
+\providecommand*{\notesname}{Notes}
+\newcommand*{\notedivision}{\chapter{\notesname}}
+
+\newcommand*{\printpagenotes}{\@ifstar{\@sprintpagenotes}{\@printpagenotes}}
+\newcommand*{\mempnofilewarn}{%
+ \ClassWarning{memoir}{There is no .ent file}}
+
+\newcommand*{\@sprintpagenotes}{%
+ \ifmempagenotes
+ \notedivision
+\IfFileExists{\jobname.ent}{%
+ \immediate\closeout\@notefile
+ \input{\jobname.ent}%
+ \immediate\openout\@notefile=\jobname.ent%
+ }{%
+ \mempnofilewarn
+}%
+\fi}
+
+\newcommand*{\@printpagenotes}{%
+ \ifmempagenotes
+ \notedivision
+ \IfFileExists{\jobname.ent}{%
+ \immediate\closeout\@notefile
+ \input{\jobname.ent}%
+ }{%
+ \mempnofilewarn
+ }
+ \fi}
+
+\newcommand*{\pagenotesubhead}[3]{%
+ \section*{#1 #2 #3}}
+
\newif\ifchangemarks\changemarksfalse
+\newcommand*{\changemarks}{\changemarkstrue}
+\newcommand*{\nochangemarks}{\changemarksfalse}
+
\newcommand{\v@rid}[2]{%
\@bsphack
\ifchangemarks
@@ -7035,6 +9056,9 @@
\fi
\@esphack}
+\newcommand*{\showtrimsoff}{\showtrimsfalse}
+\newcommand*{\showtrimson}{\showtrimstrue}
+
\newcommand*{\trimmark}{%
\begin{picture}(0,0)
\unitlength 1cm
@@ -7093,20 +9117,17 @@
\let\tmarktl\trimmark
\let\tmarktr\trimmark
\let\tmarkbl\trimmark
- \let\tmarkbr\trimmark
-}
+ \let\tmarkbr\trimmark}
\newcommand*{\trimLmarks}{%
\let\tmarktl\Ltrimpictl
\let\tmarktr\Ltrimpictr
\let\tmarkbl\Ltrimpicbl
- \let\tmarkbr\Ltrimpicbr
-}
+ \let\tmarkbr\Ltrimpicbr}
\newcommand*{\trimFrame}{%
\let\tmarktl\null
\let\tmarktr\null
\let\tmarkbl\Ftrimpicbl
- \let\tmarkbr\null
-}
+ \let\tmarkbr\null}
\newcommand*{\trimNone}{%
\let\tmarktl\relax
\let\tmarktr\relax
@@ -7115,8 +9136,7 @@
\let\tmarktm\relax
\let\tmarkml\relax
\let\tmarkmr\relax
- \let\tmarkbm\relax
-}
+ \let\tmarkbm\relax}
\newcommand*{\trimmarks}{%
\vbox to \z@{\vskip-1in \vskip\trimtop % top of logical page
@@ -7140,30 +9160,86 @@
\hss}%
\vss}}
-\newcounter{sheetsequence}
- \setcounter{sheetsequence}{1}
- \renewcommand{\thesheetsequence}{\@arabic\c@sheetsequence}
-\g@addto@macro{\@outputpage}{\stepcounter{sheetsequence}}
-
-\newcounter{lastsheet}
- \setcounter{lastsheet}{0}
-\newcounter{lastpage}
- \setcounter{lastpage}{0}
-\newcommand{\dol@stsheet}{%
- \if@filesw
- \addtocounter{sheetsequence}{-1}%
- \immediate\write\@auxout%
- {\string\setcounter{lastsheet}{\the\c@sheetsequence}}%
- \stepcounter{sheetsequence}%
- \fi}
-\newcommand{\dol@stpage}{%
- \if@filesw
- \addtocounter{page}{-1}%
- \immediate\write\@auxout%
- {\string\setcounter{lastpage}{\the\c@page}}%
- \stepcounter{page}%
- \fi}
-\AtBeginDocument{\AtEndDocument{\clearpage\dol@stsheet\dol@stpage}}
+\newcommand*{\registrationColour}[1]{#1}
+\newcommand*{\quarkmarks}{%
+\renewcommand*{\tmarktl}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(-36,0){\line(1,0){24}}
+ \put(0,12){\line(0,1){24}}
+ \put(3,27){\ttfamily\fontsize{8bp}{10bp}\selectfont\jobname\ \
+ \today\ \ \printtime\ \ Page \thepage}
+ \end{picture}}}
+\renewcommand*{\tmarktm}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(-24,24){\line(1,0){48}}
+ \put(0,12){\line(0,1){24}}
+ \put(0,24){\oval(12,12)}
+ \end{picture}}}
+\renewcommand*{\tmarktr}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(12,0){\line(1,0){24}}
+ \put(0,12){\line(0,1){24}}
+ \end{picture}}}
+\renewcommand*{\tmarkmr}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(12,0){\line(1,0){24}}
+ \put(24,-24){\line(0,1){48}}
+ \put(24,0){\oval(12,12)}
+ \end{picture}}}
+\renewcommand*{\tmarkbr}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(12,0){\line(1,0){24}}
+ \put(0,-36){\line(0,1){24}}
+ \end{picture}}}
+\renewcommand*{\tmarkbm}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(-24,-24){\line(1,0){48}}
+ \put(0,-36){\line(0,1){24}}
+ \put(0,-24){\oval(12,12)}
+ \end{picture}}}
+\renewcommand*{\tmarkbl}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(-36,0){\line(1,0){24}}
+ \put(0,-36){\line(0,1){24}}
+ \end{picture}}}
+\renewcommand*{\tmarkml}{\registrationColour{%
+ \begin{picture}(0,0)
+ \setlength{\unitlength}{1bp}\thicklines
+ \put(-36,0){\line(1,0){24}}
+ \put(-24,-24){\line(0,1){48}}
+ \put(-24,0){\oval(12,12)}
+ \end{picture}}}
+\renewcommand*{\trimmarks}{%
+%% \special{papersize=\the\stockwidth,\the\stockheight}
+ {%
+ \vbox to \z@{\vskip-1in \vskip\trimtop % top of logical page
+ \hb@xt@\z@{\hskip-1in
+ \ifodd\c@page
+ \hskip\stockwidth \hskip-\trimedge \hskip-\paperwidth
+ \else
+ \if@twoside
+ \hskip\trimedge % left of logical page
+ \else
+ \hskip\stockwidth \hsip-\trimedge \hskip-\paperwidth
+ \fi
+ \fi
+ \vbox to \paperheight{%
+ \let\protect\relax % <- v1.4 addition
+ \hb@xt@\paperwidth{\tmarktl\hfil\tmarktm\hfil\tmarktr}%
+ \vfil
+ \hb@xt@\paperwidth{\tmarkml\hfil\tmarkmr}%
+ \vfil
+ \hb@xt@\paperwidth{\tmarkbl\hfil\tmarkbm\hfil\tmarkbr}}%
+ \hss}%
+ \vss}}%
+}}
\let\mem@oldshipout\shipout
\newcommand*{\mem@shipi}{%
@@ -7172,13 +9248,16 @@
\ifvoid\@cclv
\mem@oldshipout\box\@cclv
\else
- \mem@oldshipout\vbox{\trimmarks\unvbox\@cclv}%
+ \ifshowtrims
+ \mem@oldshipout\vbox{\trimmarks\unvbox\@cclv}%
+ \else
+ \mem@oldshipout\box\@cclv
+ \fi
\fi}
\ifshowtrims
\renewcommand*{\shipout}{\afterassignment\mem@shipi\setbox\@cclv=}
\fi
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtoks\every@verbatim
\every@verbatim={}
\newtoks\afterevery@verbatim
@@ -7431,15 +9510,18 @@
{\kern\verbatimindent}{}}%
}
-\newcommand{\wrappingon}{%
+\newcommand*{\raggedwrap}{%
+ \@rightskip\@flushglue
+ \rightskip\@rightskip
+ \leftskip\@totalleftmargin
+ \parindent\ragrparindent}
+\newcommand*{\wrappingon}{%
\def\@xobeysp{~\discretionary{\verbatimbreakchar}%
{\kern\verbatimindent}{}}%
- \def\wrapright{\raggedright}%
-}
-\newcommand{\wrappingoff}{%
+ \def\wrapright{\raggedwrap}}
+\newcommand*{\wrappingoff}{%
\def\@xobeysp{\leavevmode\penalty\@M\ }%
- \def\wrapright{}%
-}
+ \def\wrapright{}}
\wrappingoff
\newwrite \verbatim@out
@@ -7502,7 +9584,7 @@
\csname ac\string#1\endcsname}%
\endgroup \fi \fi}
\def\@shortvrbinfo#1#2{%
- \PackageInfo{shortvrb}{%
+ \ClassInfo{memoir}{%
#1\expandafter\@gobble\string#2 a short reference
for \string\verb}}
\def\add@special#1{%
@@ -7520,32 +9602,6 @@
\ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}%
\xdef\@sanitize{\@sanitize}%
\endgroup}
-\newcommand{\linenumberfont}[1]{\def\vlvnumfont{#1}}
-%%% \linenumberfont{\small\rmfamily}
-
-\newcommand{\linenumberfrequency}[1]{%
- \ifnum #1< \@ne
- \def\linemodnum{0\relax}
- \bvcountlinesfalse
- \else
- \def\linemodnum{#1\relax}
- \bvcountlinestrue
- \fi
-}
-%%%%\linenumberfrequency{0}
-
-\newcommand{\getthelinenumber}[1]{%
- \ifnum\@ne=\linemodnum
- \@nameuse{the#1}
- \else
- \ifnum\@ne<\linemodnum
- \@tempcnta=\@nameuse{c@#1}
- \divide\@tempcnta\linemodnum \multiply\@tempcnta\linemodnum
- \ifnum\@tempcnta=\@nameuse{c@#1}\@nameuse{the#1}\fi
- \fi
- \fi
-}
-
\def\boxverbflag{14 }
\newlength{\bvboxsep} % user can change this
\setlength{\bvboxsep}{1em}
@@ -7554,16 +9610,25 @@
\bvperpagetrue
\newcommand{\bvtopofpage}[1]{%
- \long\def\b@vtop{#1}
-}
+ \long\def\b@vtop{#1}}
\def\b@vtop{} % used in \boxverb@split for heading
+\newcounter{memfbvline}
+ \c@memfbvline=\z@
\newcounter{bvlinectr}
-\def\theb@vlinenumber{\getthelinenumber{bvlinectr}}
-\newcommand{\resetbvlinenumber}{\setcounter{bvlinectr}{0}}
+\newcommand*{\setbvlinenums}[2]{%
+ \c@bvlinectr #1\relax \advance\c@bvlinectr \m@ne
+ \ifnum\z@<\linemodnum% we are printing line numbers
+ \@tempcnta #2\relax
+ \divide\@tempcnta\linemodnum
+ \multiply\@tempcnta\linemodnum
+ \c@memfbvline #2\relax
+ \advance\c@memfbvline-\@tempcnta
+ \fi}
+
+\def\theb@vlinenumber{\getthelinenumber{bvlinectr}{memfbvline}}
+\newcommand*{\resetbvlinenumber}{\setcounter{bvlinectr}{0}}
-\newif\ifbvcountlines % TRUE to print line numbers of verbatim lines
- \bvcountlinesfalse
\def\b@vdocount{\ifbvcountlines\stepcounter{bvlinectr}\fi}
\newlength{\bvnumlength}
%% \settowidth{\bvnumlength}{\vlvnumfont 9999}
@@ -7571,8 +9636,8 @@
\newif\ifbvcountinside % TRUE if line numbers inside box
\bvcountinsidetrue
-\newcommand{\bvnumbersinside}{\bvcountinsidetrue}
-\newcommand{\bvnumbersoutside}{\bvcountinsidefalse}
+\newcommand*{\bvnumbersinside}{\bvcountinsidetrue}
+\newcommand*{\bvnumbersoutside}{\bvcountinsidefalse}
\def\b@vdoinside{%
\ifbvcountlines\ifbvcountinside%
@@ -7586,6 +9651,8 @@
\vlvnumfont \theb@vlinenumber\space}}%
\fi\fi}
+\newcommand*{\@@m@mline}{\hb@xt@\linewidth}
+
\newcommand{\setupboxverb@line}{%
\par
\ifbvperpage
@@ -7593,7 +9660,8 @@
\fi
\def\verbatim@processline{\leavevmode
\b@vdocount%
- \bvleftsidehook\vbox{\advance\hsize-.8\p@ \@@line
+ \bvleftsidehook\vbox{\advance% \hsize-.8\p@ \@@line % changed to \linewidth
+ \linewidth-.8\p@ \@@line
{\b@vdooutside\strut\kern\bvboxsep%
\b@vdoinside%
\ift@bs
@@ -7602,8 +9670,7 @@
\the\verbatim@line
\fi
\hss}%
- \kern\bvboxsep}\bvrightsidehook\par}%
-}
+ \kern\bvboxsep}\bvrightsidehook\par}}
\newcommand{\setupbox@verb}{%
\leftskip\z@skip \rightskip\z@skip
@@ -7611,17 +9678,15 @@
\parfillskip\z@ plus\p@ minus\p@
\lineskip-\bvboxsep \baselineskip\z@skip
\frenchspacing\@vobeyspaces\@maybeobeytabs
- \boxverb@toprule
-}
+ \boxverb@toprule}
\def\boxedverbatim{\begingroup
+ \let\@@line\@@m@mline% new from mempatch v4.9
\setupboxverb@line
\@verbatim
\setupbox@verb
- \verbatim@start
-}
+ \verbatim@start}
\def\endboxedverbatim{\bvendrulehook\endtrivlist\endgroup\@doendpe}
-
\@namedef{boxedverbatim*}{\let\frenchspacing\@gobble \boxedverbatim}
\@namelet{endboxedverbatim*}\endboxverbatim
@@ -7630,7 +9695,8 @@
\newcommand*{\bvendofpage}[1]{%
\def\boxverb@botpage{#1}}
-\bvendofpage{\hrule\kern-.4pt}
+%%%%\bvendofpage{\hrule\kern-.4pt}
+\bvendofpage{\hrule width\linewidth\kern-.4pt}
\def\boxverb@split{\ifnum\outputpenalty=\boxverbflag
\ifdim\dp\@cclv=\z@
@@ -7640,8 +9706,8 @@
\fi
\fi}
-\def\bvtoprulehook{\hrule \nobreak \vskip-.1\p@}
-\def\bvendrulehook{\hrule}
+\def\bvtoprulehook{\hrule width\linewidth \nobreak\vskip-.1\p@}
+\def\bvendrulehook{\hrule width\linewidth}
\def\bvleftsidehook{\vrule}
\def\bvrightsidehook{\vrule}
\def\bvtopmidhook{\rule{0\p@}{2\bvboxsep} \hss}
@@ -7664,82 +9730,38 @@
\renewcommand{\bvtoprulehook}{\hrule \nobreak \vskip-.1\p@}%
\renewcommand{\bvleftsidehook}{\vrule}%
\renewcommand{\bvrightsidehook}{\vrule}%
- \renewcommand{\bvendrulehook}{\hrule}%
-}
+ \renewcommand{\bvendrulehook}{\hrule}}
\newcommand{\nobvbox}{%
\bvperpagefalse%
\renewcommand{\bvtoprulehook}{}%
\renewcommand{\bvleftsidehook}{}%
\renewcommand{\bvrightsidehook}{}%
- \renewcommand{\bvendrulehook}{}%
-}
+ \renewcommand{\bvendrulehook}{}}
\newcommand{\bvtopandtail}{%
\bvperpagefalse%
\renewcommand{\bvtoprulehook}{\hrule \nobreak \vskip-.1\p@}%
\renewcommand{\bvleftsidehook}{}%
\renewcommand{\bvrightsidehook}{}%
- \renewcommand{\bvendrulehook}{\hrule}%
-}
+ \renewcommand{\bvendrulehook}{\hrule}}
\newcommand{\bvsides}{%
\bvperpagefalse%
\renewcommand{\bvtoprulehook}{\vskip 3ex}%
\renewcommand{\bvleftsidehook}{\vrule}%
\renewcommand{\bvrightsidehook}{\vrule}%
- \renewcommand{\bvendrulehook}{}%
-}
+ \renewcommand{\bvendrulehook}{}}
\let\framed\relax \let\endframed\relax
\let\shaded\relax \let\endshaded\relax
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%% BEGIN FRAMED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% PW -- can't have \ProvidesPpackage
-%%\ProvidesPackage{framed}[2003/07/21 v 0.8a:
-%% framed or shaded text with page breaks]
-
-%% PW added \ifframeasnormal % TRUE normal paras, FALSE minipage paras
-%% PW default is (FALSE to match DA v0.5, or TRUE to match DA v0.6)
-\newif\ifframeasnormal
- \frameasnormaltrue
-
-%% PW Define some things AtBeginDocument if they have not already
-%% been defined via someone using the framed package.
-\AtBeginDocument{\@ifundefined{framed}{%
-\def\endMakeFramed{\par
- \kern\z@ \penalty-100 % put depth into height
- \egroup
- \begingroup \put@frame \endgroup}
-
-\newenvironment{framed}% using default \FrameCommand
- {\MakeFramed {\advance\hsize-\width \FrameRestore}}%
- {\endMakeFramed}
-
-\newenvironment{shaded}{%
- \def\FrameCommand{\colorbox{shadecolor}}%
- \MakeFramed {\FrameRestore}}%
- {\endMakeFramed}
-
-\newenvironment{leftbar}{%
- \def\FrameCommand{\vrule width 3pt \hspace{10pt}}%
- \MakeFramed {\advance\hsize-\width \FrameRestore}}%
- {\endMakeFramed}
+\chardef\FrameRestore=\catcode`\| % for debug
+\catcode`\|=\catcode`\% % (debug: insert space after backslash)
-}{}} % end of AtBeginDocument
-
-%% \def\MakeFramed#1{\par %% PW change to \newcommand
-\newcommand{\MakeFramed}[1]{\par
- % measure added width and height; call result \width and \height
- \setbox\z@\vbox{\vskip-1in \hbox{\hskip-1in
- \FrameCommand{\hbox{\vrule \@height .7in \@depth.3in \@width 1in}}}%
- \vskip\z@skip}%
- \def\width{\wd\z@}\def\height{\ht\z@}%
- \edef\fb@frw{\the\width}\edef\fb@frh{\the\height}%
- % insert pre-penalties and skips
+\def\MakeFramed#1{\par
+ \fb@sizeofframe\FrameCommand
+ \let\width\fb@frw \let\height\fb@frh
\begingroup
\skip@\lastskip
\if@nobreak\else
@@ -7750,11 +9772,6 @@
\else \vskip-\skip@ \penalty-30 \vskip\skip@
\fi\fi\fi
\penalty\z@
- % Give a stretchy breakpoint that will always be taken in preference
- % to the \penalty 9999 used to update page parameters. The cube root
- % of 10000/100 indicates a multiplier of 0.21545, but the maximum
- % calculated badness is really 8192, not 10000, so the multiplier
- % is 0.2301.
\advance\skip@ \z@ plus-.5\baselineskip
\advance\skip@ \z@ plus-.231\height
\advance\skip@ \z@ plus-.231\skip@
@@ -7763,89 +9780,151 @@
\fi
\addvspace{\topsep}%
\endgroup
- % clear out pending page break
\penalty\@M \vskip 2\baselineskip \vskip\height
\penalty9999 \vskip -2\baselineskip \vskip-\height
\penalty9999 % updates \pagetotal
+|\message{After clearout, \pagetotal=\the\pagetotal,
+| \pagegoal=\the\pagegoal. }%
\fb@adjheight
\setbox\@tempboxa\vbox\bgroup
#1% Modifications to \hsize (can use \width and \height)
- \textwidth\hsize \columnwidth\hsize
-}
+ \textwidth\hsize \columnwidth\hsize}
+
+\def\endMakeFramed{\par
+ \kern\z@
+ \hrule\@width\hsize\@height\z@
+ \penalty-100 % put depth into height
+ \egroup
+ % {\showoutput\showbox\@tempboxa}%
+ \begingroup
+ \fb@put@frame\FrameCommand\FirstFrameCommand
+ \endgroup}
-\def\put@frame{\relax
+\def\fb@put@frame#1#2{\relax
\ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi
- \ifinner \else
- \dimen@\pagegoal \advance\dimen@-\pagetotal % space left on page
- \ifdim\dimen@<2\baselineskip
- \eject \fb@adjheight \put@frame
+ \ifinner
+ \fb@putboxa#1%
+ \fb@afterframe
+ \else
+ \dimen@\pagegoal \advance\dimen@-\pagetotal % natural space left on page
+ \ifdim\dimen@<2\baselineskip % Too little room on page
+| \message{Page has only \the\dimen@\space room left; eject. }%
+ \eject \fb@adjheight \fb@put@frame#1#2%
\else % there's appreciable room left on the page
- \begingroup % temporarily set \dimen@ to be...
- \advance\dimen@.8\pageshrink % maximum space available on page
- \advance\dimen@-\fb@frh\relax % space for frame's contents
- \expandafter\endgroup
- % restore \dimen@ to real room left on page
- \ifdim\dimen@>\ht\@tempboxa % whole box does fit
- \else % box must be split
- \setbox\@tempboxa\vbox{% simulate frame and flexiblity of page:
- \vskip \fb@frh \@plus\pagestretch \@minus.8\pageshrink
- \kern137sp\kern-137sp\penalty-30
- \unvbox\@tempboxa}%
- \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth
- \splittopskip\the\splittopskip}% % v0.8a
- \boxmaxdepth\z@ \splittopskip\z@
- \setbox\tw@\vsplit\@tempboxa to\dimen@
- \setbox\tw@\vbox{\unvbox\tw@}% natural-sized
- % If the split-to size > (\vsize-\topskip),
- % then set box to full size
- \begingroup
+ \fb@sizeofframe#1%
+| \message{\string\pagetotal=\the\pagetotal,
+| \string\pagegoal=\the\pagegoal,
+| \string\pagestretch=\the\pagestretch,
+| \string\pageshrink=\the\pageshrink,
+| \string\fb@frh=\fb@frh. \space}
+| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}%
+ \begingroup % temporarily set \dimen@ to be...
+ \advance\dimen@.8\pageshrink % maximum space available on page
+ \advance\dimen@-\fb@frh\relax % space available for frame's contents
+ \expandafter\endgroup
+ \ifdim\dimen@>\ht\@tempboxa % whole box does fit
+| \message{fits in \the\dimen@. }%
+ \fb@putboxa#1%
+ \fb@afterframe
+ \else % box must be split
+| \message{must be split to fit in \the\dimen@. }%
+ \fb@sizeofframe#2%
+ \setbox\@tempboxa\vbox{% simulate frame and flexiblity of the page:
+ \vskip \fb@frh \@plus\pagestretch \@minus.8\pageshrink
+ \kern137sp\kern-137sp\penalty-30
+ \unvbox\@tempboxa}%
+ \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth
+ \splittopskip\the\splittopskip}%
+ \boxmaxdepth\z@ \splittopskip\z@
+| \message{Padded box of size \the\ht\@tempboxa\space split
+| to \the\dimen@}%
+ \setbox\tw@\vsplit\@tempboxa to\dimen@
+| \toks99\expandafter{\splitfirstmark}%
+| \toks98\expandafter{\splitbotmark}%
+| \message{Marks are: \the\toks99, \the\toks98. }%
+ \setbox\tw@\vbox{\unvbox\tw@}% natural-sized
+| \message{Natural height of split box is \the\ht\tw@, leaving
+| \the\ht\@tempboxa\space remainder. }%
+ \begingroup
\advance\dimen@\topskip
\expandafter\endgroup
- \ifdim\dimen@>\pagegoal
- \dimen@ii\pagegoal
- \advance\dimen@ii -\topskip
- \advance\dimen@ii \FrameHeightAdjust\relax
- \else % suspect this is wrong:
- % If the split-to size > feasible room_on_page,
- % rebox it smaller.
- \advance\dimen@.8\pageshrink
- \ifdim\ht\tw@>\dimen@
- \dimen@ii\dimen@
- \else % use natural size
- \dimen@ii\ht\tw@
+ \ifdim\dimen@>\pagegoal
+| \message{Frame is big -- Use up the full column. }%
+ \dimen@ii\pagegoal
+ \advance\dimen@ii -\topskip
+ \advance\dimen@ii \FrameHeightAdjust\relax
+ \else % suspect this is wrong:
+ \advance\dimen@.8\pageshrink
+ \ifdim\ht\tw@>\dimen@
+| \message{Box too tall; rebox it to \the\dimen@. }%
+ \dimen@ii\dimen@
+ \else % use natural size
+ \dimen@ii\ht\tw@
+ \fi
\fi
- \fi
- % Re-box contents to desired size \dimen@ii
- \advance\dimen@ii -\fb@frh
- \setbox\tw@\vbox to\dimen@ii \bgroup
- % remove simulated frame and page flexibility:
- \vskip -\fb@frh \@plus-\pagestretch \@minus-.8\pageshrink
- \unvbox\tw@ \unpenalty\unpenalty
- \ifdim\lastkern=-137sp % whole box went to next page
- \egroup \fb@resto@set \eject
-%%% % (\vskip for frame size was discarded) % v 0.8a
- \fb@adjheight
- \else %
- \egroup \fb@resto@set % v0.8a
- \ifvoid\@tempboxa % it all fit after all
- \setbox\@tempboxa\box\tw@
- \else % it really did split
- \ifdim\wd\tw@>\z@
- \centerline{\FrameCommand{\box\tw@}}% ? \centerline bad idea
- \else
- \box\tw@
- \fi
- \hrule \@height\z@
- \eject
+ \advance\dimen@ii -\fb@frh
+ \setbox\tw@\vbox to\dimen@ii \bgroup
+ \vskip -\fb@frh \@plus-\pagestretch \@minus-.8\pageshrink
+ \unvbox\tw@ \unpenalty\unpenalty
+ \ifdim\lastkern=-137sp % whole box went to next page
+| \message{box split at beginning! }%
+ % need work here???
+ \egroup \fb@resto@set \eject % (\vskip for frame size was discarded)
\fb@adjheight
- \put@frame
- \fi\fi\fi\fi\fi
- \ifvoid\@tempboxa\else
- \centerline{\FrameCommand{\box\@tempboxa}}%
- \nointerlineskip \null %{\showoutput \showlists}
- \penalty-30 \vskip\topsep
+ \fb@put@frame#1#2% INSERTED ???
+ \else % Got material split off at the head
+ \egroup \fb@resto@set
+ \ifvoid\@tempboxa % it all fit after all
+| \message{box split at end! }%
+ \setbox\@tempboxa\box\tw@
+ \fb@putboxa#1%
+ \fb@afterframe
+ \else % it really did split
+| \message{box split as expected. Its reboxed height
+| is \the\ht\tw@. }%
+ \ifdim\wd\tw@>\z@
+ \wd\tw@\wd\@tempboxa
+ \memfblineboxtwo{#2{\box\tw@}}% ??? \centerline bad idea? \\
+ \else
+| \message{Zero width means likely blank.
+| Don't frame it (guess)}%
+ \box\tw@
+ \fi
+ \hrule \@height\z@ \@width\hsize
+ \eject
+ \fb@adjheight
+ \fb@put@frame\LastFrameCommand\MidFrameCommand
+ \fi\fi\fi\fi\fi}
+
+\newcommand{\memfblineboxtwo}[1]{\centerline{#1}}
+\newcommand{\memfblineboxa}[1]{\centerline{#1}}
+
+\def\fb@putboxa#1{%
+ \ifvoid\@tempboxa
+%%%% PackageWarning{framed}{Boxa is void -- discard it. }%
+ \@memwarn{Boxa is void -- discard it. }%
+ \else
+| \message{Frame and place boxa. }%
+| %{\showoutput\showbox\@tempboxa}%
+%%%%%%% \centerline{#1{\box\@tempboxa}}%
+ \memfblineboxa{#1{\box\@tempboxa}}%
\fi}
+\def\fb@afterframe{%
+ \nointerlineskip \null %{\showoutput \showlists}
+ \penalty-30 \vskip\topsep \relax}
+
+\newdimen\fb@frw
+\newdimen\fb@frh
+\def\fb@sizeofframe#1{\begingroup
+ \setbox\z@\vbox{\vskip-5in \hbox{\hskip-5in
+ #1{\hbox{\vrule \@height 4.7in \@depth.3in \@width 5in}}}%
+ \vskip\z@skip}%
+| \message{Measuring frame addition for \string#1 in \@currenvir\space
+| gives ht \the\ht\z@\space and wd \the\wd\z@. }%
+ \global\fb@frw\wd\z@ \global\fb@frh\ht\z@
+ \endgroup}
+
\def\fb@adjheight{%
\vbox to\FrameHeightAdjust{}% get proper baseline skip from above.
\penalty\@M \nointerlineskip
@@ -7854,43 +9933,100 @@
\edef\zero@glue{\the\z@skip}
-%% Define configuration commands:
-\def\FrameCommand{\fboxrule=\FrameRule \fboxsep=\FrameSep \fbox}
-\newdimen\FrameRule \FrameRule= \fboxrule
-\newdimen\FrameSep \FrameSep = 3\fboxsep
-
-%% Height of frame above first baseline when frame starts a page:
-%%\def\FrameHeightAdjust{6pt} % PW changed the value
-\def\FrameHeightAdjust{0.6em}
-
-%% PW: I have added my \ifframeasnormal to the original \FrameRestore
-%% The commented out lines are commented out by DA in the
-%% framed package
-
-\newcommand{\FrameRestore}{%
- \let\if@nobreak\iffalse
- \let\if@noskipsec\iffalse
- \let\-\@dischyph
- \let\'\@acci\let\`\@accii\let\=\@acciii
- \linewidth\hsize
- \sloppy
-\ifframeasnormal\else
- \let\par\@@par
- \parindent\z@ \parskip\z@skip
- \everypar{}%
- \@totalleftmargin\z@
- \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
- \parfillskip\@flushglue \lineskip\normallineskip
- \baselineskip\normalbaselineskip
- \let\\\@normalcr
-\fi
-}
+\catcode`\|=\FrameRestore
+
+\providecommand\FrameCommand{%
+ \setlength\fboxrule{\FrameRule}\setlength\fboxsep{\FrameSep}%
+ \fbox}
+\@ifundefined{FrameRule}{\newdimen\FrameRule \FrameRule=\fboxrule}{}
+\@ifundefined{FrameSep} {\newdimen\FrameSep \FrameSep =3\fboxsep}{}
+\providecommand\FirstFrameCommand{\FrameCommand}
+\providecommand\MidFrameCommand{\FrameCommand}
+\providecommand\LastFrameCommand{\FrameCommand}
+\providecommand\FrameHeightAdjust{6pt}
+
+\def\FrameRestore{%
+ \let\if@nobreak\iffalse
+ \let\if@noskipsec\iffalse
+ \let\-\@dischyph
+ \let\'\@acci\let\`\@accii\let\=\@acciii
+ % \message{FrameRestore:
+ % \@totalleftmargin=\the \@totalleftmargin,
+ % \rightmargin=\the\rightmargin,
+ % \@listdepth=\the\@listdepth. }%
+ \ifnum \ifdim\@totalleftmargin>\z@ 1\fi
+ \ifdim\rightmargin>\z@ 1\fi
+ \ifnum\@listdepth>0 1\fi 0>\z@
+ % \message{In a list: \linewidth=\the\linewidth,
+ % \@totalleftmargin=\the\@totalleftmargin,
+ % \parshape=\the\parshape, \columnwidth=\the\columnwidth,
+ % \hsize=\the\hsize,
+ % \labelwidth=\the\labelwidth. }%
+%%% \@setminipage % snug fit around the item
+%%% \advance\linewidth-\columnwidth \advance\linewidth\hsize
+%%% \parshape\@ne \@totalleftmargin \linewidth
+ \memfblistfixparams
+ \else % Not in list
+ \linewidth=\hsize
+ %\message{No list, set \string\linewidth=\the\hsize. }%
+ \fi
+ \sloppy}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%\let\fram@d=\MakeFramed \let\endfram@d=\endMakeFramed
+\newcommand*{\memfblistfixparams}{%
+ \@setminipage % snug fit around the item
+ \advance\linewidth-\columnwidth \advance\linewidth\hsize
+ \parshape\@ne \@totalleftmargin \linewidth}
+
+\newenvironment{framed}% using default \FrameCommand
+ {\MakeFramed {\advance\hsize-\width \FrameRestore}}%
+ {\endMakeFramed}
-%%%%%%%%%%%% END FRAMED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newenvironment{shaded}{%
+ \def\FrameCommand{\fboxsep=\FrameSep \colorbox{shadecolor}}%
+ \MakeFramed {\FrameRestore}}%
+ {\endMakeFramed}
-\newcommand{\newoutputstream}[1]{%
+\newenvironment{leftbar}{%
+ \def\FrameCommand{\vrule width 3pt \hspace{10pt}}%
+ \MakeFramed {\advance\hsize-\width \FrameRestore}}%
+ {\endMakeFramed}
+
+\newenvironment{snugshade}{%
+ \def\FrameCommand{\colorbox{shadecolor}}%
+ \MakeFramed {\FrameRestore\@setminipage}}%
+ {\par\unskip\endMakeFramed}
+
+\AtBeginPackage{framed}{%
+ \let\framed\relax \let\endframed\relax
+ \let\shaded\relax \let\endshaded\relax
+ \let\leftbar\relax \let\endleftbar\relax
+ \let\snugshade\relax \let\endsnugshade\relax}
+
+\newenvironment{qframe}{%
+ \def\FrameCommand##1{\fboxrule=\FrameRule\fboxsep=\FrameSep
+ \hskip\@totalleftmargin\fbox{##1}% There is no \@totalrightmargin, so...
+ \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
+ \MakeFramed{\advance\hsize-\width
+ \advance\hsize \FrameSep
+ \@totalleftmargin\z@ \linewidth=\hsize}}%
+ {\endMakeFramed}
+
+\newenvironment{qshade}{%
+ \def\FrameCommand##1{\fboxsep=\FrameSep
+ \hskip\@totalleftmargin
+ \hskip -1\FrameSep
+ \colorbox{shadecolor}{##1}%
+ \hskip-\linewidth \hskip-\@totalleftmargin
+ \hskip -1\FrameSep
+ \hskip\columnwidth}%
+ \MakeFramed{\advance\hsize-\width
+ \advance\hsize 3\FrameSep
+ \@totalleftmargin\z@ \linewidth=\hsize}}%
+ {\endMakeFramed}
+
+\newcommand*{\newoutputstream}[1]{%
\@ifundefined{#1outstre@m}%
{\expandafter\newwrite\csname #1outstre@m\endcsname
\csname newif\expandafter\endcsname
@@ -7905,7 +10041,7 @@
}%
{\@memwarn{Output stream #1\space is already defined}}}
-\newcommand{\newinputstream}[1]{%
+\newcommand*{\newinputstream}[1]{%
\@ifundefined{#1instre@m}%
{\expandafter\newread\csname #1instre@m\endcsname
\csname newif\expandafter\endcsname
@@ -7946,23 +10082,20 @@
{\IfStreamOpen{#1}{%
\@memwarn{Output stream #1\space is open}}{#2}}}
-\newcommand{\openoutputfile}[2]{%
+\newcommand*{\openoutputfile}[2]{%
\outstre@mandclosed{#2}{%
\global\@namedef{#1@filename}{#1}%
\if@filesw
\immediate\openout\@nameuse{#2outstre@m}=\@nameuse{#1@filename}%
\fi
\global\csname stre@m#2opentrue\endcsname%
- \@nameuse{atstreamopen#2}%
- }%
-}
+ \@nameuse{atstreamopen#2}}}
-\newcommand{\closeoutputstream}[1]{%
+\newcommand*{\closeoutputstream}[1]{%
\outstre@mandopen{#1}{%
\@nameuse{atstreamclose#1}%
\immediate\closeout\@nameuse{#1outstre@m}%
- \global\csname stre@m#1openfalse\endcsname}%
-}
+ \global\csname stre@m#1openfalse\endcsname}}
\newcommand{\openinputfile}[2]{%
\IfFileExists{#1}{% file exists
@@ -7974,15 +10107,13 @@
\@nameuse{atstreamopen#2}}}%
{% file not found
\typeout{No file #1.}
- }%
-}
+ }}
\newcommand{\closeinputstream}[1]{%
\instre@mandopen{#1}{%
\@nameuse{atstreamclose#1}%
\immediate\closein\@nameuse{#1instre@m}%
- \global\csname stre@m#1openfalse\endcsname}%
-}
+ \global\csname stre@m#1openfalse\endcsname}}
\def\writeverbatim#1{%
\@bsphack
@@ -7999,8 +10130,7 @@
{\let\protect\string
\immediate\write\@nameuse{#1outstre@m}{#2}%
}}%
- \@esphack
-}
+ \@esphack}
\newif\ifstre@mnoteof
\newcommand{\checkstre@meof}[1]{%
@@ -8012,8 +10142,7 @@
\read\@nameuse{#1instre@m} to\temptokstre@m
\temptokstre@m
\repeat
- }%
-}
+ }}
\def\readaline#1{
\instre@mandopen{#1}{%
@@ -8022,9 +10151,7 @@
\else
\read\@nameuse{#1instre@m} to\temptokstre@m
\temptokstre@m
- \fi
- }%
-}
+ \fi}}
\def\readverbatim{\begingroup
\ift@bs
@@ -8038,16 +10165,14 @@
{\@verbatim #1\relax
\def\@verbinstre@m{\@nameuse{#2instre@m}}
\verb@readstre@m\endtrivlist\endgroup\@doendpe}%
- {\@memwarn{Stream #2\space is not open}\endgroup}%
-}
+ {\@memwarn{Stream #2\space is not open}\endgroup}}
\newcommand{\verb@readstre@m}{%
\verbatim@startline
\expandafter\endlinechar\expandafter\m@ne
\expandafter\verbatim@read@stre@m
\expandafter\endlinechar\the\endlinechar\relax
- \verbatim@finish
-}
+ \verbatim@finish}
\newcommand{\verbatim@read@stre@m}{%
\read\@verbinstre@m to\next
@@ -8057,8 +10182,7 @@
\verbatim@processline
\verbatim@startline
\expandafter\verbatim@read@stre@m
- \fi
-}
+ \fi}
\newcommand{\readboxedverbatim}{\begingroup
\@ifstar{\stre@mbvin\relax}%
@@ -8071,8 +10195,7 @@
\def\@verbinstre@m{\@nameuse{#2instre@m}}%
\setupbox@verb
\verb@readstre@m\bvendrulehook\endtrivlist\endgroup\@doendpe}%
- {\@memwarn{Stream #2\space is not open}\endgroup}%
-}
+ {\@memwarn{Stream #2\space is not open}\endgroup}}
\newcommand{\provideenvironment}{\@star@or@long\m@mprovenv}
\newcommand{\m@mprovenv}[1]{\@ifundefined{#1}%
@@ -8088,8 +10211,8 @@
\@ifundefined{c@#1}%
{\newcounter{#1}}%
{\@memwarn{Counter `#1' already defined}%
- \@ifnextchar[{\m@mgobbleopt}{}}%
-}
+ \@ifnextchar[{\m@mgobbleopt}{}}}
+
\def\m@mgobbleopt[#1]{}
\newcommand*{\providelength}[1]{%
@@ -8098,8 +10221,7 @@
\endgroup
\expandafter\@ifundefined\@gtempa
{\newlength{#1}}%
- {\@memwarn{Length #1 already defined}}%
-}
+ {\@memwarn{Length #1 already defined}}}
\newcommand*{\newloglike}{\@ifstar{\m@mnewlogs}{\m@mnewlog}}
\newcommand*{\m@mnewlogs}[2]{%
@@ -8149,6 +10271,9 @@
\newif\ifoddpage
\newif\ifstrictpagecheck
\strictpagecheckfalse
+\newcommand*{\strictpagecheck}{\strictpagechecktrue}
+\newcommand*{\easypagecheck}{\strictpagecheckfalse}
+
\newcounter{cp@cntr}
\newcommand{\cplabel}{^_}
\DeclareRobustCommand{\checkoddpage}{%
@@ -8200,8 +10325,7 @@
\@firstcolumntrue%
\fi%
\setlength{\hsize}{\columnwidth}%
- \setlength{\linewidth}{\hsize}%
-}
+ \setlength{\linewidth}{\hsize}}
\DeclareRobustCommand{\changetext}[5]{%
\@ifmtarg{#1}{}{\addtolength{\textheight}{#1}}%
@@ -8209,8 +10333,19 @@
\@ifmtarg{#3}{}{\addtolength{\evensidemargin}{#3}}%
\@ifmtarg{#4}{}{\addtolength{\oddsidemargin}{#4}}%
\@ifmtarg{#5}{}{\addtolength{\columnsep}{#5}}%
- \ch@ngetext%
-}
+ \ch@ngetext}
+
+\DeclareRobustCommand{\changepage}[9]{%
+ \@ifmtarg{#1}{}{\addtolength{\textheight}{#1}}%
+ \@ifmtarg{#2}{}{\addtolength{\textwidth}{#2}}%
+ \@ifmtarg{#3}{}{\addtolength{\evensidemargin}{#3}}%
+ \@ifmtarg{#4}{}{\addtolength{\oddsidemargin}{#4}}%
+ \@ifmtarg{#5}{}{\addtolength{\columnsep}{#5}}%
+ \ch@ngetext
+ \@ifmtarg{#6}{}{\addtolength{\topmargin}{#6}}%
+ \@ifmtarg{#7}{}{\addtolength{\headheight}{#7}}%
+ \@ifmtarg{#8}{}{\addtolength{\headsep}{#8}}%
+ \@ifmtarg{#9}{}{\addtolength{\footskip}{#9}}}
\newenvironment{adjustwidth}[2]{%
\begin{list}{}{%
@@ -8248,8 +10383,13 @@
#1 = \paperwidth
\advance #1 by -\textwidth
\divide #1 by \tw@
- \advance #1 by -\spinemargin
-}
+ \advance #1 by -\spinemargin}
+
+\newenvironment{vplace}[1][1]{%
+ \par\vspace{\stretch{#1}}%
+}{%
+ \vspace*{\stretch{1}}%
+ \par}
\newcommand{\cleartoevenpage}[1][\@empty]{%
\clearpage%
@@ -8288,6 +10428,14 @@
\break
\fi\endgroup}
+\newcommand*{\midsloppy}{%
+ \tolerance 5000%
+ \hbadness 4000%
+ \emergencystretch 1.5em%
+ \hfuzz .1\p@
+ \vfuzz\hfuzz}
+\newenvironment{midsloppypar}{\par\midsloppy}{\par}
+
\newcommand{\medspace}{\kern .22222em }
\DeclareRobustCommand{\:}{%
\relax\ifmmode\mskip\medmuskip\else\medspace\fi}
@@ -8428,8 +10576,7 @@
\divide \c@workm@mctr by \m@mten
\multiply \c@workm@mctr by \m@mten
\advance \c@bsm@mctr by -\c@workm@mctr
- \fi
-}
+ \fi}
\newcommand*{\form@tnumber}[1]{%
\numdigits{#1}%
@@ -8503,8 +10650,7 @@
\thexsm@mctr
\fi
\fi
- \theism@mctr % units
-}
+ \theism@mctr} % units
\newcommand*{\cardinal}[1]{%
\begingroup
@@ -8822,40 +10968,39 @@
\fi
\fi
\fi % end ifmakeordinal
-\endgroup
-}
+\endgroup}
-\newcommand*{\numtoname}[1]{%
+\DeclareRobustCommand{\numtoname}[1]{%
\makeordinalfalse
\notnumtonameallcapstrue%
\lowernumtonametrue%
\n@me@number{#1}}
-\newcommand*{\numtoName}[1]{%
+\DeclareRobustCommand{\numtoName}[1]{%
\makeordinalfalse
\notnumtonameallcapstrue%
\lowernumtonamefalse%
\n@me@number{#1}}
-\newcommand*{\NumToName}[1]{%
+\DeclareRobustCommand{\NumToName}[1]{%
\makeordinalfalse
\notnumtonameallcapsfalse%
\lowernumtonamefalse%
\n@me@number{#1}}
-\newcommand*{\ordinaltoname}[1]{%
+\DeclareRobustCommand{\ordinaltoname}[1]{%
\makeordinaltrue
\notnumtonameallcapstrue%
\lowernumtonametrue%
\n@me@number{#1}}
-\newcommand*{\ordinaltoName}[1]{%
+\DeclareRobustCommand{\ordinaltoName}[1]{%
\makeordinaltrue
\notnumtonameallcapstrue%
\lowernumtonamefalse%
\n@me@number{#1}}
-\newcommand*{\OrdinalToName}[1]{%
+\DeclareRobustCommand{\OrdinalToName}[1]{%
\makeordinaltrue
\notnumtonameallcapsfalse%
\lowernumtonamefalse%
@@ -8909,13 +11054,124 @@
\global \vsize \@colht
\global \@colroom \@colht
\@floatplacement
+ \fi}
+
+\newcommand*{\m@mcalchm}{%
+ \count0 = \time \divide \count0 by 60\relax
+ \count2 = \count0\relax% the hour
+ \count4 = \time \multiply\count0 by 60\relax
+ \advance\count4 by -\count0\relax% the minute
+ \ifnum\count4<10 \toks1 = {0}% make a leading zero
+ \else \toks1 = {}%
+ \fi}
+%%% punctuation, am and pm for \printtime
+\newcommand*{\hmpunct}{:}% hours minutes separator
+\newcommand*{\amname}{am}% ante meridiem
+\newcommand*{\pmname}{pm}% post meridiem
+
+\newcommand*{\printtime}{%
+ \@ifstar{\m@msprtime}{\m@mprtime}}
+\newcommand*{\m@mprtime}{\begingroup
+ \m@mcalchm
+ \number\count2\hmpunct\the\toks1 \number\count4
+ \endgroup}
+\newcommand*{\m@msprtime}{\begingroup
+ \m@mcalchm
+ \def\@mpm{\pmname}%
+ \ifnum\count2<1\relax% early in the morning
+ \count2=12\relax
+ \ifnum\count4>0\relax% not midnight
+ \def\@mpm{\amname}%
+ \fi
+ \else
+ \ifnum\time<721\relax% noon or earlier
+ \def\@mpm{\amname}%
+ \else
+ \ifnum\time>779\relax% 1300 hrs or later
+ \advance\count2 by -12\relax
+ \fi
+ \fi
\fi
-}
+ \number\count2\hmpunct\the\toks1 \number\count4\ \@mpm
+ \endgroup}
+
+\newcounter{sheetsequence}
+ \setcounter{sheetsequence}{1}
+ \renewcommand{\thesheetsequence}{\@arabic\c@sheetsequence}
+\g@addto@macro{\@outputpage}{\stepcounter{sheetsequence}}
+
+\newcounter{lastsheet}
+ \setcounter{lastsheet}{0}
+\newcounter{lastpage}
+ \setcounter{lastpage}{0}
+
+\newcommand{\dol@stsheet}{%
+ \if@filesw
+ \addtocounter{sheetsequence}{-1}%
+ \immediate\write\@auxout%
+ {\string\memsetcounter{lastsheet}{\the\c@sheetsequence}}%
+ \stepcounter{sheetsequence}%
+ \fi}
+\newcommand{\dol@stpage}{%
+ \if@filesw
+ \addtocounter{page}{-1}%
+ \immediate\write\@auxout%
+ {\string\memsetcounter{lastpage}{\the\c@page}}%
+ \stepcounter{page}%
+ \fi}
+\AtBeginDocument{\AtEndDocument{\clearpage\dol@stsheet\dol@stpage}}
+
+\newif\ifcntrmod
+\newif\ifnotcntrmod
+\newcommand*{\iscntrmod}[2]{
+ \@tempcnta=\@nameuse{c@#1}%
+ \@tempcntb=\@tempcnta
+ \divide\@tempcnta #2\relax
+ \multiply\@tempcnta #2\relax
+ \advance\@tempcntb-\@tempcnta
+ \ifnum\@tempcntb=0\relax
+ \cntrmodtrue
+ \notcntrmodfalse
+ \else
+ \cntrmodfalse
+ \notcntrmodtrue
+ \fi}
+
+\newcommand*{\@memensuresigpages}{%
+ \ifnum\@mempagespersig<\@ne
+ \else
+ \iscntrmod{sheetsequence}{\@mempagespersig}
+ \ifcntrmod
+ \else
+ \clearpage
+ \pagestyle{empty}
+ \mbox{}
+ \loop
+ \iscntrmod{sheetsequence}{\@mempagespersig}
+ \ifnotcntrmod
+ \clearpage
+ \pagestyle{empty}
+ \mbox{}
+ \repeat
+ \fi
+ \fi}
+
+\newcommand*{\leavespergathering}[1]{\@memcnta=#1\relax
+ \ifnum\@memcnta<\tw@
+ \def\@mempagespersig{-1}%
+ \else
+ \multiply\@memcnta \tw@
+ \edef\@mempagespersig{\@memcnta}%
+ \fi}
+\leavespergathering{0}
+
+\AtEndDocument{\@memensuresigpages}
\newcommand*{\abstractname}{Abstract}
\newcommand*{\contentsname}{Contents}
\newcommand*{\listfigurename}{List of Figures}
\newcommand*{\listtablename}{List of Tables}
+\newcommand*{\bookname}{Book}
\newcommand*{\partname}{Part}
\newcommand*{\chaptername}{Chapter}
\newcommand*{\appendixname}{Appendix}
@@ -8930,9 +11186,12 @@
\newcommand*{\tablerefname}{Table}
\newcommand*{\pagename}{page}
\newcommand*{\pagerefname}{page}
+\newcommand*{\bookrefname}{Book~}
\newcommand*{\partrefname}{Part~}
\newcommand*{\chapterrefname}{Chapter~}
\newcommand*{\sectionrefname}{\S}
+\newcommand*{\appendixrefname}{Appendix~}
+
\newcommand{\today}{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
@@ -8965,31 +11224,30 @@
\fi
\newfloat[chapter]{figure}{lof}{\figurename}
- \kill@lastcounter{lofdepth}
+%%% \kill@lastcounter{lofdepth}
\renewcommand{\thefigure}{\thechapter.\@arabic\c@figure}
\newlistof{listoffigures}{lof}{\listfigurename}
- \kill@lastcounter{lofdepth}
+%%% \kill@lastcounter{lofdepth}
\newlistentry[chapter]{figure}{lof}{0}
\cftsetindents{figure}{0em}{2.3em}
%% \kill@lastcounter{lofdepth}
\newfloat[chapter]{table}{lot}{\tablename}
- \kill@lastcounter{lotdepth}
+%%% \kill@lastcounter{lotdepth}
\renewcommand{\thetable}{\thechapter.\@arabic\c@table}
\newlistof{listoftables}{lot}{\listtablename}
- \kill@lastcounter{lotdepth}
+%%% \kill@lastcounter{lotdepth}
\newlistentry[chapter]{table}{lot}{0}
\cftsetindents{table}{0em}{2.3em}
%% \kill@lastcounter{lotdepth}
-\AtBeginDocument{%
- \@ifundefined{c@lofdepth}%
- {\newcounter{lofdepth}\setcounter{lofdepth}{1}}{}
- \@ifundefined{c@lotdepth}%
- {\newcounter{lotdepth}\setcounter{lotdepth}{1}}{}
-}
+%%%\AtBeginDocument{%
+%%% \@ifundefined{c@lofdepth}%
+%%% {\newcounter{lofdepth}\setcounter{lofdepth}{1}}{}
+%%% \@ifundefined{c@lotdepth}%
+%%% {\newcounter{lotdepth}\setcounter{lotdepth}{1}}{}}
\ifartopt
\chapterstyle{article}
@@ -9032,6 +11290,7 @@
\EmulatedPackage{array}
\EmulatedPackage{booktabs}
\EmulatedPackage{ccaption}
+\EmulatedPackage{changepage}
\EmulatedPackage{chngcntr}
\EmulatedPackage{chngpage}
\EmulatedPackage{crop}
@@ -9039,16 +11298,21 @@
\EmulatedPackage{delarray}
\EmulatedPackage{enumerate}
\EmulatedPackage{epigraph}
-\EmulatedPackage{framed}
+%%%%%\EmulatedPackage{framed}
\EmulatedPackage{ifmtarg}
\EmulatedPackage{ifpdf}
+\EmulatedPackage{ifxetex}
\EmulatedPackage{index}
\EmulatedPackage{makeidx}
\EmulatedPackage{moreverb}
+\EmulatedPackage{mparhack}
\EmulatedPackage{needspace}
\EmulatedPackage{newfile}
\EmulatedPackage{nextpage}
+\EmulatedPackage{pagenote}
+\EmulatedPackage{parskip}
\EmulatedPackage{patchcmd}
+\EmulatedPackage{setspace}
\EmulatedPackage{shortvrb}
\EmulatedPackage{showidx}
\EmulatedPackage{tabularx}
@@ -9059,6 +11323,51 @@
\EmulatedPackage{verbatim}
\EmulatedPackage{verse}
+%%% 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}
+
+\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}
+}
+
+\AtBeginPackage{float}{\let\newfloat\relax}
+
\InputIfFileExists{mempatch.sty} % should be this
\endinput
diff --git a/Master/texmf-dist/tex/latex/memoir/mempatch.sty b/Master/texmf-dist/tex/latex/memoir/mempatch.sty
index 0dbc42da7d7..3ea25995e8b 100644
--- a/Master/texmf-dist/tex/latex/memoir/mempatch.sty
+++ b/Master/texmf-dist/tex/latex/memoir/mempatch.sty
@@ -7,7 +7,7 @@
%% mempatch.dtx (with options: `patch')
%%
%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
-%% Copyright 2001 --- 2007 Peter R. Wilson
+%% Copyright 2001 --- 2008 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -22,3620 +22,13 @@
%%
%% This work consists of the files listed in the README file.
%%
-\ProvidesFile{mempatch.sty}[2007/12/24 v4.9a Patches for memoir class v1.618]
+\ProvidesFile{mempatch.sty}[2008/05/26 v5.0 Patches for memoir class v1.61803]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Version 4.0 was released simultaneously with version 1.618 of memoir.
+%%% Version 5.0 was released simultaneously with version 1.61803 of memoir.
%%% By definition there were no patches.
-%%% Most of the subsequent additions are noted in the Addendum.
%%%
-%%% Version 4.3 introduces the \reparticle macro which is not in the
-%%% Addendum.
-%%%
-%%% Version 4.4 introduces several additional commands, in particular
-%%% the \book command provides a document division above Part. See the
-%%% code (towards the end) for details of the new commands.
-%%%
-%%% Version 4.5 introduces commands for switching trim marks off and on
-%%% and a \DisemulatePackage macro to negate a prior \EmulatedPackage.
-%%% It also provides the functions of the pagenote package for end notes.
-%%% See the code (near the end) for details.
-%%%
-%%% Version 4.6 fixes all known bugs and provides means of increasing
-%%% the interlinear and interparagraph spacing, adds some minor new commands,
-%%% and provides about a dozen more built-in chapterstyles.
-%%% See the code (near the end) for details.
-%%%
-%%% 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.
-%%%
-%%% Version 4.9a fixes the (few) bugs in version 4.9.
-%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.1 (2005/10/03 and later)
-
-%%%% Use correct number of arguments for \memsecstarinfo (2 not 3).
-\def\@ssect#1#2#3#4#5{%
- \M@gettitle{#5}%
- \memsecstarinfo{\m@msecn@mame}{#5}%
- \@mem@old@ssect{#1}{#2}{#3}{#4}{#5}}
-
-%%%%%%%%%%%%
-%%%%%%%%%%%% Side captions
-%%%%%%%%%%%%
-
-\newsavebox{\m@mscap@capbox}
-\newsavebox{\m@mscap@fbox}
-
-\newdimen\sidecapsep
- \sidecapsep=\marginparsep
-\newdimen\sidecapwidth
- \sidecapwidth=\marginparwidth
-
-\newdimen\m@m@tempdima
-\newdimen\m@mscapraise
-
-\newdimen\sidecapraise
- \sidecapraise \z@
-
-\newcommand*{\setsidecappos}[1]{%
- \def\m@mscappos{#1}\def\@tempb{t}%
- \ifx\@tempb\m@mscappos
- \else
- \def\@tempb{b}%
- \ifx\@tempb\m@mscappos
- \else
- \def\@tempb{c}%
- \ifx\@tempb\m@mscappos
- \else
- \@memerror{Argument to \string\setsidecappos\space is not t or c or b.
- \MessageBreak Set to c}{\@ehc}%
- \def\m@mscappos{c}%
- \fi
- \fi
- \fi}
-\setsidecappos{c}
-
-\newcommand{\sidecapmargin}[1]{%
- \def\@tempa{#1}\def\@tempb{left}%
- \ifx\@tempb\@tempa
- \def\m@mscapmarg{0}% left
- \else
- \def\@tempb{right}%
- \ifx\@tempb\@tempa
- \def\m@mscapmarg{1}% right
- \else
- \def\@tempb{outer}%
- \ifx\@tempb\@tempa
- \def\m@mscapmarg{2}% outer
- \else
- \def\@tempb{inner}%
- \ifx\@tempb\@tempa
- \def\m@mscapmarg{3}% inner
- \else
- \@memerror{Unrecognized argument for \string\sidecapmargin}%
- {\@ehc}%
- \def\m@mscapmarg{-1}% error
- \fi
- \fi
- \fi
- \fi}
-\sidecapmargin{left}
-
-\newif\ifscapmargleft
-
-\def\sidecapfloatwidth{\linewidth}
-\newdimen\m@mscapmainwidth
-
-\newdimen\m@mscaplkern
-\newcommand*{\setm@mscaplkern}{%
- \m@mscaplkern=\sidecapwidth
- \advance\m@mscaplkern \sidecapsep
- \advance\m@mscaplkern \m@mscapmainwidth}
-
-\newcommand*{\sidecapstyle}{%
-%%% \captionnamefont{\bfseries}%
- \ifscapmargleft
- \captionstyle{\raggedleft}%
- \else
- \captionstyle{\raggedright}%
- \fi}
-
-\newcommand*{\sidecaption}{%
- \@ifnextchar [{\@sidecaption}{\@sidecaption[]}}
-\def\@sidecaption[#1]#2{%
- \@ifnextchar [{\@@sidecaption{#1}{#2}}{\@@sidecaption{#1}{#2}[]}}
-\def\@@sidecaption#1#2[#3]{%
- \ifx\@empty#1\@empty
- \def\m@mscap@fortoc{#2}%
- \else
- \def\m@mscap@fortoc{#1}%
- \fi
- \def\m@mscap@forcap{#2}%
- \ifx\@empty#3\@empty
- \def\m@mscaplabel{}%
- \else
- \def\m@mscaplabel{\@bsphack\label{#3}\@esphack}%
- \fi
- \m@mscapstart@fbox}
-
-\newcommand*{\m@mscapstart@fbox}{%
- \setlength{\m@mscapmainwidth}{\sidecapfloatwidth}%
- \setm@mscaplkern
- \begin{lrbox}{\m@mscap@fbox}%
- \begin{minipage}[c]{\m@mscapmainwidth}}
-\newcommand*{\m@mscapend@fbox}{%
- \end{minipage}%
- \end{lrbox}}
-
-\def\endsidecaption{%
- \m@mscapend@fbox
- \refstepcounter\@captype
- \m@mscaplabel
- \begin{lrbox}{\m@mscap@capbox}%
- \begin{minipage}[c]{\sidecapwidth}%
- \sidecapstyle
- \@caption\@captype[\m@mscap@fortoc]{\m@mscap@forcap}
- \end{minipage}%
- \end{lrbox}%
- \m@mscapopboxes}
-\newcommand*{\m@mscapopboxes}{%
- \m@mcalcscapraise
- \usebox{\m@mscap@fbox}\m@mscapcheckside
- \ifscapmargleft%
- \rlap{\kern-\m@mscaplkern
- \raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
- \else%
- \rlap{\kern\sidecapsep
- \raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
- \fi
- \gdef\m@mscapthisside{}}
-
-\newcommand*{\m@mcalcscapraise}{%
- \def\@tempb{t}%
- \ifx\m@mscappos\@tempb
- \settoheight{\m@m@tempdima}{\strut\usebox{\m@mscap@capbox}}%
- \settoheight{\m@mscapraise}{\usebox{\m@mscap@fbox}}%
- \advance\m@mscapraise -\m@m@tempdima
- \advance\m@mscapraise 0.5ex
- \else
- \def\@tempb{b}%
- \ifx\m@mscappos\@tempb
- \settodepth{\m@m@tempdima}{\usebox{\m@mscap@fbox}}%
- \settodepth{\m@mscapraise}{\strut\usebox{\m@mscap@capbox}}%
- \advance\m@mscapraise -\m@m@tempdima
- \else
- \m@mscapraise=\z@
- \advance\m@mscapraise 0.25ex
- \fi
- \fi
- \advance\m@mscapraise \sidecapraise}
-
-\newcommand*{\m@mscapcheckside}{%
- \if@twocolumn
- \ifdim\hsize=\textwidth% float*
- \m@mscapcheckregside
- \else
- \if@firstcolumn
- \scapmarglefttrue
- \else
- \scapmargleftfalse
- \fi
- \fi
- \else
- \m@mscapcheckregside
- \fi
- \m@mscapthisside}
-\newcommand*{\m@mscapcheckregside}{%
- \if@twoside
- \checkoddpage
- \ifnum\m@mscapmarg<\@ne% % left
- \scapmarglefttrue
- \else
- \ifnum\m@mscapmarg=\@ne% % right
- \scapmargleftfalse
- \else
- \ifnum\m@mscapmarg=\tw@% % outer
- \scapmarglefttrue
- \ifoddpage
- \scapmargleftfalse
- \fi
- \else% % inner
- \scapmargleftfalse
- \ifoddpage
- \scapmarglefttrue
- \fi
- \fi
- \fi
- \fi
- \else% oneside
- \scapmarglefttrue
- \ifnum\m@mscapmarg>\@ne
- \ifnum\m@mscapmarg<\thr@@
- \scapmargleftfalse
- \fi
- \fi
- \fi}
-
-\newcommand*{\overridescapmargin}[1]{%
- \def\@tempb{#1}\def\@tempa{left}%
- \ifx\@tempa\@tempb
- \def\m@mscapthisside{\scapmarglefttrue}%
- \else
- \def\@tempa{right}%
- \ifx\@tempa\@tempb
- \def\m@mscapthisside{\scapmargleftfalse}%
- \else
- \@memerror{Argument to \string\overridescapmargin\space neither
- left nor right}{\@ehc}%
- \def\m@mscapthisside{}%
- \fi
- \fi}
-\newcommand*{\m@mscapthisside}{}
-
-\newcommand*{\sidecontcaption}{%
- \@sidecontcaption}
-\def\@sidecontcaption#1{%
- \@ifnextchar [{\@@sidecontcaption{#1}}{\@@sidecontcaption{#1}[]}}
-\def\@@sidecontcaption#1[#2]{%
- \def\m@mscap@forcap{#1}%
- \ifx\@empty#2\@empty
- \def\m@mscaplabel{}%
- \else
- \def\m@mscaplabel{\@bsphack\label{#2}\@esphack}%
- \fi
- \m@mscapstart@fbox}
-
-\def\endsidecontcaption{%
- \m@mscapend@fbox
- \addtocounter{\@captype}{\m@ne}\refstepcounter\@captype
- \m@mscaplabel
- \begin{lrbox}{\m@mscap@capbox}%
- \begin{minipage}[c]{\sidecapwidth}%
- \sidecapstyle
- \@contcaption\@captype{\m@mscap@forcap}
- \end{minipage}%
- \end{lrbox}%
- \m@mscapopboxes}
-
-\newcommand*{\sidenamedlegend}{%
- \@ifnextchar [{\@sidenamedlegend}{\@sidenamedlegend[]}}
-\def\@sidenamedlegend[#1]#2{%
- \@@sidenamedlegend{#1}{#2}}
-\def\@@sidenamedlegend#1#2{%
- \ifx\@empty#1\@empty
- \def\m@mscap@fortoc{#2}%
- \else
- \def\m@mscap@fortoc{#1}%
- \fi
- \def\m@mscap@forcap{#2}%
- \def\m@mscaplabel{}%
- \m@mscapstart@fbox}
-
-\def\endsidenamedlegend{%
- \m@mscapend@fbox
- \begin{lrbox}{\m@mscap@capbox}%
- \begin{minipage}[c]{\sidecapwidth}%
- \sidecapstyle
- \@legend\@captype[\m@mscap@fortoc]{\m@mscap@forcap}
- \end{minipage}%
- \end{lrbox}%
- \m@mscapopboxes}
-
-\newcommand*{\sidelegend}{%
- \@@sidelegend}
-\def\@@sidelegend#1{%
- \def\m@mscap@forcap{#1}%
- \m@mscapstart@fbox}
-
-\def\endsidelegend{%
- \m@mscapend@fbox
- \begin{lrbox}{\m@mscap@capbox}%
- \begin{minipage}[c]{\sidecapwidth}%
- \sidecapstyle
- \legend{\m@mscap@forcap}
- \end{minipage}%
- \end{lrbox}%
- \m@mscapopboxes}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.2 (2005/11/21 and later)
-
-%%%%%%%%%%%%
-%%%%%%%%%%%% Extensions to \AtBeginDocument
-%%%%%%%%%%%%
-
-\renewcommand{\InputIfFileExists}[2]{%
- \IfFileExists{#1}%
- {#2\@addtofilelist{#1}\m@matbeginf{#1}%
- \@@input \@filef@und
- \m@matendf{#1}%
- \killm@matf{#1}}}
-
-\newcommand{\m@matbeginf}[1]{\@ifundefined{#1-m@mfb}{}%
- {\@nameuse{#1-m@mfb}}}
-\newcommand{\m@matendf}[1]{\@ifundefined{#1-m@mfe}{}%
- {\@nameuse{#1-m@mfe}}}
-
-\newcommand*{\killm@matf}[1]{%
- \@namelet{#1-m@mfb}\relax
- \@namelet{#1-m@mfe}\relax}
-
-\newcommand{\AtBeginFile}[2]{\@ifundefined{#1-m@mfb}%
- {\@namedef{#1-m@mfb}{#2}}%
- {\expandafter\addtodef\csname #1-m@mfb\endcsname{}{#2}}}
-\newcommand{\AtEndFile}[2]{\@ifundefined{#1-m@mfe}%
- {\@namedef{#1-m@mfe}{#2}}%
- {\expandafter\addtodef\csname #1-m@mfe\endcsname{}{#2}}}
-
-\newcommand{\AtBeginPackage}[2]{%
- \AtBeginFile{#1.\@pkgextension}{#2}}
-\newcommand{\AtEndPackage}[2]{%
- \AtEndFile{#1.\@pkgextension}{#2}}
-\newcommand{\RequireAtEndPackage}[2]{%
- \@ifpackageloaded{#1}{#2}%
- {\AtEndFile{#1.\@pkgextension}{#2}}}
-
-\newcommand{\AtBeginClass}[2]{%
- \AtBeginFile{#1.\@clsextension}{#2}}
-\newcommand{\AtEndClass}[2]{%
- \AtEndFile{#1.\@clsextension}{#2}}
-\newcommand{\RequireAtEndClass}[2]{%
- \@ifclassloaded{#1}{#2}%
- {\AtEndFile{#1.\@clsextension}{#2}}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.3 (2005/12/13 and later)
-
-%%% Replicate the appearance of a \section in the article class
-\makechapterstyle{reparticle}{%
- \setlength{\beforechapskip}{3.5ex \@plus 1ex \@minus .2ex}%
- \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}%
- \setlength{\afterchapskip}{2.3ex \@plus .2ex}%
- \renewcommand*{\printchaptername}{}%
- \renewcommand*{\chapternamenum}{}%
- \renewcommand*{\chaptitlefont}{\normalfont\Large\bfseries}%
- \renewcommand*{\chapnumfont}{\chaptitlefont}%
- \renewcommand*{\printchapternum}{\@hangfrom{\chapnumfont \thechapter\quad}}%
- \renewcommand*{\afterchapternum}{}}
-
-%%% \reparticle redefines the higher level division heads fonts and spacing
-%%% to replicate the article class (but \chapter must still be used).
-%%% Use, for example like: \ifartopt \reparticle \fi
-\newcommand*{\reparticle}{%
- \chapterstyle{reparticle}%
- \setsecheadstyle{\large\bfseries\raggedright}%
- \setsubsecheadstyle{\normalsize\bfseries\raggedright}%
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.4 (2006/01/06 and later)
-
-%%% \captiontitlefinal{<stuff>} will put <stuff> immediately at the
-%%% end of a \caption's title text and it will not appear in the
-%%% LoF/LoT/etc. For example: \captiontitlefinal{.}
-%%% (Code supplied by Frederic Connes)
-\newcommand*{\captiontitlefinal}[1]{\def\@contfinal{#1}}
-\captiontitlefinal{}
-
-\renewcommand{\@makecaption}[2]{\let\@memtempa\relax
- \ifdim\prevdepth>-99\p@ \vskip\abovecaptionskip
- \else \def\@memtempa{\vbox to\topskip{}}\fi
- \let\@contfnote\footnote \renewcommand{\footnote}[2][]{}%
- \let\@contfmark\footnotemark \renewcommand{\footnotemark}[1][]{}%
- \sbox\@tempboxa{\@contnfont #1\@contdelim \@conttfont #2\@contfinal}%
- \let\footnote\@contfnote
- \let\footnotemark\@contfmark
- \ifdim\wd\@tempboxa<\linewidth \centering\fi
- \if@contcw
- \centering
- \parbox{\@contcwidth}{%
- \ifdim\wd\@tempboxa<\@contcwidth \centering\fi
- \fi
- \if@conthang
- \sbox\@tempboxa{\@contnfont #1\@contdelim}%
- \@contpre%
- {\@contcstyle\hangindent=\wd\@tempboxa
- \noindent\box\@tempboxa\@memtempa \@conttfont #2\@contfinal\par}%
- \else
- \if@contindent
- \@contpre%
- {\@contnfont #1\@contdelim}\@memtempa
- {\@contcstyle\hangindent=\@contindw
- \hangafter=\@ne\@conttfont #2\@contfinal\par}% <- v1.4
- \else
- \@contpre%
- {\@contnfont #1\@contdelim}\@memtempa
- {\ifdim\wd\@tempboxa<\linewidth
- \@contcshortstyle\else \@contcstyle\fi% <- v1.4
- \@conttfont #2\@contfinal\par}%
- \fi
- \fi
- \@contpost
- \if@contcw
- \par
- }% end of the parbox
- \fi
- \vskip\belowcaptionskip}
-
-%%% Use the declaration \xindyindex if you will be using the xindy program
-%%% instead of MakeIndex to process index entries. As yet, xindy will not
-%%% hyperref any entries.
-%%% (Code supplied by Frederic Connes)
-\newif\ifm@mxindy
-\m@mxindyfalse
-\newcommand*{\xindyindex}{\m@mxindytrue}
-\def\@@wrspindexhyp#1|#2|#3\\{%
- \ifshowindexmark\@showidx{#1}\fi
- \ifx\\#2\\%
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}%
- \ifm@mxindy{#1}\else{#1|hyperspindexpage(\thepage)}\fi
- {\@nameuse{the\@sptheidx}}}%
- \else
- \def\Hy@temp@A{#2}%
- \ifx\Hy@temp@A\HyInd@ParenLeft
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}%
- \ifm@mxindy{#1|#2}\else{#1|#2hyperspindexpage(\thepage)}\fi
- {\@nameuse{the\@sptheidx}}}%
- \else
- \protected@write\@auxout{}%
- {\string\@@wrindexm@m{\@idxfile}{#1|#2}%
- {\@nameuse{the\@sptheidx}}}%
- \fi
- \fi
- \endgroup
- \@esphack}
-
-\renewenvironment{theindex}{%
- \clearforchapter% <- added
- \if@twocolumn
- \@restonecolfalse
- \else
- \@restonecoltrue
- \fi
- \ifonecolindex
- \onecolumn
- \chapter*{\indexname}
- \preindexhook
- \else
- \setlength{\columnseprule}{\indexrule}%
- \setlength{\columnsep}{\indexcolsep}%
- \twocolumn[\@makeschapterhead{\indexname}
- \preindexhook]%
- \fi
- \indexmark
- \ifnoindexintoc\else
- \phantomsection
- \addcontentsline{toc}{chapter}{\indexname}
- \fi
-%%% \thispagestyle{chapter}\parindent\z@ % <- changed in v4.6
- \thispagestyle{indextitlepagestyle}\parindent\z@
- \parskip\z@ \@plus .3\p@\relax
- \let\item\@idxitem}%
- {\if@restonecol\onecolumn\else\twocolumn\fi}
-
-%%% \ignorespaces fix by Aaron Rendahl to remove extraneous space
-%%% with \\>[0pt] ending a verse line
-\renewcommand*{\verselinebreak}[1][\z@]{\newline\hspace*{#1}\ignorespaces}
-
-%%% Use the \verselinenumbersleft declaration to set verse line numbers
-%%% at the left. To later return to the default of setting them at the right
-%%% use the \verselinenumbersright declaration.
-\newcommand*{\verselinenumbersright}{\def\@vstypelinenum{\@vslnumright}}
-\newcommand*{\verselinenumbersleft}{\def\@vstypelinenum{\@vslnumleft}}
-\verselinenumbersright
-
-\newcommand*{\@vslnumright}{%
- \hfill\rlap{\kern\rightskip\kern\rightmargin%
- \vlvnumfont\getthelinenumber{poemline}}}
-\newcommand*{\@vslnumleft}{%
- \hfill\rlap{\kern-\textwidth\kern-\rightskip%
- \vlvnumfont\getthelinenumber{poemline}}}
-\renewcommand*{\@vscentercr}{%
- \ifhmode \unskip\else \@nolnerr\fi
- \@vstypelinenum%
- \@vsifgt{\verselinebreak}{%
- \incr@vsline
- \par\@ifstar{\nobreak\@vsxcentercr}{%
- \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}}}}
-
-%%% Fix for wrapped verbatims in list environments.
-\newcommand*{\raggedwrap}{%
- \@rightskip\@flushglue
- \rightskip\@rightskip
- \leftskip\@totalleftmargin
- \parindent\ragrparindent}
-\renewcommand*{\wrappingon}{%
- \def\@xobeysp{~\discretionary{\verbatimbreakchar}%
- {\kern\verbatimindent}{}}%
- \def\wrapright{\raggedwrap}}
-
-%%% Use the \nopartblankpage declaration if you don't want a blank
-%%% page after a Part title page. The default is set by \partblankpage.
-\newif\ifm@mnopartnewpage
-\newcommand*{\partblankpage}{\m@mnopartnewpagefalse}
-\newcommand*{\nopartblankpage}{\m@mnopartnewpagetrue}
-
-\renewcommand*{\@endpart}{\afterpartskip
- \ifm@mnopartnewpage
- \else
- \if@twoside
- \if@openright
- \null
- \thispagestyle{afterpart}%
- \newpage
- \fi
- \fi
- \fi
- \if@tempswa
- \twocolumn
- \fi}
-
-\renewcommand{\partnumberline}[1]{%
- \hb@xt@\@tempdima{%
- \cftpartname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb\space}
-
-\aliaspagestyle{afterpart}{empty}
-\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.
-\newcommand*{\book}{%
- \@setupbook
- \secdef\@book\@sbook}
-
-\newcommand*{\bookmark}[1]{}
-\newcounter{book} \setcounter{book}{0}
-\renewcommand*{\thebook}{\Roman{book}}
-\newcommand*{\theHbook}{\arabic{book}}
-\newcommand*{\toclevel@book}{-2}
-
-\newcommand*{\beforebookskip}{\null\vfil}
-\newcommand*{\midbookskip}{\par \vskip 2\onelineskip}
-\newcommand*{\afterbookskip}{\vfil\newpage}
-
-\newcommand*{\@setupbook}{%
- \if@openright
- \cleardoublepage
- \else
- \clearpage
- \fi
- \thispagestyle{book}%
- \if@twocolumn
- \@tempswatrue
- \else
- \@tempswafalse
- \fi
- \beforebookskip}
-
-\newcommand*{\bookname}{Book}
-\newcommand*{\booknamefont}{\normalfont\huge\bfseries}
-\newcommand*{\booknumfont}{\normalfont\huge\bfseries}
-\newcommand*{\booktitlefont}{\normalfont\Huge\bfseries}
-
-\newcommand*{\printbookname}{\booknamefont \bookname}
-\newcommand*{\booknamenum}{\space}
-\newcommand*{\printbooknum}{\booknumfont \thebook}
-\newcommand{\printbooktitle}[1]{\booktitlefont #1}
-
-\newcommand{\membookinfo}[3]{}
-\newcommand{\membookstarinfo}[1]{}
-
-\long\def\@book[#1]#2{%
- \M@gettitle{#1}%
- \phantomsection
- \ifnum\c@secnumdepth > -3\relax
- \refstepcounter{book}%
- \addcontentsline{toc}{book}%
- {\protect\booknumberline{\thebook}#1}%
- \membookinfo{\thebook}{#1}{#2}%
- \else
- \addcontentsline{toc}{book}{#1}%
- \membookinfo{}{#1}{#2}%
- \fi
- \bookmark{#1}%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \ifnum \c@secnumdepth >-3\relax
- \printbookname \booknamenum \printbooknum
- \midbookskip
- \fi
- \printbooktitle{#2}\par}%
- \@endbook}
-
-\def\@sbook#1{%
- \M@gettitle{#1}%
- \phantomsection
- \membookstarinfo{#1}%
- {\centering
- \interlinepenalty \@M
- \normalfont
- \printbooktitle{#1}\par}%
- \@endbook}
-
-%%% Use the \nobookblankpage declaration if you don't want a blank
-%%% page after a Book title page. The default is set by \bookblankpage.
-\newif\ifm@mnobooknewpage
-\newcommand*{\bookblankpage}{\m@mnobooknewpagefalse}
-\newcommand*{\nobookblankpage}{\m@mnobooknewpagetrue}
-
-\newcommand*{\@endbook}{\afterbookskip
- \ifm@mnobooknewpage
- \else
- \if@twoside
- \if@openright
- \null
- \thispagestyle{afterbook}%
- \newpage
- \fi
- \fi
- \fi
- \if@tempswa
- \twocolumn
- \fi}
-
-\newcommand*{\cftbookname}{}
-\newcommand*{\cftbookbreak}{\addpenalty{-\@highpenalty}%
- \addvspace{\cftbeforebookskip}}
-\newcommand*{\l@book}[2]{%
- \ifnum\c@tocdepth >-3\relax
-%% \addpenalty{-\@highpenalty}%
- \cftbookbreak
-%% \addvspace{\cftbeforebookskip}%
- \begingroup
- {\leftskip \cftbookindent\relax
- \rightskip \@tocrmarg
- \parfillskip -\rightskip
- \parindent \cftbookindent\relax\@afterindenttrue
- \interlinepenalty\@M
- \leavevmode
- \settowidth{\@tempdima}{\cftbookfont\cftbookname}%
- \addtolength{\@tempdima}{\cftbooknumwidth}%
- \let\@cftbsnum \cftbookpresnum
- \let\@cftasnum \cftbookaftersnum
- \let\@cftasnumb \cftbookaftersnumb
- \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
- {\cftbookfont #1}%
- \cftbookfillnum{#2}}
- \nobreak
- \global\@nobreaktrue
- \everypar{\global\@nobreakfalse\everypar{}}%
- \endgroup
- \fi}
-\newcommand{\booknumberline}[1]{%
- \hb@xt@\@tempdima{%
- \cftbookname\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb\space}
-
-\newlength{\cftbeforebookskip}
- \setlength{\cftbeforebookskip}{2.25em \@plus\p@}
-\newdimen\cftbookindent
- \setlength{\cftbookindent}{0em}
-\newdimen\cftbooknumwidth
- \setlength{\cftbooknumwidth}{1.5em}
-\newcommand*{\cftbookfont}{\large\bfseries}
-\newcommand*{\cftbookpresnum}{}
-\newcommand*{\cftbookaftersnum}{}
-\newcommand*{\cftbookaftersnumb}{}
-\newcommand*{\cftbookleader}{%
- \large\bfseries\cftdotfill{\cftbookdotsep}}
-\newcommand*{\cftbookdotsep}{\cftnodots}
-\newcommand*{\cftbookpagefont}{\large\bfseries}
-\newcommand{\cftbookafterpnum}{}
-\newcommand{\cftbookfillnum}[1]{%
- {\cftbookleader}%
-%%%% {\hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}}%
- \cftbookformatpnum{#1}%
- \cftbookafterpnum\par}
-\newcommand{\cftbookformatpnum}[1]{%
- \hb@xt@\@pnumwidth{\hss {\cftbookpagefont #1}}}
-
-\renewcommand*{\@setclcnt}[2]{%
- \@tempswafalse
- \nametest{#1}{none}%
- \ifsamename
- \setcounter{#2}{-10}%
- \@tempswatrue
- \fi
- \nametest{#1}{book}%
- \ifsamename
- \setcounter{#2}{-2}%
- \@tempswatrue
- \fi
- \nametest{#1}{part}%
- \ifsamename
- \setcounter{#2}{-1}%
- \@tempswatrue
- \fi
- \nametest{#1}{chapter}%
- \ifsamename
- \setcounter{#2}{0}%
- \@tempswatrue
- \fi
- \nametest{#1}{section}%
- \ifsamename
- \setcounter{#2}{1}%
- \@tempswatrue
- \fi
- \nametest{#1}{subsection}%
- \ifsamename
- \setcounter{#2}{2}%
- \@tempswatrue
- \fi
- \nametest{#1}{subsubsection}%
- \ifsamename
- \setcounter{#2}{3}%
- \@tempswatrue
- \fi
- \nametest{#1}{paragraph}%
- \ifsamename
- \setcounter{#2}{4}%
- \@tempswatrue
- \fi
- \nametest{#1}{subparagraph}%
- \ifsamename
- \setcounter{#2}{5}%
- \@tempswatrue
- \fi
- \nametest{#1}{all}%
- \ifsamename
- \setcounter{#2}{50}%
- \@tempswatrue
- \fi
- \if@tempswa\else
- \@memerror{%
- Unknown document division name (#1)
- }{%
- I'll ignore it.
- Type \space <return> and I'll continue.\MessageBreak
- If you haven't mistyped the name then use
- \protect\setcounter\space instead.}%
- \fi}
-
-\renewcommand*{\settocdepth}[1]{%
- \@tempswafalse
- \nametest{#1}{none}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{-10}}%
- \@tempswatrue
- \fi
- \nametest{#1}{book}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{-2}}%
- \@tempswatrue
- \fi
- \nametest{#1}{part}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{-1}}%
- \@tempswatrue
- \fi
- \nametest{#1}{chapter}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{0}}%
- \@tempswatrue
- \fi
- \nametest{#1}{section}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{1}}%
- \@tempswatrue
- \fi
- \nametest{#1}{subsection}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{2}}%
- \@tempswatrue
- \fi
- \nametest{#1}{subsubsection}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{3}}%
- \@tempswatrue
- \fi
- \nametest{#1}{paragraph}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{4}}%
- \@tempswatrue
- \fi
- \nametest{#1}{subparagraph}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{5}}%
- \@tempswatrue
- \fi
- \nametest{#1}{all}%
- \ifsamename
- \addtocontents{toc}{\changetocdepth{50}}%
- \@tempswatrue
- \fi
- \if@tempswa
- \@ifundefined{toclevel@#1}{%
- \@memwarn{Unknown toclevel for #1}%
- }{%
- \setcounter{tocdepth}{\@nameuse{toclevel@#1}}%
- }
- \else
- \@memerror{%
- Unknown document division name (#1)
- }{%
- I'll ignore it.
- Type \space <return> and I'll continue.}%
- \fi}
-
-\newcommand*{\toclevel@none}{-10}
-\newcommand*{\toclevel@all}{50}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.5 (2006/02/11 and later)
-
-%%% \DisemulatePackage{pack} undoes a previous \EmulatedPackage{pack}.
-%%% For example \DisemulatePackage{index} if you need to use the index package.
-\providecommand*{\DisemulatePackage}[1]{%
- \@namelet{ver@#1.\@pkgextension}\relax}
-
-\renewcommand{\@nameedef}[1]{%
- \expandafter\protected@edef\csname #1\endcsname}
-
-%%% change timing of \@mainmattertrue in \@smemmain
-\renewcommand*{\@smemmain}{%
- \ifartopt
- \clearpage
- \else
- \cleardoublepage
- \counterwithin{figure}{chapter}%
- \counterwithin{table}{chapter}%
- \fi
- \@mainmattertrue
- \setcounter{secnumdepth}{\value{maxsecnumdepth}}}
-
-\renewcommand{\@footnotetext}[1]{%
- \reset@font\m@mold@footnotetext{#1}\m@mmf@prepare}
-
-\newif\ifm@mpn@new@chap
- \m@mpn@new@chapfalse
-\newif\ifm@mpn@new@schap
- \m@mpn@new@schapfalse
-
-%%% Fix for mistiming of \chaptermark with article option
-\def\@chapter[#1]#2{%
- \m@mpn@new@chaptrue
- \def\f@rbdy{#2}%
- \ifx\ch@pt@c\@empty % no optional args
- \def\f@rtoc{#2}%
- \def\f@rhdr{#2}%
- \else % at least one opt arg
- \let\f@rtoc\ch@pt@c
- \ifx\@empty#1\@empty
- \let\f@rhdr\ch@pt@c
- \else
- \def\f@rhdr{#1}%
- \fi
- \fi
- \m@m@Andfalse
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \m@m@Andtrue
- \fi
- \fi
- \ifm@m@And
- \refstepcounter{chapter}%
- \fi
- \ifartopt
- \@makechapterhead{#2}%
- \@afterheading
- \chaptermark{\f@rhdr}%
- \else
- \chaptermark{\f@rhdr}%
- \insertchapterspace
- \if@twocolumn
- \@topnewpage[\@makechapterhead{#2}]%
- \else
- \@makechapterhead{#2}%
- \fi
- \@afterheading
- \fi
- \ifm@m@And
- \ifanappendix
- \addcontentsline{toc}{appendix}{%
- \protect\chapternumberline{\thechapter}\f@rtoc}%
- \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
- \else
- \addcontentsline{toc}{chapter}{%
- \protect\chapternumberline{\thechapter}\f@rtoc}%
- \memchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
- \fi
- \else
- \addcontentsline{toc}{chapter}{\f@rtoc}%
- \ifanappendix
- \memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
- \else
- \memchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
- \fi
- \fi
- \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi}
-
-\renewcommand{\@schapter}[1]{%
- \m@mpn@new@schaptrue
- \def\f@rbdy{#1}%
- \ifartopt
- \@makeschapterhead{#1}%
- \else
- \if@twocolumn
- \@topnewpage[\@makeschapterhead{#1}]
- \else
- \@makeschapterhead{#1}%
- \fi
- \fi
- \@afterheading}
-\renewcommand{\@m@mschapter}[2][\@empty]{%
- \@schapter{#2}%
- \ifx \@empty#1
- \def\f@rhdr{#2}%
- \else
- \def\f@rhdr{#1}%
- \setcounter{secnumdepth}{-10}%
- \chaptermark{#1}%
- \setcounter{secnumdepth}{\value{maxsecnumdepth}}%
- \fi
- \ifanappendix
- \memappchapstarinfo{\f@rhdr}{#2}%
- \else
- \memchapstarinfo{\f@rhdr}{#2}%
- \fi
- \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{#2}\fi}
-
-%%%% Use \showtrimsoff and \showtrimson to switch trim marks off and on.
-%%%% If the showtrims option has not been used, these do nothing.
-\newcommand*{\showtrimsoff}{\showtrimsfalse}
-\newcommand*{\showtrimson}{\showtrimstrue}
-\renewcommand*{\mem@shipii}{%
- \ifvoid\@cclv
- \mem@oldshipout\box\@cclv
- \else
- \ifshowtrims
- \mem@oldshipout\vbox{\trimmarks\unvbox\@cclv}%
- \else
- \mem@oldshipout\box\@cclv
- \fi
- \fi}
-
-%%%% Fix to stop \sidepars moving up or down
-\long\def\@sidepar[#1]#2{\@bsphack\strut\vadjust{%
- \checkoddpage
- \ifsideparswitch
- \ifreversesidepar
- \ifoddpage
- \oddpagefalse
- \else
- \oddpagetrue
- \fi
- \fi
- \else
- \oddpagetrue
- \ifreversesidepar
- \oddpagefalse
- \fi
- \fi
- \rlap{\kern-\parindent
- \if@twocolumn
- \if@firstcolumn% put at left
- \kern -\marginparsep \kern -\marginparwidth
- \else% put at right
- \kern \columnwidth \kern \marginparsep
- \fi
- \else
- \ifoddpage% put at right
- \kern \textwidth \kern \marginparsep
- \else% put at left
- \kern -\marginparsep \kern -\marginparwidth
- \fi
- \fi
- \setbox0=\vtop to 0pt{%
- \begin{minipage}[t]{\marginparwidth}%
- \normalfont\normalsize
- \ifoddpage #2\else #1\fi%
- \end{minipage}%
- \vss}%
- \vtop to 0pt{\kern\sideparvshift% default should be 0pt
- \kern-\dp\strutbox
- \kern-\ht0
- \box0 \vss}}}%
- \@esphack}
-\setlength{\sideparvshift}{0pt}
-
-%%%% Ensure that fancybreaks close the paragraph they start
-\renewcommand{\@fbreak}[1]{\par
- \penalty -100
- \noindent\parbox{\linewidth}{\centering #1}%
- \par
- \@afterindentfalse
- \@afterheading}
-\renewcommand{\@sfbreak}[1]{\par
- \penalty -100
- \noindent\parbox{\linewidth}{\centering #1}%
- \par
- \@afterindenttrue
- \@afterheading}
-
-%%%% \begin{vplace}[<num>] vertically centered stuff \end{vplace}
-%%%% <num> adjusts above space wrt to below space
-\newenvironment{vplace}[1][1]{%
- \par\vspace*{\stretch{#1}}%
-}{%
- \vspace*{\stretch{1}}%
- \par}
-
-%%%%
-%%%% Include the functions of the pagenote package
-%%%%
-
-\newif\ifm@mpnpageopt
- \m@mpnpageoptfalse
-\newif\ifm@mpncontopt
- \m@mpncontoptfalse
-\newcommand*{\notepageref}{\m@mpnpageopttrue}
-\newcommand*{\continuousnotenums}{%
- \counterwithout{pagenote}{chapter}
- \renewcommand{\thepagenote}{\arabic{pagenote}}}
-
- \newcounter{pagenote}[chapter]
-\renewcommand{\thepagenote}{\arabic{pagenote}}
-\setcounter{pagenote}{0}
-\newif\ifmempagenotes
- \mempagenotesfalse
-
-\newcommand*{\makepagenote}{%
- \newwrite\@notefile
- \immediate\openout\@notefile=\jobname.ent
- \mempagenotestrue
- \def\pagenote{\@bsphack\begingroup
- \@sanitize
- \m@m@wrpnote}%
- \typeout{Writing note file \jobname.ent}%
- \let\makepagenote\@empty}
-
-\newcommand{\immediate@protected@write}[3]{%
- \begingroup
- #2%
- \let\protect\@unexpandable@protect
- \edef\reserved@a{\immediate\write#1{#3}}%
- \reserved@a
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi}
-
-\ifm@mpnpageopt
- \let\m@m@pnwrite\protected@write
-\else
- \let\m@m@pnwrite\immediate@protected@write
-\fi
-
-\newcommand*{\pnchap}{\f@rtoc}
-\newcommand*{\pnschap}{\f@rbdy}
-
-\newcommand{\m@m@wrpnote}[2][]{%
- \refstepcounter{pagenote}%
- \notenumintext{\thepagenote}%
- \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
- \addtonotes{\string\pagenotesubhead{\@chapapp}{}{\pnschap}}%
- \fi
- \m@m@pnwrite\@notefile{}
- {\string\noteentry{\thepagenote}{#1}{#2}{\thepage}}%
- \endgroup
- \@esphack}
-
-\def\pagenote{\@bsphack\begingroup \@sanitize\m@m@pagenote}
-\newcommand{\m@m@pagenote}[2][]{\endgroup\@esphack}
-
-\newcommand*{\pagetofootnote}{%
- \let\memsavepagenote\pagenote
- \renewcommand{\pagenote}[2][]{\footnote{##2}}}
-\newcommand*{\foottopagenote}{%
- \let\memsavefootnote\footnote
- \renewcommand*{\footnote}[2][]{\pagenote{##2}}}
-
-\newcommand{\addtonotes}[1]{%
- \ifmempagenotes
- \IfFileExists{\jobname.ent}{\m@m@pnwrite\@notefile{}{#1}}{\mempnofilewarn}%
-\fi}
-
-\newcommand{\notenumintext}[1]{%
- \textsuperscript{#1}}
-\newcommand{\notenuminnotes}[1]{%
- {\normalfont #1.}\space}
-\newcommand{\noteentry}[4]{%
- \prenoteinnotes
- \noteidinnotes{#1}{#2}\pageinnotes{#4}\noteinnotes{#3}%
- \postnoteinnotes}
-
-\newcommand{\idtextinnotes}[1]{%
- [#1]\space}
-\newcommand{\noteidinnotes}[2]{%
- \@ifmtarg{#2}{%
- \notenuminnotes{#1}}{\idtextinnotes{#2}}}
-\newcommand{\pageinnotes}[1]{%
- \ifm@mpnpageopt \printpageinnotes{#1}\fi}
-\newcommand*{\printpageinnotes}[1]{%
- (\pagerefname\ #1)\space}
-\newcommand{\noteinnotes}[1]{#1}
-
-\newcommand{\prenoteinnotes}{\par\noindent}
-\newcommand{\postnoteinnotes}{\par}
-
-\providecommand*{\notesname}{Notes}
-\newcommand*{\notedivision}{\chapter{\notesname}}
-
-\newcommand*{\printpagenotes}{\@ifstar{\@sprintpagenotes}{\@printpagenotes}}
-\newcommand*{\mempnofilewarn}{%
- \ClassWarning{memoir}{There is no .ent file}}
-
-\newcommand*{\@sprintpagenotes}{%
- \ifmempagenotes
- \notedivision
-\IfFileExists{\jobname.ent}{%
- \immediate\closeout\@notefile
- \input{\jobname.ent}%
- \immediate\openout\@notefile=\jobname.ent%
- }{%
- \mempnofilewarn
-}%
-\fi}
-
-\newcommand*{\@printpagenotes}{%
- \ifmempagenotes
- \notedivision
- \IfFileExists{\jobname.ent}{%
- \immediate\closeout\@notefile
- \input{\jobname.ent}%
- }{%
- \mempnofilewarn
- }
- \fi}
-
-\newcommand*{\pagenotesubhead}[3]{%
- \section*{#1 #2 #3}}
-
-\EmulatedPackage{pagenote}
-
-\newcommand*{\@cftn@me}{}
-\renewcommand*{\numberline}[1]{%
- \hb@xt@\@tempdima{\@cftn@me\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
-
-\renewcommand*{\newlistentry}[4][\@empty]{%
- \@ifundefined{c@#2}{% check & set the counter
- \ifx \@empty#1\relax
- \newcounter{#2}% % added the backslash 2007/01/22 per J{\o}rgen Larsen
- \else
- \newcounter{#2}[#1]%
- \expandafter\edef\csname the#2\endcsname{%
- \expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}}%
- \fi}{}
- \setcounter{#2}{0}
- \@namedef{l@#2}##1##2{%
- \ifnum \@nameuse{c@#3depth} > #4\relax
- \vskip \@nameuse{cftbefore#2skip}%
- {\leftskip \@nameuse{cft#2indent}\relax
- \rightskip \@tocrmarg
- \parfillskip -\rightskip
- \parindent \@nameuse{cft#2indent}\relax\@afterindenttrue
- \interlinepenalty\@M
- \leavevmode
- \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
-\expandafter\let\expandafter\@cftasnumb\csname cft#2aftersnumb\endcsname
-\expandafter\let\expandafter\@cftn@me\csname cft#2name\endcsname
- \advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip
- {\@nameuse{cft#2font}##1}\nobreak
- \@nameuse{cft#2fillnum}{##2}}
- \fi
- }% end of \l@#2
- \expandafter\newlength\csname cftbefore#2skip\endcsname
- \setlength{\@nameuse{cftbefore#2skip}}{\z@ \@plus .2\p@}
- \expandafter\newlength\csname cft#2indent\endcsname
- \expandafter\newlength\csname cft#2numwidth\endcsname
- \ifcase #4\relax% 0 (level 1)
- \setlength{\@nameuse{cft#2indent}}{0em}
- \setlength{\@nameuse{cft#2numwidth}}{2.3em}
- \or% 1 (level 2)
- \setlength{\@nameuse{cft#2indent}}{2.3em}
- \setlength{\@nameuse{cft#2numwidth}}{3.2em}
- \or% 2 (level 3)
- \setlength{\@nameuse{cft#2indent}}{5.5em}
- \setlength{\@nameuse{cft#2numwidth}}{4.1em}
- \or% 3 (level 4)
- \setlength{\@nameuse{cft#2indent}}{8.5em}
- \setlength{\@nameuse{cft#2numwidth}}{5.0em}
- \else% anything else
- \setlength{\@nameuse{cft#2indent}}{10.5em}
- \setlength{\@nameuse{cft#2numwidth}}{6.0em}
- \fi
- \@namedef{cft#2font}{\normalfont}
- \@namedef{cft#2name}{}
- \@namedef{cft#2presnum}{}
- \@namedef{cft#2aftersnum}{}
- \@namedef{cft#2aftersnumb}{}
- \@namedef{cft#2dotsep}{\cftdotsep}
- \@namedef{cft#2leader}{\normalfont\cftdotfill{\@nameuse{cft#2dotsep}}}
- \@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
- \@nameuse{cft#2formatpnum}{##1}%
- \@nameuse{cft#2afterpnum}\par}
-}% end of \newlistentry
-
-\let\cftbeforesectionskip\relax
-\let\cftsectionindent\relax
-\let\cftsectionnumwidth\relax
-\newlistentry[chapter]{section}{toc}{0}
- \cftsetindents{section}{1.5em}{2.3em}
-\let\cftbeforesubsectionskip\relax
-\let\cftsubsectionindent\relax
-\let\cftsubsectionnumwidth\relax
-\newlistentry[section]{subsection}{toc}{1}
- \cftsetindents{subsection}{3.8em}{3.2em}
-\let\cftbeforesubsubsectionskip\relax
-\let\cftsubsubsectionindent\relax
-\let\cftsubsubsectionnumwidth\relax
-\newlistentry[subsection]{subsubsection}{toc}{2}
- \cftsetindents{subsubsection}{7.0em}{4.1em}
-\let\cftbeforeparagraphskip\relax
-\let\cftparagraphindent\relax
-\let\cftparagraphnumwidth\relax
-\newlistentry[subsubsection]{paragraph}{toc}{3}
- \cftsetindents{paragraph}{10.0em}{5.0em}
-\let\cftbeforesubparagraphskip\relax
-\let\cftsubparagraphindent\relax
-\let\cftsubparagraphnumwidth\relax
-\newlistentry[paragraph]{subparagraph}{toc}{4}
- \cftsetindents{subparagraph}{12.0em}{6.0em}
-
-\let\cftbeforefigureskip\relax
-\let\cftfigureindent\relax
-\let\cftfigurenumwidth\relax
-\newlistentry[chapter]{figure}{lof}{0}
- \cftsetindents{figure}{0em}{2.3em}
-\let\cftbeforetableskip\relax
-\let\cfttableindent\relax
-\let\cfttablenumwidth\relax
-\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}}
-
-\newcommand*{\cftpartbreak}{\addpenalty{-\@highpenalty}%
- \addvspace{\cftbeforepartskip}}
-\renewcommand*{\l@part}[2]{%
- \ifnum\c@tocdepth >-2\relax
-%% \addpenalty{-\@highpenalty}%
- \cftpartbreak
-%% \addvspace{\cftbeforepartskip}%
- \begingroup
- {\leftskip \cftpartindent\relax
- \rightskip \@tocrmarg
- \parfillskip -\rightskip
- \parindent \cftpartindent\relax\@afterindenttrue
- \interlinepenalty\@M
- \leavevmode
- \settowidth{\@tempdima}{\cftpartfont\cftpartname}%
- \addtolength{\@tempdima}{\cftpartnumwidth}%
- \let\@cftbsnum \cftpartpresnum
- \let\@cftasnum \cftpartaftersnum
- \let\@cftasnumb \cftpartaftersnumb
- \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
- {\cftpartfont #1}%
- \cftpartfillnum{#2}}
- \nobreak
- \global\@nobreaktrue
- \everypar{\global\@nobreakfalse\everypar{}}%
- \endgroup
- \fi}
-
-\renewcommand*{\setrectanglesize}[3]{%
- \nametest{#1}{*}%
- \ifsamename % H = *
- \nametest{#2}{*}%
- \ifsamename % W = *
- \@memerror{%
- The combination of argument values is ambiguous.\MessageBreak
- The lengths will be set to zero}{\@ehd}
- \setlength{\@tempdima}{0pt}%
- \setlength{\@tempdimb}{0pt}%
- \else % W
- \nametest{#3}{*}%
- \ifsamename % r = *
- \setlength{\@tempdimb}{#2}%
- \setlength{\@tempdima}{\@tempdimb}%
- \else % r
- \setlength{\@tempdimb}{#2}
- \setlength{\@tempdima}{#3\@tempdimb}
- \fi
- \fi
- \else % H
- \nametest{#2}{*}%
- \ifsamename % W = *
- \nametest{#3}{*}%
- \ifsamename % r = *
- \setlength{\@tempdima}{#1}%
- \setlength{\@tempdimb}{\@tempdima}%
- \else % r
- \setlength{\@tempdima}{#1}%
- \setlength{\@tempdimb}{#3\@tempdima}%
- \fi
- \else % W
- \setlength{\@tempdima}{#1}%
- \setlength{\@tempdimb}{#2}%
- \fi
- \fi
-}
-
-\renewcommand*{\setfillsize}[5]{%
- \nametest{#2}{*}%
- \ifsamename % C = *
- \nametest{#3}{*}%
- \ifsamename % L = *
- \nametest{#4}{*}%
- \ifsamename % R = *
- \@memerror{%
- The combination of argument values is ambiguous.\MessageBreak
- The lengths will be set to zero}{\@ehd}
- \setlength{\@tempdima}{0pt}%
- \setlength{\@tempdimb}{0pt}%
- \setlength{\@tempdimc}{0pt}%
- \else % R
- \nametest{#5}{*}%
- \ifsamename % r = *
- \setlength{\@tempdimb}{#4}%
- \setlength{\@tempdima}{\@tempdimb}%
- \setlength{\@tempdimc}{#1}%
- \advance\@tempdimc -\@tempdima
- \advance\@tempdimc -\@tempdimb
- \else % r
- \setlength{\@tempdimb}{#4}%
- \setlength{\@tempdima}{#5\@tempdimb}%
- \setlength{\@tempdimc}{#1}%
- \advance\@tempdimc -\@tempdima
- \advance\@tempdimc -\@tempdimb
- \fi
- \fi
- \else % L
- \nametest{#4}{*}%
- \ifsamename % R = *
- \nametest{#5}{*}%
- \ifsamename % r = *
- \setlength{\@tempdima}{#3}%
- \setlength{\@tempdimb}{\@tempdima}%
- \setlength{\@tempdimc}{#1}%
- \advance\@tempdimc -\@tempdima
- \advance\@tempdimc -\@tempdimb
- \else % r
- \setlength{\@tempdima}{#3}%
- \setlength{\@tempdimb}{#5\@tempdima}%
- \setlength{\@tempdimc}{#1}%
- \advance\@tempdimc -\@tempdima
- \advance\@tempdimc -\@tempdimb
- \fi
- \else % R
- \setlength{\@tempdima}{#3}%
- \setlength{\@tempdimb}{#4}%
- \setlength{\@tempdimc}{#1}%
- \advance\@tempdimc -\@tempdima
- \advance\@tempdimc -\@tempdimb
- \fi
- \fi
- \else % C is valued
- \nametest{#3}{*}%
- \ifsamename % L = *
- \nametest{#4}{*}%
- \ifsamename % R = *
- \nametest{#5}{*}%
- \ifsamename % r = *
- \setlength{\@tempdimc}{#2}%
- \setlength{\@tempdima}{#1}%
- \advance\@tempdima -\@tempdimc
- \@tempdima = 0.5\@tempdima
- \@tempdimb = \@tempdima
- \else % r (CODE PERHAPS FIXED)
- \setlength{\@tempdimc}{#2}%
- \setlength{\@tempdimb}{#1}% % T
- \advance\@tempdimb -\@tempdimc % T - C
- \@tempdima = 1000sp
- \@tempdima = #5\@tempdima % 1000r sp
- \advance\@tempdima by 1000sp % 1000(1+r)sp
- \@tempcnta = \@tempdima % 1000(1+r)
- \@tempdima = \@tempdimb % T - C
- \divide\@tempdima by \@tempcnta % (T-C)/1000(1+r) pts
- \@tempdima = 1000\@tempdima % (T-C)/(1+r) pts = L
- \advance\@tempdimb by -\@tempdima % = R
- \fi
- \else % R
- \setlength{\@tempdimc}{#2}%
- \setlength{\@tempdimb}{#4}%
- \setlength{\@tempdima}{#1}%
- \advance\@tempdima -\@tempdimc
- \advance\@tempdima -\@tempdimb
- \fi
- \else % L
- \nametest{#4}{*}%
- \ifsamename % R = *
- \setlength{\@tempdimc}{#2}%
- \setlength{\@tempdima}{#3}%
- \setlength{\@tempdimb}{#1}%
- \advance\@tempdimb -\@tempdimc
- \advance\@tempdimb -\@tempdima
- \else % R
- \@memerror{%
- The combination of argument values is ambiguous.\MessageBreak
- The lengths will be set to zero}{\@ehd}%
- \setlength{\@tempdima}{0pt}%
- \setlength{\@tempdimb}{0pt}%
- \setlength{\@tempdimc}{#2}%
- \fi
- \fi
- \fi}
-
-\newcommand*{\m@mclassicht}{%
- \setlength{\@tempdima}{\textheight}%
- \divide\@tempdima \baselineskip
- \@tempcnta=\@tempdima
- \setlength{\textheight}{\@tempcnta\baselineskip}%
- \addtolength{\textheight}{\topskip}}
-
-\newcommand*{\m@mlinesht}{%
- \setlength{\@tempdima}{\textheight}%
- \advance\@tempdima -\baselineskip
- \divide\@tempdima \baselineskip
- \@tempcnta=\@tempdima
- \setlength{\textheight}{\@tempcnta\baselineskip}%
- \addtolength{\textheight}{\topskip}}
-
-\newcommand*{\m@mnearestht}{%
- \setlength{\@tempdima}{\textheight}%
- \advance\@tempdima -\topskip
- \advance\@tempdima 0.5\baselineskip
- \divide\@tempdima \baselineskip
- \@tempcnta=\@tempdima
- \setlength{\textheight}{\@tempcnta\baselineskip}%
- \addtolength{\textheight}{\topskip}}
-
-\renewcommand*{\checkthelayout}[1][classic]{%
- \@memnegtest{\trimedge}
- \@memnegtest{\trimtop}
- \@memznegtest{\stockwidth}
- \@memznegtest{\paperwidth}
- \@memznegtest{\textwidth}
-%%% \@memznegtest{\spinemargin}
- \@memnegtest{\spinemargin}
-%%% \@memznegtest{\foremargin}
- \@memnegtest{\foremargin}
- \@memznegtest{\marginparsep}
- \@memznegtest{\marginparwidth}
- \@memznegtest{\stockheight}
- \@memznegtest{\paperheight}
- \@memznegtest{\textheight}
-%%% \@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
- \else
- \nametest{#1}{lines}%
- \ifsamename
- \m@mlinesht
- \else
- \nametest{#1}{nearest}%
- \ifsamename
- \m@mnearestht
- \else
- \nametest{#1}{fixed}
- \ifsamename
- \else% not classic, lines, nearest, or fixed
- \@memerror{Optional argument is not one of:\MessageBreak
- classic, fixed, lines, or nearest. \MessageBreak
- I will assume the default}%
- {\@ehc}%
- \fi
- \fi
- \fi
- \fi
- \setulmargins{\uppermargin}{*}{*}
- \@tempdimb = -1pt
- \@tempdima=\stockwidth
- \advance\@tempdima -\trimedge
- \advance\@tempdima -\paperwidth
- \ifdim\@tempdima<\@tempdimb
- \@tempdima = -\@tempdima
- \@memerror{\protect\paperwidth\space and/or
- \protect\trimedge\space
- are too large for \protect\stockwidth\space
- by \the\@tempdima}%
- {\@ehd}
- \fi
- \@tempdima = \paperwidth
- \advance\@tempdima -\foremargin
- \advance\@tempdima -\textwidth
- \advance\@tempdima -\spinemargin
- \ifdim\@tempdima<\@tempdimb
- \@tempdima = -\@tempdima
- \@memerror{\protect\spinemargin\space and/or
- \protect\textwidth\space and/or
- \protect\foremargin\space
- are too large for \protect\paperwidth\space
- by \the\@tempdima}%
- {\@ehd}
- \fi
- \@tempdima = \stockheight
- \advance\@tempdima -\trimtop
- \advance\@tempdima -\paperheight
- \ifdim\@tempdima<\@tempdimb
- \@tempdima = -\@tempdima
- \@memerror{\protect\paperheight\space and/or
- \protect\trimtop\space
- are too large for \protect\stockheight\space
- by \the\@tempdima}%
- {\@ehd}
- \fi
- \@tempdima = \paperheight
- \advance\@tempdima -\uppermargin
- \advance\@tempdima -\textheight
- \advance\@tempdima -\lowermargin
- \ifdim\@tempdima<\@tempdimb
- \@tempdima = -\@tempdima
- \@memerror{\protect\uppermargin\space and/or
- \protect\textheight\space and/or
- \protect\lowermargin\space
- are too large for \protect\paperheight\space
- by \the\@tempdima}%
- {\@ehd}
- \fi
- \@tempdima = \uppermargin
- \advance\@tempdima -\headheight
- \advance\@tempdima -\headsep
- \ifdim\@tempdima<\@tempdimb
- \@tempdima = -\@tempdima
- \@memerror{\protect\headheight\space and/or
- \protect\headsep\space
- are too large for \protect\uppermargin\space
- by \the\@tempdima}%
- {\@ehd}
- \fi
- \@tempdima = \lowermargin
- \advance\@tempdima -\footskip
- \ifdim\@tempdima<\z@
- \@tempdima = -\@tempdima
- \@memerror{\protect\footskip
- is too large for \protect\lowermargin\space
- by \the\@tempdima}%
- {\@ehd}
- \fi
-}
-\renewcommand*{\checkandfixthelayout}[1][classic]{%
- \checkthelayout[#1]%
- \fixthelayout
- \typeoutlayout}
-
-\newcommand*{\midsloppy}{%
- \tolerance 5000%
- \hbadness 4000%
- \emergencystretch 1.5em%
- \hfuzz .1\p@
- \vfuzz\hfuzz}
-\newenvironment{midsloppypar}{\par\midsloppy}{\par}
-
-\newdimen\everylistparindent
- \everylistparindent \z@
-\renewcommand*{\list}[2]{%
- \ifnum \@listdepth >5\relax
- \@toodeep
- \else
- \global\advance\@listdepth\@ne
- \fi
- \rightmargin\z@
- \listparindent\everylistparindent
- \itemindent\z@
- \csname @list\romannumeral\the\@listdepth\endcsname
- \def\@itemlabel{#1}%
- \let\makelabel\@mklab
- \@nmbrlistfalse
- #2\relax
- \@trivlist
- \parskip\parsep
- \parindent\listparindent
- \advance\linewidth -\rightmargin
- \advance\linewidth -\leftmargin
- \advance\@totalleftmargin \leftmargin
- \parshape \@ne \@totalleftmargin \linewidth
- \ignorespaces}
-
-\renewcommand*{\defaultlists}{%
- \setlength{\partopsep}{0.2\onelineskip \@plus 0.1\onelineskip
- \@minus 0.1\onelineskip}%
- \parsepi = 0.3333\onelineskip \@plus 0.1667\onelineskip \@minus \p@
- \itemsepi = \parsepi
- \topsepi = 0.6667\onelineskip \@plus 0.3333\onelineskip
- \@minus 0.2\onelineskip
- \parsepii = 0.1667\onelineskip \@plus \p@ \@minus \p@
- \topsepii = \parsepi
- \topsepiii = \parsepii
- \everylistparindent \listparindent}
-\defaultlists
-
-\newcommand*{\firmlists}{%
- \@ifstar{\m@msfirmlists}{\m@mfirmlists}}
-
-\newcommand*{\m@msfirmlists}{
- \setlength{\partopsep}{\z@ \@plus \p@ \@minus \p@}%
- \parsepi = 0.1667\onelineskip \@plus 0.0833\onelineskip \@minus \p@
- \itemsepi = \parsepi
- \topsepi = \parsepi
- \parsepii = 0.0833\onelineskip \@plus \p@ \@minus \p@
- \topsepii = \parsepi
- \topsepiii = \parsepii
- \everylistparindent\listparindent}
-
-\newcommand*{\m@mfirmlists}{
- \setlength{\partopsep}{0.1\onelineskip \@plus 0.05\onelineskip
- \@minus 0.05\onelineskip}%
- \parsepi = 0.1667\onelineskip \@plus 0.0833\onelineskip \@minus \p@
- \itemsepi = \parsepi
- \topsepi = \parsepi
- \parsepii = 0.0833\onelineskip \@plus \p@ \@minus \p@
- \topsepii = \parsepi
- \topsepiii = \parsepii
- \everylistparindent\listparindent}
-
-\renewcommand*{\tightlists}{%
- \@ifstar{\m@mstightlists}{\m@mtightlists}}
-
-\newcommand*{\m@mstightlists}{%
- \setlength{\partopsep}{\z@ \@plus \p@ \@minus \p@}%
- \parsepi = \z@ \@plus \p@ \@minus \p@
- \itemsepi = \parsepi
- \topsepi = \z@ \@plus \p@ \@minus \p@
- \parsepii = \z@ \@plus \p@ \@minus \p@
- \topsepii = \parsepi
- \topsepiii = \parsepii
- \everylistparindent\parindent}
-
-\newcommand*{\m@mtightlists}{%
- \setlength{\partopsep}{0.5\onelineskip \@plus \p@ \@minus \p@}%
- \parsepi = \z@ \@plus \p@ \@minus \p@
- \itemsepi = \parsepi
- \topsepi = \z@ \@plus \p@ \@minus \p@
- \parsepii = \z@ \@plus \p@ \@minus \p@
- \topsepii = \parsepi
- \topsepiii = \parsepii
- \everylistparindent\parindent}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.6 (2006/11/22 and later)
-
-\EmulatedPackage{setspace}
-
-\newcommand{\setSpacing}[1]{%
- \def\baselinestretch{#1}%
- \@currsize}
-
-\newcommand*{\setSingleSpace}[1]{%
- \def\m@m@singlespace{#1}}
-\setSingleSpace{1}
-
-%%% start single spacing
-\newcommand*{\SingleSpacing}{%
- \setSpacing{\m@m@singlespace}%
- \vskip\baselineskip% correction for coming into single spacing
-}
-\SingleSpacing
-
-%%% start `one and a half spacing', the elegant version of double spacing.
-\newcommand*{\OnehalfSpacing}{
- \setSpacing{1.25}% default (10pt)
- \ifcase \@ptsize \relax % 10pt
- \setSpacing{1.25}%
- \or% 11pt
- \setSpacing{1.213}%
- \or% 12pt
- \setSpacing{1.241}%
- \or\or% 14pt
- \setSpacing{1.20}%
- \or\or\or% 17pt
- \setSpacing{1.16}%
- \or\or% 9pt
- \setSpacing{1.35}%
- \fi}
-
-%%% start double spacing, which looks terrible.
-\newcommand*{\DoubleSpacing}{
- \setSpacing{1.667}% default (10pt)
- \ifcase \@ptsize \relax % 10pt
- \setSpacing{1.667}%
- \or% 11pt
- \setSpacing{1.618}%
- \or% 12pt
- \setSpacing{1.655}%
- \or\or% 14pt
- \setSpacing{1.60}%
- \or\or\or% 17pt
- \setSpacing{1.545}%
- \or\or% 9pt
- \setSpacing{1.8}%
- \fi}
-
-\renewcommand*{\@setsize}[4]{%
- \@nomath#1%
- \let\@currsize#1%
- \baselineskip #2%
- \baselineskip \baselinestretch\baselineskip
- \parskip \baselinestretch\parskip
- \setbox\strutbox \hbox{%
- \vrule height.7\baselineskip
- depth .3\baselineskip
- width \z@}%
- \skip\footins \baselinestretch\skip\footins
- \normalbaselineskip\baselineskip#3#4}
-
-%%% Environment form of \SingleSpacing.
-\newenvironment{SingleSpace}{%
- \vskip\baselineskip
- \setSpacing{\m@m@singlespace}%
- \vskip -\baselineskip
-}{\par}
-
-\newenvironment{SingleSpace*}{%
- \setSpacing{\m@m@singlespace}%
- \vskip 0.5\baselineskip
-}{\vskip -0.5\baselineskip}
-
-\newcommand*{\m@mrestore@spacing}{%
- \par
- \vskip \parskip
- \vskip \baselineskip
- \endgroup
- \vskip -\parskip
- \vskip -\baselineskip}
-
-%%% \begin{Spacing}{num} baselineskip is increased to num*baselineskip.
-\newenvironment{Spacing}[1]{%
- \par
- \begingroup
- \setSpacing{#1}}{\m@mrestore@spacing}
-
-%%% Environment form of \OnehalfSpacing
-\newenvironment{OnehalfSpace}{%
- \begingroup
- \OnehalfSpacing}{\m@mrestore@spacing}
-
-%%% Environment form of \DoubleSpacing
-\newenvironment{DoubleSpace}{%
- \begingroup
- \DoubleSpacing}{\m@mrestore@spacing}
-
-%%% \setDisplayskipStretch{num} changes space around displays by the factor
-%%% (1+num).
-%%% \noDisplayskipStretch keeps the regular space around displays.
-\newcommand*{\memdskipstretch}{0.0}
-\newcommand*{\setDisplayskipStretch}[1]{%
- \renewcommand*{\memdskipstretch}{#1}}
-\newcommand*{\noDisplayskipStretch}{\setDisplayskipStretch{0.0}}
-
-\newcommand*{\memdskips}{%
- \advance\abovedisplayskip \memdskipstretch\abovedisplayskip
- \advance\belowdisplayskip \memdskipstretch\belowdisplayskip
- \advance\abovedisplayshortskip \memdskipstretch\abovedisplayshortskip
- \advance\belowdisplayshortskip \memdskipstretch\belowdisplayshortskip
-}
-
-\everydisplay\expandafter{%
- \the\everydisplay
- \memdskips}
-
-\let\m@m@xfloat\@xfloat
-\def\@xfloat #1[#2]{%
- \m@m@xfloat #1[#2]%
- \def\baselinestretch{\m@m@singlespace}%
- \normalsize}
-
-\newdimen\memPD
-%%% vminipage is like minipage but with better fore and aft spacing.
-\newenvironment{vminipage}{%
- \par
- \@ifnextchar[%]
- \@ivminipage
- {\@iiiminipage t\relax[s]}
-}{%
- \par\global\memPD=\prevdepth
- \endminipage
- \par
- \kern-\memPD% no pagebreak allowed here
- \hbox{\vrule depth \memPD width \z@}}
-
- \def\@ivminipage[#1]{%
- \@ifnextchar[%]
- {\@iiminipage{t}}{\@iiiminipage{t}\relax[s]}}
-%%% Ensure single spacing in footnotes
-%%%
-
-\renewcommand{\@footnotetext}[1]{%
- \insert\footins{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \@preamfntext
- \hsize\columnwidth
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
- \@finalstrut\strutbox}%
- \color@endgroup}\m@mmf@prepare}
-
-\renewcommand{\@mpfootnotetext}[1]{%
- \global\setbox\@mpfootins\vbox{%
- \unvbox \@mpfootins
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@makefntext{%
- \rule\z@\footnotesep\ignorespaces{\foottextfont #1}
- \@finalstrut\strutbox}%
- \color@endgroup}\m@mmf@prepare}
-
-\let\m@mold@footnotetext\@footnotetext
-\let\m@mold@mpfootnotetext\@mpfootnotetext
-
-\renewcommand{\plainfootnotes}{%
- \let\@footnotetext\m@mold@footnotetext
- \let\@mpfootnotetext\m@mold@mpfootnotetext}
-
-\renewcommand{\m@make@footnotetext}[1]{%
- \@namelongdef{@footnotetext#1}##1{%
- \insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \@preamfntext
- \hsize\columnwidth
- \protected@edef\@currentlabel{%
- \csname p@footnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \color@begingroup
- \@nameuse{@makefntext#1}{%
- \rule\z@\footnotesep\ignorespaces{\@nameuse{foottextfont#1} ##1}%
- \@finalstrut\strutbox}%
- \color@endgroup}\m@mmf@prepare}}
-
-\renewcommand{\m@make@mpfootnotetext}[1]{%
- \@namelongdef{@mpfootnotetext#1}##1{%
- \global\setbox\@nameuse{@mpfootins#1}\vbox{%
- \unvbox \@nameuse{@mpfootins#1}%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \color@begingroup
- \@nameuse{@makefntext#1}{%
- \rule\z@\footnotesep\ignorespaces{\@nameuse{foottextfont#1} ##1}
- \@finalstrut\strutbox}%
- \color@endgroup}\m@mmf@prepare}}
-
-\renewcommand{\@twocolfootnotetext}[1]{%
- \insert\footinsv@r{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \@preamfntext
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@twocolfootfmt{#1}%
- \color@endgroup}\m@mmf@prepare}
-
-\renewcommand{\@mptwocolfootnotetext}[1]{%
- \global\setbox\@mpfootinsv@r\vbox{%
- \unvbox \@mpfootinsv@r
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@twocolfootfmt{#1}%
- \color@endgroup}\m@mmf@prepare}
-
-\renewcommand{\m@make@twocolfootnotetext}[1]{%
- \@namelongdef{@twocolfootnotetext#1}##1{%
- \insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \@preamfntext
- \protected@edef\@currentlabel{%
- \csname p@footnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \color@begingroup
- \@nameuse{@twocolfootfmt#1}{##1}
- \color@endgroup}\m@mmf@prepare}}
-
-\renewcommand{\m@make@mptwocolfootnotetext}[1]{%
- \@namelongdef{@mptwocolfootnotetext#1}##1{%
- \global\setbox\@nameuse{@mpfootins#1}\vbox{%
- \unvbox \@nameuse{@mpfootins#1}%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \color@begingroup
- \@nameuse{@twocolfootfmt#1}{##1}%
- \color@endgroup}\m@mmf@prepare}}
-
-\renewcommand{\@threecolfootnotetext}[1]{%
- \insert\footinsv@r{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \@preamfntext
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@threecolfootfmt{#1}%
- \color@endgroup}\m@mmf@prepare}
-
-\renewcommand{\@mpthreecolfootnotetext}[1]{%
- \global\setbox\@mpfootinsv@r\vbox{%
- \unvbox \@mpfootinsv@r
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote\endcsname\@thefnmark
- }%
- \color@begingroup
- \@threecolfootfmt{#1}%
- \color@endgroup}\m@mmf@prepare}
-
-\renewcommand{\m@make@threecolfootnotetext}[1]{%
- \@namelongdef{@threecolfootnotetext#1}##1{%
- \insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \@preamfntext
- \protected@edef\@currentlabel{%
- \csname p@footnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \color@begingroup
- \@nameuse{@threecolfootfmt#1}{##1}
- \color@endgroup}\m@mmf@prepare}}
-
-\renewcommand{\m@make@mpthreecolfootnotetext}[1]{%
- \@namelongdef{@mpthreecolfootnotetext#1}##1{%
- \global\setbox\@nameuse{@mpfootins#1}\vbox{%
- \unvbox \@nameuse{@mpfootins#1}%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \color@begingroup
- \@nameuse{@threecolfootfmt#1}{##1}%
- \color@endgroup}\m@mmf@prepare}}
-
-\renewcommand{\@parafootnotetext}[1]{%
- \insert\footinsv@r{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \@preamfntext
- \protected@edef\@currentlabel{%
- \csname p@footnote\endcsname\@thefnmark
- }%
- \setbox0=\vbox{\hsize=\maxdimen
- \color@begingroup
- \noindent \@parafootfmt{#1}%
- \color@endgroup}\m@mungebox}%
- \m@mmf@prepare}
-
-\renewcommand{\@mpparafootnotetext}[1]{%
- \global\setbox\@mpfootinsv@r\vbox{%
- \unvbox \@mpfootinsv@r
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\foottextfont
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote\endcsname\@thefnmark
- }%
- \setbox0=\vbox{\hsize=\maxdimen
- \color@begingroup
- \noindent \@parafootfmt{#1}%
- \color@endgroup}\m@mungebox}%
- \m@mmf@prepare}
-
-\renewcommand{\m@make@parafootnotetext}[1]{%
- \@namelongdef{@parafootnotetext#1}##1{%
- \insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \@preamfntext
- \protected@edef\@currentlabel{%
- \csname p@footnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \setbox0=\vbox{\hsize=\maxdimen
- \color@begingroup
- \noindent \@nameuse{@parafootfmt#1}{##1}
- \color@endgroup}\m@mungebox}\m@mmf@prepare}}
-
-\renewcommand{\m@make@mpparafootnotetext}[1]{%
- \@namelongdef{@mpparafootnotetext#1}##1{%
- \global\setbox\@nameuse{@mpfootins#1}\vbox{%
- \unvbox \@nameuse{@mpfootins#1}%
- \def\baselinestretch{\m@m@singlespace}
- \reset@font\@nameuse{foottextfont#1}%
- \hsize\columnwidth
- \@parboxrestore
- \protected@edef\@currentlabel{%
- \csname p@mpfootnote#1\endcsname\@nameuse{@thefnmark#1}%
- }%
- \setbox0=\vbox{\hsize=\maxdimen
- \color@begingroup
- \noindent \@nameuse{@parafootfmt#1}{##1}%
- \color@endgroup}\m@mungebox}\m@mmf@prepare}}
-
-\EmulatedPackage{parskip}
-
-\newif\ifm@mnzpskip
-%%% \traditionalparskip set \parskip to 0pt.
-\newcommand*{\traditionalparskip}{%
- \parskip \z@
- \m@mnzpskipfalse}
-\newskip\m@mabparskip
-%%% \abnormalparskip{length} sets \parskip to length.
-\newcommand*{\abnormalparskip}[1]{%
- \setlength{\parskip}{#1}\m@mabparskip=#1\relax
- \m@mnzpskiptrue}
-%%% \nonzeroparskip sets \parskip to a non-zero value that might be
-%%% not too bad (any non-zero \parskip is not good).
-\newcommand*{\nonzeroparskip}{\abnormalparskip{%
- 0.5\baselineskip
- \@plus .1\baselineskip \@minus .1\baselineskip% NTG
-%% 0.5/baselineskip \@plus 2pt% RF
-}}
-\traditionalparskip
-
-%%% Change lists to cater for non-zero \parskip.
-\newlength{\itemsepii}
-\newlength{\itemsepiii}
-\newlength{\partopsepiii}
-%%%\newskip\parsepiii
-\let\m@mold@defaultlists\defaultlists
-\renewcommand*{\defaultlists}{%
- \m@mold@defaultlists
- \itemsepii\parsepii
- \itemsepiii\topsepiii
- \partopsepiii \p@ \@plus\z@ \@minus\p@
- \ifm@mnzpskip
- \partopsep \p@ \@plus\z@ \@minus\p@
- \topsepi\z@
- \parsepi\parskip
- \itemsepi\z@
- \topsepii\z@
- \parsepii\parskip
- \itemsepii\z@
- \topsepiii\z@
-%% \parsepiii\parskip
- \itemsepiii\z@
- \fi}
-
-\let\m@mold@tightlists\tightlists
-\renewcommand*{\tightlists}{%
- \m@mold@tightlists
- \ifm@mnzpskip
- \partopsep \p@ \@plus\z@ \@minus\p@
- \topsepi\z@
- \parsepi\parskip
- \itemsepi\z@
- \topsepii\z@
- \parsepii\parskip
- \itemsepii\z@
- \topsepiii\z@
-%% \parsepiii\parskip
- \itemsepiii\z@
- \partopsepiii\partopsep
- \fi}
-
-\let\@listI\@listi
-\defaultlists
-\@listi
-
-\renewcommand*{\@listii}{%
- \leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
- \topsep\topsepii
- \parsep\parsepii
- \itemsep\itemsepii}
-\renewcommand*{\@listiii}{%
- \leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
- \topsep\topsepiii
- \parsep\z@
- \itemsep\itemsepiii
- \partopsep\partopsepiii}
-
-\providecommand*{\verbatim}{%
- \topsep=-0.5\parskip
- \@verbatim
- \frenchspacing\@vobeyspaces \@xverbatim}
-
-\providecommand*{\@minipagerestore}{%
- \parskip=.5\baselineskip \@plus .1\baselineskip \@minus .1\baselineskip}
-\renewcommand*{\@minipagerestore}{%
- \let\@verbfootnotetext\@verbmpfootnotetext% for \verbfootnotein a minipage
- \m@mdoextrafeetmini% footnotes in minipages
- \ifm@mnzpskip \parskip=\m@mabparskip\fi}
-
-%%% \setsidecaps{<sep>}{<width>} sets sidecaption lengths
-\newcommand*{\setsidecaps}[2]{%
- \setlength{\sidecapsep}{#1}\@memznegtest{\sidecapsep}%
- \setlength{\sidecapwidth}{#2}\@memznegtest{\sidecapwidth}}
-
-\newcommand*{\m@sideb@left}{%
- \@tempdimc \sidebarwidth
- \advance\@tempdimc\sidebarhsep
- \kern-\@tempdimc}
-\newcommand*{\m@sideb@right}{%
- \@tempdimc \columnwidth% or \hsize
- \advance\@tempdimc\sidebarhsep
- \kern\@tempdimc}
-
-\newlength{\sidebartopsep}
- \setlength{\sidebartopsep}{0pt}
-\renewcommand*{\sidebarfont}{}
-\renewcommand*{\setsidebarheight}[1]{%
- \setlength{\dimen\sideins}{#1}%
- \advance\dimen\sideins-\topskip
- \advance\dimen\sideins\ht\strutbox}
-
-%%% \setsidebars{hsep}{width}{vsep}{topsep}{font}{height}
-%%% A * argument means leave the setting as is.
-\newcommand*{\setsidebars}[6]{%
- \nametest{#1}{*}\ifsamename\else
- \setlength{\sidebarhsep}{#1}\@memznegtest{\sidebarhsep}%
- \fi
- \nametest{#2}{*}\ifsamename\else
- \setlength{\sidebarwidth}{#2}\@memznegtest{\sidebarwidth}%
- \fi
- \nametest{#3}{*}\ifsamename\else
- \setlength{\sidebarvsep}{#3}\@memnegtest{\sidebarvsep}%
- \fi
- \nametest{#4}{*}\ifsamename\else
- \setlength{\sidebartopsep}{#4}%
- \fi
- \nametest{#5}{*}\ifsamename\else
- \def\sidebarfont{#5}%
- \fi
- \nametest{#6}{*}\ifsamename\else
- \setsidebarheight{#6}%
- \ifdim\dimen\sideins>\z@\else
- \@memerror{\protect\sidebarheight\space is zero or negative}{\@ehd}%
- \fi
- \fi}
- \setsidebars{\marginparsep}% sidebarhsep
- {\marginparwidth}% sidebarwidth
- {\onelineskip}% sidebarvsep
- {0pt}% sidebartopsep
- {\normalsize\normalfont}% sidebarfont
- {\textheight}% sidebarheight
-
-\renewcommand{\sidecontents}{\hbox to \z@{%
- \if@twocolumn% %% put outside nearest column
- \if@firstcolumn% %% move to left
- \m@sideb@left
- \else% %% move to right
- \m@sideb@right
- \fi
- \else% %% put into foremargin?
- \ifsidebaroneside% %% move to right
- \m@sideb@right
- \else% %% pick the margin
- \ifcase\m@msidebar@margin% 0 to left
- \m@sideb@left
- \or% 1 to right
- \m@sideb@right
- \or% 2 to outer
- \ifodd\c@page% %% move to right
- \m@sideb@right
- \else% %% move to left
- \m@sideb@left
- \fi
- \or% 3 to inner
- \ifodd\c@page% %% move to left
- \m@sideb@left
- \else %% move to right
- \m@sideb@right
- \fi
- \fi
- \fi
- \fi
- \vtop to0pt{%
- \normalsize\normalfont\sidebarfont % select font so we know the strut size
- \vskip\topskip \vskip-\ht\strutbox
- \vskip\sidebartopsep % extra vertical shift
- \unvbox\sideins \vss}%
- \hss
-}}
-
-\renewcommand{\sidebar}[1]{%
- \insert\sideins{%
- \hsize\sidebarwidth
- \@parboxrestore
- \sidebarform \normalsize\normalfont\sidebarfont
- \splittopskip=\ht\strutbox
- \splitmaxdepth=\dp\strutbox % doesn't do anything useful
- \allowbreak
- \prevdepth=\dp\strutbox % supersedes a "top-strut"
- \vskip-\parskip
- #1%
- \ifvmode\else
- \unskip\@finalstrut\strutbox
- \fi\par
- \ifdim\prevdepth>\dp\strutbox \prevdepth=\dp\strutbox \fi
- \ifdim\prevdepth>99\p@
- \nobreak
- \vskip-\prevdepth
- \allowbreak
- \vskip\dp\strutbox
- \fi
- \vskip\sidebarvsep}}
-
-\renewcommand*{\typeoutlayout}{%
- \typeout{}
- \typeout{******************************************************}
- \typeout{Stock height and width:
- \the\stockheight\space by \the\stockwidth}
- \typeout{Top and edge trims:
- \the\trimtop\space and \the\trimedge}
- \typeout{Page height and width:
- \the\paperheight\space by \the\paperwidth}
- \typeout{Text height and width:
- \the\textheight\space by \the\textwidth}
- \typeout{Spine and edge margins:
- \the\spinemargin\space and \the\foremargin}
- \typeout{Upper and lower margins:
- \the\uppermargin\space and \the\lowermargin}
- \typeout{Headheight and headsep:
- \the\headheight\space and \the\headsep}
- \typeout{Footskip:
- \the\footskip}
- \typeout{Columnsep and columnseprule:
- \the\columnsep\space and \the\columnseprule}
- \typeout{Marginparsep and marginparwidth:
- \the\marginparsep\space and \the\marginparwidth}
- \typeout{Sidecapsep and sidecapwidth:
- \the\sidecapsep\space and \the\sidecapwidth}
- \typeout{Sidebarhsep and sidebarwidth:
- \the\sidebarhsep\space and \the\sidebarwidth}
- \typeout{Sidebarvsep and sidebartopsep:
- \the\sidebarvsep\space and \the\sidebartopsep}
- \typeout{Sidebarheight:
- \the\dimen\sideins}
- \typeout{******************************************************}
- \typeout{}}
-
-%%% user command to set the \footnoterule
-%%% \setfootnoterule[<fill>]{<uplift>}{<width>}{<thickness>}
-\newcommand*{\setfootnoterule}[4][]{%
- \def\footnoterule{\kern -#2\relax #1\relax
- \hrule width #3\relax
- \kern #2\kern-#4}}
-%%%% memoir's default setting is:
-\setfootnoterule{3pt}{0.4\columnwidth}{\normalrulethickness}
-%%%% to force footnotes to the bottom after a \raggedbottom
-%%%% \setfootnoterule[\vfill]{3pt}{0.4\columnwidth}{\normalrulethickness}
-
-%%% \sloppybottom allows an extra line on a page to save a widow.
-%%% You must increase the \topskip (by 60\% is reasonable) and this
-%%% will push the text lower on the page. Run \checkandfixthelayout
-%%% after the change. For example:
-%%% \setlength{\topskip}{1.6\topskip}
-%%% \checkandfixthelayout
-%%% \sloppybottom
-%%% ...
-\newcommand*{\sloppybottom}{%
- \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}}
-
-%%% \m@mcalchm calculates the time of day. (Code basis from TeX for the Impatient)
-\newcommand*{\m@mcalchm}{%
- \count0 = \time \divide \count0 by 60\relax
- \count2 = \count0\relax% the hour
- \count4 = \time \multiply\count0 by 60\relax
- \advance\count4 by -\count0\relax% the minute
- \ifnum\count4<10 \toks1 = {0}% make a leading zero
- \else \toks1 = {}%
- \fi}
-%%% punctuation, am and pm for \printtime
-\newcommand*{\hmpunct}{:}% hours minutes separator
-\newcommand*{\amname}{am}% ante meridiem
-\newcommand*{\pmname}{pm}% post meridiem
-
-%%% \printtime prints time per 24 hour clock
-%%% \printtime* prints time per 12 hour clock
-\newcommand*{\printtime}{%
- \@ifstar{\m@msprtime}{\m@mprtime}}
-\newcommand*{\m@mprtime}{\begingroup
- \m@mcalchm
- \number\count2\hmpunct\the\toks1 \number\count4
- \endgroup}
-\newcommand*{\m@msprtime}{\begingroup
- \m@mcalchm
- \def\@mpm{\pmname}%
- \ifnum\count2<1\relax% early in the morning
- \count2=12\relax
- \ifnum\count4>0\relax% not midnight
- \def\@mpm{\amname}%
- \fi
- \else
- \ifnum\time<721\relax% noon or earlier
- \def\@mpm{\amname}%
- \else
- \ifnum\time>779\relax% 1300 hrs or later
- \advance\count2 by -12\relax
- \fi
- \fi
- \fi
- \number\count2\hmpunct\the\toks1 \number\count4\ \@mpm
- \endgroup}
-
-%%% \quarkmarks generates trim marks in the style of Quark Xpress
-%%% (Code supplied by William Adams)
-%%%
-\newcommand*{\registrationColour}[1]{#1}
-\newcommand*{\quarkmarks}{%
-\renewcommand*{\tmarktl}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(-36,0){\line(1,0){24}}
- \put(0,12){\line(0,1){24}}
- \put(3,27){\ttfamily\fontsize{8bp}{10bp}\selectfont\jobname\ \
- \today\ \ \printtime\ \ Page \thepage}
- \end{picture}}}
-\renewcommand*{\tmarktm}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(-24,24){\line(1,0){48}}
- \put(0,12){\line(0,1){24}}
- \put(0,24){\oval(12,12)}
- \end{picture}}}
-\renewcommand*{\tmarktr}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(12,0){\line(1,0){24}}
- \put(0,12){\line(0,1){24}}
- \end{picture}}}
-\renewcommand*{\tmarkmr}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(12,0){\line(1,0){24}}
- \put(24,-24){\line(0,1){48}}
- \put(24,0){\oval(12,12)}
- \end{picture}}}
-\renewcommand*{\tmarkbr}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(12,0){\line(1,0){24}}
- \put(0,-36){\line(0,1){24}}
- \end{picture}}}
-\renewcommand*{\tmarkbm}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(-24,-24){\line(1,0){48}}
- \put(0,-36){\line(0,1){24}}
- \put(0,-24){\oval(12,12)}
- \end{picture}}}
-\renewcommand*{\tmarkbl}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(-36,0){\line(1,0){24}}
- \put(0,-36){\line(0,1){24}}
- \end{picture}}}
-\renewcommand*{\tmarkml}{\registrationColour{%
- \begin{picture}(0,0)
- \setlength{\unitlength}{1bp}\thicklines
- \put(-36,0){\line(1,0){24}}
- \put(-24,-24){\line(0,1){48}}
- \put(-24,0){\oval(12,12)}
- \end{picture}}}
-\renewcommand*{\trimmarks}{%
-%% \special{papersize=\the\stockwidth,\the\stockheight}
- {%
- \vbox to \z@{\vskip-1in \vskip\trimtop % top of logical page
- \hb@xt@\z@{\hskip-1in
- \ifodd\c@page
- \hskip\stockwidth \hskip-\trimedge \hskip-\paperwidth
- \else
- \if@twoside
- \hskip\trimedge % left of logical page
- \else
- \hskip\stockwidth \hsip-\trimedge \hskip-\paperwidth
- \fi
- \fi
- \vbox to \paperheight{%
- \let\protect\relax % <- v1.4 addition
- \hb@xt@\paperwidth{\tmarktl\hfil\tmarktm\hfil\tmarktr}%
- \vfil
- \hb@xt@\paperwidth{\tmarkml\hfil\tmarkmr}%
- \vfil
- \hb@xt@\paperwidth{\tmarkbl\hfil\tmarkbm\hfil\tmarkbr}}%
- \hss}%
- \vss}}%
-}}
-
-%%% Remove extraneous spaces from pagestyle code
-%%%
-\renewcommand*{\makepagestyle}[1]{%
- \@namedef{ps@#1}{%
- \@namedef{#1@evenhead}{%
- \@nameuse{#1evenhpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
- \vbox{\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedright\@nameuse{#1eheadl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
- \centering\@nameuse{#1eheadc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedleft\@nameuse{#1eheadr}\strut}}}%
- \@nameuse{#1headrule}}}\@nameuse{#1evenhpr}}%
- \@namedef{#1@oddhead}{%
- \@nameuse{#1oddhpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
- \vbox{\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedright\@nameuse{#1oheadl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
- \centering\@nameuse{#1oheadc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedleft\@nameuse{#1oheadr}\strut}}}%
- \@nameuse{#1headrule}}}\@nameuse{#1oddhpr}}%
- \@namedef{#1@evenfoot}{%
- \@nameuse{#1evenfpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
- \vbox{\@nameuse{#1footrule}\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedright\@nameuse{#1efootl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
- \centering\@nameuse{#1efootc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedleft\@nameuse{#1efootr}\strut}}}%
- }}\@nameuse{#1evenfpr}}%
- \@namedef{#1@oddfoot}{%
- \@nameuse{#1oddfpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
- \vbox{\@nameuse{#1footrule}\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedright\@nameuse{#1ofootl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
- \centering\@nameuse{#1ofootc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
- \raggedleft\@nameuse{#1ofootr}\strut}}}%
- }}\@nameuse{#1oddfpr}}%
- \def\@evenhead{\@nameuse{#1@evenhead}}%
- \def\@oddhead{\@nameuse{#1@oddhead}}%
- \def\@evenfoot{\@nameuse{#1@evenfoot}}%
- \def\@oddfoot{\@nameuse{#1@oddfoot}}%
- \@nameuse{#1pshook}%
- }%
- \makeevenhead{#1}{}{}{}%
- \makeoddhead{#1}{}{}{}%
- \makeevenfoot{#1}{}{}{}%
- \makeoddfoot{#1}{}{}{}%
- \makerunningwidth{#1}{\textwidth}%
- \makeheadposition{#1}{}{}{}{}%
- \makeheadrule{#1}{\textwidth}{0pt}%
- \makefootrule{#1}{\textwidth}{\footruleheight}{\footruleskip}%
- \makepsmarks{#1}{}%
-}
-
-\renewcommand*{\aliaspagestyle}[2]{%
- \@namedef{ps@#1}{\@nameuse{ps@#2}}}
-
-\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}}%
- \@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}%
- \@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}%
- \@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}%
- \@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}%
- \@namedef{#1headrule}{\@nameuse{#2headrule}}%
- \@namedef{#1footrule}{\@nameuse{#2footrule}}%
- \makepsmarks{#1}{\@nameuse{#2pshook}}%
-}
-
-\renewcommand*{\ifonlyfloats}[2]{\if@fcolmade #1\else #2\fi}
-
-\renewcommand*{\mergepagefloatstyle}[3]{%
- \@nameuse{ps@#3}\@nameuse{ps@#2}%
- \@namedef{ps@#1}{%
- \def\@evenhead{\ifonlyfloats{\@nameuse{#3@evenhead}}%
- {\@nameuse{#2@evenhead}}}%
- \def\@oddhead{\ifonlyfloats{\@nameuse{#3@oddhead}}%
- {\@nameuse{#2@oddhead}}}%
- \def\@evenfoot{\ifonlyfloats{\@nameuse{#3@evenfoot}}%
- {\@nameuse{#2@evenfoot}}}%
- \def\@oddfoot{\ifonlyfloats{\@nameuse{#3@oddfoot}}%
- {\@nameuse{#2@oddfoot}}}%
- \@namedef{#1pshook}{\@nameuse{#2pshook}}%
-}}
-\makepagestyle{empty}
-
-\makepagestyle{plain}
- \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
- \def\chaptermark##1{%
- \markboth{\memUChead{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \@chapapp\ \thechapter. \ %
- \fi
- \fi
- ##1}}{}}%
- \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{\memUChead{%
- \ifnum \c@secnumdepth > \z@
- \thesection. \ %
- \fi
- ##1}}}%
- }%
- \makeevenhead{headings}{\thepage}{}{\slshape\leftmark}
- \makeoddhead{headings}{\slshape\rightmark}{}{\thepage}
-\else
- \makepagestyle{headings}
- \makepsmarks{headings}{%
-%%% \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markright{\memUChead{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \@chapapp\ \thechapter. \ %
- \fi
- \fi
- ##1}}}%
- \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\chaptermark\@gobble
- \let\sectionmark\@gobble
- \def\tocmark{}%
- \def\lofmark{}%
- \def\lotmark{}%
- \def\bibmark{}%
- \def\indexmark{}%
- }
- \makeevenhead{myheadings}{\thepage}{}{\slshape\leftmark}
- \makeoddhead{myheadings}{\slshape\rightmark}{}{\thepage}
-
-\aliaspagestyle{chapter}{plain}
-\aliaspagestyle{part}{plain}
-\aliaspagestyle{cleared}{empty}
-
-\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
- \hbox{}\thispagestyle{cleared}%
- \newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
-
-\makepagestyle{ruled}
-\makeevenfoot{ruled}{\thepage}{}{}
-\makeoddfoot{ruled}{}{}{\thepage}
-\makeheadrule{ruled}{\textwidth}{\normalrulethickness}
-\renewcommand*{\@ruledmarks}{%
-%%% \let\@mkboth\markboth
- \def\chaptermark##1{%
- \markboth{%
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \thechapter. \ %
- \fi
- \fi
- ##1}{}}
- \def\sectionmark##1{\markright{##1}}%
- \def\tocmark{\markboth{\contentsname}{}}%
- \def\lofmark{\markboth{\listfigurename}{}}%
- \def\lotmark{\markboth{\listtablename}{}}%
- \def\bibmark{\markboth{\bibname}{}}%
- \def\indexmark{\markboth{\indexname}{}}%
-}
-\makepsmarks{ruled}{\@ruledmarks}
-\makeevenhead{ruled}{\scshape\leftmark}{}{}
-\makeoddhead{ruled}{}{}{\rightmark}
-
-\makepagestyle{Ruled}
-\makerunningwidth{Ruled}{1.1\textwidth}
-\makeheadposition{Ruled}{flushright}{flushleft}{flushright}{flushleft}
-\makeevenfoot{Ruled}{\thepage}{}{}
-\makeoddfoot{Ruled}{}{}{\thepage}
-\makeheadrule{Ruled}{1.1\textwidth}{\normalrulethickness}
-\makepsmarks{Ruled}{\@ruledmarks}
-\makeevenhead{Ruled}{\scshape\leftmark}{}{}
-\makeoddhead{Ruled}{}{}{\rightmark}
-
-%%%%\newlength{\headwidth} % don't use in the patch file
-
-\makepagestyle{companion}
-\setlength{\headwidth}{\textwidth}
- \addtolength{\headwidth}{\marginparsep}
- \addtolength{\headwidth}{\marginparwidth}
-\makerunningwidth{companion}{\headwidth}
-\makeheadrule{companion}{\headwidth}{\normalrulethickness}
-\makeheadposition{companion}{flushright}{flushleft}{}{}
-\makepsmarks{companion}{%
-%%% \let\@mkboth\markboth
- \def\chaptermark##1{\markboth{##1}{##1}} % left mark & right marks
- \def\sectionmark##1{\markright{%
- \ifnum \c@secnumdepth>\z@
- \thesection. \ %
- \fi
- ##1}}
- \def\tocmark{\markboth{\contentsname}{\contentsname}}%
- \def\lofmark{\markboth{\listfigurename}{\listfigurename}}%
- \def\lotmark{\markboth{\listtablename}{\listtablename}}%
- \def\bibmark{\markboth{\bibname}{\bibname}}%
- \def\indexmark{\markboth{\indexname}{\indexname}}%
-}
-\makeevenhead{companion}{\normalfont\bfseries\thepage}{}%
- {\normalfont\bfseries\leftmark}
-\makeoddhead{companion}{\normalfont\bfseries\rightmark}{}%
- {\normalfont\bfseries\thepage}
-
-%% \subsection{Theindex}
-\aliaspagestyle{indextitlepagestyle}{chapter}
-
-%%%%%%% Fix for inconsistent chapter styles and ToC, etc style.
-\renewcommand*{\newlistof}[3]{%
- \@namedef{ext@#2}{#2}
- \@ifundefined{c@#2depth}{\newcounter{#2depth}}{}
- \setcounter{#2depth}{1}
- \@namedef{#2mark}{\markboth{#3}{#3}}
- \@namedef{#1}{\@ifstar{\@nameuse{@star#2}}{\@nameuse{@plain#2}}}
- \@namedef{@star#2}{%
- \ensureonecol
- \par
- \begingroup
-%%%%%%% \parindent\z@ \parskip\cftparskip
- \@nameuse{@#2maketitle}
- \@starttoc{#2}%
- \endgroup
- \restorefromonecol}
- \@namedef{@plain#2}{%
- \ensureonecol
- \par
- \begingroup
-%%%%%%% \parindent\z@ \parskip\cftparskip
- \@nameuse{@#2maketitle}
- \phantomsection
- \addcontentsline{toc}{chapter}{#3}
-\parskip\cftparskip
- \@starttoc{#2}%
- \endgroup
- \restorefromonecol}
- \@namedef{@#2maketitle}{%
- \@nameuse{#2headstart}
- {\parindent\z@
-%%%%%%%% \parskip\cftparskip
- \interlinepenalty\@M
- \@nameuse{print#2nonum}%
- \@nameuse{print#2title}{#3}%
- \@nameuse{#2mark}%
- \thispagestyle{chapter}%
- \@nameuse{after#2title}
- }
- \@afterheading}
- \@namedef{#2headstart}{\chapterheadstart}
- \@namedef{after#2title}{\afterchaptertitle}
- \@namedef{print#2nonum}{\printchapternonum}
- \@namedef{print#2title}##1{\printchaptertitle{##1}}
-} % end \newlistof
-
-\renewcommand*{\@starttoc}[1]{%
- \begingroup\makeatletter
- \@input{\jobname.#1}%
- \if@filesw
- \AtEndDocument{%
- \expandafter\newwrite\csname tf@#1\endcsname
- \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
- }%
- \fi
- \@nobreakfalse
- \endgroup}
-
-\newlistof{tableofcontents}{toc}{\contentsname}
-\newlistof{listoffigures}{lof}{\listfigurename}
-\newlistof{listofables}{lot}{\listtablename}
-%%% remove subfigure support
-\renewcommand*{\@cftl@subfigtab}{}
-
-\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}}
-
-%% 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}{%
- \chapnamefont\centering\@chapapp}
- \renewcommand*{\printchapternum}{\chapnumfont \textit{\thechapter}}
- \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
- \renewcommand*{\printchaptertitle}[1]{%
- \hrule\vskip\onelineskip \centering \chaptitlefont\textbf{##1}\par}
- \renewcommand*{\afterchaptertitle}{\vskip\onelineskip \hrule\vskip
- \afterchapskip}
- \renewcommand*{\printchapternonum}{%
- \vphantom{\chapnumfont \textit{9}}\afterchapternum}}
-
-\makechapterstyle{bringhurst}{%
- \chapterstyle{default}
- \renewcommand*{\chapterheadstart}{}
- \renewcommand*{\printchaptername}{}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\printchapternum}{}
- \renewcommand*{\afterchapternum}{}
- \renewcommand*{\printchaptertitle}[1]{%
- \raggedright\Large\scshape\MakeLowercase{##1}}
- \renewcommand*{\afterchaptertitle}{%
- \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}
- \renewcommand*{\printchapternonum}{%
- \vphantom{\printchaptername \chapnumfont 1}
- \afterchapternum
- \vskip \onelineskip \vskip -\topskip}
- \renewcommand*{\chaptitlefont}{\Large\itshape}
- \renewcommand*{\printchaptertitle}[1]{%
- \hrule\vskip\onelineskip \centering\chaptitlefont ##1}}
-
-\makechapterstyle{culver}{%
- \chapterstyle{default}
- \chapterstyle{article}%
- \renewcommand*{\thechapter}{\Roman{chapter}}
- \renewcommand*{\printchapternum}{% center number/title
- \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}{}
- \renewcommand*{\chapnumfont}{\normalfont\large}
- \settoheight{\midchapskip}{\chapnumfont 1}
- \renewcommand*{\printchapternum}{\centering \chapnumfont
- \rule[0.5\midchapskip]{1em}{0.4pt} \thechapter\
- \rule[0.5\midchapskip]{1em}{0.4pt}}
- \renewcommand*{\afterchapternum}{\par\nobreak\vskip 0.5\onelineskip}
- \renewcommand*{\printchapternonum}{\centering
- \vphantom{\chapnumfont 1}\afterchapternum}
- \renewcommand*{\chaptitlefont}{\normalfont\Large}
- \renewcommand*{\printchaptertitle}[1]{\centering \chaptitlefont ##1}
- \setlength{\afterchapskip}{2.5\onelineskip}}
-
-\makechapterstyle{demo2}{%
- \chapterstyle{default}
- \renewcommand*{\printchaptername}{\centering}
- \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}{3\baselineskip}
- \renewcommand*{\printchapternonum}{%
- \vphantom{\chapnumfont One}
- \afterchapternum%
- \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}
- \renewcommand*{\chapterheadstart}{\begingroup
- \vspace*{\beforechapskip}%
- \begin{adjustwidth}{}{-\chapindent}%
- \hrulefill
- \smash{\rule{0.4pt}{15mm}}
- \end{adjustwidth}\endgroup}
- \renewcommand*{\printchaptername}{}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\printchapternum}{%
- \begin{adjustwidth}{}{-\chapindent}
- \hfill
- \raisebox{10mm}[0pt][0pt]{\chapnumfont \thechapter}%
- \hspace*{1em}
- \end{adjustwidth}\vspace*{-3.0\onelineskip}}
- \renewcommand*{\printchaptertitle}[1]{%
- \vskip\onelineskip
- \raggedleft {\chaptitlefont ##1}\par\nobreak}}
-
-%% 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}
- \renewcommand*{\printchaptertitle}[1]{\chaptitlefont ##1
- \\\mbox{}\rule[5pt]{\textwidth}{0.4pt}}}
-
-\makechapterstyle{lyhne}{% needs graphicx package
- \chapterstyle{default}
- \setlength{\beforechapskip}{1.5cm}
- \setlength{\afterchapskip}{1cm}
- \setlength{\midchapskip}{2cm}
- \renewcommand*{\chapnamefont}{\normalfont\normalsize\scshape\raggedleft}
- \renewcommand*{\chaptitlefont}{\normalfont\normalsize\bfseries\sffamily\raggedleft}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\printchapternum}{\makebox[0pt][l]{\hspace{0.2em}%
- \resizebox{!}{2ex}{\chapnamefont\bfseries\sffamily\thechapter}}}
- \renewcommand*{\afterchapternum}{\par\hspace{1.5cm}\hrule\vspace{0.2cm}}
- \renewcommand*{\printchapternonum}{\vphantom{\chapnamefont 1}\afterchapternum}
- \renewcommand*{\afterchaptertitle}{\vskip 0.2cm
- \hrule\vskip\afterchapskip}}
-
-%% posted to ctt, December 2003
-%%%% \usepackage{graphicx}
-\makechapterstyle{madsen}{%
- \chapterstyle{default}
- \renewcommand*{\chapnamefont}{%
- \normalfont\Large\scshape\raggedleft}
- \renewcommand*{\chaptitlefont}{%
- \normalfont\Huge\bfseries\sffamily\raggedleft}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\printchapternum}{%
- \makebox[0pt][l]{\hspace{0.4em}
- \resizebox{!}{4ex}{%
- \chapnamefont\bfseries\sffamily\thechapter}
- }%
- }%
- \renewcommand*{\afterchapternum}{%
- \par\hspace{1.5cm}\hrule\vskip\midchapskip}}
-
-\newcommand*{\colorchapnum}{}
-\newcommand*{\colorchaptitle}{}
-\makechapterstyle{pedersen}{%
- \chapterstyle{default}
- \setlength{\beforechapskip}{-20pt}
- \setlength{\afterchapskip}{10pt}
- \renewcommand*{\chapnamefont}{\normalfont\LARGE\itshape}
- \renewcommand*{\chapnumfont}{\normalfont\HUGE\itshape\colorchapnum}
- \renewcommand*{\chaptitlefont}{\normalfont\huge\itshape\colorchaptitle}
- \renewcommand*{\afterchapternum}{}
- \renewcommand*{\printchaptername}{}
- \setlength{\midchapskip}{20mm}% was \numberheight
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\printchapternum}{%
- \sidebar{\raisebox{0pt}[0pt][0pt]{\makebox[0pt][l]{%
- \resizebox{!}{\midchapskip}{\chapnumfont\thechapter}}}}}
- \renewcommand*{\printchaptertitle}[1]{\chaptitlefont ##1}
-}
-
-%% Thomas Dye's southall chapter style
-\makechapterstyle{southall}{%
- \chapterstyle{default}
- \setlength{\afterchapskip}{5\baselineskip}
- \setlength{\beforechapskip}{36pt}% \headindent
- \setlength{\midchapskip}{\textwidth}% \rightblock
- \addtolength{\midchapskip}{-\beforechapskip}
- \renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
- \renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
- \renewcommand*{\chapnumfont}{\chaptitlefont}
- \renewcommand*{\printchaptername}{}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\afterchapternum}{}
- \renewcommand*{\printchapternum}{%
- \begin{minipage}[t][\baselineskip][b]{\beforechapskip}
- {\vspace{0pt}\chapnumfont%%%\figureversion{lining}
- \thechapter}
- \end{minipage}}
- \renewcommand*{\printchaptertitle}[1]{%
- \hfill\begin{minipage}[t]{\midchapskip}
- {\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
- \renewcommand*{\afterchaptertitle}{%
- \par\vspace{\baselineskip}%
- \hrulefill \par\nobreak\noindent \vskip \afterchapskip}}
-
-\makechapterstyle{thatcher}{%
- \chapterstyle{default}
- \renewcommand*{\chapterheadstart}{}
- \renewcommand*{\printchaptername}{%
- \centerline{\chapnumfont{\@chapapp\ \thechapter}}}
- \renewcommand*{\chapternamenum}{}
- \renewcommand*{\chapnumfont}{\normalfont\scshape\MakeLowercase}
- \renewcommand*{\printchapternum}{}
- \renewcommand*{\afterchapternum}{%
- \par\centerline{\parbox{0.5in}{\hrulefill}}\par}
- \renewcommand*{\printchapternonum}{%
- \vphantom{\chapnumfont \@chapapp 1}\par
- \parbox{0.5in}{}\par}
- \renewcommand*{\chaptitlefont}{\normalfont\large}
- \renewcommand*{\printchaptertitle}[1]{%
- \centering \chaptitlefont\MakeUppercase{##1}}}
-
-%% A new chapter style, that suits well for trimmed documents.
-%% We are scaling the chapter number, which most DVI viewers
-%% 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}
- \renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
- \renewcommand*{\chapnumfont}{\normalfont\HUGE}
- \renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
- \renewcommand*{\printchaptername}{%
- \chapnamefont\MakeUppercase{\@chapapp}}
- \renewcommand*{\chapternamenum}{}
- \setlength{\beforechapskip}{18mm}% \numberheight
- \setlength{\midchapskip}{\paperwidth}% \barlength
- \addtolength{\midchapskip}{-\textwidth}
- \addtolength{\midchapskip}{-\spinemargin}
- \renewcommand*{\printchapternum}{%
- \makebox[0pt][l]{%
- \hspace{.8em}%
- \resizebox{!}{\beforechapskip}{\chapnumfont \thechapter}%
- \hspace{.8em}%
- \rule{\midchapskip}{\beforechapskip}%
- }%
- }%
- \makeoddfoot{plain}{}{}{\thepage}}
-
-\makechapterstyle{verville}{%
- \chapterstyle{default}
- \setlength{\beforechapskip}{0pt}
- \renewcommand*{\printchaptername}{}
- \renewcommand*{\printchapternum}{%
- \hrule \vskip 0.5\onelineskip
- \Huge \centering \thechapter.\ }
- \renewcommand*{\printchapternonum}{%
- \hrule \vskip 0.5\onelineskip
- \Huge \centering}
- \renewcommand*{\afterchapternum}{}
- \setlength{\midchapskip}{0pt}
- \renewcommand*{\printchaptertitle}[1]{%
- ##1 \par
- \vskip 0.5\onelineskip
- \hrule}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.7 (2006/12/23 and later)
-
-\renewcommand*{\flushleftright}{%
- \leftskip\z@ \rightskip\z@
- \parfillskip\@flushglue}
-\renewcommand*{\centerlastline}{%
- \parfillskip=\z@ plus 2fil
- \rightskip=\z@ plus -1fil
- \leftskip\@flushglue}
-
-\renewcommand{\@epitext}[1]{%
- \begin{minipage}{\epigraphwidth}\begin{\textflush} #1\par
- \ifdim\epigraphrule>\z@ \@epirule \else \vspace*{1ex}\fi
- \end{\textflush}\end{minipage}}
-\renewcommand{\@episource}[1]{%
- \begin{minipage}{\epigraphwidth}\begin{\sourceflush} #1\par
- \end{\sourceflush}\end{minipage}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%% Version 4.8 (2007/01/22 and later)
-
-%%%% \abscolnamefont and \abscoltextfont are the fonts when an abstract
-%%%% is like a section in a two column document.
-\newcommand*{\abscolnamefont}{\normalfont\Large\bfseries}
-\newcommand*{\abscoltextfont}{\normalfont}
-
-\absleftindent=\leftmargin
-\abs@leftindent=\leftmargin
-\absrightindent=\leftmargin
-
-\renewcommand*{\setup@bstract}{%
- \abs@leftindent=\absleftindent
- \if@twocolumn
- \if@bsonecol
- \else
- \abs@leftindent=\z@
- \absrightindent=\z@
- \renewcommand*{\abstractnamefont}{\abscolnamefont}
- \renewcommand*{\abstracttextfont}{\abscoltextfont}
- \renewcommand*{\absnamepos}{flushleft}
- \setlength{\abstitleskip}{-2ex}
- \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
-\@ifundefined{XeTeXrevision}{\xetexfalse}{\xetextrue}
-\def\RequireXeTeX{%
- \ifxetex\else
- \@memerror{XeTeX is required to process this document}%
- {Try again with xelatex, not (pdf)latex.\MessageBreak
- Or try removing any XeTeX package(s).}
- \fi}
-\EmulatedPackage{ifxetex}
-
-\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{#2\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
%%