-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhitepaper.sty
599 lines (500 loc) · 18.1 KB
/
whitepaper.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
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
% ======================================================================
%+
% NAME:
% whitepaper.sty
%
% PURPOSE:
% Master style file for LSST science collaboration white papers
%
% COMMENTS:
% Adapted from SciBook.sty
%
% INPUTS:
%
%
% OPTIONAL INPUTS:
%
%
% OUTPUTS:
% white paper PDF file
%
% DEPENDENCIES:
% - SciBook.bst
% - komascript package, providing the scrbook.cls
% http://www.ctan.org/tex-archive/macros/latex/contrib/koma-script/
% - lineno.sty, for draft version
% http://www.ctan.org/tex-archive/macros/latex/contrib/lineno/
%
% EXAMPLES:
% make produces draft version of white paper
% make final produces final version of white paper
%
% BUGS:
% - see trac system for open tickets
% - lineno package may well need installing for draft version to work
%
% AUTHORS:
% Michael Sivertz <[email protected]>
% Phil Marshall <[email protected]>
% Michael Wood-Vasey <[email protected]>
%-
% ======================================================================
% PJM 2009-01-29 (Thursday) 09:37 PST
% Bizarre bug only dound on windows - clash between scrbook definition of
% ifvtex pacakage, and some other invocation of it....
\let\ifvtex\relax
% Tony - does this solve your problem?
% Draft and final versions - boolean variable set by makefile,
% default is draft.
\usepackage{ifthen}
\newboolean{draft}
\newboolean{final}
\setboolean{draft}{false}
\typeout{ }
\ifthenelse{\boolean{draft}}{
\typeout{************************}
\typeout{* Making draft version *}
\typeout{************************}
}{
\setboolean{final}{true}
\typeout{************************}
\typeout{* Making final version *}
\typeout{************************}
}
\typeout{ }
\ifthenelse{\boolean{draft}}
{ % Draft version settings:
\typeout{*********************************}
\typeout{* INCLUDE LINE NUMBERS IN DRAFT *}
\typeout{*********************************}
\usepackage{lineno}
\linenumbers
}{ % Final version settings:
% Nice fonts - but not available on many systems (including Tony's)
% \usepackage{mathpple}
}
%------------------------------------------------------------------------------%
% Line spacing - this could go inside the if block above if
% the draft needed to be double spaced...
% Standard:
\renewcommand{\baselinestretch}{1.0}
% % Double spacing:
% \renewcommand{\baselinestretch}{2.0}
% % Slightly compressed:
% \renewcommand{\baselinestretch}{0.95}
%------------------------------------------------------------------------------%
% Packages
%%%%%
% Generally useful:
\usepackage{xspace}
\usepackage{tabularx}
\usepackage{deluxetable} % Moved here by PJM 2009-01-27
% 2012/07/22 - Added MWV to control enumeration lists labels and references
\usepackage[inline]{enumitem}
%\usepackage{paralist}
%%%%%
%% If you use a font encoding package, please enter it here, i.e.,
% \usepackage{T1enc}
% The following is an attractive font - but not everyone has it!
% \usepackage{mathpple}
% At the moment, we are using the system default font - the safest, but not
% necessarily the prettiest option.
%%%%%
% Math packages commonly used by astronomers:
\usepackage{amsmath,amssymb}
\usepackage{bm}
%%%%%
% Style for inserting .eps files and rotating illustrations or tables
% possible options for graphicx:
% [dvips], [xdvi], [dvipdf], [dvipsone], [dviwindo], [emtex], [dviwin],
% [pctexps], [pctexwin], [pctexhp], [pctex32], [truetex], [tcidvi],
% [oztex], [textures]
%\usepackage[dvips]{graphicx}
% jpg figures preferred to keep file size small and compilation
% rapid - cannot use graphicx like this though...
\usepackage{epsfig}
%%%%%
% Adding useful figure package tools
\usepackage{wrapfig}
%%%%%
% Attempt to allow astro journal style citations (eg citep and citet...)
\usepackage{natbib}
%\usepackage{chapterbib}
%%%%%
% Hyper-linking between sections - must be *last* package?!:
%\usepackage{color}
%\definecolor{violet}{rgb}{0.4,0.0,0.4}
%\usepackage[%
%pdftitle={The LSST Science Book},%
%pdfauthor={The LSST Science Collaborations},%
%bookmarksnumbered=true,%
%linkcolor=blue,citecolor=violet,colorlinks=true]{hyperref}
%mbs
\usepackage{color}
\definecolor{violet}{rgb}{0.4,0.0,0.4}
\usepackage[%
pdftitle={The LSST Dark Energy Science White Paper},%
pdfauthor={The LSST Dark Energy Science Collaborations},%
bookmarksnumbered=true,%
linkcolor=blue,citecolor=violet,colorlinks=true]{hyperref}
%linkcolor=blue,citecolor=violet,urlcolor=green,colorlinks=true]{hyperref}
%mbs
% PJM: Does not work with kapmono.cls - I get the following error:
%
% ! Argument of \@fifthoffive has an extra }.
% <inserted text>
% \par
% l.126 ...mulation shown in Figure~\ref{fig:imsim4}
% . This simulation was
% ?
% Could be that hyperref is incompatible with the way labelling is set up
% in this class file. The problem is not the label string...
%%%%%
% Tony Tyson on windows needs to explicitly set the ifpdf flag?
% This package shouldprint out the following message to show that the pdf
% generation is going to work properly:
% (/usr/share/texmf/tex/latex/oberdiek/ifpdf.sty
% Package: ifpdf 2001/06/14 v1.0 Providing \ifpdf (HO)
% Package ifpdf Info: pdfTeX in pdf mode detected on input line 140.
% )
% Tony gets something different:
% ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\ifpdf.sty"
% Package: ifpdf 2007/12/12 v1.6 Provides the ifpdf switch (HO)
% Package ifpdf Info: pdfTeX in pdf mode not detected.
% )
\usepackage{ifpdf}
\usepackage{rotating}
%------------------------------------------------------------------------------%
% Headings and contents:
%%%
% How many levels of section head would you like numbered?
% 0= no section numbers, 1= section, 2= subsection, 3= subsubsection
\setcounter{secnumdepth}{2}
% How many levels of section head would you like to appear in the
% Table of Contents?
% 0= chapter titles, 1= section titles, 2= subsection titles,
% 3= subsubsection titles.
% Some chapters are organised as 1 project per subsection! eg weaklens
\setcounter{tocdepth}{1}
% This is to get the spacing right in the table of contents:
% \makeatletter
\renewcommand*\l@part{\@dottedtocline{1}{0em}{2.0em}}
\renewcommand*\l@chapter{\@dottedtocline{1}{0em}{2.0em}}
\renewcommand*\l@section{\@dottedtocline{1}{0em}{3.0em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{3.0em}{2.8em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{5.8em}{3.2em}}
%\renewcommand*\l@section{\@dottedtocline{1}{0em}{3.0em}}
%\renewcommand*\l@subsection{\@dottedtocline{2}{3.0em}{2.8em}}
%\renewcommand*\l@subsubsection{\@dottedtocline{3}{5.8em}{3.2em}}
% \makeatother
%------------------------------------------------------------------------------%
% Macros/definitions:
% Markup:
\def\XX{{\bf XX}\;}
% General purpose usefulness:
\def\eg{{e.g.}\xspace}
\def\ie{{i.e.}\xspace}
\def\etc{{etc}\xspace}
\newcommand{\etal}{et al.}
% Journal definitions for bibtex:
\def\jnl#1{{\it#1\/}}
\def\apj{\jnl{ApJ}}
\def\apjl{\jnl{ApJL}}
\def\apjs{\jnl{ApJS}}
\def\aj{\jnl{AJ}}
\def\apss{\jnl{Ap\&SS}}
\def\mnras{\jnl{MNRAS}}
\def\aap{\jnl{A\&A}}
\def\aaps{\jnl{A\&AS}}
\def\nat{\jnl{Nature}}
\def\physrep{\jnl{Phys. Rep.}}
\def\araa{\jnl{ARAA}}
\def\prd{\jnl{Phys.\ Rev.\ D}}
\def\pasp{\jnl{PASP}}
\def\pasj{\jnl{PASJ}}
\def\aaps{\jnl{A\&AS}}
\def\an{\jnl{AN}}
\def\jcap{\jnl{JCAP}}
% Math macros:
\def\ltsim{\lesssim}
\def\gtsim{\gtrsim}
\def\lessim{\lesssim}
\newcommand{\bit}[1]{\mbox{\textbf{\emph{#1}}}} % bold italic
% Cosmology:
\def\Om{\ensuremath{\Omega_{\rm m}}}
\def\Ob{\ensuremath{\Omega_{\rm b}}}
\def\OL{\ensuremath{\Omega_{\Lambda}}}
\def\Ok{\ensuremath{\Omega_{\rm k}}}
\def\om{\ensuremath{\omega_{\rm m}}}
\def\ob{\ensuremath{\omega_{\rm b}}}
\def\w0{\ensuremath{w_0}}
\def\wa{\ensuremath{w_{\rm a}}}
\def\lcdm{$\Lambda$CDM}
\def\wcdm{$w$CDM}
% Astronomy:
\def\arcsec{''}
\def\kms{\ensuremath{{\rm km s}^{-1}}}
\def\hgpcq{\mbox{$h^{-3}$Gpc$^3$}}
\def\hmpcq{\mbox{$h^{-3}$Mpc$^3$}}
\def\hmpc{\mbox{$h^{-1}$Mpc}}
\def\hmpci{\mbox{$h$\,Mpc$^{-1}$}}
\def\mpc{\mbox{Mpc}}
\def\mpci{\mbox{Mpc$^{-1}$}}
%\def\phz{{photo-\emph{z}}}
%\def\Phz{{Photo-\emph{z}}}
\def\phz{{photometric redshift}}
\def\Phz{{Photometric redshift}}
\def\zp{z_{\rm p}}
% Statistics/inference:
\newcommand{\pr}{\textrm{\rm Pr\,}}
\newcommand{\Data}{\textrm{\,data\,}}
\newcommand{\Model}{\textrm{\,model\,}}
\newcommand{\Pars}{\{\theta\}}
\newcommand{\datav}{\mathbf{d}}
\newcommand{\modelv}{\mathbf{H}}
\newcommand{\parsv}{\boldsymbol{\theta}}
\newcommand{\datum}{\mathnormal{d}}
\newcommand{\model}{\mathnormal{h}}
\newcommand{\param}{\theta}
\newcommand{\covmat}{\mathsf{C}}
% Strong Lensing:
\def\zd{z_{\rm l}}
\def\zs{z_{\rm s}}
\def\Dd{D_{\rm l}}
\def\Ds{D_{\rm s}}
\def\Dds{D_{\rm ls}}
\def\kappax{\kappa_{\rm ext}}
\def\thetaE{\theta_{\rm E}}
\def\bsixteenoeight{B1608$+$656}
\def\rxjthirteenfortyseven{RX~J1347$-$1145}
\def\bulletcluster{1E0657$-$56}
\def\babybullet{MACS~J0025.4$-$1222}
\def\babybulletii{MACS~J2243.3$-$--0935}
%------------------------------------------------------------------------------%
% Explicit margin set-up (PJM 2009-08-25):
%
% - Useful diagram explaining various lengths:
% http://latex.knobs-dials.com/margins.png
% - If topmargin and bottommargin are set too large, document may not
% compile, complaining of "too many unprocessed floats".
% Basically to fit all the figures in with their current sizes, need small
% margins. Maybe some figures are not sized as fractions of the \linewidth?
% Letter:
% \setlength{\paperwidth}{8.5in} % set size for latex
% \setlength{\paperheight}{11in}
% \special{papersize=8.5in,11in} % set size for ghostscript
% A4:210 × 297mm = 8.27 x 11.69in
\setlength{\paperwidth}{210mm} % set size for latex
\setlength{\paperheight}{297mm}
\special{papersize=210mm,297mm} % set size for ghostscript
% ---
% Left hand margin - different according to page number.
% Inner margin should be larger to account for spine?
% % Wide margins:
% \newlength{\innermargin}
% \setlength{\innermargin}{1.3in}
% \newlength{\outermargin}
% \setlength{\outermargin}{1.0in}
% Narrow margins (about 2 and 3cm):
\newlength{\innermargin}
\setlength{\innermargin}{1.0in}
\newlength{\outermargin}
\setlength{\outermargin}{0.8in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Size tests PJM 2009-08-27 (Thursday)
%
% Letter paper, stretch 0.95, wide margins: 625 pages
% A4 paper, stretch 0.95, wide margins: 576 pages
% A4 paper, stretch 0.95, narrow margins: 558 pages
% A4 paper, stretch 1.00, narrow margins: 576 pages
% No checking for figure placement issues
% Left it with this final option.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page numbering is such that odd pages are on the left:
\setlength{\oddsidemargin}{\innermargin}
\addtolength{\oddsidemargin}{-1.0in} % start with zero
\addtolength{\oddsidemargin}{-\hoffset}
\setlength{\evensidemargin}{\outermargin}
\addtolength{\evensidemargin}{-1.0in} % start with zero
\addtolength{\evensidemargin}{-\hoffset}
% Just to make sure - zero the margin notes:
\setlength{\marginparsep}{0in}
\setlength{\marginparwidth}{0in}
% Now set text width accordingly - each page has an inner and an outer margin:
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-\innermargin}
\addtolength{\textwidth}{-\outermargin}
% ---
% Top and bottom margins are harder - need to account for header and footer.
% Topmargin is gap between paper edge and top of header:
\addtolength{\topmargin}{-1.0in} % start with zero
\addtolength{\topmargin}{-\voffset}
\addtolength{\topmargin}{0.9in}
% Height of header line:
\setlength{\headheight}{0.3in}
% Separation between header and top of text block:
\setlength{\headsep}{0.3in}
% Distance between top of text block and first line of text:
\setlength{\topskip}{\baselineskip}
% Distance between bottom of text block and bottom of footer:
\setlength{\footskip}{3\baselineskip}
% Define distance between bottom of footer and end of page:
\newlength{\bottommargin}
\setlength{\bottommargin}{0.8in}
% Now set height of text block - first to maximum:
\setlength{\textheight}{\paperheight}
% then leftovers is text block height:
\addtolength{\textheight}{-1in} % start with zero
\addtolength{\textheight}{-\topmargin}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\footskip}
\addtolength{\textheight}{-\bottommargin}
% \addtolength{\textheight}{5\baselineskip}
%------------------------------------------------------------------------------%
% Useful front matter trick:
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
%------------------------------------------------------------------------------%
% Redefine headers:
\renewcommand{\chaptermark}[1]{\markboth{Chapter\ \thechapter: #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}{}}
%------------------------------------------------------------------------------%
% Redefine paragraphs and lists:
\setlength\parskip{0.5\baselineskip \@plus 0.5\baselineskip}
\setlength\parindent{0mm}
\setlength\listparindent{0mm}
\setlength\itemsep{-0.5\baselineskip}
\setlength\parsep{0.5\baselineskip}
\setlength\topsep{0mm}
\setlength\partopsep{0mm}
\renewcommand*\descfont{\bfseries}
%------------------------------------------------------------------------------%
% Redefine sectioning:
\renewcommand*\sectfont{\bfseries}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\raggedsection\normalfont\itshape\size@subsubsection\sectfont}}
%------------------------------------------------------------------------------%
% Redefine captions:
\renewcommand{\@makecaption}[2]{%
\vskip\abovecaptionskip
\sbox\@tempboxa{%
{\footnotesize\caplabelfont #1\captionformat}
{\footnotesize\capfont #2}}%
\ifdim \wd\@tempboxa >\hsize
{\footnotesize\caplabelfont #1\captionformat}
{\footnotesize\capfont #2\par}
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip
}
%------------------------------------------------------------------------------%
% Autoreferencing:
\renewcommand*\chapterautorefname{Chapter}
\renewcommand*\sectionautorefname{\S}
\renewcommand*\subsectionautorefname{\S}
\renewcommand*\figureautorefname{Figure}
\renewcommand*\tableautorefname{Table}
\renewcommand*\equationautorefname{Equation}
% Needed in white paper:
\renewcommand*\Itemautorefname{Task}
%------------------------------------------------------------------------------%
% Task formatting:
% PJM: description environment for tasks, needs(?)
% item heading macros, to allow global editing, and italic headings.
% \renewcommand\descriptionlabel[1]{\hspace{\labelsep}{\textsl{#1}}}
% \def\motivation{Motivation:}
% \def\activities{Activities:}
% \def\deliverables{Deliverables:}
% Example usage:
%
% \begin{description}
% \item[\motivation] Currently things are bad.
% \item[\activities] We will work to make them better.
% \item[\deliverables] Code to solve all problems.
% \end{description}
% PJM: The following macro works, but is not very transparent to the writer...
% \def\task#1#2#3%
% {\begin{description}
% \item[Motivation]{#1}
% \item[Activities]{#2}
% \item[Deliverables]{#3}
% \end{description}}
% Example usage:
%
% \task
% {Currently things are bad.}
% {We will work to make them better.}
% {Code to solve all problems.}
% PJM: OK, this is better - now only task items are italicised, and we have
% control over all tasks:
\def\motivation#1{\item[Motivation:] #1}
\def\activities#1{\item[Activities:] #1}
\def\deliverables#1{\item[Deliverables:] #1}
\newenvironment{task}%
{\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textit{##1}}
\begin{description}\setlength{\itemsep}{0.15\baselineskip}}
{\end{description}}
% Example usage:
%
% \begin{task}
% \motivation{Currently things are bad}.
% \activities{We will work to make them better}.
% \deliverables{Code to solve all problems}.
% \end{task}
% PJM: here's a tasklist environment to take care of Michael's enumeration:
\def\tasktitle#1{\item{\bf #1}}
\newenvironment{tasklist}[1]%
{\begin{enumerate}[label=#1-\arabic{*}.,ref=\thesubsection:#1-\arabic{*},font=\bf]}
{\end{enumerate}}
% Example usage:
%
% \begin{tasklist}{H}
% \tasktitle{Automated Lens Candidate Detection in the LSST Catalogs [Lupton]}
% \label{task:sl:detection}
% \begin{task}
% \motivation{Currently things are bad}.
% \activities{We will work to make them better}.
% \deliverables{Code to solve all problems}.
% \end{task}
% \end{tasklist}
%------------------------------------------------------------------------------%
% Tabular material:
\setlength{\extrarowheight}{4pt}
%------------------------------------------------------------------------------%
% Bibliography stuff:
\bibpunct[, ]{(}{)}{;}{a}{}{,}
% Rename bibliography sections and make everything more compact:
% \renewcommand\bibname{\LARGE References}
% PJM: That large makes the header look silly...
\renewcommand\bibname{References}
% PJM 10/10/09: need this switch to change marking of appendix headers:
\newboolean{appendix}
\setboolean{appendix}{false}
% PJM: This command makes latex set up the bibliography as a section*, not
% a chapter. Need to add a markboth command too, below...
\renewcommand\bibsection{\section*{\refname}}
\let\oldthebibliography=\thebibliography
\let\endoldthebibliography=\endthebibliography
\renewenvironment{thebibliography}[1]{%
\begin{oldthebibliography}{#1}%
% Make sure the references line gets into the contents table - note spacing!
\addcontentsline{toc}{section}{\hspace{3em}References}
\footnotesize
\setlength{\parskip}{0ex}%
\setlength{\itemsep}{0ex}%
% PJM 10/10/09: Appendix reference section headers need to be marked with
% "Appendix" not "Chapter"
\ifthenelse{\boolean{appendix}}{
\markboth{Appendix\ \thechapter: References}{Appendix\ \thechapter: References}
}{
\markboth{Chapter\ \thechapter: References}{Chapter\ \thechapter: References}
}
}%
{%
\end{oldthebibliography}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%