-
Notifications
You must be signed in to change notification settings - Fork 0
/
smarthepnote.cls
274 lines (238 loc) · 8.69 KB
/
smarthepnote.cls
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
% SMARTHEP note template v1.0, 2023-01-13
% Adapted from CERN ATLAS Note document Class version 0.1,
% In turn adopted for use in ATLAS notes by Thorsten Wengler from:
%
% CERN Accelerator and Technology Sector Note document class Version 0.1
% Previous history of this file:
% CERN SL Division LHC Project Note style in LaTeX format
% CERN SL Division SL MD Note style in LaTeX format
% Version 1.0 (14/2/95) JMJ
% Adapted to latex2e from the old slmdnote.sty, just a rather minor
% modification of 12pt article class.
%
% Last Modification: 14/2/95
%
% Version 1.0 (13/9/95) AFG and BAT :)
% Adapted to latex2e from the old slmdnote.cls
%
% Version 1.1 (01/07/97) Scott Berg
% Fixed \@maketitle to do line spacing right and avoid underfull hbox
% complaints
%
% Version 1.2 (31/07/98) Frank Schmidt
% (06/10/98) Frank Schmidt fiddled a bit
% Disclaimer added as numberless footnote
% Some fixes John Jowett 2/6/2010
%
% Modified into a first version of ATS Note John Jowett 1/3/2011
% Some of the things done:
% remove health warning footnote
% change LHC magnet logo to CERN logo
% use more modern options and include more standard packages (eg hyperref, amsmath, isodate)
% fix up title block a bit
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\def\fileversion{0.1}
\def\filedate{11/12/2017}
\def\docdate {11/12/2017}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cernatlasnote}%
[\filedate\space version \fileversion]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions
\LoadClass[12pt,a4paper]{article}
\RequirePackage{graphics}
\RequirePackage{array}
\usepackage{multirow}
\usepackage[table]{xcolor}
\RequirePackage[UKenglish]{babel} % http://ectan.org/pkg/babel
\RequirePackage{amsmath}
%\RequirePackage{ucs}
%\RequirePackage[utf8x]{inputenc}
\RequirePackage{hyperref}
\hypersetup{
%backref,
pdfpagemode=UseOutlines ,
linkcolor=black,
citecolor=blue,
urlcolor=blue,
%hyperfigures=true,
colorlinks=true
}
\RequirePackage[UKenglish,cleanlook]{isodate} %%% gives dates in non-American format
\cleanlookdateon %% this is for the english option of isodate
%% not sure how this interacts with a4paper option to article class
%% may not be quite the right thing to do
%% See also LaTeX book p 182
\setlength{\topmargin}{-1.0cm}
\setlength{\oddsidemargin}{0.1cm}
\setlength{\textwidth}{16.0cm}
\setlength{\textheight}{23.0cm}
%it uses the following info
% \email{..} (electronic mail adress) printed at top left of title page
% \title{..}
% \author{..}
% \date{..} optional
% \documentlabel{..} printed at top right of title page
% You also need to use \begin{document} and \end{document}
\def\section{\@startsection{section}{1}{\z@}{-3.5ex plus -1ex minus
-.2ex}{2.3ex plus .2ex}{\bfseries\Large}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus
-.2ex}{1.5ex plus .2ex}{\bfseries\large}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
-1ex minus -.2ex}{1.5ex plus .2ex}{\bfseries\normalsize}}
\def\paragraph{\@startsection
{paragraph}{4}{\z@}{-2.25ex plus 1ex minus .2ex}{1em}{\normalsize}}
% Sign changes for BEFORE&AFTERSKIP at 15:09:43 on 30 Nov 1987 by JOWETT
% Makes unnumbered headings without running in to text (subparagraph will
% still do that for you).
\def\subparagraph{\@startsection
{subparagraph}{4}{\parindent}{3.25ex plus 1ex minus .2ex}
{-1em}{\normalsize}}
% The value of the counter secnumdepth gives the depth of the
% highest-level sectioning command that is to produce section numbers.
%
\setcounter{secnumdepth}{3}
%-----------------------------------------------------------------------
% Use same font series in contents
\def\l@section#1#2{\addpenalty{\@secpenalty} % good place for page break
\addvspace{1.0em plus 1pt} % space above toc entry
\@tempdima 1.5em % width of box holding section number
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\bfseries % Bold sans serif
%% Modified at 17:10:02 on 29 Mar 1989 by JOWETT
\leavevmode % TeX command to enter horizontal mode.
#1\hfil \hbox to\@pnumwidth{\hss #2}\par
\endgroup}
%-----------------------------------------------------------------------
% Change label style in description environment
\def\descriptionlabel#1{\hspace\labelsep \bfseries #1}
%-----------------------------------------------------------------------
% The abstract Environment (actually generates a Summary)
\def\abstract{\paragraph*{Summary}\small}
\def\endabstract{\par\noindent\rule{\textwidth}{1.5pt}}
\def\endtitlepage{\setcounter{footnote}{0}}
%-----------------------------------------------------------------------
% fancy double line
\def\fancyline{\par\noindent
\parbox{\textwidth}{
\setlength{\baselineskip}{1.2mm}
\rule{\textwidth}{0.8pt}
\rule{\textwidth}{1.5pt}\par
}}
%-----------------------------------------------------------------------
\renewcommand\maketitle{%
% Here we put the document label, email and file
% name at top right. Defaults are an
% empty box for email and "Preliminary draft" with
% time of day and date for the label. Tabular
% environments are used to allow for the possibility
% of multiple line document labels - lines separated
% by \\ in the argument of \documentlabel - and
% multiple line email (which could have other uses).
{\setlength{\arrayrulewidth}{1pt}
\setlength{\parindent}{0pt}
\begin{tabular}[t]{@{}p{0.45\textwidth}}
{
\protect{\includegraphics[width=55mm]{images/SmartHEPLogo.pdf}}
}
\end{tabular}
\hfill
\begin{tabular}[b]{r@{}}
{\normalsize\@date}\\
\end{tabular}
\par
\vskip\baselineskip
\vskip1ex
{\bfseries\Large\raggedright\hyphenpenalty=10000\@title\par}
\vskip\baselineskip
{\large\raggedright\hyphenpenalty=10000\@author\par}
\vskip\baselineskip
\hfill\par
}
\fancyline
\endtitlepage
}
\newcommand{\makereviewtable}{
{\flushleft
\begin{center}
\begin{tabular}[bhp]{|p{0.3\textwidth}|p{0.3\textwidth}|p{0.3\textwidth}|}
\hline
\multicolumn{1}{|l}{Deliverable Number:} & \multicolumn{2}{l|}{\@DeliverableNo} \\
\multicolumn{1}{|l}{Version:} & \multicolumn{2}{l|}{\@draftversion} \\
\multicolumn{1}{|l}{Last modified:} & \multicolumn{2}{l|}{\@documentlabel} \\
\hline
\textbf{Authors:} & \textbf{Editors:} & \textbf{Coordinators:}\\
& & \\
\begin{minipage}{0.3\textwidth}
\@DocAuthors
\end{minipage}
&
\begin{minipage}{0.3\textwidth}
\@DocEditors
\end{minipage}
&
\begin{minipage}{0.3\textwidth}
\@DocCoordinators
\end{minipage}
\\
& & \\
\hline
\hline
\end{tabular}
\end{center}
}
\vskip10pt
\small \textbf{Authorship note:} Editors have made significant contributions to the text and figures in this document, authors have contributed to supervision, discussions, writing and reviewing this document, and coordinators have contributed to editing and led the overall work towards the delivery of this document.
}
%------------------------------------------------------------------------
% compute the time in hours and minutes; make new variables \timehh and \timemm
%% Added at 11:19:59 on 26 Sep 1988 by JOWETT
%
\newcount\timehh\newcount\timemm
\timehh=\time
\divide\timehh by 60 \timemm=\time
\count255=\timehh\multiply\count255 by -60 \advance\timemm by \count255
%
\def\timeofday{\ifnum\timehh<10 0\fi\number\timehh:%
\ifnum\timemm<10 0\fi\number\timemm
}
\def\documentlabel#1{\gdef\@documentlabel{\large\bfseries #1}}
% see \@maketitle
\gdef\@documentlabel{\tt\timeofday\ on \today}
\def\email#1{\gdef\@email{#1}} % see \@maketitle
\gdef\@email{\hbox{}}
\def\keywords#1{\gdef\@keywords{#1}} % see \@maketitle
\gdef\@keywords{{\tt SMARTHEP, real-time analysis}}
\def\@DeliverableNo{}
\newcommand{\DeliverableNo}[1]%
{
\def\@DeliverableNo{#1}
}
\def\@DocAuthors{}
\newcommand{\DocAuthors}[1]%
{
\def\@DocAuthors{#1}
}
\def\@DocCoordinators{}
\newcommand{\DocCoordinators}[1]%
{
\def\@DocCoordinators{#1}
}
\def\@DocEditors{}
\newcommand{\DocEditors}[1]%
{
\def\@DocEditors{#1}
}
% Draft version
\def\@draftversion{}
\newcommand{\draftversion}[1]%
{
\def\@draftversion{#1}
}
% The \documentlabel, \email and \keywords
% commands do not exist in ordinary LaTeX.
\endinput