-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdune.cls
More file actions
executable file
·347 lines (290 loc) · 9.19 KB
/
dune.cls
File metadata and controls
executable file
·347 lines (290 loc) · 9.19 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
% -*- latex -*-
%
% Document class for Conceptual Design Report
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cdr}[2015/02/02]
\LoadClass[12pt,letterpaper]{report}
\RequirePackage[letterpaper,margin=2cm]{geometry}
% Required values and their setters
\newcommand\thedoctitle{DRAFT Technical Design Report}
\newcommand\thedocsubtitle{Deep Underground Neutrino Experiment (DUNE) and Long-Baseline Neutrino Facility (LBNF)}
\def\titleextra{ }
%%% numbers below count section digits (not the chapter digit)
% set depth of sectioning to appear in the table of contents
% "2" will show chapter/section/subsection
% "3" will additionally include subsubsection
% note, this also governs the depth of the PDF "Index"
\setcounter{tocdepth}{2}
% set depth to which numbering is applied.
% "3" will number chapter/section/subsection/subsubsection
% "4" will additionally number subsubsubsection
\setcounter{secnumdepth}{4}
% note: numbering in the text and ToC are the same.
% You can have unnumbered (sub*N)sections in the ToC if
% secnumdepth < tocdepth
%%%%%%%%%%%%
%% https://tex.stackexchange.com/a/60212
% Provide finer-grained sectioning.
\RequirePackage{titlesec}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}[\glsresetall]
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%
%%% original: messes up the index
% \newcounter{subsubsubsection}[subsubsection]
% \def\subsubsubsectionmark#1{}
% \def\thesubsubsubsection {\thesubsubsection
% .\arabic{subsubsubsection}}
% \def\subsubsubsection{\@startsection
% {subsubsubsection}{4}{\z@} {-3.25ex plus -1
% ex minus -.2ex}{1.5ex plus .2ex}{\bf\normalsize\sffamily}}
% \def\l@subsubsubsection{\@dottedtocline{4}{4.8em}
% {4.2em}}
% List of other packages required, add as needed.
% Some basic packages
\RequirePackage{soul}
\RequirePackage{graphicx}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
% used for local line spacing changes such as in the title
\RequirePackage{setspace}
% Anne adds parskip 5/7/15
\RequirePackage{parskip}
\setlength{\parskip}{\baselineskip}
\RequirePackage{capt-of}
% Smart end-of-macro spacing
\RequirePackage{xspace}
% Let's use units properly and consistently!
\RequirePackage[detect-all=true,group-digits=true,group-separator={,},binary-units=true]{siunitx}
% this option trips up some people (eg, tom junk): group-minimum-digits=4,
% Long table is long
\RequirePackage{longtable}
% For abbrev/acronym lists
% \RequirePackage[intoc]{nomencl}
% \makenomenclature % does this belong here or outside of the class?
% \renewcommand{\nomname}{Acronyms, Abbreviations and Terms}
% \setlength{\nomlabelwidth}{0.2\textwidth}
% Tighter control of floats.
\RequirePackage{placeins}
\RequirePackage[table,usenames,pdftex,dvipsnames]{xcolor}
%% fixme: this needs to be controlled by "draft"
% \RequirePackage[color]{showkeys}
\RequirePackage[pagewise]{lineno}
\RequirePackage{framed}
\RequirePackage{wrapfig}
\RequirePackage{tikz}
\RequirePackage[skins]{tcolorbox}
\usetikzlibrary{snakes}
\usetikzlibrary{matrix}
\usetikzlibrary{trees}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{shadings}% needed by tcolorbox
% fixme's, must folow xcolor, tikz, ifthen
\RequirePackage{todonotes}
\RequirePackage{menukeys}
\setlength{\marginparwidth}{2cm}
% Fancier headers
\RequirePackage{fancyhdr}
\newcommand{\titlepagecornerblock}{}
\fancypagestyle{empty}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\fancypagestyle{titlepage}{
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[RO]{\titlepagecornerblock}
\fancyfoot[C]{\includegraphics[width=0.4\textwidth]{dunelogo_colorhoriz}}
}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[C]{\bfseries \thepage} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\fancypagestyle{simple}{
\fancyhf{}
\fancyhead[RO,LE]{\textsf{\footnotesize \thechapter--\thepage}}
\fancyhead[LO,RE]{\textsf{\footnotesize \leftmark}}
\fancyfoot[CO,CE]{\textsf{\footnotesize \explong}}
}
% Avoid warnings like:
% Package Fancyhdr Warning: \headheight is too small (12.0pt):
% Make it at least 14.49998pt.
\setlength{\headheight}{15pt}
% Fancier tables
\RequirePackage{booktabs}
% from http://tex.stackexchange.com/questions/4811/make-first-row-of-table-all-bold:
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
%$
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
\newcolumntype{L}{%
>{\raggedright
\bfseries
\boldmath
}l}%
%\definecolor{lightblue}{RGB}{212,236,244} ---Anne is changing (212,236,244 is lightblue)
\definecolor{dunetablecolor}{RGB}{125,174,211} % matches lighter blue color from Diana's scheme
\newcommand{\rowtitlestyle}{
% \rowcolor{lightblue}
\rowcolor{dunetablecolor}
\rowstyle{\bfseries \boldmath}
}
\newcommand{\colhline}{
\arrayrulecolor{gray}
\specialrule{0.5pt}{0pt}{1pt}
\arrayrulecolor{black}
}
\newcommand{\toprowrule}{
\arrayrulecolor{gray}
\specialrule{1.2pt}{0pt}{1pt}
\arrayrulecolor{black}
}
%%% originals come from booktabs
%%% maybe want to customize:
% \renewcommand{\toprule}{
% \arrayrulecolor{red}
% \specialrule{1.5pt}{2pt}{0pt}
% \arrayrulecolor{black}
% }
% \renewcommand{\midrule}{
% \arrayrulecolor{red}
% \specialrule{1pt}{1pt}{1pt}
% \arrayrulecolor{black}
% }
% \renewcommand{\bottomrule}{
% \arrayrulecolor{red}
% \specialrule{1.5pt}{0pt}{2pt}
% \arrayrulecolor{black}
% }
\newcommand{\dunetabtablabel}{}% stores the label
\newcommand{\dunetabcaption}{}% stores the caption
\newcommand{\dunetabcaptionshort}{}% stores an optional short caption
\newenvironment{dunetable}[4][]
{
\if\relax\detokenize{#1}\relax
\gdef\dunetabcaptionshort{\relax}
\else
\gdef\dunetabcaptionshort{#1}
\fi
\gdef\dunetablabel{#3}
\gdef\dunetabcaption{#4}
\begin{table}[hbtp]
\centering
\caption[\dunetabcaptionshort]{\dunetabcaption}
\begin{tabular}{#2}
\toprule
\rowtitlestyle
}
{
\bottomrule
\end{tabular}
\label{\dunetablabel}
\end{table}
}
\newcommand{\dunefiglabel}{}% stores the label
\newcommand{\dunefigcaption}{}% stores the caption
\newcommand{\dunefigcaptionshort}{}% stores an optional short caption
\newenvironment{dunefigure}[3][]
{
\if\relax\detokenize{#1}\relax
\gdef\dunefigcaptionshort{\relax}
\else
\gdef\dunefigcaptionshort{#1}
\fi
\gdef\dunefiglabel{#2}
\gdef\dunefigcaption{#3}
\begin{figure}[hbtp]
\centering
}
{
\caption[\dunefigcaptionshort]{\dunefigcaption}
\label{\dunefiglabel}
\end{figure}
}
%
% Provide an "editors note" environment
%
\definecolor{editornotecolor}{RGB}{255,255,153}
\newenvironment{editornote}
{
\begin{center}
\begin{tcolorbox}[width=0.9\textwidth,
colframe=editornotecolor!130,
colback=editornotecolor!20!white,
skin=enhanced]
}
{
\end{tcolorbox}
\end{center}
}
% Hyperref typically needs to come at the end of all \usepackages
\RequirePackage[pdftex,bookmarks,hidelinks]{hyperref}
% Use to import pdf files (Anne 4/28/15)
\RequirePackage{pdfpages}
% this seems overly tortured
\newif\iffinal
%\finalfalse
\DeclareOption{final}{
\finaltrue
}
\ProcessOptions\relax
\iffinal
\presetkeys{todonotes}{disable}{}
\newcommand{\hlfix}[2]{}
\newcommand{\fixme}[1]{}
\newcommand{\metainfo}[1]{}
%\linenumbers %<---- uncomment if you want ONLY linenumbers with otherwise print-ready copy
\else
% "draft"
%Set default style for todonotes
\presetkeys{todonotes}{fancyline}{}
\newcommand{\hlfix}[2]{\texthl{#1}\todo{#2}}
\newcommand{\fixme}[1]{\todo[inline]{#1}}
\newcommand{\metainfo}[1]{\todo[inline,backgroundcolor=yellow]{#1}}
\linenumbers
\fi
%add TOC, TOF, TOT, Ref to TOC (show up in PDF sidebar for easy navigation)
\RequirePackage{tocbibind}
% Use to include authorlist in PDF format
\usepackage{pdfpages}
%for \lesssim symbol
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{cleveref} %To use vref suggested by A Habig Feb 2018
\usepackage{makecell} % To allow linebreaking within table cells (AH Feb 2018)
\usepackage{cprotect}
\usepackage{eurosym}
\usepackage{tfrupee}
\usepackage{textcomp}