|
|
1.1 root 1: % Copyright (c) 1989 Jan-Simon Pendry
2: % Copyright (c) 1989 Imperial College of Science, Technology & Medicine
3: % Copyright (c) 1989 The Regents of the University of California.
4: % All rights reserved.
5: %
6: % This code is derived from software contributed to Berkeley by
7: % Jan-Simon Pendry at Imperial College, London.
8: %
9: % Redistribution and use in source and binary forms are permitted provided
10: % that: (1) source distributions retain this entire copyright notice and
11: % comment, and (2) distributions including binaries display the following
12: % acknowledgement: ``This product includes software developed by the
13: % University of California, Berkeley and its contributors'' in the
14: % documentation or other materials provided with the distribution and in
15: % all advertising materials mentioning features or use of this software.
16: % Neither the name of the University nor the names of its contributors may
17: % be used to endorse or promote products derived from this software without
18: % specific prior written permission.
19: % THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
20: % WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
21: % MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22: %
23: % @(#)nh.sty 5.1 (Berkeley) 7/19/90
24: %
25: % Change page size parameters for A4 paper on LaserWriter,
26: % allowing for headers and footers. Define some new macros for headers
27: % and footers too.
28: %
29: % MJW 9 Jan 1987
30: \oddsidemargin 16pt % MJW actually get 1/2 inch (=32pt) margin because
31: % of printer offset. was 1pt
32: \evensidemargin 16pt % was 1pt
33: \marginparwidth 30pt % these gain 53pt width
34: \topmargin 5pt % gains 26pt height (MJW was 16pt)
35: \headheight 14pt % gains 11pt height (MJW was 1pt)
36: \headsep 25pt % gains 24pt height (MJW was 1pt)
37: %\footheight 12 pt % cannot be changed as number must fit
38: \footskip 24pt % gains 6pt height
39: \textheight % 528 + 26 + 11 + 24 + 6 + 55 for luck -16 +32 (heads: -10 -15)
40: % 650pt
41: % 666pt
42: 641pt
43: \textwidth % 360 + 53 + 47 for luck -15 +8
44: 453pt
45: %\pagestyle{myheadings}
46: %\markboth{LEFT}{RIGHT}
47: %left = even, right = odd for two-sided
48: % everything is right for one-sided
49: \def\evenheadline{}\def\oddheadline{}
50: \def\evenfootline{}\def\oddfootline{}
51: % Use these to set headers and footers for two-sided printing.
52: \def\setbothheaders#1#2{\def\evenheadline{#1}\def\oddheadline{#2}}
53: \def\setbothfooters#1#2{\def\evenfootline{#1}\def\oddfootline{#2}}
54: % Use these for one-sided printing.
55: \def\setheader#1{\def\oddheadline{#1}}\def\setfooter#1{\def\oddfootline{#1}}
56: % To set footer on first page of a chapter
57: \def\setchapterfoot#1{\def\chapterfoot{#1}}
58: \def\setchapterhead#1{\def\chapterhead{#1}}
59: % Initialise footers to the page number.
60: \setbothfooters{\hfil\thepage\hfil}{\hfil\thepage\hfil}
61: % Initialise chapter footer to page number, header empty.
62: \setchapterfoot{\hfil\thepage \hfil}
63: \setchapterhead{}
64: % My version of \chapter
65: \def\chapter{\clearpage % Starts new page.
66: % \if@twoside \cleardoublepage
67: % \else\clearpage\fi % Starts new page.
68: \thispagestyle{chapterpage} % Page style of chapter page is 'chapterpage'
69: \global\@topnum\z@ % Prevents figures from going at top of page.
70: \@afterindentfalse % Suppresses indent in first paragraph. Change
71: \secdef\@chapter\@schapter} % to \@afterindenttrue to have indent.
72: % Style for first page of a chapter
73: \def\ps@chapterpage{\let\@mkboth\markboth
74: \def\@evenhead{\chapterhead}\def\@oddhead{\chapterhead}
75: \def\@evenfoot{\chapterfoot}\def\@oddfoot{\chapterfoot}}
76: % Style for headers AND footers.
77: \if@twoside % If two-sided printing.
78: \def\ps@footers{\let\@mkboth\markboth
79: \def\@evenhead{\evenheadline}\def\@oddhead{\oddheadline}
80: \def\@evenfoot{\evenfootline}\def\@oddfoot{\oddfootline}
81: % Chapter stuff
82: \def\chaptermark##1{\markboth{\uppercase{\ifnum \c@secnumdepth >\m@ne
83: \@chapapp\ \thechapter. \ \fi ##1}}{}}
84: \def\sectionmark##1{\markright{\uppercase{\ifnum \c@secnumdepth >\z@
85: \thesection. \ \fi ##1}}}
86: }
87: \else % If one-sided printing.
88: \def\ps@footers{\let\@mkboth\markboth
89: \def\@evenhead{\evenheadline}\def\@oddhead{\oddheadline}
90: \def\@evenfoot{\evenfootline}\def\@oddfoot{\oddfootline}
91: % Chapter stuff
92: %\def\chaptermark##1{\markright{\uppercase{\ifnum \c@secnumdepth >\m@ne
93: % \@chapapp\ \thechapter. \ \fi ##1}}}
94: \def\chaptermark##1{\markright{\sf {\ifnum \c@secnumdepth >\m@ne
95: \@chapapp\ \thechapter : \ \fi ##1}}}
96: }
97: \fi
98:
99: % Debugging stuff.
100: %\let\markbothorig\markboth
101: %\def\markboth#1#2{\typeout{---Markboth: \#1=#1, \#2=#2\newline}
102: % \markbothorig {#1} {#2}}
103: %
104: %\let\markrightorig\markright
105: %\def\markright#1{\typeout{---Markright: \#1=#1\newline}
106: % \markrightorig {#1}}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.