summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/memoir
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-01-28 00:54:45 +0000
committerKarl Berry <karl@freefriends.org>2009-01-28 00:54:45 +0000
commit1cf91a6aa1a270f53850002b99132287886165ae (patch)
treeb1913fe01842dd9ecb401b734e9e7462f2271af1 /Master/texmf-dist/tex/latex/memoir
parent7d2fbdd12223e7c4c050a70e544874f6f8111ab4 (diff)
memoir update (27jan09)
git-svn-id: svn://tug.org/texlive/trunk@11997 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/memoir')
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memhfixc.sty6
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memoir.cls384
2 files changed, 304 insertions, 86 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
index 1ee23cf5f29..6488626bfb1 100644
--- a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
+++ b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
@@ -38,6 +38,7 @@
%% With thanks to Heiko Oberdiek, if you use hyperref dated 2006/11/15
%% or later, memhfixc will be automatically loaded after hyperref.
%%
+%% Version 1.11 2009/01/18
%% Version 1.10 2008/08/23
%% Version 1.9 2006/11/22
%% Version 1.8 2006/01/21
@@ -50,7 +51,7 @@
%% Version 1.1 2003/01/22
%% Version 1.0 2002/10/22
%%
-\ProvidesPackage{memhfixc}[2008/08/23 v1.10 nameref/hyperref package fixes for memoir class]
+\ProvidesPackage{memhfixc}[2009/01/18 v1.11 nameref/hyperref package fixes for memoir class]
\let\M@hfixcfinish\relax
\@ifclassloaded{memoir}{}%
{\let\M@hfixcfinish\endinput
@@ -269,6 +270,9 @@
\end{lrbox}%
\m@mscapopboxes}
+\def\@mem@titlerefnolink#1{\begingroup \let\numberline\@gobble
+ \let\M@TitleReference\@mem@theTR % interrupt recursion of \ref
+ \ref*{#1}\endgroup}
\endinput
%%
%% End of file `memhfixc.sty'.
diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls
index a421c26c08e..cdde4cba8d1 100644
--- a/Master/texmf-dist/tex/latex/memoir/memoir.cls
+++ b/Master/texmf-dist/tex/latex/memoir/memoir.cls
@@ -25,7 +25,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{memoir}%
- [2008/08/07 v1.6180339a configurable book, report, article document class]
+ [2009/01/25 v1.6180339c configurable book, report, article document class]
\newcommand*{\@ptsize}{}
\newcommand*{\@memptsize}{}
\newlength{\onelineskip}
@@ -226,9 +226,8 @@
\newif\ifm@mifetex
\m@mifetexfalse
\IfFileExists{ifetex.sty}{\RequirePackage{ifetex}\relax}{%
- \ClassWarningNoLine{memoir}{%
- If there is an `ifetex' package then it is not installed.\MessageBreak
- The package is being emulated}%
+ \ClassInfo{memoir}{%
+ An `ifetex' package is being emulated}%
\m@mifetextrue
\newif\ifetex
\etexfalse
@@ -270,7 +269,7 @@
\m@mifluatexfalse
\IfFileExists{ifluatex.sty}{\RequirePackage{ifluatex}\relax}{%
\ClassWarningNoLine{memoir}{%
- If there is an `ifluatex' package then it is not installed.\MessageBreak
+ The `ifluatex' package is not installed.\MessageBreak
The package is being emulated}%
\m@mifluatextrue
\newif\ifluatex
@@ -456,58 +455,76 @@
\newcommand*{\stockmdemyvo} {\stockheight=216mm \stockwidth=138mm}
\newcommand*{\stockmsmallroyalvo} {\stockheight=234mm \stockwidth=156mm}
+\newcommand*{\stockao} {\stockheight=1189mm \stockwidth=841mm}
+\newcommand*{\stockai} {\stockheight=841mm \stockwidth=594mm}
+\newcommand*{\stockaii} {\stockheight=594mm \stockwidth=420mm}
\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*{\stockbo} {\stockheight=1414mm \stockwidth=1000mm}
+\newcommand*{\stockbi} {\stockheight=1000mm \stockwidth=707mm}
+\newcommand*{\stockbii} {\stockheight=707mm \stockwidth=500mm}
\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}
-
+\newcommand*{\pagedbill} {\paperheight=7in \paperwidth=3in}
+\newcommand*{\pagestatement} {\paperheight=8.5in \paperwidth=5.5in}
+\newcommand*{\pageexecutive} {\paperheight=10.5in \paperwidth=7.25in}
+\newcommand*{\pageletter} {\paperheight=11in \paperwidth=8.5in}
+\newcommand*{\pageold} {\paperheight=12in \paperwidth=9in}
+\newcommand*{\pagelegal} {\paperheight=14in \paperwidth=8.5in}
+\newcommand*{\pageledger} {\paperheight=17in \paperwidth=11in}
+\newcommand*{\pagebroadsheet}{\paperheight=22in \paperwidth=17in}
+
+\newcommand*{\pagepottvo} {\paperheight=6.25in \paperwidth=4in}
+\newcommand*{\pagefoolscapvo} {\paperheight=6.75in \paperwidth=4.25in}
+\newcommand*{\pagecrownvo} {\paperheight=7.5in \paperwidth=5in}
+\newcommand*{\pagepostvo} {\paperheight=8in \paperwidth=5in}
+\newcommand*{\pagelargecrownvo}{\paperheight=8in \paperwidth=5.25in}
+\newcommand*{\pagelargepostvo} {\paperheight=8.25in \paperwidth=5.25in}
+\newcommand*{\pagesmalldemyvo} {\paperheight=8.5in \paperwidth=5.675in}
+\newcommand*{\pagedemyvo} {\paperheight=8.75in \paperwidth=5.675in}
+\newcommand*{\pagemediumvo} {\paperheight=9in \paperwidth=5.75in}
+\newcommand*{\pagesmallroyalvo}{\paperheight=9.25in \paperwidth=6.175in}
+\newcommand*{\pageroyalvo} {\paperheight=10in \paperwidth=6.25in}
+\newcommand*{\pagesuperroyalvo}{\paperheight=10.25in \paperwidth=6.75in}
+\newcommand*{\pageimperialvo} {\paperheight=11in \paperwidth=7.5in}
+
+\newcommand*{\pagemcrownvo} {\paperheight=186mm \paperwidth=123mm}
+\newcommand*{\pagemlargecrownvo} {\paperheight=198mm \paperwidth=129mm}
+\newcommand*{\pagemdemyvo} {\paperheight=216mm \paperwidth=138mm}
+\newcommand*{\pagemsmallroyalvo} {\paperheight=234mm \paperwidth=156mm}
+
+\newcommand*{\pageao} {\paperheight=1189mm \paperwidth=841mm}
+\newcommand*{\pageai} {\paperheight=841mm \paperwidth=594mm}
+\newcommand*{\pageaii} {\paperheight=594mm \paperwidth=420mm}
+\newcommand*{\pageaiii}{\paperheight=420mm \paperwidth=297mm}
+\newcommand*{\pageaiv} {\paperheight=297mm \paperwidth=210mm}
+\newcommand*{\pageav} {\paperheight=210mm \paperwidth=148mm}
+\newcommand*{\pageavi} {\paperheight=148mm \paperwidth=105mm}
+
+\newcommand*{\pagebo} {\paperheight=1414mm \paperwidth=1000mm}
+\newcommand*{\pagebi} {\paperheight=1000mm \paperwidth=707mm}
+\newcommand*{\pagebii} {\paperheight=707mm \paperwidth=500mm}
+\newcommand*{\pagebiii}{\paperheight=500mm \paperwidth=353mm}
+\newcommand*{\pagebiv} {\paperheight=353mm \paperwidth=250mm}
+\newcommand*{\pagebv} {\paperheight=250mm \paperwidth=176mm}
+\newcommand*{\pagebvi} {\paperheight=176mm \paperwidth=125mm}
+
+\DeclareOption{a0paper}{\stockao}
+\DeclareOption{a1paper}{\stockai}
+\DeclareOption{a2paper}{\stockaii}
\DeclareOption{a3paper}{\stockaiii}
\DeclareOption{a4paper}{\stockaiv}
\DeclareOption{a5paper}{\stockav}
\DeclareOption{a6paper}{\stockavi}
+\DeclareOption{b0paper}{\stockbo}
+\DeclareOption{b1paper}{\stockbi}
+\DeclareOption{b2paper}{\stockbii}
\DeclareOption{b3paper}{\stockbiii}
\DeclareOption{b4paper}{\stockbiv}
\DeclareOption{b5paper}{\stockbv}
@@ -544,10 +561,10 @@
{\setlength\stockheight {9in}%
\setlength\stockwidth {6in}}
-\DeclareOption{landscape}
- {\setlength\@tempdima {\stockheight}
- \setlength\stockheight{\stockwidth}
- \setlength\stockwidth {\@tempdima}}
+\newif\ifmemlandscape
+ \memlandscapefalse
+\DeclareOption{landscape}{\memlandscapetrue}
+\DeclareOption{portrait}{\memlandscapefalse}
\renewcommand*{\@ptsize}{0}
\renewcommand*{\@memptsize}{10}
@@ -623,8 +640,14 @@
\DeclareOption{oldfontcommands}{\@memoldfonttrue}
\DeclareOption{extrafontsizes}{\extrafontsizestrue}
-\ExecuteOptions{final,letterpaper,10pt,onecolumn,openright,twoside}
-\ProcessOptions
+\ExecuteOptions{final,letterpaper,10pt,onecolumn,openright,twoside,
+ portrait}
+\ProcessOptions*
+ \ifmemlandscape
+ \setlength\@tempdima {\stockheight}
+ \setlength\stockheight{\stockwidth}
+ \setlength\stockwidth {\@tempdima}
+ \fi
\providecommand*{\memoirpostopthook}{}
\memoirpostopthook
@@ -881,19 +904,29 @@
\setlength{\textheight}{\@tempdima}%
\setlength{\textwidth}{\@tempdimb}}
+\newlength{\binding}
+\newcommand*{\setbinding}[1]{\setlength{\binding}{#1}}
+ \setbinding{0pt}
+
\newlength{\spinemargin}
\newlength{\foremargin}
\newcommand{\setlrmargins}[3]{%
+ \advance\paperwidth -\binding
\setfillsize{\paperwidth}{\textwidth}{#1}{#2}{#3}%
\setlength{\textwidth}{\@tempdimc}%
\setlength{\spinemargin}{\@tempdima}%
- \setlength{\foremargin}{\@tempdimb}}
+ \setlength{\foremargin}{\@tempdimb}%
+ \advance\paperwidth \binding
+ \advance\spinemargin \binding}
\newcommand{\setlrmarginsandblock}[3]{%
+ \advance\paperwidth -\binding
\setfillsize{\paperwidth}{*}{#1}{#2}{#3}%
\setlength{\textwidth}{\@tempdimc}%
\setlength{\spinemargin}{\@tempdima}%
- \setlength{\foremargin}{\@tempdimb}}
+ \setlength{\foremargin}{\@tempdimb}%
+ \advance\paperwidth \binding
+ \advance\spinemargin \binding}
\newlength{\uppermargin}
\newlength{\lowermargin}
@@ -1281,7 +1314,7 @@
\setulmarginsandblock{\uppermargin}{*}{2}}
\newcommand*{\setpagebl}[3]{%
- \settrimmedsize{#1}{#2}{#3}
+ \settrimmedsize{#1}{#2}{#3}%
\trimtop=\stockheight \advance\trimtop -\paperheight
\trimedge=\stockwidth \advance\trimedge -\paperwidth}
\newcommand*{\setpageml}[3]{%
@@ -1293,6 +1326,36 @@
\settrimmedsize{#1}{#2}{#3}
\trimtop=0pt
\trimedge=\stockwidth \advance\trimedge -\paperwidth}
+\newcommand*{\setpagetm}[3]{%
+ \settrimmedsize{#1}{#2}{#3}%
+ \trimtop=0pt
+ \trimedge=\stockwidth \advance\trimedge -\paperwidth
+ \advance\trimedge -0.5\trimedge}
+
+\newcommand*{\setpagetr}[3]{%
+ \settrimmedsize{#1}{#2}{#3}%
+ \trimtop=0pt
+ \trimedge=0pt}
+\newcommand*{\setpagemr}[3]{%
+ \settrimmedsize{#1}{#2}{#3}%
+ \trimtop=\stockheight \advance\trimtop -\paperheight
+ \advance\trimtop -0.5\trimtop
+ \trimedge=0pt}
+\newcommand*{\setpagebr}[3]{%
+ \settrimmedsize{#1}{#2}{#3}%
+ \trimtop=\stockheight \advance\trimtop -\paperheight
+ \trimedge=0pt}
+\newcommand*{\setpagebm}[3]{%
+ \settrimmedsize{#1}{#2}{#3}%
+ \trimtop=\stockheight \advance\trimtop -\paperheight
+ \trimedge=\stockwidth \advance\trimedge -\paperwidth
+ \advance\trimedge -0.5\trimedge}
+\newcommand*{\setpagecc}[3]{%
+ \settrimmedsize{#1}{#2}{#3}%
+ \trimtop=\stockheight \advance\trimtop -\paperheight
+ \advance\trimtop -0.5\trimtop
+ \trimedge=\stockwidth \advance\trimedge -\paperwidth
+ \advance\trimedge -0.5\trimedge}
\setcounter{topnumber}{3}
\renewcommand{\topfraction}{.85}
@@ -1325,8 +1388,27 @@
\@namedef{#1ofootr}{#4}
}
-\newcommand{\makerunningwidth}[2]{%
- \@namedef{#1runwidth}{#2}}
+\newcommand*{\makerunningwidth}[1]{%
+ \def\m@mhfstyle{#1}%
+ \m@mopthfwidth}
+\newcommand*{\m@mopthfwidth}[2][\@mpty]{%
+ \setlength\@tempdima{#2}
+ \expandafter\edef\csname \m@mhfstyle headrunwidth\endcsname{\the\@tempdima}
+ \ifx\@mpty #1
+ \expandafter\edef\csname \m@mhfstyle footrunwidth\endcsname{\the\@tempdima}
+ \else
+ \setlength\@tempdima{#1}
+ \expandafter\edef\csname \m@mhfstyle footrunwidth\endcsname{\the\@tempdima}
+ \fi}
+\newcommand*{\makerunningheadwidth}[2]{%
+ \setlength\@tempdima{#2}%
+ \expandafter\edef\csname \m@mhfstyle headrunwidth\endcsname{\the\@tempdima}%
+}
+\newcommand*{\makerunningfootwidth}[2]{%
+ \setlength\@tempdima{#2}%
+ \expandafter\edef\csname \m@mhfstyle footrunwidth\endcsname{\the\@tempdima}%
+}
+
\newlength{\normalrulethickness}
\setlength{\normalrulethickness}{0.4pt}
\newcommand{\footruleheight}{0pt}
@@ -1389,46 +1471,49 @@
\newcommand*{\m@mhe@dreset}{\def\baselinestretch{1}\normalsize}
+\newcommand*\makeheadfootvposition[3]{%
+ \@namedef{#1headvplacement}{#2}\@namedef{#1footvplacement}{#3}}
+
\newcommand{\makepagestyle}[1]{%
\@namedef{ps@#1}{%
\@namedef{#1@evenhead}{%
- \@nameuse{#1evenhpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
+ \@nameuse{#1evenhpl}\hb@xt@\@nameuse{#1headrunwidth}{\m@mhe@dreset%
\vbox{\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \rlap{\parbox[\@nameuse{#1headvplacement}]{\@nameuse{#1headrunwidth}}{%
\raggedright\@nameuse{#1eheadl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
+ \parbox[\@nameuse{#1headvplacement}]{\@nameuse{#1headrunwidth}}{%
\centering\@nameuse{#1eheadc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \llap{\parbox[\@nameuse{#1headvplacement}]{\@nameuse{#1headrunwidth}}{%
\raggedleft\@nameuse{#1eheadr}\strut}}}%
\@nameuse{#1headrule}}}\@nameuse{#1evenhpr}}%
\@namedef{#1@oddhead}{%
- \@nameuse{#1oddhpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
+ \@nameuse{#1oddhpl}\hb@xt@\@nameuse{#1headrunwidth}{\m@mhe@dreset%
\vbox{\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \rlap{\parbox[\@nameuse{#1headvplacement}]{\@nameuse{#1headrunwidth}}{%
\raggedright\@nameuse{#1oheadl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
+ \parbox[\@nameuse{#1headvplacement}]{\@nameuse{#1headrunwidth}}{%
\centering\@nameuse{#1oheadc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \llap{\parbox[\@nameuse{#1headvplacement}]{\@nameuse{#1headrunwidth}}{%
\raggedleft\@nameuse{#1oheadr}\strut}}}%
\@nameuse{#1headrule}}}\@nameuse{#1oddhpr}}%
\@namedef{#1@evenfoot}{%
- \@nameuse{#1evenfpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
+ \@nameuse{#1evenfpl}\hb@xt@\@nameuse{#1footrunwidth}{\m@mhe@dreset%
\vbox{\@nameuse{#1footrule}\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \rlap{\parbox[\@nameuse{#1footvplacement}]{\@nameuse{#1footrunwidth}}{%
\raggedright\@nameuse{#1efootl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
+ \parbox[\@nameuse{#1footvplacement}]{\@nameuse{#1footrunwidth}}{%
\centering\@nameuse{#1efootc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \llap{\parbox[\@nameuse{#1footvplacement}]{\@nameuse{#1footrunwidth}}{%
\raggedleft\@nameuse{#1efootr}\strut}}}%
}}\@nameuse{#1evenfpr}}%
\@namedef{#1@oddfoot}{%
- \@nameuse{#1oddfpl}\hb@xt@\@nameuse{#1runwidth}{\m@mhe@dreset%
+ \@nameuse{#1oddfpl}\hb@xt@\@nameuse{#1footrunwidth}{\m@mhe@dreset%
\vbox{\@nameuse{#1footrule}\hbox{%
- \rlap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \rlap{\parbox[\@nameuse{#1footvplacement}]{\@nameuse{#1footrunwidth}}{%
\raggedright\@nameuse{#1ofootl}\strut}}\hfill
- \parbox[b]{\@nameuse{#1runwidth}}{%
+ \parbox[\@nameuse{#1footvplacement}]{\@nameuse{#1footrunwidth}}{%
\centering\@nameuse{#1ofootc}\strut}\hfill
- \llap{\parbox[b]{\@nameuse{#1runwidth}}{%
+ \llap{\parbox[\@nameuse{#1footvplacement}]{\@nameuse{#1footrunwidth}}{%
\raggedleft\@nameuse{#1ofootr}\strut}}}%
}}\@nameuse{#1oddfpr}}%
\def\@evenhead{\@nameuse{#1@evenhead}}%
@@ -1444,6 +1529,7 @@
\makeheadposition{#1}{}{}{}{}%
\makeheadrule{#1}{\textwidth}{0pt}%
\makefootrule{#1}{\textwidth}{\footruleheight}{\footruleskip}%
+ \makeheadfootvposition{#1}{b}{b}%
\makepsmarks{#1}{}}
\newcommand{\aliaspagestyle}[2]{%
@@ -1459,11 +1545,12 @@
{\@nameuse{#2efootc}}{\@nameuse{#2efootr}}%
\makeoddfoot{#1}{\@nameuse{#2ofootl}}%
{\@nameuse{#2ofootc}}{\@nameuse{#2ofootr}}%
- \makerunningwidth{#1}{\@nameuse{#2runwidth}}%
+ \makerunningwidth{#1}[\@nameuse{#2footrunwidth}]{\@nameuse{#2headrunwidth}}%
\@namedef{#1evenhpl}{\@nameuse{#2evenhpl}}%
\@namedef{#1oddhpl}{\@nameuse{#2oddhpl}}%
\@namedef{#1evenhpr}{\@nameuse{#2evenhpr}}%
\@namedef{#1oddhpr}{\@nameuse{#2oddhpr}}%
+ \makeheadfootvposition{#1}{\@namedef{#2headvplacement}}{\@namedef{#2footvplacement}}%
\@namedef{#1evenfpl}{\@nameuse{#2evenfpl}}%
\@namedef{#1oddfpl}{\@nameuse{#2oddfpl}}%
\@namedef{#1evenfpr}{\@nameuse{#2evenfpr}}%
@@ -1758,6 +1845,41 @@
\makeoddhead{companion}{\normalfont\bfseries\rightmark}{}%
{\normalfont\bfseries\thepage}
+\newif\ifshowheadfootloc
+ \showheadfootloctrue
+\newcommand*{\showheadfootlocon}{\showheadfootloctrue}
+\newcommand*{\showheadfootlocoff}{\showheadfootlocfalse}
+\newif\ifshowtextblockloc
+ \showtextblockloctrue
+\newcommand*{\showtextblocklocon}{\showtextblockloctrue}
+\newcommand*{\showtextblocklocoff}{\showtextblocklocfalse}
+
+\newcommand*{\framepichead}{%
+\ifshowheadfootloc
+ \begin{picture}(0,0)
+ \unitlength 1pt
+ \put(0,0){\line(1,0){\strip@pt\textwidth}}
+ \end{picture}%
+\fi}
+
+\newcommand*{\framepictextfoot}{%
+ \begin{picture}(0,0)
+ \unitlength 1pt
+ \ifshowheadfootloc
+ \put(0,0){\line(1,0){\strip@pt\textwidth}}
+ \fi
+ \ifshowtextblockloc
+ \put(0,\strip@pt\footskip)%
+ {\framebox(\strip@pt\textwidth,\strip@pt\textheight){}}
+ \fi
+ \end{picture}}
+
+\makepagestyle{showlocs}
+\makeevenhead{showlocs}{\framepichead\thepage}{\thepage}{\thepage}
+\makeoddhead{showlocs}{\framepichead\thepage}{\thepage}{\thepage}
+\makeevenfoot{showlocs}{\framepictextfoot\thepage}{\thepage}{\thepage}
+\makeoddfoot{showlocs}{\framepictextfoot\thepage}{\thepage}{\thepage}
+
\renewcommand{\pagenumbering}{%
\@ifstar{\@smempnum}{\@mempnum}}
\newcommand{\@smempnum}[1]{%
@@ -3695,6 +3817,68 @@
\twocolumn
\fi}
+\let\memorigdbs\\
+\let\memorigpar\par
+\let\atcentercr\@centercr
+
+\newcommand*{\flushleftright}{%
+ \let\\\memorigdbs
+ \leftskip\z@skip
+ \rightskip\leftskip
+ \parfillskip\@flushglue
+ \everypar{}}
+
+\newcommand*{\linenottooshort}[1][4em]{%
+ \@tempdima=\hsize
+ \advance\@tempdima -#1
+ \leftskip\z@skip
+ \rightskip\leftskip
+ \parfillskip=\@tempdima \@minus \@tempdima}
+
+\newcommand*{\russianpar}{\ifhmode\unskip
+ \strut\vadjust{}\nobreak
+ \discretionary{}%
+ {\hbox{\hskip2\parindent
+ \vrule depth 273sp width 0sp height \ht\strutbox}}%
+ {\hbox{\hskip\parindent}}%
+ \hskip-2\parindent \@minus 2\parindent
+ \hskip\hsize \@minus \hsize
+ \kern\z@ \parfillskip\z@
+ \memorigpar
+ \ifdim\prevdepth=273sp
+ \nobreak
+ \vskip-2\baselineskip
+ \hbox{\strut}%
+ \fi\fi}
+
+\newcommand*{\lastlineparrule}{%
+ \hrule height 0.5ex depth \@tempdimb\relax}
+\newcommand*{\lastlinerulefill}{%
+ \let\\\@centercr
+ \@tempdimb=-0.5ex \advance\@tempdimb 0.4pt
+ \unskip\nobreak\space
+ \leaders\lastlineparrule\hskip\@flushglue
+ \vadjust{}{\parfillskip\z@\memorigpar}}
+
+\newcommand*{\centerlastline}{%
+ \leftskip\@flushglue
+ \rightskip=\z@ plus -1fil
+ \parfillskip=\z@ plus 2fil}
+
+\newcommand*{\leftcenterright}{%;
+ \let\\\break
+ \parindent\z@
+ \leftskip\@flushglue
+ \rightskip\leftskip
+ \parfillskip \z@ \@plus -1fil
+ \everypar={\hskip \z@ \@plus -1fil}}
+
+\newcommand*{\centerfloat}{%
+ \parindent \z@
+ \leftskip \z@ \@plus 1fil \@minus \textwidth
+ \rightskip\leftskip
+ \parfillskip \z@skip}
+
\newdimen\ragrparindent
\setlength{\ragrparindent}{\parindent}
\newcommand{\raggedyright}[1][2em]{%
@@ -3702,6 +3886,19 @@
\leftskip\z@skip
\parindent\ragrparindent}
+\newcommand*{\justlastraggedleft}{%
+ \leftskip\@flushglue
+ \rightskip-\leftskip
+ \parfillskip\leftskip
+ \parindent \z@}
+
+\newcommand*{\raggedrightthenleft}{%
+ \parindent \z@
+ \leftskip \z@ \@plus 1fill
+ \rightskip\@flushglue
+ \parfillskip \z@
+ \everypar{\hskip \z@ \@plus -1fill}}
+
\newcommand{\hangfrom}[1]{%
\setbox\@tempboxa\hbox{{#1}}%
\hangindent \wd\@tempboxa\noindent\box\@tempboxa}
@@ -3710,6 +3907,17 @@
\newenvironment{hangparas}[2]{\setlength{\parindent}{\z@}
\everypar={\hangpara{#1}{#2}}}{\par}
+\newcommand{\leftspringright}[4]{%
+ \@tempdimb=\hsize
+ \par\noindent\hbox to\@tempdimb{%
+ \vtop{\hsize=#1\@tempdimb \flushleft#3\par}\hss
+ \vtop{\hsize=#2\@tempdimb \flushright#4\par}}}
+
+\newcommand*{\sourceatright}[2][2em]{{%
+ \unskip\nobreak\hfil\penalty50
+ \hskip#1\hbox{}\nobreak\hfil{#2}
+ \parfillskip\z@\finalhyphendemerits=0\par}}
+
\if@twocolumn
\setlength{\leftmargini}{2em}
\else
@@ -5653,14 +5861,6 @@
\newcommand{\captiontitlefont}[1]{\def\@conttfont{#1}}
\captiontitlefont{}
-\newcommand*{\flushleftright}{%
- \leftskip\z@ \rightskip\z@
- \parfillskip\@flushglue}
-\newcommand*{\centerlastline}{%
- \parfillskip=\z@ plus 2fil
- \rightskip=\z@ plus -1fil
- \leftskip\@flushglue}
-
\newcommand*{\captionstyle}[1]{\def\@contcstyle{#1}}
\captionstyle{}
@@ -6282,6 +6482,9 @@
\@ifnextchar [{\@sidecaption}{\@sidecaption[]}}
\def\@sidecaption[#1]#2{%
\@ifnextchar [{\@@sidecaption{#1}{#2}}{\@@sidecaption{#1}{#2}[]}}
+\newcommand\@mem@scap@beforehook{}
+\newcommand\@mem@scap@afterhook{}
+
\def\@@sidecaption#1#2[#3]{%
\ifx\@empty#1\@empty
\def\m@mscap@fortoc{#2}%
@@ -6297,6 +6500,7 @@
\m@mscapstart@fbox}
\newcommand*{\m@mscapstart@fbox}{%
+ \@mem@scap@beforehook%
\setlength{\m@mscapmainwidth}{\sidecapfloatwidth}%
\setm@mscaplkern
\begin{lrbox}{\m@mscap@fbox}%
@@ -6326,7 +6530,9 @@
\rlap{\kern\sidecapsep
\raisebox{\m@mscapraise}{\usebox{\m@mscap@capbox}}}%
\fi
- \gdef\m@mscapthisside{}}
+ \gdef\m@mscapthisside{}%
+ \@mem@scap@afterhook%
+}
\newcommand*{\m@mcalcscapraise}{%
\def\@tempb{t}%
@@ -6719,10 +6925,16 @@
\let\@mem@nestwarn\@gobble
\let\M@TitleReference\@firstoftwo
-\DeclareRobustCommand{\titleref}[1]{\begingroup \let\numberline\@gobble
+\newcommand*\@mem@titleref[1]{\begingroup
+ \let\numberline\@gobble
\let\M@TitleReference\@mem@theTR % interrupt recursion of \ref
\ref{#1}\endgroup}
-\DeclareRobustCommand{\currenttitle}{\begingroup \let\numberline\@gobble
+\let\@mem@titlerefnolink\@mem@titleref
+
+\DeclareRobustCommand\titleref{\@ifstar{\@mem@titlerefnolink}{\@mem@titleref}}
+
+\DeclareRobustCommand{\currenttitle}{\begingroup
+ \let\numberline\@gobble
\theTitleReference\@currentlabel\M@currentTitle\endgroup}
\let\M@currentTitle\@empty
@@ -6762,6 +6974,7 @@
\begingroup
%%% \parindent\z@ \parskip\cftparskip
\@nameuse{@#2maketitle}
+\parskip\cftparskip
\@starttoc{#2}%
\endgroup
\restorefromonecol}
@@ -7125,7 +7338,7 @@
\newcommand{\chapterprecistoc}[1]{%
\addtocontents{toc}{\precistoctext{#1}}}
\DeclareRobustCommand{\precistoctext}[1]{%
- {\leftskip \cftchapterindent\relax
+ {\nopagebreak\leftskip \cftchapterindent\relax
\advance\leftskip \cftchapternumwidth\relax
\rightskip \@tocrmarg\relax
\precistocfont #1\par}}
@@ -7797,7 +8010,8 @@
\hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}%
}
-\newcommand{\parnopar}{\parfillskip=0pt\par\parskip=0pt\noindent}
+\newcommand{\parnopar}{\parfillskip=0pt\par\parskip=0pt\noindent
+ \parfillskip\@flushglue}
\newif\ifreversesidepar
\reversesidepartrue
@@ -11438,7 +11652,7 @@
\AtBeginPackage{float}{\let\newfloat\relax}
-\InputIfFileExists{mempatch.sty} % should be this
+\InputIfFileExists{mempatch.sty}{}{} % should be this
\endinput
%%