Preprint-Number

The HEP–PAPER package∗ Publications in high energy physics Jan Hajer†

Department of Physics, University of Basel, Klingelbergstraße :4, 6278 Basel, Switzerland 4243/2:/23

Abstract

The 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 hep-paper preferably loads third party packages as long as they are lightweight enough.

Contents

3 Introduction 4 3.3 Options ...... 4

4 Macros and environments 5 4.3 Title page ...... 6 4.4 Text...... 6 4.5 Math...... 8 4.6 Floats ...... : 4.7 Bibliography ...... ;

5 Conclusion ;

∗This document corresponds to hep-paper v3.:. †[email protected]

3 3 Introduction

For usual publications it is enough to load additionally to the article class without optional arguments only the hep-paper package [3]. \documentclass{article} \usepackage{hep-paper}

The most notable changes after loading the hep-paper package is the change of some LATEX defaults. The paper and font sizes are set to A6 and  pt, respectively. Addi- tionally, the paper geometry is adjusted using the geometry package [4]. Furthermore, the font is changed to latin modern using the cfr-lm package [5] with microtype [6] optimizations. Finally, portable document format (PDF) hyperlinks are implemented hep-title with the hyperref package [7]. If only subset of the functionality is needed one of the smaller style files hep-title, hep-acronyms, and hep-bibliography containing hep-bibliography only the macros relevant to sections 4.3, 4.4.4, and 4.7, respectively. hep-acronyms 3.3 Options

paper The paper=hformati option loads the specified paper format. The possible hformatsi are: a2, a3, a4, a5, a6, a7, a8, b2, b3, b4, b5, b6, b7, b8, c2, c3, c4, c5, c6, c7, c8, ansia, ansib, ansic, ansid, ansie, letter, executive, legal. The default is a6. font The font=hsizei option loads the specified font size. The possible hsizesi are: :pt, ;pt, 32pt, 33pt, 34pt, 36pt, 39pt, 42pt. The default is  pt. lang The lang=hnamei option switches the document language to one of the values provided by the babel package [8]. The default is british. sansserif The sansserif option switches the document including math to sans serif font shape. oldstyle The oldstyle option activates the use of oldstyle text- (345) in favour of lining- () figures in text mode.

parskip The parskip option changes how paragraphs are separated from each other using the parskip package [9]. The LATEX default is separation via indentation the parskip option switches to separation via vertical space.3

symbols The symbols=hfamilyi set the family of the symbol fonts. symbols=ams loads the two AMS fonts [:] and the bm bold fonts. The default symbols=true replaces additionally the blackboard font with the dsfont [;]. symbols=minion switches the symbol fonts to the Adobe MinionPro companion font from the MnSymbol package [32]. symbols=false deactivates loading any additional symbol fonts.

3.3.3 Deactivation

The hep-paper package loads few bigger packages which have a large impact on the document. The deactivation options can prevent such and other adjustments.

3 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.

4 defaults The defaults option prevents the adjustment of the page geometry and the font size set by the document class.

title The title=false option deactivates the title page adjustments. bibliography The bibliography=hkeyi option prevents the automatic loading of the biblatex pack- age [33] if hkeyi=false. Otherwise the hkeyi is passed as style string to the bibla- package.

glossaries The glossaries=false option deactives acronyms and the use of the glossaries pack- age [34].

references The references=false option prevents the cleveref package [35] from being loaded and deactivates further redefinitions of reference macros.

3.3.4 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 hep-paper is able to detect the presence of such a class or package, i.e. if it is loaded before the hep-paper package, the compatibility mode is activated automatically.

The beamer option activates the beamer [36] compatibility mode. jhep The jhep option activates the JHEP [37] compatibility mode. jcap The jcap option activates the JCAP [38] compatibility mode. revtex The revtex option activates the REVTEX[39] compatibility mode. pos The pos option activates the PoS compatibility mode. springer The springer option activates the compatibility mode the svjour class [3:].

3.3.5 Reactivation

The hep-paper package deactivates unrecommended macros, which can be reactivated manually. manualplacement The manualplacement option reactivates manual float placement. eqnarray The eqnarray option reactivates the depreciated eqnarray environment.

4 Macros and environments

twocolumn If the global twocolumn option is present the page geometry is changed to cover almost the entire page. Additionally the environment is defined that abstract* abstract* generates a one column abstract and takes care of placing the title information.

5 4.3 Title page

\series The \series{hseriesi} macro is defined using the titling package [3;]. \title The PDF meta information is set according to the \title{htexti} and \author{htexti} information.

