diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-06-02 14:38:57 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-06-02 14:38:57 +0000 |
commit | 82d52884d37b1a23afa751837ee5df24e03a99a4 (patch) | |
tree | 48ee8859c29f8239296f846b3b26a8d249ea5576 /Master/texmf-dist/doc/latex/memoir/memlays.sty | |
parent | 968c2c8410e2d768d324c6f06c6a92395b77cf16 (diff) |
memoir v1.61803
git-svn-id: svn://tug.org/texlive/trunk@8483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/memoir/memlays.sty')
-rwxr-xr-x | Master/texmf-dist/doc/latex/memoir/memlays.sty | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/memoir/memlays.sty b/Master/texmf-dist/doc/latex/memoir/memlays.sty new file mode 100755 index 00000000000..ec694324e4a --- /dev/null +++ b/Master/texmf-dist/doc/latex/memoir/memlays.sty @@ -0,0 +1,203 @@ +% memlays.sty % extra layouts for membook, extension to layouts package + +\ProvidesPackage{memlays}[2002/08/10 v1.0 Extra membook layouts] + +\usepackage{layouts} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% CHAPTER HEADING +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\newcommand{\drawchapter}{% +% Some default values first + \l@yltoc{0.85\textwidth}{\l@youthdi} % textwidth + \l@yltoc{\baselineskip}{\l@youtvdi} % baselineskip + \ifdrawparameters +% When drawparameters is TRUE, use a generic layout. +% Set dimensions and coordinates. + \Huge \l@youtvdii=\baselineskip \normalsize % Heading baselineskip + \divide\l@youtvdii by \l@yonepoint + \l@yltoc{50pt}{\l@youtvpiii} % beforeskip + \l@yltoc{20pt}{\l@youtvpi} % midskip + \l@yltoc{40pt}{\l@youtvpii} % afterskip + \fi +% Now continue setting all the other drawing lengths and coordinates. + \l@youtvdiii=\l@youtvpii % afterskip + \advance\l@youtvdiii by \l@youtparskip + \advance\l@youtvdiii by \l@youtvdi + \l@youtvdiv=\l@youtvpi % midskip +% \advance\l@youtvdiv by \l@youtparskip + \advance\l@youtvdiv by \l@youtvdii + \l@youtvdv=\l@youtvpiii % beforeskip +% \advance\l@youtvdv by \l@youtparskip + \advance\l@youtvdv 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) +% Continue. + \l@youtyciii=\l@youtycii % Y coord of base Chapter N + \advance\l@youtyciii by \l@youtvdiv + \l@youtyciv=\l@youtyciii % Y coord of top of typeblock + \advance\l@youtyciv by \l@youtvdv + \l@youtycvi=\l@youtyciv % 3*l@youtvdi + l@youtyciv + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \l@youthdii=\l@youtvdi % a small amount + \l@youthdiii=\l@youthdii % half a small amount + \divide\l@youthdiii by \tw@ +% +% Draw the picture! +% + \begin{center} + \setlength{\unitlength}{\l@youtunitlength} + \begin{picture}(\l@youthdi,\l@youtycvi) + \put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv) +% +% Draw the two after heading text lines + \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} +% Draw the heading + \put(0,\l@youtycii){{\Huge The title}} +% Draw the Chapter + \put(0,\l@youtyciii){{\huge Chapter 3}} +% Top of the typeblock + \put(0,\l@youtyciv){\l@ylabelfont \_\_\_\_ top of the typeblock} + \testdrawdimensions + \ifl@ytempif +% Draw the dimensions if required. First the before skips. + \put(0,\l@youtyciv){\vector(0,-1){\l@youtvdv}} + \put(0,\l@youtyciv){\begin{picture}(\l@youthdii,\l@youthdii) + \put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]% + {\l@yparamfont \l@ypcmd{beforechapskip}}} + \end{picture}} +% The midskip +%% \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}} + \put(-\l@youthdiii,\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 \l@ypcmd{midchapskip}}} + \end{picture}} +% And finish with the afterskip + \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 \l@ypcmd{afterchapskip}}} + \end{picture}} + \fi + \end{picture}} +% Draw rules. + \put(0,0){\line(1,0){\l@youthdi}} + \put(0,\l@youtycvi){\line(1,0){\l@youthdi}} + \end{picture} + \end{center} + \setlength{\unitlength}{1pt} +% The end of the definition of |\drawheading|. +} + +% Shorthands. +\newcommand{\chapterdiagram}{\drawparameterstrue\drawchapter} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% HEADERS AND FOOTERS +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\newcommand{\headerfooterdiagram}{% +% some initial values + \l@yltoc{0.85\textwidth}{\l@youthdi} % textwidth + \l@yltoc{\baselineskip}{\l@youtvdi} % baselineskip +% we need 4 x coordinates + \l@youtxci=\z@ + \l@youtxciii=\l@youthdi + \l@youtxciv=\l@youtxciii + \advance\l@youtxciv by \l@youtvdi + \l@youtxcii=\l@youtxciii % midway between xci and xciii + \advance\l@youtxcii by \l@youtxci + \divide\l@youtxcii by \tw@ +% we need 8 y coordinates + \l@youtycii=\l@youtvdi + \l@youtyciii=\l@youtycii + \advance\l@youtyciii by \l@youtvdi + \l@youtyciv=\l@youtyciii + \advance\l@youtyciv by \l@youtvdi + \l@youtycvi=\l@youtyciv + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \advance\l@youtycvi by \l@youtvdi + \l@youtycv=\l@youtyciv % midway between yciv and ycvi + \advance\l@youtycv by \l@youtycvi + \divide\l@youtycv by \tw@ + \l@youtycvii=\l@youtycvi + \advance\l@youtycvii by \l@youtvdi + \l@youtycviii=\l@youtycvii + \advance\l@youtycviii by \l@youtvdi + \l@youtyci=\l@youtycviii + \advance\l@youtyci by \l@youtvdi +% we need 1 horizontal distance, which is the diagram width +% (i.e., \l@youthdi) +% and one vertical distance, total picture height + \l@youtvdii=\l@youtycviii + \advance\l@youtvdii by \l@youtvdi + \advance\l@youtvdii by \l@youtvdi + \advance\l@youtvdii by \l@youtvdi +% and a (half) small amount + \l@youthdii=\l@youtvdi + \l@youthdiii=\l@youthdii + \divide\l@youthdiii by \tw@ +% +% Draw the picture +% + \begin{center} + \setlength{\unitlength}{\l@youtunitlength} + \begin{picture}(\l@youthdi,\l@youtvdii) +\thinlines +% draw the horizontals + \put(0,0){\line(1,0){\l@youthdi}} + \put(0,\l@youtvdii){\line(1,0){\l@youthdi}} +% the footer texts + \put(0,\l@youtyciii){\makebox(0,0)[bl]{left}} + \put(\l@youtxcii,\l@youtyciii){\makebox(0,0)[b]{center}} + \put(\l@youtxciii,\l@youtyciii){\makebox(0,0)[br]{right}} +% the footrule +\thicklines + \put(0,\l@youtyciv){\line(1,0){\l@youthdi}} + \put(\l@youtxciv,\l@youtyciv){\begin{picture}(\l@youthdii,\l@youthdii) + \put(0,\l@youthdiii){\makebox(0,0)[br]% + {\l@yparamfont \l@ypcmd{footrule}}} + \end{picture}} +% the TYPE BLOCK + \put(\l@youtxcii,\l@youtycv){\makebox(0,0){THE TYPE BLOCK}} +% the headrule + \put(0,\l@youtycvi){\line(1,0){\l@youthdi}} + \put(\l@youtxciv,\l@youtycvi){\begin{picture}(\l@youthdii,\l@youthdii) + \put(0,-\l@youthdiii){\makebox(0,0)[tr]% + {\l@yparamfont \l@ypcmd{headrule}}} + \end{picture}} +\thinlines +% the header texts + \put(0,\l@youtycvii){\makebox(0,0)[tl]{left}} + \put(\l@youtxcii,\l@youtycvii){\makebox(0,0)[t]{center}} + \put(\l@youtxciii,\l@youtycvii){\makebox(0,0)[tr]{right}} +% the runningwidth + \put(0,\l@youtycviii){\vector(1,0){\l@youthdi}} + \put(0,\l@youtycviii){\vector(-1,0){0}} + \put(\l@youtxcii,\l@youtyci){\makebox(0,0)% + {\l@yparamfont \l@ypcmd{runningwidth}}} + \end{picture} + \setlength{\unitlength}{1pt} + \end{center} +} + + + +\endinput |