summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-19 22:54:48 +0000
committerKarl Berry <karl@freefriends.org>2010-09-19 22:54:48 +0000
commit63653db196b6e47d4fc631c9e850c2b31478fe6f (patch)
treee4b5f86537eb826d53e1feb9c07fe84454511316 /Master/texmf-dist/tex
parent3127e51522e361c647124aed8a4883caff20a9ed (diff)
memoir 3.6g (20sep10)
git-svn-id: svn://tug.org/texlive/trunk@19810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memoir.cls268
1 files changed, 194 insertions, 74 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/memoir.cls b/Master/texmf-dist/tex/latex/memoir/memoir.cls
index 1177fad37cd..e1b29b992e0 100644
--- a/Master/texmf-dist/tex/latex/memoir/memoir.cls
+++ b/Master/texmf-dist/tex/latex/memoir/memoir.cls
@@ -26,7 +26,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{memoir}%
- [2010/08/22 v3.6f configurable book, report, article document class]
+ [2010/09/19 v3.6g configurable book, report, article document class]
\newcommand*{\@ptsize}{}
\newcommand*{\@memptsize}{}
\newlength{\onelineskip}
@@ -1230,41 +1230,127 @@
\@settopoint\evensidemargin
\fixheaderwidths}
+\newcommand\settypeoutlayoutunit[1]{
+ \nametest{#1}{pt}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{1.0}
+ \else
+ \nametest{#1}{pc}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.083333}
+ \else
+ \nametest{#1}{in}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.013837}
+ \else
+ \nametest{#1}{mm}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.351459}
+ \else
+ \nametest{#1}{cm}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.0351459}
+ \else
+ \nametest{#1}{bp}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.996264}
+ \else
+ \nametest{#1}{dd}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.9345718}
+ \else
+ \nametest{#1}{cc}
+ \ifsamename
+ \def\mem@tl@unit{#1}
+ \def\mem@tl@unitperpt{0.0778809}
+ \else
+ \@memerror{Unknown unit '#1' not suitable for layout listing}{}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\settypeoutlayoutunit{pt}
+\newcommand\mem@typeouttwolengths[4]{
+ % #1 = text before
+ % #2 = first length
+ % #3 = text between
+ % #4 = second length
+ \setlength\@tempdimc{\mem@tl@unitperpt #2}
+ \edef\l@first{\strip@pt\@tempdimc}%
+ \setlength\@tempdimc{\mem@tl@unitperpt #4}
+ \edef\l@second{\strip@pt\@tempdimc}%
+ \typeout{#1: \l@first\mem@tl@unit\space#3\space\l@second\mem@tl@unit}
+}
+\newcommand\mem@typeoutonelength[2]{
+ % #1 = text before
+ % #2 = first length
+ \setlength\@tempdimc{\mem@tl@unitperpt #2}
+ \edef\l@first{\strip@pt\@tempdimc}%
+ \typeout{#1: \l@first\mem@tl@unit}
+}
\newcommand*{\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{Sidefoothsep and sidefootwidth:
- \the\sidefoothsep\space and \the\sidefootwidth}
- \typeout{Sidefootvsep and sidefootheight:
- \the\sidefootvsep\space and \the\sidefootheight}
+ % \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{Sidefoothsep and sidefootwidth:
+ % \the\sidefoothsep\space and \the\sidefootwidth}
+ % \typeout{Sidefootvsep and sidefootheight:
+ % \the\sidefootvsep\space and \the\sidefootheight}
+ \mem@typeouttwolengths{Stock height and width}{\stockheight}{by}{\stockwidth}
+ \mem@typeouttwolengths{Top and edge trims}{\trimtop}{and}{\trimedge}
+ \mem@typeouttwolengths{Page height and width}{\paperheight}{by}{\paperwidth}
+ \mem@typeouttwolengths{Text height and width}{\textheight}{by}{\textwidth}
+ \mem@typeouttwolengths{Spine and edge margins}{\spinemargin}{and}{\foremargin}
+ \mem@typeouttwolengths{Upper and lower margins}{\uppermargin}{and}{\lowermargin}
+ \mem@typeouttwolengths{Headheight and headsep}{\headheight}{and}{\headsep}
+ \mem@typeoutonelength{Footskip}{\footskip}
+ \mem@typeouttwolengths{Columnsep and columnseprule}{\columnsep}{and}{\columnseprule}
+ \mem@typeouttwolengths{Marginparsep and marginparwidth}{\marginparsep}{and}{\marginparwidth}
+ \mem@typeouttwolengths{Sidecapsep and sidecapwidth}{\sidecapsep}{and}{\sidecapwidth}
+ \mem@typeouttwolengths{Sidebarhsep and sidebarwidth}{\sidebarhsep}{and}{\sidebarwidth}
+ \mem@typeouttwolengths{Sidebarvsep and sidebartopsep}{\sidebarvsep}{and}{\sidebartopsep}
+ \mem@typeoutonelength{Sidebarheight}{\dimen\sideins}
+ \mem@typeouttwolengths{Sidefoothsep and sidefootwidth}{\sidefoothsep}{and}{\sidefootwidth}
+ \mem@typeouttwolengths{Sidefootvsep and sidefootheight}{\sidefootvsep}{and}{\sidefootheight}
\typeout{******************************************************}
\typeout{}}
@@ -1301,20 +1387,27 @@
\newcommand{\typeoutstandardlayout}{%
\typeout{}
\typeout{******************************************************}
- \typeout{Page height and width:
- \the\paperheight\space by \the\paperwidth}
- \typeout{Text height and width:
- \the\textheight\space by \the\textwidth}
- \typeout{Oddside and evenside margins:
- \the\oddsidemargin\space and \the\evensidemargin}
- \typeout{Topmargin and footskip:
- \the\topmargin\space and \the\footskip}
- \typeout{Headheight and headsep:
- \the\headheight\space and \the\headsep}
- \typeout{Columnsep and columnseprule:
- \the\columnsep\space and \the\columnseprule}
- \typeout{Marginparsep and marginparwidth:
- \the\marginparsep\space and \the\marginparwidth}
+ % \typeout{Page height and width:
+ % \the\paperheight\space by \the\paperwidth}
+ \mem@typeouttwolengths{Page height and width}{\paperheight}{by}{\paperwidth}
+ % \typeout{Text height and width:
+ % \the\textheight\space by \the\textwidth}
+ \mem@typeouttwolengths{Text height and width}{\textheight}{by}{\textwidth}
+ % \typeout{Oddside and evenside margins:
+ % \the\oddsidemargin\space and \the\evensidemargin}
+ \mem@typeouttwolengths{Oddside and evenside margins}{\oddsidemargin}{and}{\evensidemargin}
+ % \typeout{Topmargin and footskip:
+ % \the\topmargin\space and \the\footskip}
+ \mem@typeouttwolengths{Topmargin and footskip}{\topmargin}{and}{\footskip}
+ % \typeout{Headheight and headsep:
+ % \the\headheight\space and \the\headsep}
+ \mem@typeouttwolengths{Headheight and headsep}{\headheight}{and}{\headsep}
+ % \typeout{Columnsep and columnseprule:
+ % \the\columnsep\space and \the\columnseprule}
+ \mem@typeouttwolengths{Columnsep and columnseprule}{\columnsep}{and}{\columnseprule}
+ % \typeout{Marginparsep and marginparwidth:
+ % \the\marginparsep\space and \the\marginparwidth}
+ \mem@typeouttwolengths{Marginparsep and marginparwidth}{\marginparsep}{and}{\marginparwidth}
\typeout{******************************************************}
\typeout{}
}
@@ -2017,16 +2110,23 @@
\@currsize}
\newcommand*{\setSingleSpace}[1]{%
- \def\m@m@singlespace{#1}}
+ \def\m@m@singlespace{#1}%
+ \def\m@m@footnote@spacing{#1}%
+ \def\m@m@float@spacing{#1} %
+}
\setSingleSpace{1}
+\newcommand*\setPagenoteSpacing[1]{\def\m@m@footnote@spacing{#1}}
+\newcommand*\setFloatSpacing[1] {\def\m@m@float@spacing{#1}}
\newcommand*{\SingleSpacing}{%
\setSpacing{\m@m@singlespace}%
+ \edef\m@m@footnote@spacing{\baselinestretch}%
+ \edef\m@m@float@spacing{\baselinestretch}%
\vskip\baselineskip% correction for coming into single spacing
}
\SingleSpacing
-\newcommand*{\OnehalfSpacing}{
+\newcommand*{\@OnehalfSpacing}{
\setSpacing{1.25}% default (10pt)
\ifcase \@ptsize \relax % 10pt
\setSpacing{1.25}%
@@ -2043,8 +2143,15 @@
\else% the extended sizes
\setSpacing{1.16}%
\fi}
+\newcommand*\OnehalfSpacing{%
+ \@ifstar{%
+ \@OnehalfSpacing%
+ \edef\m@m@footnote@spacing{\baselinestretch}%
+ \edef\m@m@float@spacing{\baselinestretch}%
+ }{\@OnehalfSpacing}%
+}
-\newcommand*{\DoubleSpacing}{
+\newcommand*{\@DoubleSpacing}{
\setSpacing{1.667}% default (10pt)
\ifcase \@ptsize \relax % 10pt
\setSpacing{1.667}%
@@ -2061,6 +2168,13 @@
\else% larger sizes
\setSpacing{1.5}%
\fi}
+\newcommand*\DoubleSpacing{%
+ \@ifstar{%
+ \@DoubleSpacing%
+ \edef\m@m@footnote@spacing{\baselinestretch}%
+ \edef\m@m@float@spacing{\baselinestretch}%
+ }{\@DoubleSpacing}%
+}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check what this does!!!!!!!!
\renewcommand*{\@setsize}[4]{%
@@ -2104,10 +2218,16 @@
\newenvironment{OnehalfSpace}{%
\begingroup
\OnehalfSpacing}{\m@mrestore@spacing}
+\newenvironment{OnehalfSpace*}{%
+ \begingroup
+ \OnehalfSpacing*}{\m@mrestore@spacing}
\newenvironment{DoubleSpace}{%
\begingroup
\DoubleSpacing}{\m@mrestore@spacing}
+\newenvironment{DoubleSpace*}{%
+ \begingroup
+ \DoubleSpacing}{\m@mrestore@spacing}
\newcommand*{\memdskipstretch}{0.0}
\newcommand*{\setDisplayskipStretch}[1]{%
@@ -2126,7 +2246,7 @@
\let\m@m@xfloat\@xfloat
\def\@xfloat #1[#2]{%
\m@m@xfloat #1[#2]%
- \def\baselinestretch{\m@m@singlespace}%
+ \def\baselinestretch{\m@m@float@spacing}%
\normalsize}
\newdimen\memPD
@@ -8611,8 +8731,8 @@
\fi}
\renewcommand{\@footnotetext}[1]{\insert\footins{%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
- \reset@font% <- v1.6180 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
+ \reset@font%
\foottextfont
\@preamfntext
\hsize\columnwidth
@@ -8759,12 +8879,12 @@
\renewcommand{\@mpfootnotetext}[1]{%
\global\setbox\@mpfootins\vbox{%
\unvbox\@mpfootins
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\foottextfont \hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
- \reset@font% <- v1.6180 addition
+ \reset@font%
\@makefntext{%
\rule\z@\footnotesep\ignorespaces{\foottextfont #1}%
\@finalstrut\strutbox}%
@@ -8879,7 +8999,7 @@
\newcommand{\m@make@footnotetext}[1]{%
\@namelongdef{@footnotetext#1}##1{%
\insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\hsize\columnwidth
@@ -8896,7 +9016,7 @@
\@namelongdef{@mpfootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9055,7 +9175,7 @@
\let\mp@footgroupv@r\@mptwocol@footgroupv@r}
\newcommand{\@twocolfootnotetext}[1]{\insert\footinsv@r{%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\foottextfont
\@preamfntext
\protected@edef\@currentlabel{%
@@ -9079,7 +9199,7 @@
\newcommand{\@mptwocolfootnotetext}[1]{%
\global\setbox\@mpfootinsv@r\vbox{%
\unvbox\@mpfootinsv@r
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\foottextfont
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9108,7 +9228,7 @@
\newcommand{\m@make@twocolfootnotetext}[1]{%
\@namelongdef{@twocolfootnotetext#1}##1{%
\insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\protected@edef\@currentlabel{%
@@ -9122,7 +9242,7 @@
\@namelongdef{@mptwocolfootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9159,7 +9279,7 @@
\let\mp@footgroupv@r\@mpthreecol@footgroupv@r}
\newcommand{\@threecolfootnotetext}[1]{\insert\footinsv@r{%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\foottextfont
\@preamfntext
\protected@edef\@currentlabel{%
@@ -9182,7 +9302,7 @@
\newcommand{\@mpthreecolfootnotetext}[1]{%
\global\setbox\@mpfootinsv@r\vbox{%
\unvbox\@mpfootinsv@r
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\foottextfont
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9210,7 +9330,7 @@
\newcommand{\m@make@threecolfootnotetext}[1]{%
\@namelongdef{@threecolfootnotetext#1}##1{%
\insert\@nameuse{footins#1}{%
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\protected@edef\@currentlabel{%
@@ -9223,7 +9343,7 @@
\@namelongdef{@mpthreecolfootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9299,7 +9419,7 @@
\xdef\footfudgefactor{\expandafter\strip@pt\dimen0 }}}
\newcommand{\@parafootnotetext}[1]{\insert\footinsv@r{
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\foottextfont
\@preamfntext
\protected@edef\@currentlabel{%
@@ -9318,7 +9438,7 @@
\newcommand{\@mpparafootnotetext}[1]{%
\global\setbox\@mpfootinsv@r\vbox{%
\unvbox\@mpfootinsv@r
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\foottextfont
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9354,7 +9474,7 @@
\newcommand{\m@make@parafootnotetext}[1]{%
\@namelongdef{@parafootnotetext#1}##1{%
\insert\@nameuse{footins#1}{
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\@preamfntext
\protected@edef\@currentlabel{%
@@ -9369,7 +9489,7 @@
\@namelongdef{@mpparafootnotetext#1}##1{%
\global\setbox\@nameuse{@mpfootins#1}\vbox{%
\unvbox\@nameuse{@mpfootins#1}
- \def\baselinestretch{\m@m@singlespace}% <- v1.61803 addition
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font\@nameuse{foottextfont#1}%
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
@@ -9564,7 +9684,7 @@
\renewcommand{\@footnotetext}[1]{%
\ifm@mfnmargin% use marginpar
\marginpar{%
- \def\baselinestretch{\m@m@singlespace}%
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font
\foottextfont
\protected@edef\@currentlabel{%
@@ -9574,7 +9694,7 @@
\color@endgroup}%
\else% regular feet
\insert\footins{%
- \def\baselinestretch{\m@m@singlespace}%
+ \def\baselinestretch{\m@m@footnote@spacing}%
\reset@font
\foottextfont
\@preamfntext
@@ -9751,7 +9871,7 @@
\newcommand{\@sidefootnotetext}[1]{\insert\sidefootins{%
\hsize\sidefootwidth
\@parboxrestore
- \def\baselinestretch{\m@m@singlespace}%
+ \def\baselinestretch{\m@m@footnote@spacing}%
\sidefootform \normalsize\normalfont\sidefoottextfont
\splittopskip=\ht\strutbox
\splitmaxdepth=\dp\strutbox
@@ -11386,7 +11506,7 @@
\advance #1 by -\spinemargin}
\newenvironment{vplace}[1][1]{%
- \par\vspace{\stretch{#1}}%
+ \par\vspace*{\stretch{#1}}%
}{%
\vspace*{\stretch{1}}%
\par}
@@ -11409,7 +11529,7 @@
\newcommand{\needspace}[1]{\begingroup\setlength{\dimen@}{#1}%
\vskip\z@\@plus\dimen@\penalty -100\vskip\z@\@plus-\dimen@
- \vskip\dimen@\penalty 9999\vskip-\dimen@\endgroup}
+ \vskip\dimen@\penalty 9999\vskip-\dimen@\vskip\z@skip\endgroup}
\newcommand{\Needspace}{\@ifstar{\M@sneedsp@}{\M@needsp@}}
\newcommand{\M@sneedsp@}[1]{\par \penalty-100\begingroup