\subtitle The \subtitle{hsubtitlei} macro is defined.

\editor In order to facilitate multiple authors with different affiliations the authblk pack- age [42] is loaded. The following lines add . . two authors with different affiliations \author e g \affiliation \author[3]{Author one \email{email one}} \affiliation[3]{Affiliation one} \email \author[4]{Author two \email{email two}} \affiliation[3,4]{Affiliation two}

\preprint The \preprint{hnumeri} macro places a pre-print number in the upper right corner of the title page.

abstract The abstract environment is adjusted to not start with an indentation.

\titlefont Various title font macros are defined, allowing to change the appearance of the output. \subtitlefont \maketitle

\authorfont 4.4 Text \affiliationfont Hyphenation is provided by the babel package [8] and quotation commands are \preprintfont provided by the csquotes package [43]. The latter package provides the convenient \enquote macros \enquote{htexti} and \MakeOuterQuote{} allowing to leave the choice of quotation marks to LATEX and use . . . instead of the pair . . . and . . . , respectively. \MakeOuterQuote The foreign package [44] defines macros such as \eg, \ie, \cf, and \vs which are \eg typeset as e.g., i.e., cf., and vs. \vs The \no{hnumberi} macro is typeset as › 345. \no The \software[hversioni]{hnamei} macro is typeset as HEP-Paper v3.:. \software The h i h i macro combines the features of the h i h i \online \online{ url }{ text } \href{ url }{ text } [7] and the \url{htexti} [45] macros, resulting in e.g. ctan.org/pkg/hep-paper. inlinelist The inlinelist and enumdescript environments are defined using the enumitem pack- age [46]. enumdescript The three main points are i) one, ii) two, The three main points are and iii) three. \begin{inlinelist} \item one \item two \item three \end{inlinelist}

6 \begin{enumdescript}[label=\Roman*)] I) First one \item{First} one II) Second two \item{Second} two III) Third three \item{Third} three \end{enumdescript} \textsc A bold versions Small Caps and a sans serif version of Small Caps based on the computer modern font [47] is provided, the latter using the sansmathfonts pack- age [48].

\underline The \underline macro is redefined to allow line-breaks using the ulem package [49]. The macro is extended to also overline text outside of math environments. \overline \overline \useparskip If the parskip option is activated the \useparindent macro switches to the usual parindent mode, while the \useparskip macro switches to the parskip mode. \useparindent 4.4.3 References and footnotes

\cref References are extended with the cleveref package [35], which allows to e.g. just type \cref{hkeyi} in order to write ‘figure 3’. Furthermore, the cleveref package allows to reference multiple objects within one \cref{hkey3,key4i}.

\cite Citations are adjusted to not start on a new line in order to avoid the repeated use of ~\cite{hkeyi}.

\ref References are also adjusted to not start on a new line. \eqref Footnotes are adjusted to swallow white space before the footnote mark and at the \subref beginning of the footnote text. \footnote 4.4.4 Acronyms

\acronym The \acronymh*i[htypeset abbreviationi]{habbreviationi}h*i{hdefinitioni}[hplural i macro generates the singular h i and plural h i \shortacronym definition ] \ abbreviation \ abbreviation s macros. The first star prevents the addition of an ‘s’ to the abbreviation plural. The \longacronym second star restores the 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. The long form is never used in math mode. Capitalization at the beginning of paragraphs and sentences is (mostly) ensured. The \shortacronym and \longacronym macros are drop-in replacements \resetacronym of the \acronym macro showing only the short or long form of their acronym. The first use form of the acronym can be enforced by resetting the acronym counter with \dummyacronym \resetacronym{hkeyi}. If the acronym counter equals one at the end of the document the short form of the acronym is not introduced. Placing a \dummyacronym{hkeyi} at the end of the document ensures that the short form is introduced.

7 4.5 Math

