summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/memoir/memlays.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/memoir/memlays.sty')
-rw-r--r--Master/texmf-dist/doc/latex/memoir/memlays.sty158
1 files changed, 158 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/memoir/memlays.sty b/Master/texmf-dist/doc/latex/memoir/memlays.sty
index ea7ba932dfb..030fbee8170 100644
--- a/Master/texmf-dist/doc/latex/memoir/memlays.sty
+++ b/Master/texmf-dist/doc/latex/memoir/memlays.sty
@@ -205,5 +205,163 @@
}
+\LMnote{2011/03/15}{We removed the \cs{parskip} effect on \cs{section}
+in one of the latest memoir versions, thus we need this to go away
+from the drawing}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% SECTIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\renewcommand{\drawheading}[1]{%
+ \l@yltoc{\textwidth}{\l@youthdi} % textwidth
+ \l@yltoc{\baselineskip}{\l@youtvdi} % baselineskip
+ \ifdrawparameters
+ \Huge \l@youtvdii=\baselineskip \normalsize % Heading baselineskip
+ \divide\l@youtvdii by \l@yonepoint
+ \l@yltoc{40pt}{\l@youtvpi} % beforeskip
+ \ifruninhead
+ \l@yltoc{-72pt}{\l@youtvpii} % afterskip
+ \l@yltoc{50pt}{\l@youthpi} % indent
+ \else
+ \l@yltoc{45pt}{\l@youtvpii} % afterskip
+ \l@yltoc{72pt}{\l@youthpi} % indent
+ \fi
+ \setbox0 = \hbox{{\Huge 3.5 Heading Title }}
+ \l@yltoc{\wd0}{\l@youthdv} % width of heading text
+ \else
+ {#1 \l@youtvdii=\baselineskip\normalfont\normalsize} % heading baselineskip
+ \divide\l@youtvdii by \l@yonepoint
+ \setbox0 = \hbox{{#1 3.5 Heading Title }}
+ \l@yltoc{\wd0}{\l@youthdv} % width of heading text
+ \fi
+ \l@youtvdiii=\l@youtvpii % afterskip + parskip + textbaselineskip
+ \advance\l@youtvdiii by \l@youtparskip
+ \advance\l@youtvdiii by \l@youtvdi
+ \l@youtvdiv=\l@youtvpi % beforeskip + parskip + headbaselineskip
+ \ifnum\l@youtvdiv < \z@
+ \l@youtvdiv = -\l@youtvdiv
+ \fi
+ \advance\l@youtvdiv by \l@youtparskip
+ \advance\l@youtvdiv by \l@youtvdii
+ \l@youtyci=\l@youtvdi % Y coord of base of after text
+ \l@youtycii=\l@youtyci % Y coord of base of heading text
+ \advance\l@youtycii by \l@youtvdiii
+ \l@youthdiv=\z@ % 0 or abs(-afterskip)
+ \ifnum\l@youtvpii < \z@
+ \l@youthdiv = -\l@youtvpii
+ \l@youtvdiii=\l@youtvdi % textbaselineskip
+ \l@youtxci=\l@youthpi % X coord of end of heading text
+ \advance\l@youtxci by \l@youthdv
+ \l@youtxcii=\l@youtxci % X coord of start of after text
+ \advance\l@youtxcii by \l@youthdiv
+ \l@youtycii=\l@youtvdi % Y coord of base of heading text
+ \fi
+ \l@youtyciii=\l@youtycii % Y coord of base of prior text
+ \advance\l@youtyciii by \l@youtvdiv
+ \l@youtyciv=\l@youtyciii % Y coord of top of prior text
+ \advance\l@youtyciv by \l@youtvdi
+ \l@youtycv=\l@youtyciv % 2*l@youtvdi + l@youtyciv
+ \advance\l@youtycv by \l@youtvdi
+ \advance\l@youtycv by \l@youtvdi
+ \l@youthdii=\l@youtvdi % a small amount
+ \l@youthdiii=\l@youthdii % half a small amount
+ \divide\l@youthdiii by \tw@
+ \begin{center}
+ \setlength{\unitlength}{\l@youtunitlength}
+ \begin{picture}(\l@youthdi,\l@youtycv)
+ \ifnum\l@youtvpii < \z@
+ \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
+ \put(0,0){\l@ylabelfont second line of text following the heading \ldots}
+ \ifdrawparameters
+ \put(\l@youthpi,\l@youtycii){{\Huge 3.5 Heading Title}}
+ \else
+ \put(\l@youthpi,\l@youtycii){{#1 3.5 Heading Title}}
+ \fi
+ \put(\l@youtxcii,\l@youtycii){\l@ylabelfont Start of text \ldots}
+ \put(0,\l@youtyciii){\l@ylabelfont \ldots end of last line of preceding text.}
+%% \ifdrawparameters
+ \testdrawdimensions
+ \ifl@ytempif
+ \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
+ \put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
+ {\l@yparamfont \textit{$\|$beforeskip$\|$} +
+ \l@ypcmd{baselineskip}
+ (of heading font)}}
+ \end{picture}}
+ \put(0,\l@youtycii){\vector(1,0){\l@youthpi}}
+ \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdii,\l@youthdiii){\l@yparamfont \textit{indent}}
+ \end{picture}}
+ \put(\l@youtxci,\l@youtycii){\vector(1,0){\l@youthdiv}}
+ \put(\l@youtxci,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,\l@youthdii){\l@yparamfont \textit{afterskip} ($< 0$)}
+ \end{picture}}
+ \fi
+ \end{picture}}
+ \else
+ \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
+ \put(0,0){\l@ylabelfont second line of text following the heading \ldots}
+ \put(0,\l@youtyci){\l@ylabelfont This is the start of the after-heading text,
+ which continues on \ldots}
+ \ifdrawparameters
+ \put(\l@youthpi,\l@youtycii){{\Huge 3.5 Heading Title}}
+ \else
+ \put(\l@youthpi,\l@youtycii){{#1 3.5 Heading Title}}
+ \fi
+ \put(0,\l@youtyciii){\l@ylabelfont \ldots end of last line of preceding text.}
+%% \ifdrawparameters
+ \testdrawdimensions
+ \ifl@ytempif
+ \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
+ \put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
+ {\l@yparamfont \textit{$\|$beforeskip$\|$} +
+ \l@ypcmd{baselineskip}
+ (of heading font)}}
+ \end{picture}}
+ \put(0,\l@youtycii){\vector(1,0){\l@youthpi}}
+ \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdii,\l@youthdiii){\l@yparamfont \textit{indent}}
+ \end{picture}}
+ \put(0,\l@youtycii){\vector(0,-1){\l@youtvdiii}}
+ \put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
+ \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
+ {\l@yparamfont \textit{afterskip} +
+ \l@ypcmd{baselineskip}
+ (of text font)}}
+ \end{picture}}
+ \fi
+ \end{picture}}
+ \fi
+ \put(0,0){\line(1,0){\l@youthdi}}
+ \put(0,\l@youtycv){\line(1,0){\l@youthdi}}
+ \end{picture}
+ \end{center}
+ \setlength{\unitlength}{1pt}
+%% \ifdrawparameters\else
+ \testprintparameters
+ \ifl@ytempif
+ \begin{center}
+ \begin{footnotesize}
+ Lengths are to the nearest pt. \\
+ \begin{ttfamily}
+ \begin{tabular}{l@{\hspace{20pt}}l}
+ \textit{beforeskip} = \number\l@youtvpi pt &
+ \textit{afterskip} = \number\l@youtvpii pt \\
+ \textit{indent} = \number\l@youthpi pt &
+ \textrm{(heading font)}
+ \l@ycmd{baselineskip} = \number\l@youtvdii pt \\
+ \l@ycmd{parskip} = \number\l@youtparskip pt &
+ \textrm{heading font} = \string#1 \\
+ \end{tabular}
+ \end{ttfamily}\end{footnotesize}
+ \end{center}
+ \fi
+}
+
+
+
\endinput