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
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
%%
%% This is file `hep-paper-documentation.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hep-paper-implementation.dtx (with options: `documentation')
%% This is a generated file.
%% Copyright (C) 2019-2020 by Jan Hajer
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in:
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\ProvidesFile{hep-paper-documentation.tex}[2020/10/01 v1.5 HEP-Paper documentation]
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\def\MacroFont{\fontencoding\encodingdefault\fontfamily{lmtt}\fontseries\mddefault\fontshape\shapedefault\small}
\MacroIndent=1.5em
\usepackage[parskip]{hep-paper}
\bibliography{bibliography}
\acronym{PDF}{portable document format}
\acronym{URL}{uniform resource locator}
\acronym{CM}{computer modern}
\acronym{LM}{latin modern}
\usepackage{hologo}
\newenvironment{columns}[1][.5]{%
\par\vspace{-\bigskipamount}%
\begin{minipage}[t]{\linewidth}%
\begin{minipage}[t]{#1\linewidth}%
\newcommand{\column}{%
\end{minipage}%
\begin{minipage}[t]{\linewidth-#1\linewidth}%
}%
}{\end{minipage}\end{minipage}\par}
\setlength{\fboxsep}{1pt}
\GetFileInfo{hep-paper.sty}
\title{The \software{hep-paper} package\thanks{This document corresponds to \software{hep-paper}~\fileversion.}}
\subtitle{Publications in high energy physics}
\author{Jan Hajer \email{jan.hajer@uclouvain.be}}
\affiliation{Centre for Cosmology, Particle Physics and Phenomenology, Université catholique de Louvain, Louvain-la-Neuve B-1348, Belgium}
\preprint{Preprint-Number}
\date{\filedate}
\begin{document}
\maketitle
\begin{abstract}
The \software{hep-paper} package aims to provide a single style file containing most configurations and macros necessary to write appealing publications in High Energy Physics.
Instead of reinventing the wheel by introducing newly created macros \software{hep-paper} preferably loads third party packages as long as they are lightweight enough.
\end{abstract}
\tableofcontents\clearpage
\newgeometry{vscale=.8, vmarginratio=3:4, includeheadfoot, left=11em, marginparwidth=4.6cm, marginparsep=3mm, right=7em}
\section{Introduction}
For usual publications it is enough to load additionally to the |article| class without optional arguments only the \software{hep-paper} package \cite{hep-paper}.
\begin{verbatim}
\documentclass{article}
\usepackage{hep-paper}
\end{verbatim}
The most notable changes after loading the \software{hep-paper} package is the change of some \hologo{LaTeX} defaults.
The paper and font sizes are set to A4 and \unit[11]{pt}, respectively.
Additionally, the paper geometry is adjusted using the \software{geometry} package \cite{geometry}.
Furthermore, the font is changed to \LM using the \software{lmodern} package \cite{lmodern} with \software{microtype} \cite{microtype} optimizations.
Finally, \PDF hyperlinks are implemented with the \software{hyperref} package \cite{hyperref}.
\subsection{Options}
\DescribeMacro{paper}
The |paper=|\meta{format} option loads the specified paper format.
The possible \meta{formats} are:
|a0|, |a1|, |a2|, |a3|, |a4|, |a5|, |a6|,
|b0|, |b1|, |b2|, |b3|, |b4|, |b5|, |b6|,
|c0|, |c1|, |c2|, |c3|, |c4|, |c5|, |c6|,
|ansia|, |ansib|, |ansic|, |ansid|, |ansie|,
|letter|, |executive|, |legal|.
The default is |a4|.
\DescribeMacro{font}
The |font=|\meta{size} option loads the specified font size.
The possible \meta{sizes} are:
|8pt|, |9pt|, |10pt|, |11pt|, |12pt|, |14pt|, |17pt|, |20pt|.
The default is \unit[11]{pt}.
\DescribeMacro{lang}
The |lang|=\meta{name} option switches the document language to one of the values values provided by the \software{babel} package \cite{babel}.
The default is |british|.
\DescribeMacro{sansserif}
The |sansserif| option switches the document including math to sans serif font shape.
\DescribeMacro{parskip}
The |parskip| option changes how paragraphs are separated from each other using the \software{parskip} package \cite{parskip}.
The \hologo{LaTeX} default is separation via indentation the |parskip| option switches to separation via vertical space.
\footnote{Although the |parskip| option is used for this document, it is recommended only for very few document types such as technical manuals or answers to referees.}
\DescribeMacro{symbols}
The |symbols|=\meta{family} set the family of the symbol fonts.
|symbols=ams| loads two \hologo{AmS} fonts \cite{amsfonts} and the \software{bm} bold fonts.
The default setting replaces additionally the blackboard font with the \software{dsfont} \cite{dsfont}.
|symbols=minion| switches the symbol fonts to the Adobe MinionPro companion font from the \software{MnSymbol} package \cite{MnSymbol}.
|symbols=false| deactivates additional symbol fonts.
\subsubsection{Deactivation}
The \software{hep-paper} package loads few bigger packages which have a large impact on the document.
The deactivation options prevent such adjustments.
\DescribeMacro{defaults}
The |defaults| option prevents the adjustment of the page geometry and the font size set by the document class.
\DescribeMacro{title}
The |title=false| option deactivates the title page adjustments.
\DescribeMacro{bibliography}
The |bibliography|=\meta{key} option prevents the automatic loading of the \software{biblatex} package \cite{biblatex} if \meta{key}=|false|.
Otherwise the \meta{key} is passed as |style| string to the \software{biblatex} package.
\DescribeMacro{glossaries}
The |glossaries=false| option deactives acronyms and the use of the \software{glossaries} package \cite{glossaries}.
\DescribeMacro{references}
The |references=false| option prevents the \software{cleveref} package \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros.
\subsubsection{Compatibility}
The compatibility options activate the compatibility mode for certain classes and packages used for publications in high energy physics.
They are mostly suitable combinations of options described in the previous section.
If \software{hep-paper} is able to detect the presence of such a class or package, \ie if it is loaded before the \software{hep-paper} package, the compatibility mode is activated automatically.
\DescribeMacro{beamer}
The |beamer| option activates the \software{beamer} \cite{beamer} compatibility mode.
\DescribeMacro{jhep}
The |jhep| option activates the \software{JHEP} \cite{jhep} compatibility mode.
\DescribeMacro{jcap}
The |jcap| option activates the \software{JCAP} \cite{jcap} compatibility mode.
\DescribeMacro{revtex}
The |revtex| option activates the REV\hologo{TeX} \cite{revtex} compatibility mode.
\DescribeMacro{pos}
The |pos| option activates the \software{PoS} compatibility mode.
\subsubsection{Reactivation}
The \software{hep-paper} package deactivates unrecommended macros, which can be reactivated manually.
\DescribeMacro{manualplacement}
The |manualplacement| option reactivates manual float placement.
\DescribeMacro{eqnarray}
The |eqnarray| option reactivates the depreciated |eqnarray| environment.
\section{Macros and environments}
\subsection{Title page}
\DescribeMacro{\title}
The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information.
\DescribeMacro{\subtitle}
The |\subtitle|\marg{subtitle} macro is defined using the \software{titling} package \cite{titling}.
\DescribeMacro{\author}
\DescribeMacro{\affiliation}
\DescribeMacro{\email}
In order to facilitate multiple authors with different affiliations the \software{authblk} package \cite{authblk} is loaded.
The following lines add \eg two authors with different affiliations
\begin{verbatim}
\author[1]{Author one \email{email one}}
\affiliation[1]{Affiliation one}
\author[2]{Author two \email{email two}}
\affiliation[1,2]{Affiliation two}
\end{verbatim}
\DescribeMacro{\preprint}
The |\preprint|\marg{numer} macro places a pre-print number in the upper right corner of the title page.
\DescribeEnv{abstract}
The |abstract| environment is adjusted to not start with an indentation.
\DescribeMacro{\titlefont}
\DescribeMacro{\subtitlefont}
\DescribeMacro{\authorfont}
\DescribeMacro{\affiliationfont}
\DescribeMacro{\preprintfont}
Various title font macros are defined, allowing to change the appearance of the |\maketitle| output.
\subsection{Text}
Hyphenation is provided by the \software{babel} package \cite{babel} and quotation commands are provided by the \software{csquotes} package \cite{csquotes} recommended by the \software{babel} package.
\DescribeMacro{\enquote}
\DescribeMacro{\MakeOuterQuote}
The latter package provides the convenient macros |\enquote|\marg{text} and |\MakeOuterQuote{"}| allowing to leave the choice of quotation marks to \hologo{LaTeX} and use |"| instead of the pair |``| and |''|, respectively.
\DescribeMacro{\eg}
\DescribeMacro{\vs}
The \software{foreign} package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs.
\DescribeMacro{\no}
The |\no|\marg{number} macro is typeset as \no{123}.
\DescribeMacro{\software}
The |\software|\oarg{version}\marg{name} macro is typeset as \software[\fileversion]{HEP-Paper}.
\DescribeMacro{\online}
The |\online|\marg{url}\marg{text} macro combines the features of the |\href|\marg{url} \marg{text} \cite{hyperref} and the |\url|\marg{text} \cite{url} macros, resulting in \eg \online{https://ctan.org/pkg/hep-paper}{ctan.org/pkg/hep-paper}.
\DescribeMacro{inlinelist}
\DescribeMacro{enumdescript}
The |inlinelist| and |enumdescript| environments are defined using the \software{enumitem} package \cite{enumitem}.
\begin{columns}
\begin{verbatim}
The three main points are
\begin{inlinelist}
\item one
\item two
\item three
\end{inlinelist}
\end{verbatim}
\column
The three main points are
\begin{inlinelist}
\item one
\item two
\item three
\end{inlinelist}
\end{columns}
\vspace{4ex}
\begin{columns}[.6]
\begin{verbatim}
\begin{enumdescript}[label=\Roman*)]
\item{First} one
\item{Second} two
\item{Third} three
\end{enumdescript}
\end{verbatim}
\column
\begin{enumdescript}[label=\Roman*)]
\item{First} one
\item{Second} two
\item{Third} three
\end{enumdescript}
\end{columns}
\DescribeMacro{\textsc}
A bold versions \textbf{\textsc{Small Caps}} and a sans serif version of \textsf{\textsc{Small Caps}} based on the \CM font is provided, the latter using the \software{sansmathfonts} package \cite{sansmathfonts}.
\DescribeMacro{\underline}
\DescribeMacro{\overline}
The |\underline| macro is redefined to allow line-breaks using the \software{ulem} package \cite{ulem}.
The |\overline| macro is extended to also \overline{overline} text outside of math environments.
\DescribeMacro{\useparskip}
\DescribeMacro{\useparindent}
If the |parskip| option is activated the |\useparindent| macro switches back the usual parindent mode, while the |\useparskip| macro switches to the parskip mode.
\subsubsection{References and footnotes}
\DescribeMacro{\cref}
References are extended with the \software{cleveref} package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{figure 1}.
Furthermore, the \software{cleveref} package allows to reference multiple objects within one |\cref|\marg{key1,key2}.
\DescribeMacro{\cite}
Citations are adjusted to not start on a new line in order to avoid the repeated use of |~\cite|\marg{key}.
\DescribeMacro{\ref}
\DescribeMacro{\eqref}
\DescribeMacro{\subref}
References are also adjusted to not start on a new line.
\DescribeMacro{\footnote}
Footnotes are adjusted to swallow white space before the footnote mark and at the beginning of the footnote text.
\subsubsection{Acronyms}
\DescribeMacro{\acronym}
\DescribeMacro{\shortacronym}
\DescribeMacro{\longacronym}
The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\meta{*}\marg{definition}\oarg{plural\linebreak[4]definition} macro generates the singular |\|\meta{abbreviation} and plural |\|\meta{abbreviation}|s| macros.
The first star prevents the addition of an \enquote{s} to the abbreviation plural.
The second star restores the \hologo{TeX} default of swallowing subsequent white space.
The long form is only shown at the first appearance of these macros, later appearances generate the abbreviation with a hyperlink to the long form.
Capitalization at the beginning of paragraphs and sentences is ensured.
The |\shortacronym| and |\longacronym| macros are drop-in replacements of the |\acronym| macro showing only the short or long form of their acronym.
\DescribeMacro{\resetacronym}
\DescribeMacro{\dummyacronym}
The first use form of the acronym can be enforced by resetting the acronym counter with |\resetacronym|\marg{key}.
If the acronym counter equals one at the end of the document the short form of the acronym is not introduced.
Placing a |\dummyacronym|\marg{key} at the end of the document ensures that the short form is introduced.
\subsection{Math}
The \software{mathtools} \cite{mathtools} and \software{amssymb} \cite{amsfonts} packages are loaded.
They in turn load the \hologo{AmSLaTeX} \software{amsmath} \cite{amsmath} and \software{amsfonts} \cite{amsfonts} packages.
\DescribeMacro{\mathbf}
Bold math, via |\mathbf| is improved by the \software{bm} package \cite{bm}, \ie ($ A b \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$).
Macros switching to |bfseries| such as |\section|\marg{text} are ensured to also typeset math in bold.
This may cause trouble if bold symbols carry an additional non-implicit meaning.
\DescribeMacro{\text}
The |\text|\marg{text} macro makes it possible to write text within math mode, \ie ($ \text A \text b \text \Gamma \text \delta \text{\textbf A} \text{\textbf b} \text{\textbf \Gamma} \text{\textbf \delta}$).
This behaviour conflicts \eg with the \software{sansserif} package option.
\DescribeMacro{\mathsf}
The math sans serif alphabet is redefined to be italic sans serif if the main text is serif and italic serif if the main text is sans serif, \ie ($\mathsf A \mathsf b \mathsf \Gamma \mathsf \delta \mathbf{\mathsf A} \mathbf{\mathsf b} \mathbf{\mathsf \Gamma} \mathbf{\mathsf \delta}$).
\DescribeMacro{\mathscr}
The |\mathcal| font \ie ($\mathcal{ABCD}$) is accompanied by the |\mathscr| font \ie ($\mathscr{ABCD}$).
\DescribeMacro{\mathbb}
The |\mathbb| font is improved by the \software{doublestroke} package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$).
\DescribeMacro{\mathfrak}
Finally, the |\mathfrak| font is also available \ie ($\mathfrak{AaBb12}$).
Details about the font handling in \hologo{TeX} can be found in \ccite{fntguide}.
\DescribeMacro{\nicefrac}
\DescribeMacro{\flatfrac}
The |\frac|\marg{number}\marg{number} macro is accompanied by |\nicefrac|\linebreak[1]\marg{number}\linebreak[1]\marg{number} and |\flatfrac|\marg{number}\marg{number} leading to $\frac12$, $\nicefrac 12$, and $\flatfrac 12$.
\DescribeMacro{\diag}
\DescribeMacro{\sgn}
Diagonal matrix |\diag| and signum |\sgn| operators are defined.
\DescribeMacro{\mathdef}
The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro \prefix{re}{defines} macros only within math mode without changing the text mode definition.
\DescribeMacro{\i}
\DescribeMacro{\d}
The imaginary unit $\i$ and the differential $\d$ are defined using this functionality.
\DescribeMacro{\numberwithin}
For longer paper it can be useful to re-number the equation in accordance with the section numbering |\numberwithin{equation}{section}|.
\DescribeMacro{subequations}
In order to further reduce the size the of equation counter it can be useful to wrap |align| environments with multiple rows in a |subequations| environment.
Both macros are provided by the \software{amsmath} package.
\DescribeMacro{eqnarray}
The depreciated |eqnarray| environment is undefined as long this behaviour is not prevented by the |eqnarray| package option.
The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the \software{amsmath} and \software{mathtools} packages should be used instead.
\DescribeMacro{equation}
Use the |equation| environment for short equations.
\begin{columns}
\begin{verbatim}
\begin{equation}
left = right \ .
\end{equation}
\end{verbatim}
\column
\begin{equation}
\framebox[2em]{left\strut} = \framebox[7em]{right\strut} \ .
\end{equation}
\end{columns}
\DescribeMacro{multline}
Use the |multline| environment for longer equations.
\begin{columns}
\begin{verbatim}
\begin{multline}
left = right 1 \\
+ right 2 \ .
\end{multline}
\end{verbatim}
\column
\begin{multline}
\framebox[2em]{left\strut} = \framebox[7em]{right 1\strut} \\
\framebox[7em]{+ right 2\strut} \ .
\end{multline}
\end{columns}
\DescribeMacro{split}
Use the |split| sub environment for equations in which multiple equal signs should be aligned.
\begin{columns}
\begin{verbatim}
\begin{equation} \begin{split}
left &= right 1 \\
&= right 2 \ .
\end{split} \end{equation}
\end{verbatim}
\column
\begin{equation}
\begin{split}
\framebox[2em]{left\strut} &= \framebox[7em]{right 1\strut} \\
&= \framebox[7em]{right 2\strut} \ .
\end{split}
\end{equation}
\end{columns}
\DescribeMacro{align}
Use the |align| environment for the vertical alignment and horizontal distribution of multiple equations.
\begin{columns}
\begin{verbatim}
\begin{subequations} \begin{align}
left &= right \ , &
left &= right \ , \\
left &= right \ , &
left &= right \ .
\end{align} \end{subequations}
\end{verbatim}
\column
\begin{subequations}
\begin{align}
\framebox[2em]{left\strut} &= \framebox[3em]{right\strut} \ , &
\framebox[2em]{left\strut} &= \framebox[3em]{right\strut} \ , \\
\framebox[2em]{left\strut} &= \framebox[3em]{right\strut} \ , &
\framebox[2em]{left\strut} &= \framebox[3em]{right\strut} \ .
\end{align}
\end{subequations}
\end{columns}
\DescribeMacro{aligned}
Use the |aligned| environment within a |equation| environment if the aligned equations should be labeled with a single equation number.
\DescribeMacro{multlined}
Use the |multlined| environment if either |split| or |align| contain very long lines.
\begin{columns}
\begin{verbatim}
\begin{equation} \begin{split}
left &= right 1 \\ &=
\begin{multlined}[t]
right 2 \\ + right 3 \ .
\end{multlined}
\end{split} \end{equation}
\end{verbatim}
\column
\begin{equation}
\begin{split}
\framebox[2em]{left\strut} &= \framebox[7em]{right 1\strut} \\ &=
\begin{multlined}[t]
\framebox[7em]{right 2\strut} \\
\framebox[7em]{+ right 3\strut} \ .
\end{multlined}
\end{split}
\end{equation}
\end{columns}
\DescribeMacro{alignat}
Use the |alignat| environment together with the |\mathllap| macro for the alignment of multiple equations with vastly different lengths.
\begin{columns}
\begin{verbatim}
\begin{subequations}
\begin{alignat}{2}
left &= long right && \ , \\
le. 2 &= ri. 2 \ , &
\mathllap{le. 3 = ri. 3} & \ .
\end{alignat}
\end{subequations}
\end{verbatim}
\column
\begin{subequations}
\begin{alignat}{2}
\framebox[2em]{left\strut} &=
\framebox[11em]{long right\strut} && \ , \\
\framebox[2em]{le.\ 2\strut}
&= \framebox[2.5em]{ri.\ 2\strut} \ , &
\mathllap{\framebox[2em]{le.\ 3\strut}
= \framebox[2.5em]{ri.\ 3\strut}} & \ .
\end{alignat}
\end{subequations}
\end{columns}
As a rule of thumb if you have to use |\notag|, |\nonumber|, or perform manual spacing via |\quad| you are probably using the wrong environment.
\subsubsection{Physics}
Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the \software{fixmath} \cite{fixmath} and \software{alphabeta} \cite{alphabeta} packages.
This allows differentiations like
\begin{align}
\sigma &= \unit[5]{fb} \ , & &\text{at \unit[5]{\sigma} C.L.} \ , & \mu &= \unit[5]{cm} \ , & l &= \text{\unit[5]{\mu m}} \ ,
\label{eq:greek}
\end{align}
and \eg to distinguish gauge $\nu$ and mass \nu\ eigenstates in models with massive neutrinos.
Additionally, Greek letters can also be directly typed using Unicode.
\DescribeMacro{\ev}
\DescribeMacro{\pdv}
\DescribeMacro{\comm}
\DescribeMacro{\order}
The \software{physics} package \cite{physics} provides additional macros such as
\begin{align}
&\ev{\phi} \ ,
&&\pdv[n]{f}{x} \ ,
&&\comm{A}{B} \ ,
&&\order{x^2} \ ,
&&\eval{x}_0^\infty \ ,
&&\det(M)\ .
\end{align}
\DescribeMacro{\cancel}
\DescribeMacro{\slashed}
The |\cancel|\marg{characters} macro from the \software{cancel} package \cite{cancel} and the |\slashed| \marg{character} macro from the \software{slashed} package \cite{slashed} allow to $\cancel{\text{cancel}}$ math and use the Dirac slash notation \ie $\slashed \partial$, respectively.
\DescribeMacro{\overleftright}
A better looking over left right arrow is defined \ie $\overleftright{\partial}$.
\DescribeMacro{\unit}
\DescribeMacro{\inv}
The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value} \marg{unit} from the \software{units} package \cite{units} which can also be used in text mode.
The macro |\inv|\oarg{power}\marg{text} allows to avoid math mode also for inverse units such as \unit[5]{\inv{fb}} typeset via |\unit[5]{\inv{fb}}|.
\subsection{Floats}
\DescribeEnv{figure}
\DescribeEnv{table}
Automatic float placement is adjusted to place a single float at the top of pages and to reduce the number of float pages, using the \hologo{LaTeX} macros.
|\setcounter{bottomnumber}{0}| \hfill no floats at the bottom of a page (default 1) \\
|\setcounter{topnumber}{1}| \hfill a single float at the top of a page (default 2) \\
|\setcounter{dbltopnumber}{1}| \hfill same for full widths floats in two-column mode \\
|\renewcommand{\textfraction}{.1}| \hfill large floats are allowed (default 0.2)\\
|\renewcommand{\topfraction}{.9}| \hfill (default 0.7) \\
|\renewcommand{\dbltopfraction}{.9}| \hfill (default 0.7) \\
|\renewcommand{\floatpagefraction}{.8}| \hfill float pages must be full (default 0.5)
Additionally, manual float placement is deactivated but can be reactivated using the |manualplacement| package option.
It is however recommended to archive the desired design by adjusting above macros.
The most useful float placement is usually archived by placing the float \emph{in front} of the paragraph it is referenced in first.
\DescribeMacro{\raggedright}
The float environments have been adjusted to center their content.
The usual behaviour can be reactivated using |\raggedright|.
\begin{table}
\begin{panels}{.6}
\begin{verbatim}
\begin{panels}{.6}
code
\panel{.4}
\begin{tabular}...\end{tabular}
\end{panels}
\end{verbatim}
\caption{Code for this panel environment.}
\label{tab:panels}
\panel{.4}
\begin{tabular}{cccc}
\toprule
\multicolumn{2}{c}{one}& \multicolumn{2}{c}{two} \\ \cmidrule(r){1-2} \cmidrule(l){3-4}
\multirow{2}{*}{a} & b & c & d \\
& b & c & d \\
\bottomrule
\end{tabular}
\caption{The \protecting{|booktabs|} and \protecting{|multirow|} features.}
\label{tab:booktabs}
\end{panels}
\caption{Example use of the \protecting{|panels|} environment in Panel \subref{tab:panels} and the features from the \software{booktabs} and \software{multirow} packages in Panel \subref{tab:booktabs}.
} \label{tab:table}
\end{table}
\DescribeEnv{panels}
\DescribeMacro{\panel}
The |panels| environment makes use of the \software{subcaption} package \cite{subcaption}.
It provides sub-floats and takes as mandatory argument either the number of sub-floats (default~2) or the width of the first sub-float as fraction of the |\linewidth|.
Within the |\begin{panels}|\oarg{vertical alignment}\marg{width} environment the |\panel| macro initiates a new sub-float.
In the case that the width of the first sub-float has been given as an optional argument to the |panels| environment the |\panel|\marg{width} macro takes the width of the next sub-float as mandatory argument.
The example code is presented in \cref{tab:panels}.
\DescribeEnv{tabular}
The \software{booktabs} \cite{booktabs} and \software{multirow} \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}.
\DescribeMacro{\graphic}
\DescribeMacro{\graphics}
The \software{graphicx} package \cite{graphicx} is loaded and the |\graphic|\oarg{width}\marg{figure} macro is defined, which is a wrapper for the |\includegraphics|\marg{figure} macro and takes the figure width as fraction of the |\linewidth| as optional argument (default~1).
If the graphics are located in a sub-folder its path can be indicated by |\graphics|\marg{subfolder}.
\subsection{Bibliography}
\DescribeMacro{\bibliography}
\DescribeMacro{\printbibliography}
The \software{biblatex} package \cite{biblatex} is loaded for bibliography management.
The user has to add the line |\bibliography|\marg{my.bib} to the preamble of the document and |\printbibliography| at the end of the document.
The bibliography is generated by \software{Biber} \cite{biber}.
|biblatex| is extended to be able to cope with the |collaboration| and |reportNumber| fields provided by \online{https://inspirehep.net}{inspirehep.net} and a bug in the volume number is fixed.
Additionally, the PubMed IDs are recognized and \online{https://ctan.org}{ctan.org}, \online{https://github.com}{github.com}, \online{https://gitlab.com}{gitlab.com}, \online{https://bitbucket.org}{bitbucket.org}, \online{https://www.launchpad.net}{launchpad.net}, \online{https://sourceforge.net}{sourceforge.net}, and \online{https://hepforge.org}{hepforge.org} are valid |eprinttype|s.
\DescribeMacro{erratum}
Errata can be included using the |related| feature.
\begin{verbatim}
\article{key1,
...,
relatedtype="erratum",
related="key2",
}
\article{key2,
...,
}
\end{verbatim}
\section{Conclusion}
The \software{hep-paper} package provides a matching selection of preloaded packages and additional macros enabling the user to focus on the content instead of the layout by reducing the amount of manual tasks.
The majority of the loaded packages are fairly lightweight, the others can be deactivated with package options.
\DescribeMacro{arxiv-collector}
\nolinkurl{arxiv.org} \cite{arxiv} requires the setup dependent |bbl| files instead of the original |bib| files, which causes trouble if the local \hologo{LaTeX} version differs from the one used by arXiv.
The \software{arxiv-collector} python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures).
\printbibliography
\end{document}
\endinput
%%
%% End of file `hep-paper-documentation.tex'.
|