The mathtools [4:] and amssymb [:] packages are loaded. They in turn load the \mathbf AMS-LATEX amsmath [4;] and amsfonts [:] packages. Bold math, via \mathbf is improved by the bm package [52], i.e.(AbΓ δAbΓ δ). Macros switching to bfseries \text such as \section{htexti} are ensured to also typeset math in bold. The \text{htexti} macro makes it possible to write text within math mode, . .(AbΓδ Γδ). The \mathsf i e Ab math sans serif alphabet is redefined to be italic sans serif if the main text is serif \mathscr and italic serif if the main text is sans serif, i.e.(AbΓ δAbΓ δ). The \mathcal font i.e. (ABCD) is accompanied by the font . .( ). The font is \mathbb \mathscr i e ABCD \mathbb improved by the doublestroke package [;] and adjusted depending on the sansserif \mathfrak option i.e.(Ah1). Finally, the \mathfrak font is also available i.e.(AaBb12). Details about the font handling in TEX can be found in reference [53]. \nicefrac The \frac{hnumberi}{hnumberi} macro is accompanied by \nicefrac{hnumberi} h i , h i h i , and h i h i \flatfrac { number } \textfrac{ number }{ number } \flatfrac{ number }{ number } 1 1 3 leading to 2 , /2, /4, and 1/2 . Diagonal matrix \diag and signum \sgn operators \textfrac are defined. \diag The \mathdef{hnamei}[hargumentsi]{hcodei} macro (re-)defines macros only within \sgn math mode without changing the text mode definition. \mathdef The imaginary unit i and the differential d are defined using this functionality. \i For longer paper it can be useful to re-number the equation in accordance with the \d section numbering \numberwithin{equation}{section}. In order to further reduce the size the of equation counter it can be useful to wrap align environments with \numberwithin multiple rows in a subequations environment. Both macros are provided by the subequations amsmath package.

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 amsmath and mathtools packages should be used instead.

equation Use the equation environment for short equations. \begin{equation} left = right . (3) left = right \ . \end{equation} multline Use the multline environment for longer equations. \begin{multline} left = right 3 \\ + right 4 \. left = right 3 \end{multline} + right 4 . (4)

split Use the split sub environment for equations in which multiple equal signs should be aligned.

8 \begin{equation} \begin{split} left &= right 3 \\ left = right 3 &= right 4 \. (5) \end{split} \end{equation} = right 4 .

align Use the align environment for the vertical alignment and horizontal distribution of multiple equations. \begin{subequations} \begin{align} left &= right \ , & left = right , left = right , (6a) left &= right \ , \\ left &= right \ , & left = right , left = right . (6b) left &= right \ . \end{align} \end{subequations} aligned Use the aligned environment within a equation environment if the aligned equations should be labeled with a single equation number. multlined Use the multlined environment if either split or align contain very long lines. \begin{equation} \begin{split} left &= right 3 \\ &= left = right 3 \begin{multlined}[t] right 4 \\ + right 5 \. = right 4 (7) \end{multlined} \end{split} \end{equation} + right 5 . alignat Use the alignat environment together with the \mathllap macro for the alignment of multiple equations with vastly different lengths. \begin{subequations} \begin{alignat}{4} left = long right , (8a) left &= long right && \ , \\ le. 4 &= ri. 4 \,& le. 4 = ri. 4 , le. 5 = ri. 5 . (8b) \mathllap{le. 5 = ri. 5}&\. \end{alignat} \end{subequations} 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.

4.5.3 Physics

\unit The correct spacing for units, cf. equation (9), is provided by the macro \unit[hvaluei] h i from the units package [54] which can also be used in text mode. The macro \inv { unit } \inv[hpoweri]{htexti} allows to avoid math mode also for inverse units such as  fb−1 typeset via \unit[7]{\inv{fb}}. Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the fixmath [55] and alphabeta [56] packages. This allows differentiations like

σ = 5 fb , at  σ C.L. , µ = 5 cm , l = 5 μm . (9)

9 \begin{panels}{4} code one two \panel b c d \begin{tabular}...\end{tabular} a b c d \end{panels} (a) Code for this panel environment. (b) The booktabs and multirow features.

Table 3: Example use of the panels environment in Panel (a) and the features from the booktabs and multirow packages in Panel (b).

Additionally, Greek letters can also be directly typed using Unicode.

\ev The physics package [57] provides additional macros such as \pdv n ∂ f 2 ∞ hφi , , [A, B] , O(x ) , x|0 , det(M) . (:) \comm ∂xn \order The \cancel{hcharactersi} macro from the cancel package [58] and the \slashed  \cancel {hcharacteri} macro from the slashed package [59] allow to cancel math and use the \slashed Dirac slash notation i.e. ∂/, respectively. ↔ \overleftright A better looking over left right arrow is defined i.e. ∂.

4.6 Floats

