-
Notifications
You must be signed in to change notification settings - Fork 0
/
work.sty
160 lines (139 loc) · 4.55 KB
/
work.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
\voffset=0pt
\hoffset=0pt
%\ds@twoside
\oddsidemargin=0pt
\evensidemargin=0pt
%%\evensidemargin=120pt
\topmargin=0pt
\headheight=12pt
\headsep=24pt
\footskip=34pt
\marginparsep=0pt
\marginparwidth=0pt
\marginparpush=0pt
%%\marginparsep=0.25in
%%\marginparwidth=1.6in
%%\marginparpush=5pt
\hyphenpenalty=1000
\overfullrule=0pt
\looseness=1
\hfuzz=11pt
\vfuzz=11pt
\clubpenalty=10000
\widowpenalty=10000
\parindent=0pt
\parskip=8pt
\setlength{\textheight}{8.25in}
\setlength{\textwidth}{6.5in}
%%\setlength{\textwidth}{4.75in}
%%define directory for includes; renewcommand before each chapter
\newcommand{\chapterdir}{}
%%define directory for includel; renewcommand before each chapter
\newcommand{\chapname}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%defines new command \marginlabel for use with marginal notes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\marginlabel}[1]
{\mbox{}\marginpar{\footnotesize\sl\raggedright\hspace{0pt}#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%define desired header and footer structures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancyplain}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}
\renewcommand{\chaptermark}[1]%
{\markboth{#1}{#1}}
\renewcommand{\sectionmark}[1]%
{\markright{\thesection\ #1}}
\lhead[\fancyplain{}{\bf\thepage}]%
{\fancyplain{}{\bf\rightmark}}
\rhead[\fancyplain{}{\bf\leftmark}]%
{\fancyplain{}{\bf\thepage}}
\cfoot{}
\lfoot[\fancyplain{}
{\sc CMB-S4 Science Book}]%
{\fancyplain{}{}}
\rfoot[\fancyplain{}{}]%
{\fancyplain{}{\sc CMB-S4 Science Book}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\c@secnumdepth\tw@
%\addtolength{\headwidth}{-48pt}
\def\@makechapterhead#1{%
\leftline{\Huge\bf\hspace{7pt}\thechapter\hfill}
\vskip3pt
\hbox to\headwidth{%
\leaders\hrule height3.5pt\hfil}
\vskip-8pt
\hbox to\headwidth{%
\leaders\hrule height1.5pt\hfil}
\vskip18pt
%\hbox to \headwidth{\begin{minipage}{6.5in}\begin{flushright}\Huge\bf{#1}\end{flushright}\end{minipage}}
\hbox to \headwidth{\begin{minipage}{6.5in}\begin{center}\Huge\bf{#1}\end{center}\end{minipage}}
} %\vskip 30pt }
%\addtolength{\headwidth}{48pt}
\def\@makeschapterhead#1{%
\hbox to\headwidth{%
\leaders\hrule height3.5pt\hfil}
\vskip-8pt
\hbox to\headwidth{%
\leaders\hrule height1.5pt\hfil}
\vskip18pt
%\hbox to \headwidth{\begin{minipage}{6.5in}\begin{flushright}\Huge\bf{#1}\end{flushright}\end{minipage}}
\hbox to \headwidth{\begin{minipage}{6.5in}\begin{center}\Huge\bf{#1}\end{center}\end{minipage}}
\vskip 30pt }
% \vspace*{50\p@}%
% {\parindent \z@ \raggedright
% \Huge \bf
% #1\par
% \nobreak
% \vskip 40\p@
% }}
\let\introtext\@empty
\newdimen\sectionruledimen
\sectionruledimen.15pt
\def\makeparrule{%
\def\par{%
\endgraf\nobreak\vskip\lineskip\nointerlineskip
\vskip6pt
\hbox to\hsize{\hskip\sectionbackskip\leaders\hrule height\sectionruledimen
\hfil}%
%\nointerlineskip
}%
}%
\def\section{%
\@startsection {section}{1}{\sectionbackskip}{-11pt plus -1.2ex minus
-.2ex}
{13pt}{\Large\bf\makeparrule}%
}%
\sectionbackskip-\marginpartotal
\sectionruledimen2pt
\def\subsection{%
\@startsection{subsection}{2}{\z@}{-18pt plus -1ex minus -.2ex}%
{13pt plus .2ex}{\large\bf}%
}%
\def\thefigure{\mbox{\thechapter-\@arabic\c@figure}}
\def\thetable{\mbox{\thechapter-\@arabic\c@table}}
\def\thebibliography#1{\newpage\section*{\bibname\@mkboth
{\uppercase{\bibname}}{\uppercase{\bibname}}}\list
{\@biblabel{\arabic{enumiv}}}{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumiv}%
\let\p@enumiv\@empty
\def\theenumiv{\arabic{enumiv}}}%
\def\newblock{\hskip .11em plus.33em minus.07em}%
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=\@m}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% More space for the labels in the TOC.
\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
\vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\bf \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil
\nobreak\hbox to\@pnumwidth{\hss #2}\par
\penalty\@highpenalty \endgroup}
\def\l@section{\@dottedtocline{1}{1.5em}{3em}}
\def\l@subsection{\@dottedtocline{2}{4.5em}{4em}}
\def\l@subsubsection{\@dottedtocline{3}{8.5em}{5em}}
\setcounter{tocdepth}{3}