figure 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 LAT X macros. table E \setcounter{bottomnumber}{2} no floats at the bottom of a page (default 3) \setcounter{topnumber}{3} a single float at the top of a page (default 4) \setcounter{dbltopnumber}{3} same for full widths floats in two-column mode \renewcommand{\textfraction}{.3} large floats are allowed (default 2.4) \renewcommand{\topfraction}{.;} (default 2.9) \renewcommand{\dbltopfraction}{.;} (default 2.9) \renewcommand{\floatpagefraction}{.:} float pages must be full (default 2.7) 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 \raggedright archived by placing the float in front of the paragraph it is referenced in first. The float environments have been adjusted to center their content. The usual behaviour can be reactivated using \raggedright. panels The panels environment makes use of the subcaption package [5:]. It provides sub-floats and takes as mandatory argument either the number of sub-floats (de- \panel fault 4) or the width of the first sub-float as fraction of the \linewidth. Within the \begin{panels}[hvertical alignmenti]{hwidthi} 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{hwidthi} macro takes the width of the next sub-float as mandatory argument. The example code is presented in table 3a.

tabular The booktabs [5;] and multirow [62] packages are loaded enabling publication quality tabulars such as in table 3b.

\graphic The graphicx package [63] is loaded and the \graphic[hwidthi]{hfigurei} macro is defined, which is a wrapper for the h i macro and takes the fig- \graphics \includegraphics{ figure } ure width as fraction of the \linewidth as optional argument (default 3). If the graph- ics are located in a sub-folder its path can be indicated by \graphics{hsubfolderi}.

4.7 Bibliography

\bibliography The biblatex package [33] is loaded for bibliography management. The user has to add the line h i to the preamble of the document and \printbibliography \bibliography{ my.bib } \printbibliography at the end of the document. The bibliography is generated by Biber [64]. biblatex is extended to be able to cope with the collaboration and reportNumber fields provided by inspirehep.net and a bug in the volume number is fixed. Additionally, the PubMed IDs are recognized and ctan.org, github.com, gitlab.com, bitbucket.org, launchpad.net, sourceforge.net, and hepforge.org are erratum valid eprinttypes. Errata can be included using the related feature. \article{key3, ..., relatedtype="erratum", related="key4", } \article{key4, ..., }

5 Conclusion

The 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.

arxiv-collector arxiv.org [65] requires the setup dependent bbl files instead of the original bib files, which causes trouble if the local LATEX version differs from the one used by arXiv. The arxiv-collector python script [66] alleviates this problem by collecting all files necessary for publication on arXiv (including figures).

; References [3] J. Hajer. ‘The hep-paper package: Publications in high energy physics’ (423;). CTAN: hep - paper. doi: 32 . 74:3 / zenodo . 5828658. GitHub: janhajer / hep - paper. [4] D. Carlisle and H. Umeki. ‘The geometry package: Flexible and complete inter- face to document dimensions’ (3;;8). CTAN: geometry. GitHub: davidcarlisle/ geometry. [5] C. F. Rees. ‘The cfr-lm package: Enhanced support for the Latin Modern fonts’ (422:). CTAN: cfr - lm. [6] R. Schlicht. ‘The microtype package: Subliminal refinements towards typo- graphical perfection’ (4226). CTAN: microtype. [7] LATEX5 Project. ‘Hypertext marks in LATEX: a manual for hyperref: Ex- tensive support for hypertext in LATEX’ (3;;7). CTAN: hyperref. GitHub: latex5 / hyperref. [8] J. Braams, J. Bezos, and at al. ‘Babel Localization and internationaliza- tion: Multilingual support for Plain TEX or LATEX’ (3;:;). CTAN: babel. GitHub: latex5 / babel. [9] R. Fairbairns, F. Mittelbach, and H. Partl. ‘The parskip package: Layout with zero \parindent, non-zero \parskip’(3;:;). CTAN: parskip. GitHub: FrankMittelbach / fmitex. [:] American Mathematical Society. ‘The amsfonts package: TEX fonts from the American Mathematical Society’ (3;;7). CTAN: amsfonts. url: ams . org / tex / amsfonts. [;] O. Kummer. ‘The doublestroke font: Typeset mathematical double stroke symbols’ (3;;7). CTAN: doublestroke. [32] A. Blumensath. ‘The MnSymbol package: Mathematical symbol font for Adobe MinionPro’ (4227). CTAN: MnSymbol. [33] P. Lehman, J. Wright, A. Boruvka, and P. Kime. ‘The biblatex Package: Sophisticated Bibliographies in LATEX’ (4228). CTAN: biblatex. GitHub: plk / biblatex. [34] N. Talbot. ‘The glossaries package: Create glossaries and lists of acronyms’ (4229). CTAN: glossaries. [35] T. Cubitt. ‘The cleveref package: Intelligent cross-referencing’ (4228). CTAN: cleveref. url: dr - qubit . org / cleveref. [36] T. Tantau, J. Wright, and V. Miletić. ‘The beamer class: A LATEX class for producing presentations and slides’ (4225). CTAN: beamer. GitHub: josephwright / beamer. [37] SISSA Medialab. ‘The JHEP package’ (3;;9). url: jhep . sissa . it / jhep / help / JHEP _ TeXclass . jsp. [38] SISSA Medialab. ‘The JCAP package’ (4224). url: jcap . sissa . it / jcap / help / JCAP _ TeXclass . jsp. [39] American Physical Society. ‘The REVTEX class: Styles for various Physics Journals’ (3;;;). CTAN: revtex. url: journals.aps.org/revtex.

32 [3:] Springer Verlag. ‘The svjour package: Macros for Springer journals’ (3;;9). CTAN: springer. [3;] P. R. Wilson. ‘The titling package: Control over the typesetting of the \maketitle command’ (4222). CTAN: titling. [42] P. W. Daly. ‘A LATEX Package to Prepare Author and Affiliation Blocks: Support for footnote style author/affiliation’ (4223). CTAN: authblk. [43] P. Lehman and J. Wright. ‘The csquotes Package: Context sensitive quota- tion facilities’ (4225). CTAN: csquotes. [44] P. G. Ratcliffe. ‘The foreign package for LATEX 4ε: Systematic treatment of “foreign” words in documents’ (4234). CTAN: foreign. [45] D. Arseneau. ‘The url package: Verbatim with URL-sensitive line breaks’ (3;;8). CTAN: url. [46] J. Bezos. ‘Customizing lists with the enumitem package: Control layout of itemize, enumerate, description’ (4225). CTAN: enumitem. url: texnia.com/ enumitem . html. GitHub: jbezos / enumitem. [47] Donald E. Knuth. ‘Computer Modern fonts’ (3;:8). CTAN: cm. [48] A. Barton. ‘The sansmathfonts package: Correct placement of accents in sans-serif maths’ (4235). CTAN: sansmathfonts. [49] D. Arseneau. ‘The ulem package: Package for underlining’ (3;:;). CTAN: ulem. [4:] L. Madsen, M. Høgholm, W. Robertson, and J. Wright. ‘The mathtools package: Mathematical tools to use with amsmath’(4226). CTAN: mathtools. [4;] LATEX Team. ‘The amsmath package: AMS mathematical facilities for LATEX’ (3;;6). CTAN: amsmath. url: ams.org/tex/amslatex. [52] LATEX Team. ‘The bm package: Access bold symbols in maths mode’ (3;;5). CTAN: bm. [53] LATEX Team. ‘LATEX 4ε font selection: Docmentation of LATEX font commands’ (3;;7). CTAN: fntguide. [54] A. Reichert. ‘The units and nicefrac packages: Typeset units’ (3;;:). CTAN: units. [55] W. Schmidt. ‘The fixmath package for LATEX 4ε: Make maths comply with ISO 53-2:3;;4 to ISO 53-35:3;;4’(4222). CTAN: fixmath. [56] G. Milde. ‘The alphabeta package: LICR macros and encoding definition files for Greek’ (4235). CTAN: greek - fontenc. [57] S. C. de la Barrera. ‘The physics package: Macros supporting the Mathe- matics of Physics’ (4234). CTAN: physics. [58] D. Arseneau. ‘The cancel package: Place lines through maths formulae’ (4235). CTAN: cancel. [59] D. Carlisle. ‘The slashed package: Put a slash through characters’ (3;:9). CTAN: slashed. [5:] A. Sommerfeldt. ‘The subcaption package: Support for sub-captions’ (4229). CTAN: subcaption. GitLab: axelsommerfeldt/caption. [5;] D. Els and S. Fear. ‘The booktabs package: Publication quality tables in LATEX’ (3;;7). CTAN: booktabs.

33 [62] P. van Oostrum and J. Leichter. ‘The multirow, bigstrut and bigdelim packages: Create tabular cells spanning multiple rows’ (3;;6). CTAN: multirow. [63] D. Carlisle and S. Rahtz. ‘Packages in the “graphics” bundle: Enhanced sup- port for graphics’ (3;;6). CTAN: graphicx. [64] F. Charette and P. Kime. ‘: Backend processor for BibLATEX’ (422;). GitHub: plk/biber. sourceforge: biblatex- biber. [65] arXiv Team. ‘arXiv: free distribution service and an open archive for schol- arly articles’ (3;;3). url: arxiv . org. [66] D. Sutherland. ‘arxiv-collector: A little Python script to collect LATEX sources for upload to the arXiv’ (423:). GitHub: dougalsutherland/arxiv-collector.

34