summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-01 21:34:50 +0000
committerKarl Berry <karl@freefriends.org>2020-09-01 21:34:50 +0000
commit702ea1a475d8ae525aca8ca610b0497254ba513f (patch)
tree438d6319fa302f452917720d3b23adb35bf3f804 /Master
parent84b22db625f6573c289357aa78ba29ac2a2339fa (diff)
hep-paper (1sep20)
git-svn-id: svn://tug.org/texlive/trunk@56236 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/hep-paper/README.md8
-rw-r--r--Master/texmf-dist/doc/latex/hep-paper/bibliography.bib84
-rw-r--r--Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdfbin0 -> 454890 bytes
-rw-r--r--Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex609
-rw-r--r--Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdfbin0 -> 535891 bytes
-rw-r--r--Master/texmf-dist/doc/latex/hep-paper/hep-paper.pdfbin525662 -> 0 bytes
-rw-r--r--Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx (renamed from Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx)1709
-rw-r--r--Master/texmf-dist/source/latex/hep-paper/hep-paper.ins6
-rw-r--r--Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx11
-rw-r--r--Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty347
10 files changed, 1953 insertions, 821 deletions
diff --git a/Master/texmf-dist/doc/latex/hep-paper/README.md b/Master/texmf-dist/doc/latex/hep-paper/README.md
index e35410f36ec..fe6ce7a1058 100644
--- a/Master/texmf-dist/doc/latex/hep-paper/README.md
+++ b/Master/texmf-dist/doc/latex/hep-paper/README.md
@@ -12,6 +12,14 @@ For usual publications it is enough to load additionally to the `article` class
\documentclass{article}
\usepackage{hep-paper}
+## Installation
+
+Running `pdflatex hep-paper.ins` will generate the main style file `hep-paper.sty` together with the necessary datamodel file `hep-paper.dbx`.
+These two files must be moved into a folder the `tex` installation is aware of, e.g. the folder containing the document that should use the `hep-paper` package.
+Additionally the documentation file `hep-paper-documentation.tex` will be generated.
+Subsequently running `pdflatex hep-paper-documentation.tex` will generate the documentation `hep-paper-documentation.pdf`.
+Finally running `pdflatex hep-paper-implementation.dtx` will generate the complete documentation of the implementation `hep-paper-implementation.pdf`
+
## Author
Jan Hajer
diff --git a/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib b/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib
index d63b7339470..63e5ad9916e 100644
--- a/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib
+++ b/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib
@@ -1,6 +1,6 @@
@article{hep-paper,
title = "The |hep-paper| package",
-subtitle = "Publications in High Energy Physics",
+subtitle = "Publications in high energy physics",
author = "Jan Hajer",
year = "2019",
eprinttype = "ctan",
@@ -123,7 +123,6 @@ eprint = "mathtools",
@article{amsmath,
title = "The |amsmath| package",
subtitle = "AMS mathematical facilities for \hologo{LaTeX}",
-author = "\hologo{LaTeX}",
collaboration = "\hologo{LaTeX} Team",
date = "1994",
url = "https://ams.org/tex/amslatex",
@@ -348,7 +347,9 @@ eprint = "iftex",
@article{fontspec,
title = "The |fontspec| package",
+subtitle = "Advanced font selection in \hologo{XeLaTeX} and \hologo{LuaLaTeX}",
author = "Will Robertson and Khaled Hosny",
+date = "2004",
eprinttype = "ctan",
eprint = "fontspec",
}
@@ -494,7 +495,6 @@ eprint = "fmitex",
title = "\hologo{LaTeX2e}\ font selection",
subtitle = "Docmentation of \hologo{LaTeX} font commands",
collaboration = "\hologo{LaTeX} Team",
-author = "\hologo{LaTeX} Team",
date = "1995",
eprinttype = "ctan",
eprint = "fntguide",
@@ -516,6 +516,15 @@ eprinttype = "ctan",
eprint = "soul",
}
+@article{ulem,
+title = "The |ulem| package",
+subtitle = "Package for underlining",
+author = "Donald Arseneau",
+date = "1989",
+eprinttype = "ctan",
+eprint = "ulem",
+}
+
@article{glossaries,
title = "The |glossaries| package",
subtitle = "Create glossaries and lists of acronyms",
@@ -555,13 +564,15 @@ eprint = "pdftexcmds",
@article{fix-cm,
title = "The |fix-cm| package",
+subtitle = "Permit Computer Modern fonts at arbitrary sizes",
author = "Frank Mittelbach and David Carlisle and Chris Rowley and Walter Schmidt",
+date = "1993",
eprinttype = "ctan",
eprint = "fix-cm",
}
@article{revtex,
-title = "The REV\hologo{TeX} package",
+title = "The REV\hologo{TeX} class",
subtitle = "Styles for various Physics Journals",
author = "Mark Doyle and Arthur Ogawa",
collaboration = "American Physical Society",
@@ -656,7 +667,6 @@ eprint = "url",
@article{jhep,
title = "The |JHEP| package",
-author = "SISSA Medialab",
collaboration = "SISSA Medialab",
date = "1997",
url = "https://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp",
@@ -664,7 +674,6 @@ url = "https://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp",
@article{jcap,
title = "The |JCAP| package",
-author = "SISSA Medialab",
collaboration = "SISSA Medialab",
date = "2002",
url = "https://jcap.sissa.it/jcap/help/JCAP_TeXclass.jsp",
@@ -682,7 +691,7 @@ related = "bbm"
@article{bbm,
title = "|bbm|",
subtitle = "\enquote{Blackboard-style} cm fonts",
-author = " Gilles Robert",
+author = "Gilles Robert",
date = "1993",
eprinttype = "ctan",
eprint = "bbm",
@@ -698,3 +707,64 @@ year = "1991",
organization = "Cornell University",
ReportNumber = "test",
}
+
+@article{dsfont,
+title = "The |doublestroke| font",
+subtitle = "Typeset mathematical double stroke symbols",
+author = "Olaf Kummer",
+date = "1995",
+eprinttype = "ctan",
+eprint = "doublestroke",
+}
+
+@article{mleftright,
+title = "The |mleftright| package",
+subtitle = "Variants of delimiters that act as maths open/close",
+author = "Heiko Oberdiek",
+date = "2010",
+eprinttype = "ctan",
+eprint = "mleftright",
+}
+
+@article{urwchancal,
+title = "A virtual font for URW Chancery Math",
+subtitle = "Use URW's clone of Zapf Chancery as a maths alphabet",
+author = "Michael Sharpe",
+date = "2011",
+eprinttype = "ctan",
+eprint = "urwchancal",
+}
+
+@article{footnotebackref,
+title = "The |footnotebackref| package",
+subtitle = "Back-references from footnotes",
+author = "Holger Lange",
+date = "2012",
+eprinttype = "ctan",
+eprint = "footnotebackref",
+}
+
+@article{cancel,
+title = "The |cancel| package",
+subtitle = "Place lines through maths formulae",
+author = "Donald Arseneau",
+date = "2013",
+eprinttype = "ctan",
+eprint = "cancel",
+}
+
+@article{beamer,
+title = "The |beamer| class",
+subtitle = "A \hologo{LaTeX} class for producing presentations and slides",
+author = "Till Tantau and Joseph Wright and Vedran Miletić",
+date = "2003",
+eprinttype = "ctan",
+eprint = "beamer",
+related = "beamer-1",
+}
+
+@manual{beamer-1,
+eprinttype = "github",
+eprintclass = "josephwright",
+eprint = "beamer",
+}
diff --git a/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdf b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdf
new file mode 100644
index 00000000000..7e8d9dbdb59
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex
new file mode 100644
index 00000000000..0f5e7957649
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex
@@ -0,0 +1,609 @@
+%%
+%% 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.
+\RequirePackage[l2tabu, orthodox]{nag}
+\documentclass{ltxdoc}
+
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+
+\MacroIndent=1.5em
+
+\usepackage[parskip]{hep-paper}
+
+\bibliography{bibliography}
+
+\acronym{PDF}{portable document format}
+\acronym{URL}{uniform resource locator}
+
+\usepackage{hologo}
+
+\newenvironment{columns}[1][.5]{%
+ \begin{minipage}[t]{\linewidth}%
+ \begin{minipage}[t]{#1\linewidth}%
+ \newcommand{\column}{%
+ \end{minipage}%
+ \begin{minipage}[t]{\linewidth-#1\linewidth}%
+ }%
+}{\end{minipage}\end{minipage}}
+
+\setlength{\fboxsep}{1pt}
+
+\begin{document}
+
+\GetFileInfo{hep-paper.sty}
+
+\title{The |hep-paper| package\thanks{This document corresponds to \protecting{|hep-paper|}~\fileversion.}}
+\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{\normalfont\filedate}
+
+\maketitle
+
+\begin{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.
+\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 |hep-paper| package \cite{hep-paper}.
+
+| \documentclass{article}|\\
+| \usepackage{hep-paper}|
+
+The most notable changes after loading the |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 set to the values known from the (depreciated) |a4wide| package \cite{a4wide} using the |geometry| package \cite{geometry}.
+Furthermore, the font is changed to |lmodern| \cite{lmodern} with |microtype| \cite{microtype} optimizations.
+Finally, \PDF hyperlinks are implemented with the |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 the chosen value.
+The possible values are given by the |babel| package \cite{babel}.
+The default is |british|.
+
+\DescribeMacro{sansserif}
+The |sansserif| option switches the document including math to the sans serif font shape.
+
+\DescribeMacro{parskip}
+The |parskip| option makes use of the |parskip| package \cite{parskip} and changes how two paragraphs are separated from each other.
+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.}
+
+\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 |biblatex| package \cite{biblatex} if \meta{key}=|false|.
+Otherwise the \meta{key} is passed as |style| string to the |biblatex| package.
+
+\DescribeMacro{glossaries}
+The |glossaries=false| option deactives acronyms and the use of the |glossaries| package \cite{glossaries}.
+
+\DescribeMacro{references}
+The |references=false| option prevents the |cleveref| pacakge \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{\author}
+\DescribeMacro{\affiliation}
+\DescribeMacro{\email}
+In order to facilitate multiple authors with different affiliations the |authblk| package \cite{authblk} is loaded.
+The following lines add \eg two authors with different affiliations
+
+| \author[1]{Author one \email{Email one}}|\\
+| \affiliation[1]{Affiliation one}|\\
+| \author[2]{Author two \email{Email two}}|\\
+| \affiliation[1,2]{Affiliation two}|
+
+\DescribeMacro{\title}
+The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information.
+
+\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.
+
+\subsection{Text}
+
+Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |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 |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}.
+
+The |inlinelist| and |enumdescript| environments are defined using the |enumitem| package \cite{enumitem}.
+
+\DescribeMacro{inlinelist}
+\begin{columns}
+|The three main points are|
+|\begin{inlinelist}|
+
+| \item one|
+
+| \item two|
+
+| \item three|
+
+|\end{inlinelist}|
+\column
+The three main points are
+\begin{inlinelist}
+ \item one
+ \item two
+ \item three
+\end{inlinelist}
+\end{columns}
+
+\DescribeMacro{enumdescript}
+\begin{columns}[.6]
+|\begin{enumdescript}[label=\Roman*)]|
+
+| \item{First} one|
+
+| \item{Second} two|
+
+| \item{Third} three|
+
+|\end{enumdescript}|
+\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}} is provided, using the |sansmathfonts| package \cite{sansmathfonts}.
+
+\DescribeMacro{\underline}
+\DescribeMacro{\overline}
+The |\underline| macro is redefined to allow line-breaks using the |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 |cleveref| package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{figure 1}.
+Furthermore, the |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 and are redefined in order to handle multiple references at once.
+
+\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 |mathtools| \cite{mathtools} and |amssymb| \cite{amsfonts} packages are loaded.
+They in turn load the \hologo{AmSLaTeX} |amsmath| \cite{amsmath} and |amsfonts| \cite{amsfonts} packages.
+\DescribeMacro{\mathbf}
+Bold math, via |\mathbf| is improved by the |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}$).
+The often used |\mathrm|\marg{text} and |{\rm|\meta{text}|}| macros are \emph{not} the correct tool for this purpose, as they switch to roman font shape.
+This behaviour conflicts \eg with the |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 |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 (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 |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 |amsmath| and |mathtools| packages should be used instead.
+
+\DescribeMacro{equation}
+Use the |equation| environment for short equations.
+
+\begin{columns}
+|\begin{equation}|
+
+| left = right \ .|
+
+|\end{equation}|
+\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{multline}|
+
+| left = right 1 \\|
+
+| + right 2 \ .|
+
+|\end{multline}|
+\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{equation} \begin{split}|
+
+| left &= right 1 \\|
+
+| &= right 2 \ .|
+
+|\end{split} \end{equation}|
+\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{subequations}|
+|\begin{align}|
+
+| left &= right \ , &|
+| left &= right \ , \\|
+| left &= right \ , &|
+| left &= right \ .|
+
+|\end{align}|
+|\end{subequations}|
+\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{equation} \begin{split}|
+
+| left &= right 1 \\ &=|
+| \begin{multlined}[t]|
+| right 2 \\ + right 3 \ .|
+| \end{multlined}|
+|\end{split} \end{equation}|
+\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{subequations}|
+|\begin{alignat}{2}|
+
+| left &= long right && \ , \\|
+
+| le. 2 &= ri. 2 \ , &|
+
+| \mathllap{le. 3 = ri. 3} & \ .|
+|\end{alignat}|
+|\end{subequations}|
+\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 |fixmath| \cite{fixmath} and |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 |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 |cancel| \cite{cancel} package and the |\slashed| \marg{character} macro from the |slashed| \cite{slashed} package 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 |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}
+\raggedright
+|\begin{panels}{.6}|\\
+|code|\\
+|\panel{.4}|\\
+|\begin{tabular}...\end{tabular}|\\
+|\end{panels}|\\
+\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 \protecting{|booktabs|} and \protecting{|multirow|} packages in Panel \subref{tab:booktabs}.
+} \label{tab:table}
+\end{table}
+
+\DescribeEnv{panels}
+\DescribeMacro{\panel}
+The |panels| environment makes use of the |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 |booktabs| \cite{booktabs} and |multirow| \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}.
+
+\DescribeMacro{\graphic}
+\DescribeMacro{\graphics}
+The |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 |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.
+
+| \article{|\meta{key1}|,|\\
+| |\dots|,|\\
+| relatedtype="erratum",|\\
+| related="|\meta{key2}|",|\\
+| }|\\
+| \article{|\meta{key2}|,|\\
+| |\dots|,|\\
+| }|
+
+\section{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.
+
+\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 |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'.
diff --git a/Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdf b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdf
new file mode 100644
index 00000000000..b087bd542ea
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/hep-paper/hep-paper.pdf b/Master/texmf-dist/doc/latex/hep-paper/hep-paper.pdf
deleted file mode 100644
index 4142b2afe7d..00000000000
--- a/Master/texmf-dist/doc/latex/hep-paper/hep-paper.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx b/Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx
index 5c9841bc6a7..f8bddd02e49 100644
--- a/Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx
+++ b/Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx
@@ -18,64 +18,51 @@
% \iffalse
%
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-%<package>\ProvidesPackage{hep-paper}[2020/05/01 v1.3 Publications in High Energy Physics]
-%<datamodel>\ProvidesFile{hep-paper.dbx}[2020/05/01 v1.3 HEP-Paper biblatex data model]
+%<package>\ProvidesPackage{hep-paper}[2020/08/01 v1.4 Publications in High Energy Physics]
+%<datamodel>\ProvidesFile{hep-paper.dbx}[2020/08/01 v1.4 HEP-Paper biblatex data model]
%
-%<*driver>
-
+%<*documentation>
+\RequirePackage[l2tabu, orthodox]{nag}
\documentclass{ltxdoc}
-\MacroIndent=1.5em
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
-% \makeatletter
-% \newenvironment{decl}[1][]%
-% {\par\small\addvspace{4.5ex plus 1ex}%
-% \vskip -\parskip
-% \ifx\relax#1\relax
-% \def\@decl@date{}%
-% \else
-% \def\@decl@date{\NEWfeature{#1}}%
-% \fi
-% \noindent\hspace{-\leftmargini}%
-% \begin{tabular}{|l|}\hline\ignorespaces}%
-% {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak
-% \vspace{2.3ex}\vskip -\parskip}
-% \makeatother
+\MacroIndent=1.5em
\usepackage[parskip]{hep-paper}
\bibliography{bibliography}
\acronym{PDF}{portable document format}
+\acronym{URL}{uniform resource locator}
\usepackage{hologo}
-\usepackage{multicol}
-
-\usepackage{titletoc}
-\titlecontents{section}[0em]{\medskip\bfseries}{\thecontentslabel\hspace{.8em}}{}{\hfill\contentspage}
\newenvironment{columns}[1][.5]{%
\begin{minipage}[t]{\linewidth}%
- \begin{minipage}[t]{#1\linewidth}
+ \begin{minipage}[t]{#1\linewidth}%
\newcommand{\column}{%
\end{minipage}%
\begin{minipage}[t]{\linewidth-#1\linewidth}%
}%
}{\end{minipage}\end{minipage}}
-\EnableCrossrefs
-\CodelineIndex
-\RecordChanges
+\setlength{\fboxsep}{1pt}
+%</documentation>
+%<*driver>
+\expandafter\newif\csname ifshort\endcsname
+\shortfalse
\begin{document}
-\DocInput{hep-paper.dtx}
+\DocInput{hep-paper-implementation.dtx}
\end{document}
-
%</driver>
%
% \fi
%
-% \CheckSum{1140}
+% \CheckSum{1302}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -93,414 +80,597 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \changes{v1.0}{2019/01/01}{Initial version of the style file}
-% \changes{v1.1}{2020/01/01}{Transition to documented \hologo{LaTeX} source file}
-% \changes{v1.2}{2020/03/01}{Introduction of package options}
-% \changes{v1.3}{2020/05/01}{Inclusion of JHEP and JCAP package options, fix incompatibility with recent subcaption package version, move biblatex datamodel into its own file}
-%
-% \GetFileInfo{hep-paper.sty}
-%
-% \DoNotIndex{\,,\@}
-% \DoNotIndex{\@affiliation,\@affil@opt,\@affil}
-%
-% \title{The |hep-paper| package\thanks{This document corresponds to \protecting{|hep-paper|}~\fileversion.}}
-% \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{\normalfont\filedate}
-%
-% \maketitle
-%
-% \begin{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.
-% \end{abstract}
-%
-% \clearpage\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 |hep-paper| package \cite{hep-paper}.
-%
-% | \documentclass{article}|\\
-% | \usepackage{hep-paper}|
-%
-% The most notable changes after loading the |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 set to the values known from the (depreciated) |a4wide| package \cite{a4wide} using the |geometry| package \cite{geometry}.
-% Furthermore, the font is changed to |lmodern| \cite{lmodern} with |microtype| \cite{microtype} optimizations.
-% Finally, \PDF hyperlinks are implemented with the |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|.
-%
-% \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|.
-%
-% \DescribeMacro{defaults}
-% The |defaults| option prevents the adjustment of the page geometry and the font size set by the document class.
-%
-% \DescribeMacro{lang}
-% The |lang|=\meta{name} option switches the document language to the chosen value.
-% The possible values are given by the |babel| package \cite{babel}.
-% The default is |british|.
-%
-% \DescribeMacro{parskip}
-% The |parskip| option makes use of the |parskip| package \cite{parskip} and changes how two paragraphs are separated from each other.
-% The \hologo{LaTeX} default is separation via indentation the |parskip| option switches to separation via vertical space.
-% \footnote{The |parskip| option is used for this document.}
-%
-% \DescribeMacro{sansserif}
-% The |sansserif| option switches the document including math to sans serif font shape.
-%
-% \DescribeMacro{title}
-% The |title=false| option deactivates the title page adjustments.
-%
-% \DescribeMacro{manualplacement}
-% The |manualplacement| option reactivates manual float placement.
-%
-% \DescribeMacro{bibliography}
-% The |bibliography|=\meta{key} option prevents the automatic loading of the |biblatex| package \cite{biblatex} if \meta{key}=|false|.
-% Otherwise the \meta{key} is passed as |style| string to the |biblatex| package.
-%
-% \DescribeMacro{glossaries}
-% The |glossaries=false| option deactives the use of the |glossaries| package \cite{glossaries}.
-%
-% \DescribeMacro{jhep}
-% The |jhep| option activates the |JHEP| \cite{jhep} compatibility mode.
-%
-% \DescribeMacro{jcap}
-% The |jcap| option activates the |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 |PoS| compatibility mode.
-%
-% \DescribeMacro{eqnarray}
-% The |eqnarray| option reactivates the depreciated |eqnarray| environment.
-%
-% \section{Macros and environments}
-%
-% \subsection{Title page}
-%
-% \DescribeMacro{\author}
-% \DescribeMacro{\affiliation}
-% \DescribeMacro{\email}
-% In order to facilitate multiple authors with different affiliations the |authblk| package \cite{authblk} is loaded.
-% The following lines add \eg two authors with different affiliations
-%
-% | \author[1]{Author one \email{Email one}}|\\
-% | \affiliation[1]{Affiliation one}|\\
-% | \author[2]{Author two \email{Email two}}|\\
-% | \affiliation[1,2]{Affiliation two}|
-%
-% \DescribeMacro{\title}
-% The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information.
-%
-% \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.
-%
-% \subsection{Text}
+% \changes{v1.0}{2019/01/01}{Initial version of the style file.}
+% \changes{v1.1}{2020/01/01}{Transition to documented \hologo{LaTeX} source file.}
+% \changes{v1.2}{2020/03/01}{Introduction of package options.}
+% \changes{v1.3}{2020/05/01}{Inclusion of JHEP and JCAP package options. Fix of incompatibility with recent subcaption package version. Move of biblatex datamodel into its own file}
+% \changes{v1.4}{2020/08/01}{If possible the compatibility options are selected automatically. Inclusion of PubMed IDs in bibliography.}
%
-% Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |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.
+% \ifshort
+%<*documentation>
%
-% \DescribeMacro{\eg}
-% \DescribeMacro{\vs}
-% The |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}.
-%
-% The |inlinelist| and |enumdescript| environments are defined using the |enumitem| package \cite{enumitem}.
-%
-% \DescribeMacro{inlinelist}
-% \begin{columns}
-% |The three main points are|
-%
-% |\begin{inlinelist}|
-%
-% | \item one|
-%
-% | \item two|
-%
-% | \item three|
-%
-% |\end{inlinelist}|
-% \column
-% The three main points are
-% \begin{inlinelist}
-% \item one
-% \item two
-% \item three
-% \end{inlinelist}
-% \end{columns}
-%
-% \DescribeMacro{enumdescript}
-% \begin{columns}[.6]
-% |\begin{enumdescript}[label=\Roman*)]|
-%
-% | \item{First} one|
-%
-% | \item{Second} two|
-%
-% | \item{Third} three|
+\begin{document}
+% \fi
+
+\GetFileInfo{hep-paper.sty}
+
+\title{The |hep-paper| package\thanks{This document corresponds to \protecting{|hep-paper|}~\fileversion.}}
+\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{\normalfont\filedate}
+
+\maketitle
+
+\begin{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.
+\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 |hep-paper| package \cite{hep-paper}.
+
+| \documentclass{article}|\\
+| \usepackage{hep-paper}|
+
+The most notable changes after loading the |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 set to the values known from the (depreciated) |a4wide| package \cite{a4wide} using the |geometry| package \cite{geometry}.
+Furthermore, the font is changed to |lmodern| \cite{lmodern} with |microtype| \cite{microtype} optimizations.
+Finally, \PDF hyperlinks are implemented with the |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 the chosen value.
+The possible values are given by the |babel| package \cite{babel}.
+The default is |british|.
+
+\DescribeMacro{sansserif}
+The |sansserif| option switches the document including math to the sans serif font shape.
+
+\DescribeMacro{parskip}
+The |parskip| option makes use of the |parskip| package \cite{parskip} and changes how two paragraphs are separated from each other.
+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.}
+
+\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 |biblatex| package \cite{biblatex} if \meta{key}=|false|.
+Otherwise the \meta{key} is passed as |style| string to the |biblatex| package.
+
+\DescribeMacro{glossaries}
+The |glossaries=false| option deactives acronyms and the use of the |glossaries| package \cite{glossaries}.
+
+\DescribeMacro{references}
+The |references=false| option prevents the |cleveref| pacakge \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{\author}
+\DescribeMacro{\affiliation}
+\DescribeMacro{\email}
+In order to facilitate multiple authors with different affiliations the |authblk| package \cite{authblk} is loaded.
+The following lines add \eg two authors with different affiliations
+
+| \author[1]{Author one \email{Email one}}|\\
+| \affiliation[1]{Affiliation one}|\\
+| \author[2]{Author two \email{Email two}}|\\
+| \affiliation[1,2]{Affiliation two}|
+
+\DescribeMacro{\title}
+The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information.
+
+\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.
+
+\subsection{Text}
+
+Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |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 |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}.
+
+The |inlinelist| and |enumdescript| environments are defined using the |enumitem| package \cite{enumitem}.
+
+\DescribeMacro{inlinelist}
+\begin{columns}
+|The three main points are|
+|\begin{inlinelist}|
+
+| \item one|
+
+| \item two|
+
+| \item three|
+
+|\end{inlinelist}|
+\column
+The three main points are
+\begin{inlinelist}
+ \item one
+ \item two
+ \item three
+\end{inlinelist}
+\end{columns}
+
+\DescribeMacro{enumdescript}
+\begin{columns}[.6]
+|\begin{enumdescript}[label=\Roman*)]|
+
+| \item{First} one|
+
+| \item{Second} two|
+
+| \item{Third} three|
+
+|\end{enumdescript}|
+\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}} is provided, using the |sansmathfonts| package \cite{sansmathfonts}.
+
+\DescribeMacro{\underline}
+\DescribeMacro{\overline}
+The |\underline| macro is redefined to allow line-breaks using the |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 |cleveref| package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{figure 1}.
+Furthermore, the |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 and are redefined in order to handle multiple references at once.
+
+\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 |mathtools| \cite{mathtools} and |amssymb| \cite{amsfonts} packages are loaded.
+They in turn load the \hologo{AmSLaTeX} |amsmath| \cite{amsmath} and |amsfonts| \cite{amsfonts} packages.
+\DescribeMacro{\mathbf}
+Bold math, via |\mathbf| is improved by the |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}$).
+The often used |\mathrm|\marg{text} and |{\rm|\meta{text}|}| macros are \emph{not} the correct tool for this purpose, as they switch to roman font shape.
+This behaviour conflicts \eg with the |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 |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 (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 |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 |amsmath| and |mathtools| packages should be used instead.
+
+\DescribeMacro{equation}
+Use the |equation| environment for short equations.
+
+\begin{columns}
+|\begin{equation}|
+
+| left = right \ .|
+
+|\end{equation}|
+\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{multline}|
+
+| left = right 1 \\|
+
+| + right 2 \ .|
+
+|\end{multline}|
+\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{equation} \begin{split}|
+
+| left &= right 1 \\|
+
+| &= right 2 \ .|
+
+|\end{split} \end{equation}|
+\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{subequations}|
+|\begin{align}|
+
+| left &= right \ , &|
+| left &= right \ , \\|
+| left &= right \ , &|
+| left &= right \ .|
+
+|\end{align}|
+|\end{subequations}|
+\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{equation} \begin{split}|
+
+| left &= right 1 \\ &=|
+| \begin{multlined}[t]|
+| right 2 \\ + right 3 \ .|
+| \end{multlined}|
+|\end{split} \end{equation}|
+\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{subequations}|
+|\begin{alignat}{2}|
+
+| left &= long right && \ , \\|
+
+| le. 2 &= ri. 2 \ , &|
+
+| \mathllap{le. 3 = ri. 3} & \ .|
+|\end{alignat}|
+|\end{subequations}|
+\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 |fixmath| \cite{fixmath} and |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 |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 |cancel| \cite{cancel} package and the |\slashed| \marg{character} macro from the |slashed| \cite{slashed} package 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 |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}
+\raggedright
+|\begin{panels}{.6}|\\
+|code|\\
+|\panel{.4}|\\
+|\begin{tabular}...\end{tabular}|\\
+|\end{panels}|\\
+\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 \protecting{|booktabs|} and \protecting{|multirow|} packages in Panel \subref{tab:booktabs}.
+} \label{tab:table}
+\end{table}
+
+\DescribeEnv{panels}
+\DescribeMacro{\panel}
+The |panels| environment makes use of the |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 |booktabs| \cite{booktabs} and |multirow| \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}.
+
+\DescribeMacro{\graphic}
+\DescribeMacro{\graphics}
+The |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 |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.
+
+| \article{|\meta{key1}|,|\\
+| |\dots|,|\\
+| relatedtype="erratum",|\\
+| related="|\meta{key2}|",|\\
+| }|\\
+| \article{|\meta{key2}|,|\\
+| |\dots|,|\\
+| }|
+
+\section{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.
+
+\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 |arxiv-collector| python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures).
+
+% \ifshort
+\printbibliography
+
+\end{document}
%
-% |\end{enumdescript}|
-% \column
-% \begin{enumdescript}[label=\Roman*)]
-% \item{First} one
-% \item{Second} two
-% \item{Third} three
-% \end{enumdescript}
-% \end{columns}
-%
-% \DescribeMacro{\textsc}
-% A sans serif version of \textsf{\textsc{Small Caps}} is provided, using the |sansmathfonts| package \cite{sansmathfonts}.
-%
-% \DescribeMacro{\underline}
-% \DescribeMacro{\overline}
-% The |\underline| macro is redefined to allow linebreaks using the |soul| package \cite{soul}.
-% 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 |cleveref| package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{Figure 1}.
-% Furthermore, the |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 and are redefined in order to handle multiple references at once.
-%
-% \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 singluar |\|\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 only show 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.
-% 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 |mathtools| \cite{mathtools} and |amssymb| \cite{amsfonts} packages are loaded.
-% They in turn load the \hologo{AmSLaTeX} |amsmath| \cite{amsmath} and |amsfonts| \cite{amsfonts} packages.
-% Details about the font handling in \hologo{TeX} can be found in \cite{fntguide}.
-% \DescribeMacro{\mathbf}
-% Bold math, including |\mathbf| is provided by the |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}$).
-% The often used |\mathrm|\marg{text} and |\rm|\marg{text} macros are \emph{not} the correct tool for this purpose, as they switch to roman font shape.
-% This behaviour conflicts \eg with the |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 changed by the |bbm| \cite{bbm-macros} package and adjusted depending on the |sansserif| option \ie ($\mathbb{Ab1}${\mathversion{bold}$\mathbb{Ab1}$}).
-%
-% \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}
-%
-% A diagonal matrix operator is defined |\diag|.
-%
-% \DescribeMacro{\mathdef}
-% The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro (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 \hologo{AmSLaTeX} 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 should be used instead.
-%
-% \subsubsection{Physics}
-%
-% Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the |fixmath| \cite{fixmath} and |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 |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{\slashed}
-% The |\slashed|\marg{character} macro from the |slashed| \cite{slashed} package allows to use the Dirac slash notation.
-%
-% \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 |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.
-% The most useful float placement is usually archived by placing the float \emph{in front} of the paragraph it is referenced in first.
-% Additionally, manual float placement is deactivated but can be reactivated using the |manualplacement| package option.
-% \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}
-% \raggedright
-% |\begin{panels}{.6}|\\
-% |code|\\
-% |\panel{.4}|\\
-% |\begin{tabular}...\end{tabular}|\\
-% |\end{panels}|\\
-% \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 \protecting{|booktabs|} and \protecting{|multirow|} packages in Panel \subref{tab:booktabs}.
-% } \label{tab:table}
-% \end{table}
-%
-% \DescribeEnv{panels}
-% \DescribeMacro{\panel}
-% The |panels| environment makes use of the |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 |booktabs| \cite{booktabs} and |multirow| \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}.
-%
-% \DescribeMacro{\graphic}
-% \DescribeMacro{\graphics}
-% The |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 |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, \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 recognized as |eprinttype|s.
-% \DescribeMacro{erratum}
-% Errata can be included using the |related| feature.
-%
-% | \article{|\meta{key1}|,|\\
-% | |\dots|,|\\
-% | relatedtype="erratum",|\\
-% | related="|\meta{key2}|",|\\
-% | }|\\
-% | \article{|\meta{key2}|,|\\
-% | |\dots|,|\\
-% | }|
-%
-% \section{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.
-%
-% \DescribeMacro{arxiv-collector}
-% 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 |arxiv-collector| python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures).
+%</documentation>
+% \fi
%
% \StopEventually{
% \printbibliography
% \PrintChanges
% }
%
+% \addtocontents{toc}{\protect\clearpage}
+% \clearpage
% \appendix
%
+% \ifshort
+%<*package>
+% \fi
+%
% \section{Options}
%
-%<*package>
-
% Load the |pdftexcmds| \cite{pdftexcmds} and |kvoptions| \cite{kvoptions} packages and define a |hep| namespace.
-% \DoNotIndex{\RequirePackage,\SetupKeyvalOptions}
% \begin{macrocode}
\RequirePackage{pdftexcmds}
\RequirePackage{kvoptions}
@@ -513,7 +683,6 @@
% \begin{macro}{paper}
% Define a |paper=|\meta{size} option.
% Make A4 paper the default.
-% \DoNotIndex{\DeclareStringOption}
% \begin{macrocode}
\DeclareStringOption[a4]{paper}
% \end{macrocode}
@@ -527,14 +696,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{defaults}
-% Define the |defaults| option which deactivates the |paper| and |font| options and prevents the change of the class defaults by this package.
-% \DoNotIndex{\DeclareBoolOption,\ifhep@defaults}
-% \begin{macrocode}
-\DeclareBoolOption[false]{defaults}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{lang}
% Define the |lang| option, which takes the values provided by the |babel| package \cite{babel}.
% Make |british| the default language.
@@ -543,29 +704,35 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{sansserif}
+% Define the option pair |serif| and |sansserif| controling the font shape of the whole document.
+% \begin{macrocode}
+\DeclareBoolOption[true]{serif}
+\DeclareComplementaryOption{sansserif}{serif}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{parskip}
% Define the option pair |parindent| and |parskip| controlling the separation of paragraphs.
-% \DoNotIndex{\DeclareComplementaryOption,\ifhep@parindent}
% \begin{macrocode}
\DeclareBoolOption[true]{parindent}
\DeclareComplementaryOption{parskip}{parindent}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{sansserif}
-% Define the option pair |serif| and |sansserif| controling the font shape of the whole document.
-% \DoNotIndex{\ifhep@serif}
+% \subsection{Deactivation}
+%
+% \begin{macro}{defaults}
+% Define the |defaults| option which deactivates the |paper| and |font| options and prevents the change of the class defaults by this package.
% \begin{macrocode}
-\DeclareBoolOption[true]{serif}
-\DeclareComplementaryOption{sansserif}{serif}
+\DeclareBoolOption[false]{defaults}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{eqnarray}
-% Provide the option |eqnarray| for reactivating the |eqnarray| environment.
-% \DoNotIndex{\ifhep@eqnarray}
+% \begin{macro}{title}
+% Provide the option |title| for deactivating redefinition of title macros.
% \begin{macrocode}
-\DeclareBoolOption[false]{eqnarray}
+\DeclareBoolOption[true]{title}
% \end{macrocode}
% \end{macro}
%
@@ -578,25 +745,24 @@
%
% \begin{macro}{glossaries}
% Provide the option |glossaries| able to turn of the use of the |glossaries| package \cite{glossaries}.
-% \DoNotIndex{\ifhep@glossaries}
% \begin{macrocode}
\DeclareBoolOption[true]{glossaries}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{manualplacement}
-% Provide the |manualplacement| option for reactivating the manual placement of floats.
-% \DoNotIndex{\ifhep@manualplacement}
+% \begin{macro}{references}
+% Provide the option |references| for preventing the |cleveref| package from being loaded redefinitions of reference macros.
% \begin{macrocode}
-\DeclareBoolOption[false]{manualplacement}
+\DeclareBoolOption[true]{references}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{title}
-% Provide the option |title| for deactivating redefinition of title macros.
-% \DoNotIndex{\ifhep@title}
+% \subsection{Compatibility}
+%
+% \begin{macro}{beamer}
+% Provide the option |beamer| for \software{beamer} \cite{beamer} compatibility mode.
% \begin{macrocode}
-\DeclareBoolOption[true]{title}
+\DeclareBoolOption[false]{beamer}
% \end{macrocode}
% \end{macro}
%
@@ -628,30 +794,61 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Reactivation}
+%
+% \begin{macro}{eqnarray}
+% Provide the option |eqnarray| for reactivating the |eqnarray| environment.
+% \begin{macrocode}
+\DeclareBoolOption[false]{eqnarray}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{manualplacement}
+% Provide the |manualplacement| option for reactivating the manual placement of floats.
+% \begin{macrocode}
+\DeclareBoolOption[false]{manualplacement}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Process options}
%
% \begin{macrocode}
\ProcessKeyvalOptions*
% \end{macrocode}
%
+% \subsection{Set compatibility}
+%
% Set the |pos| compatibility options.
-% \DoNotIndex{\ifhep@pos,\setkeys,\fi}
% \begin{macrocode}
+\@ifclassloaded{PoS}{\setkeys{hep}{pos}}{}
\ifhep@pos
- \setkeys{hep}{title=false, defaults}
+ \setkeys{hep}{defaults, title=false}
+ \DeclareRobustCommand\boldmath{\@nomath\boldmath\mathversion{bold}}
+\fi
+% \end{macrocode}
+%
+% Set the |beamer| compatibility options.
+% \begin{macrocode}
+\@ifclassloaded{beamer}{\setkeys{hep}{beamer}}{}
+\ifhep@beamer
+ \setkeys{hep}{defaults, title=false, references=false, sansserif}
\fi
% \end{macrocode}
%
% Set the |revtex| compatibility options.
-% \DoNotIndex{\ifhep@revtex}
% \begin{macrocode}
+\@ifclassloaded{revtex4}{\setkeys{hep}{revtex}}{}
+\@ifclassloaded{revtex4-1}{\setkeys{hep}{revtex}}{}
+\@ifclassloaded{revtex4-2}{\setkeys{hep}{revtex}}{}
\ifhep@revtex
- \setkeys{hep}{defaults, title=false, lang=american, bibliography=false}
+ \setkeys{hep}{defaults, title=false, bibliography=false, lang=american}
\fi
% \end{macrocode}
%
% Define the SISSA conditional.
% \begin{macrocode}
+\@ifpackageloaded{jheppub}{\setkeys{hep}{jhep}}{}
+\@ifpackageloaded{jcappub}{\setkeys{hep}{jcap}}{}
\newif\ifhep@sissa
\ifhep@jhep\hep@sissatrue
\else
@@ -670,29 +867,16 @@
urlcolor=blue, anchorcolor=blue, citecolor=blue, filecolor=blue,
linkcolor=blue, menucolor=blue, pagecolor=blue
}{hyperref}
- \hoffset 0pt
- \voffset 0pt
+ \PassOptionsToPackage{reset}{geometry}
\fi
% \end{macrocode}
-
-% \section{Engine}
-%
-% \begin{macro}{\ifxetexorluatex}
-% Load the |ifluatex| \cite{ifluatex} and |ifxetex| \cite{ifxetex} packages.
-% Define the |\ifxetexorluatex| conditional checking if the package is executed by \hologo{LuaLaTeX} or \hologo{XeLaTeX}.
-% \DoNotIndex{\newif,\ifxetex,\xetexorluatextrue,\else,\ifluatex,\xetexorluatexfalse,\fi}
+% Set the JHEP compatibility options.
% \begin{macrocode}
-\RequirePackage{ifluatex}
-\RequirePackage{ifxetex}
-\newif\ifxetexorluatex
-\ifxetex\xetexorluatextrue
-\else
- \ifluatex\xetexorluatextrue
- \else\xetexorluatexfalse
- \fi
+\ifhep@jhep
+ \voffset 0in
+ \hoffset 0in
\fi
% \end{macrocode}
-% \end{macro}
% \section{Text}
%
@@ -705,7 +889,6 @@
% Set the whole text to sans serif if requested.
% Load the |sansmathfonts| package \cite{sansmathfonts} first.
% Although, most fonts will later be overwritten by the |lmodern| package \cite{lmodern} some mathematical objects are ensured to be in sans serif.
-% \DoNotIndex{\ifhep@serif,\renewcommand,\familydefault,\sfdefault}
% \begin{macrocode}
\ifhep@serif\else
\RequirePackage{sansmathfonts}
@@ -713,46 +896,76 @@
\fi
% \end{macrocode}
%
+% \begin{macro}{\ifxetexorluatex}
+% Load the |ifluatex| \cite{ifluatex} and |ifxetex| \cite{ifxetex} packages.
+% Define the |\ifxetexorluatex| conditional checking if the package is executed by \hologo{LuaLaTeX} or \hologo{XeLaTeX}.
+% \begin{macrocode}
+\RequirePackage{ifluatex}
+\RequirePackage{ifxetex}
+\newif\ifxetexorluatex
+\ifxetex\xetexorluatextrue
+\else
+ \ifluatex\xetexorluatextrue
+ \else\xetexorluatexfalse
+ \fi
+\fi
+% \end{macrocode}
+% \end{macro}
+%
% Pick the correct font encoding depending on the engine used and load the |fontenc| package \cite{fontenc} with this encoding.
% For details of the font encoding see \cite{encguide}.
-% \DoNotIndex{\def,\@encoding}
% \begin{macrocode}
\ifxetexorluatex
- \def\@encoding{TU}
+ \def\hep@encoding{TU}
\else
- \def\@encoding{T1}
+ \def\hep@encoding{T1}
\fi
-\RequirePackage[\@encoding]{fontenc}
+\RequirePackage[\hep@encoding]{fontenc}
% \end{macrocode}
-% Load the |lmodern| font \cite{lmodern}, the |textcomp| extension \cite{textcomp}, and the |microtype| font optimization \cite{microtype}.
+% Fix the remaining coputer modern fonts \cite{fix-cm}, load the |lmodern| font \cite{lmodern}, the |textcomp| extension \cite{textcomp}, and the |microtype| font optimization \cite{microtype}.
% \begin{macrocode}
+\RequirePackage{fix-cm}
\RequirePackage{lmodern}
\RequirePackage{textcomp}
\RequirePackage{microtype}
% \end{macrocode}
%
-% Define sans serif small caps font shapes.
+% Define bold and sans serif small caps font shapes using the fontspec package \cite{fontspec}.
% The font abbreviations are
% \begin{description}[nosep]
+% \item[lmr] Latin modern roman font
% \item[lmss] Latin modern sans serif font
% \item[cmss] Computer modern sans serif font
% \item[xcmss] Extended computer modern sans serif font (from the |sansmathfonts| package \cite{sansmathfonts})
% \item[bx] Bold extended series
+% \item[b] Bold series
% \item[m] Medium weight and width series
% \item[c] Medium weight, condensed width series
% \item[sc] Caps and small caps font shape
% \end{description}
-% \DoNotIndex{\DeclareFontShape,\sffamily}
% \begin{macrocode}
\ifxetexorluatex
- \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
- \DeclareFontShape{\@encoding}{lmss}{m}{sc}{%
+ \RequirePackage{fontspec}
+ \setmainfont{Latin Modern Roman}[
+ UprightFeatures={SmallCapsFont={[lmromancaps10-regular.otf]}},
+ BoldFeatures={
+ SmallCapsFeatures={Letters=SmallCaps},
+ SmallCapsFont={[cmunbx.otf]}
+ }
+ ]
+ \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->cmssbxcsc10}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{%
<-9>cmsscsc8<9-10>cmsscsc9<10->cmsscsc10%
}{}
\else
+ \rmfamily
+ \DeclareFontShape{\hep@encoding}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{}
\sffamily
- \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->ssub*xcmss/bx/sc}{}
- \DeclareFontShape{\@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->ssub*xcmss/bx/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->ssub*xcmss/bx/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{}
\fi
% \end{macrocode}
@@ -764,29 +977,26 @@
% \end{macrocode}
%
% Load the |babel| \cite{babel} package for hyphenation and the recommended |csquotes| package \cite{csquotes}.
-% \DoNotIndex{\hep@lang}
% \begin{macrocode}
\RequirePackage[\hep@lang]{babel}
\RequirePackage{csquotes}
% \end{macrocode}
%
% \begin{macro}{\underline}
-% Load the |soul| package \cite{soul} for hyphenable underlined text.
-% \DoNotIndex{\let}
+% Load the |ulem| package \cite{ulem} for hyphenable underlined text.
% \begin{macrocode}
-\RequirePackage{soul}
-\let\underline\ul
+\RequirePackage[normalem]{ulem}
+\let\underline\uline
% \end{macrocode}
% \end{macro}
%
% \subsection{Font size} \label{sec:font size}
%
% Undefine previously defined font sizes and load the \hologo{LaTeX} font size file corresponding to the font size option.
-% \DoNotIndex{\remove@pt,\edef,\@ptsize,\expandafter,\small,\relax,\footnotesize,\scriptsize}
% \begin{macrocode}
\ifhep@defaults\else
- \def\remove@pt#1pt{#1}
- \edef\@ptsize{\expandafter\remove@pt\hep@font}
+ \def\hep@remove@pt#1pt{#1}
+ \edef\hep@pt@size{\expandafter\hep@remove@pt\hep@font}
\let\small\relax
\let\footnotesize\relax
\let\scriptsize\relax
@@ -796,7 +1006,7 @@
\let\LARGE\relax
\let\huge\relax
\let\Huge\relax
- \input{size\@ptsize.clo}
+ \input{size\hep@pt@size.clo}
\fi
% \end{macrocode}
@@ -805,7 +1015,6 @@
%\begin{macro}{\vs}
% Load the |foreign| package \cite{foreign} in order to highlight abbreviations and vocabularies from foreign languages.
% Add the missing |\vs| command.
-% \DoNotIndex{\DeclareRobustCommand,\xperiodafter,\foreignabbrfont,\pdf@strcmp,\hep@lang@foreign}
% \begin{macrocode}
\ifnum\pdf@strcmp{\hep@lang}{american}=0
\newcommand{\hep@lang@foreign}{USenglish}
@@ -836,7 +1045,6 @@
%
%\begin{macro}{\software}
% Define a macro for software with optional version information |\software|\linebreak[1]\oarg{version}\linebreak[1]\marg{name}, using the |relsize| package \cite{relsize}.
-% \DoNotIndex{\hspace,\fontdimen,\font,\smaller,\textsc}
% \begin{macrocode}
\RequirePackage{relsize}
\newcommand{\software}[2][\hspace{-\fontdimen2\font}]{%
@@ -846,8 +1054,7 @@
% \end{macro}
%
% \begin{macro}{\online}
-% The |\online|\marg{text}\marg{url} macro combines the features of the |\href| and the |\url| macros.
-% \DoNotIndex{\href,\url}
+% Define the |\online|\marg{text}\marg{url} macro combining the features of the |\href| and the |\url| macros.
% \begin{macrocode}
\newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}
% \end{macrocode}
@@ -862,7 +1069,6 @@
%
% \begin{environment}{inlinelist}
% Define an inline list environment.
-% \DoNotIndex{\newlist,\setlist*,\ }
% \begin{macrocode}
\newlist{inlinelist}{enumerate*}{1}
\setlist*[inlinelist,1]{%
@@ -873,48 +1079,40 @@
%
% \begin{environment}{enumdescript}
% Define an enumdescript list environment.
-% \DoNotIndex{\arabic*,\old@item,\item,ifx,\textbf,\empty,\@ifnextchar,\par,\@gobble}
% \begin{macrocode}
\newlist{enum@descript}{enumerate}{2}
\setlist[enum@descript]{label=\arabic*.}
\newenvironment{enumdescript}[1][]{
\begin{enum@descript}[#1]
- \let\old@item\item
+ \let\hep@item\item
\renewcommand{\item}[2][]{
- \ifx&##1&\old@item\else\old@item[##1]\fi
+ \ifx&##1&\hep@item\else\hep@item[##1]\fi
\textbf{##2}\ifx##2\empty\else~\fi\@ifnextchar\par\@gobble\relax
}
}{\end{enum@descript}}
% \end{macrocode}
% \end{environment}
-% \subsection{Footnotes}
-%
-% \begin{macro}{\footnote}
-% Ensure that no spaces appear before the footmark or at the beginning of the footnote.
-% \DoNotIndex{\unskip,\@foot@note,\ignorespaces}
-% \begin{macrocode}
-\let\@foot@note\footnote
-\renewcommand{\footnote}[1]{\unskip\@foot@note{\ignorespaces#1}}
-% \end{macrocode}
-% \end{macro}
-
% \section{Geometry}
%
% Load the |geometry| package \cite{geometry} and adjust the text width and height to the values of the |a4wide| package \cite{a4wide}.
% This step must happen after readjusting the font size in \cref{sec:font size}.
-% \DoNotIndex{\ifhep@defaults,\hep@paper,\geometry}
% \begin{macrocode}
\ifhep@defaults\else
- \RequirePackage[\hep@paper paper]{geometry}
- \geometry{hscale=.75, vscale=.8, vmarginratio=3:4, includeheadfoot}
+ \RequirePackage{geometry}
+ \geometry{%
+ \hep@paper paper,
+ hscale=.75,
+ vscale=.8,
+ vmarginratio=3:4,
+ includeheadfoot
+ }
\fi
% \end{macrocode}
%\begin{macro}{\useparskip}
%\begin{macro}{\useparindent}
% Load the |parskip| package \cite{parskip} if requested and provide two commands switching between the two paragraph modes.
-% \DoNotIndex{\ifhep@parindent,\setlength,\parskip,\baselineskip,\parindent}
% \begin{macrocode}
\ifhep@parindent\else
\RequirePackage{parskip}
@@ -946,11 +1144,14 @@
% \end{macrocode}
% \begin{macro}{\diag}
-% Provide a diag operator
+% \begin{macro}{\sgn}
+% Provide the |\diag| and |\sgn| operators
% \begin{macrocode}
\DeclareMathOperator{\diag}{diag}
+\DeclareMathOperator{\sgn}{sgn}
% \end{macrocode}
% \end{macro}
+% \end{macro}
% \begin{macro}{\mathdef}
% Define the |\mathdef|\marg{name}\oarg{arguments}\marg{macro} macro which (re-)defines macros in math mode only.
@@ -980,17 +1181,28 @@
% \end{macro}
% \begin{macro}{\overline}
-% Redefine |\overline| to be a text macro using the |soul| package \cite{soul}.
+% Redefine |\overline| to be a text macro using the |ulem| package \cite{ulem}.
% Extend it as a math macro with the original definition from |amsmath| \cite{amsmath}.
% \begin{macrocode}
-\def\overline#1{{\setul{-2ex}{}\ul{#1}}}
+\def\overline#1{{\renewcommand{\ULdepth}{-1.9ex}{}\uline{#1}}}
\DeclareRobustCommand{\over@line}[1]{\@@overline{#1}}
\mathdef{\overline}{\over@line}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\left}
+% \begin{macro}{\right}
+% Load the |mleftright| package \cite{mleftright} and adjust the spacing around |\left| and |\right|.
+% \begin{macrocode}
+\RequirePackage{mleftright}
+\mleftright
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+
+
% \begin{macro}{eqnarray}
-% Undefine the |eqnarray| environment.
+% Undefine the |eqnarray| environment if not prevented by package option.
% \begin{macrocode}
\ifhep@eqnarray\else
\let\eqnarray\@undefined
@@ -1005,7 +1217,7 @@
% Load the |bm| package \cite{bm} for superior boldmath after limiting the number of allocated math alphabets.
% Make math symbols bold whenever they appear in bold macros such as |\section|\marg{text}.
% \begin{macrocode}
-\newcommand{\bmmax}{2}
+\ifhep@serif\providecommand{\bmmax}{2}\else\providecommand{\bmmax}{1}\fi
\RequirePackage{bm}
\let\mathbf\bm
\g@addto@macro\bfseries{\boldmath}
@@ -1014,7 +1226,7 @@
%
% \begin{macro}{\mathsf}
% Load the |fixmath| package \cite{fixmath} which ensures that upper Greek letters in math mode are italic.
-% Ensure that also math mode is sans serif using the |sfmath| package \cite{sfmath} if the option sans serif is passed to the package.
+% Ensure that also math mode is sans serif using the |sfmath| package \cite{sfmath} if the sans serif option is used.
% Ensure that |\mathsf| is italic as well as sans serif and sans for sans and sans serif documents, respectively.
% The font abbreviations are
% \begin{description}[nosep]
@@ -1028,48 +1240,51 @@
% \begin{macrocode}
\ifhep@serif
\RequirePackage{fixmath}
- \DeclareMathAlphabet{\mathsf}{OML}{cmbr}{m}{it}
- \SetMathAlphabet{\mathsf}{bold}{OML}{cmbr}{bx}{it}
+ \newcommand\hep@sf@font{cmbr}
\else
\RequirePackage[slantedGreek]{sfmath}
\RequirePackage{sansmathfonts}
- \DeclareMathAlphabet{\mathsf}{OML}{cmm}{m}{it}
- \SetMathAlphabet{\mathsf}{bold}{OML}{cmm}{bx}{it}
+ \newcommand\hep@sf@font{cmm}
\fi
+\SetMathAlphabet{\mathsf}{normal}{OML}{\hep@sf@font}{m}{it}
+\SetMathAlphabet{\mathsf}{bold}{OML}{\hep@sf@font}{bx}{it}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\mathscr}
% Load the |mathrsfs| package for the |\mathscr| math script font.
% \begin{macrocode}
-\RequirePackage{mathrsfs}
+\DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\mathbb}
-% Load the |bbm| package \cite{bbm-macros} for the |\mathbb| math blackboard style font in (sans-) serif.
+% Load the |dsfont| package \cite{dsfont} and adjust the |\mathbb| math blackboard style font according to the (sans-) serif option.
% \begin{macrocode}
-\RequirePackage{bbm}
\ifhep@serif
- \let\mathbb\mathbbm
+ \newcommand\hep@bb@font{dsrom}
\else
- \let\mathbb\mathbbmss
+ \newcommand\hep@bb@font{dsss}
\fi
+\SetMathAlphabet{\mathbb}{normal}{U}{\hep@bb@font}{m}{n}
% \end{macrocode}
% \end{macro}
% \subsection{Physics notation}
%
+% \begin{macro}{\cancel}
% \begin{macro}{\slashed}
% \begin{macro}{\unit}
% Load the |physics| package \cite{physics} which provides macros useful for publications in physics.
-% Additionally, load the |slashed| package \cite{slashed} which provides the slashed macro for Dirac notation.
+% Additionally, load the |cancel| \cite{cancel} and |slashed| \cite{slashed} packages which provide the |\cancel| and |\slashed| macros.
% Finally, load the |units| package \cite{units} which provides the |\units| and |\nicefrac| macros.
% \begin{macrocode}
\RequirePackage{physics}
+\RequirePackage{cancel}
\RequirePackage{slashed}
\RequirePackage{units}
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
% \begin{macro}{\inv}
% Provide a macro for the inverse, useful in combination with the unit macro in text mode.
@@ -1106,11 +1321,13 @@
%
% Adjust the \hologo{LaTeX} float placement defaults
% \begin{macrocode}
-\renewcommand{\textfraction}{0.01}
-\setcounter{topnumber}{1}
-\renewcommand{\topfraction}{.9}
-\setcounter{bottomnumber}{0}
-\renewcommand{\floatpagefraction}{.8}
+\setcounter{bottomnumber}{0} % 1
+\setcounter{topnumber}{1} % 2
+\setcounter{dbltopnumber}{1} % 2
+\renewcommand{\topfraction}{.9} % .7
+\renewcommand{\dbltopfraction}{.9} % .7
+\renewcommand{\textfraction}{.1} % .2
+\renewcommand{\floatpagefraction}{.8} % .5
% \end{macrocode}
% \begin{environment}{figure}
@@ -1143,9 +1360,25 @@
% \subsection{Sub-floats}
%
-% Prevent the |caption| package \cite{caption} from complaining about the |revtex| class.
+% \begin{macro}{\ifhep@journal}
+% Define a new journal conditional.
% \begin{macrocode}
-\ifhep@revtex
+\newif\ifhep@journal
+\ifhep@sissa\hep@journaltrue
+\else
+ \ifhep@revtex\hep@journaltrue
+ \else
+ \ifhep@pos\hep@journaltrue
+ \else\hep@journalfalse
+ \fi
+ \fi
+\fi
+% \end{macrocode}
+% \end{macro}
+%
+% Prevent the |caption| package \cite{caption} from complaining about the journal classes and packages.
+% \begin{macrocode}
+\ifhep@journal
\setlength\abovecaptionskip{\f@size\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
@@ -1163,7 +1396,7 @@
% \end{macrocode}
%
% Load the |subcaption| package \cite{subcaption}.
-% Provide old |\subcaption@minipage| macro.
+% Provide the old |\subcaption@minipage| macro.
% \begin{macrocode}
\RequirePackage[subrefformat=parens]{subcaption}
\captionsetup{font=small}
@@ -1250,30 +1483,26 @@
% \section{Title page}
%
-% \begin{macro}{\date}
-% Allow empty date field.
+% Begin of |title| conditional.
% \begin{macrocode}
\ifhep@title
+% \end{macrocode}
+%
+% \begin{macro}{\date}
+% Allow absent date field.
+% \begin{macrocode}
\date{}
% \end{macrocode}
% \end{macro}
-
+%
% \subsection{Authors}
%
% \begin{macro}{\author}
-% Allow empty author field.
+% Allow absent author field.
% \begin{macrocode}
\author{}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\email}
-% Define a macro for the email of authors used as |\author{|$\langle name\rangle$| \email{|$\langle email\rangle$|}}|.
-% \begin{macrocode}
-\AtEndOfClass{\newcommand{\email}[1]{%
- \unskip\thanks{\online{mailto:#1}{#1}}
-}}
-% \end{macrocode}
-% \end{macro}
%
% Enable the handling of multiple authors with different affiliations using the |authblk| package \cite{authblk}.
% \begin{macrocode}
@@ -1281,6 +1510,19 @@
\renewcommand\Affilfont{\footnotesize}
% \end{macrocode}
%
+% \begin{macro}{\email}
+% Define a macro for typesetting emails.
+% Redefine this macro to place the email address in a footnote if called from within the |\author| macro |\author{|$\langle name\rangle$ |\email{|$\langle email\rangle$|}}|.
+% \begin{macrocode}
+\newcommand{\email}[1]{\online{mailto:#1}{#1}}
+\let\hep@author\author
+\def\author{%
+ \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}%
+ \hep@author
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\affiliation}
% Define the |\affiliation| macro, ensure that linebreaks happen after a comma.
% \begin{macrocode}
@@ -1319,9 +1561,9 @@
% \begin{macrocode}
\RequirePackage{atbegshi}
\RequirePackage{picture}
-\let\old@maketitle\maketitle
+\let\hep@maketitle\maketitle
\renewcommand{\maketitle}{%
- \old@maketitle%
+ \hep@maketitle%
\AtBeginShipoutFirst{%
\put(
\textwidth+\oddsidemargin-\widthof{\@preprint@box},
@@ -1338,12 +1580,12 @@
% Adjust the |abstract| environment to not start with indentation.
% \begin{macrocode}
\@ifundefined{abstract}{}{%
- \let\old@abstract\abstract%
- \renewcommand\abstract{\old@abstract\noindent\ignorespaces}%
+ \let\hep@abstract\abstract%
+ \renewcommand\abstract{\hep@abstract\noindent\ignorespaces}%
}
% \end{macrocode}
% \end{environment}
-% End of check for |title| option.
+% End of |title| conditional.
% \begin{macrocode}
\fi
% \end{macrocode}
@@ -1363,35 +1605,18 @@
% \end{macro}
%
% \begin{macro}{hep-paper}
-% Define a new sorting template that sorts only multi key |\cite| entries according to their date and leaves the rest of the bibliography entries in the order they appear in the text.
% Provide the |\DeclareSortingTemplate| macro for older |biblatex| installations.
+% Define a new sorting template that sorts only multi key |\cite| entries according to their date and leaves the rest of the bibliography entries in the order they appear in the text.
% \begin{macrocode}
\providecommand{\DeclareSortingTemplate}{\DeclareSortingScheme}
\DeclareSortingTemplate{hep-paper}{
\sort{\citeorder}
- \sort[final]{
- \field{sortkey}
- }
- \sort{
- \field{sortyear}
- \field{year}
- \literal{9999}
- }
- \sort{
- \field{month}
- }
- \sort{
- \field{eprint}
- \field{doi}
- }
- \sort{
- \field{sorttitle}
- \field{title}
- }
- \sort{
- \field{subtitle}
- \field{volume}
- }
+ \sort[final]{\field{sortkey}}
+ \sort{\field{sortyear} \field{year} \literal{9999}}
+ \sort{\field{month}}
+ \sort{\field{eprint} \field{doi}}
+ \sort{\field{sorttitle} \field{title}}
+ \sort{\field{subtitle} \field{volume}}
}
% \end{macrocode}
% \end{macro}
@@ -1407,16 +1632,17 @@
% \begin{macro}{erratum}
% Add new bibliography string \enquote{Erratum} for the use in the |relatedtype| field.
% \begin{macrocode}
-\NewBibliographyString{erratum}
-\DefineBibliographyStrings{english}{erratum={Erratum}}
+\NewBibliographyString{erratum,erratums}
+\DefineBibliographyStrings{english}{erratum={Erratum},erratums={Errata}}
+\providecommand{\relateddelimerratum}{\addsemicolon\space}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\printbibliography}
% Allow the bibliography to be printed sloppy
% \begin{macrocode}
-\let\old@printbibliography\printbibliography
-\renewcommand{\printbibliography}{\sloppy\old@printbibliography}
+\let\hep@printbibliography\printbibliography
+\renewcommand{\printbibliography}{\sloppy\hep@printbibliography}
% \end{macrocode}
% \end{macro}
@@ -1425,15 +1651,18 @@
% \begin{macro}{\reg@exp@one}
% \begin{macro}{\reg@exp@two}
% \begin{macro}{\reg@exp@url}
-% Define regular expressions in order to deal with inconsistent journal title and volume naming as well as URL protocols.
+% \begin{macro}{\reg@exp@pmc}
+% Define regular expressions in order to deal with inconsistent journal title and volume naming as well as \URL protocols and the PMCID.
% \begin{macrocode}
\newcommand{\reg@exp@one}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}}
\newcommand{\reg@exp@two}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}}
\newcommand{\reg@exp@url}{\regexp{\A(ht|f)tp(s)?:\/\/}}
+\newcommand{\reg@exp@pmc}{\regexp{\A(PMC)?}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\DeclareSourcemap}
% Use the |\DeclareSourcemap| feature.
@@ -1471,19 +1700,58 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{url}
-% Remove the protocol from URL.
+% Remove the protocol from \URL.
% \begin{macrocode}
\map{
\step[fieldsource=url, final=true]
\step[fieldset=protocollessurl, origfieldval, final=true]
\step[fieldsource=protocollessurl, match=\reg@exp@url, replace={}]
}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{pmc}
+% Remove the PMC from the PMCID.
+% \begin{macrocode}
+ \map{
+ \step[fieldsource=pmcid, final=true]
+ \step[fieldset=pmc, origfieldval, final=true]
+ \step[fieldsource=pmc, match=\reg@exp@pmc, replace={}]
+ }
}%
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\letbibmacro}
+% Provide the |\letbibmacro| macro for old |biblatex| installations.
+% \begin{macrocode}
+\providecommand{\letbibmacro}[2]{\csletcs{abx@macro@#1}{abx@macro@#2}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{collaboration}
+% Execute the author macro even if only the collaboration information if present and override the author information with collaboration information if present.
+% \begin{macrocode}
+\renewbibmacro*{author/translator+others}{%
+ \ifboolexpr{
+ test \ifuseauthor and (
+ not test {\ifnameundef{author}} or
+ not test {\iffieldundef{collaboration}}
+ )
+ }
+ {\usebibmacro{author}}
+ {\usebibmacro{translator+others}}
+}
+\letbibmacro{hep@bib@author}{author}
+\renewbibmacro*{author}{%
+ \iffieldundef{collaboration}{%
+ \usebibmacro{hep@bib@author}}{\textit{\printfield{collaboration}}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{In:}
% Remove spurious \enquote{In:} if no journal is present.
% \begin{macrocode}
@@ -1494,7 +1762,7 @@
% \end{macro}
%
% \begin{macro}{url}
-% Show URLs without the protocol.
+% Show \URLs without the protocol.
% \begin{macrocode}
\DeclareFieldFormat{url}{%
\mkbibacro{URL}\addcolon\space\online{#1}{\thefield{protocollessurl}}%
@@ -1502,49 +1770,55 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{collaboration}
-% Override the author information with collaboration information if present.
+% \begin{macro}{\bib@online}
+% Private |\bib@online| macro
% \begin{macrocode}
-\renewbibmacro*{author}{%
- \iffieldundef{collaboration}{%
- \printnames{author}}{\textbf{\printfield{collaboration}}%
- }%
+\newcommand{\bib@online}[2]{%
+ \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\letbibmacro}
-% Provide the |\letbibmacro| macro for old |biblatex| installations.
+% \begin{macro}{pmid}
+% \begin{macro}{pmcid}
+% Present PubMed IDs.
% \begin{macrocode}
-\providecommand{\letbibmacro}[2]{\csletcs{abx@macro@#1}{abx@macro@#2}}
+\DeclareFieldFormat{pmid}{%
+ \mkbibacro{PM}\addcolon\space%
+ \bib@online{https://www.ncbi.nlm.nih.gov/pubmed/#1}{#1}%
+}
+\DeclareFieldFormat{pmc}{%
+ \mkbibacro{PMC}\addcolon\space%
+ \bib@online{https://www.ncbi.nlm.nih.gov/pmc/articles/PMC#1}{#1}%
+}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
+% \begin{macro}{pmcid}
+% \begin{macro}{pmid}
% \begin{macro}{reportnumber}
-% Add the pre-print information if present.
+% Add the pre-print and PubMed information if present.
% \begin{macrocode}
-\letbibmacro{doi+eprint+url-old}{doi+eprint+url}
+\letbibmacro{hep-doi+eprint+url}{doi+eprint+url}
\renewbibmacro*{doi+eprint+url}{%
- \usebibmacro{doi+eprint+url-old}
- \iffieldundef{reportnumber}{}{\textls[0]{%
+ \usebibmacro{hep-doi+eprint+url}
+ \iffieldundef{pmc}{%
+ \iffieldundef{pmid}{}{\printfield{pmid}\newunit}%
+ }{\printfield{pmc}\newunit}
+ \iffieldundef{reportnumber}{}{%
\newunitpunct\textnumero\intitlepunct%
\textsc{\small\printfield{reportnumber}}%
- }}%
+ \newunit%
+ }%
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
% \subsection{Eprints}
%
-% \begin{macro}{\bib@online}
-% Private |\bib@online| macro
-% \begin{macrocode}
-\newcommand{\bib@online}[2]{%
- \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
-}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\new@eprint}
% Private |\new@eprint| macro
% \begin{macrocode}
@@ -1615,26 +1889,22 @@
% \end{macrocode}
% \end{macro}
%
-
+%
% End check for bibliography option.
% \begin{macrocode}
\fi
% \end{macrocode}
-% \section{Hyperlinks and References}
+% \section{Hyperlinks, Footnotes and References} \label{sec:hyperlinks}
%
% Load the |hyperref| package \cite{hyperref} enable Unicode encoding and hide links.
%
% \begin{macrocode}
\RequirePackage{hyperref}
\hypersetup{
- pdfencoding=auto,
- psdextra,
- hidelinks,
- linktoc=all,
- breaklinks=true,
- pdfcreator={},
- pdfproducer={}
+ pdfencoding=auto, psdextra,
+ hidelinks, linktoc=all, breaklinks=true,
+ pdfcreator={}, pdfproducer={}
}
% \end{macrocode}
% Set the \PDF meta data according to the paper information and ensure that unnecessary information is suppressed.
@@ -1652,15 +1922,42 @@
\ifhep@revtex
\AtBeginShipout{\hypersetup{pdftitle={\@title}}}
\else
- \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+ \ifhep@beamer\else
+ \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+ \fi
\fi
\ifhep@title
\AtBeginDocument{\hypersetup{pdfauthor=\AB@authlist}}
\else
- \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
+ \ifhep@beamer\else
+ \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
+ \fi
\fi
% \end{macrocode}
+% \subsection{Footnotes}
+%
+% Place a hyperlink from the footnote back to its referencing label using the |footnotebackref| package \cite{footnotebackref}.
+% \begin{macrocode}
+\def\BackrefFootnoteTag{}
+\RequirePackage{footnotebackref}
+% \end{macrocode}
+%
+% \begin{macro}{\footnote}
+% Ensure that no spaces appear before the footmark or at the beginning of the footnote.
+% \begin{macrocode}
+\let\@foot@note\footnote
+\renewcommand{\footnote}[1]{\unskip\@foot@note{\ignorespaces#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \subsection{References}
+%
+% Begin of |references| conditional
+% \begin{macrocode}
+\ifhep@references
+% \end{macrocode}
+%
% \begin{macro}{\cref}
% Improve reference using the |cleveref| package \cite{cleveref}.
%
@@ -1668,13 +1965,12 @@
\RequirePackage[noabbrev, nameinlink]{cleveref}
\newcommand{\creflastconjunction}{, and\nobreakspace}
\crefname{enumi}{point}{points}
-\Crefname{enumi}{Point}{Points}
+\crefname{inlinelisti}{point}{points}
% \end{macrocode}
% \end{macro}
-
+%
%\begin{macro}{\no@break@before}
% Define a macro able to prevent line breaks.
-% \DoNotIndex{\no@break@before,\ifvmode,\ifhmode,\ifdim,\lastskip,\unskip,\nobreakspace}
% \begin{macrocode}
\newcommand\no@break@before{%
\relax\ifvmode\else%
@@ -1687,11 +1983,11 @@
}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\ref}
% Adjust |\ref|\marg{key} in order to prevent preceding line breaks and to enable the possibility to reference multiple references at once.
% \begin{macrocode}
-\let\old@ref\ref
+\let\hep@ref\ref
\AtBeginDocument{\renewcommand\ref{\no@break@before\labelcref}}
% \end{macrocode}
% \end{macro}
@@ -1707,11 +2003,11 @@
% \begin{macro}{\subref}
% Adjust |\subref|\marg{key} in order to prevent preceding line breaks.
% \begin{macrocode}
-\let\old@subref\subref
-\renewcommand\subref{\no@break@before\old@subref}
+\let\hep@subref\subref
+\renewcommand\subref{\no@break@before\hep@subref}
\renewcommand*\subcaption@ref[2]{\begingroup%
\caption@setoptions{sub}%
- \subcaption@reffmt\p@subref{\old@ref#1{sub@#2}}%
+ \subcaption@reffmt\p@subref{\hep@ref#1{sub@#2}}%
\endgroup}
% \end{macrocode}
% \end{macro}
@@ -1741,14 +2037,19 @@
}
% \end{macrocode}
% \end{macro}
+%
+% End of |references| conditional
+% \begin{macrocode}
+\fi
+% \end{macrocode}
% \subsection{Citations}
%
% \begin{macro}{\cite}
% Adjust |\cite|\marg{key} in order to prevent preceding line breaks.
% \begin{macrocode}
-\let\old@cite\cite
-\renewcommand\cite{\no@break@before\old@cite}
+\let\hep@cite\cite
+\renewcommand\cite{\no@break@before\hep@cite}
% \end{macrocode}
% \end{macro}
@@ -1793,7 +2094,7 @@
% \section{Acronyms}
%
-% Acronyms are implemented with the |glossaries-extra| package \cite{glossaries-extra} which is an extension of the |glossaries| package \cite{glossaries}.
+% Acronyms are implemented with the |glossaries-extra| package \cite{glossaries-extra} which is an extension of the |glossaries| package \cite{glossaries} and must be loaded after the |hyperref| pacakge in \cref{sec:hyperlinks}.
% \begin{macrocode}
\ifhep@glossaries
\RequirePackage[nostyles]{glossaries-extra}
@@ -1872,15 +2173,21 @@
% \begin{macrocode}
\NewDocumentCommand{\acronym}{somsmo}{
\newabbreviation[
- longplural=\IfNoValueTF{#6}{#5s}{#6},
- \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
+ type=\acronymtype,
+ sort=#3,
+ \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}},
+ longplural=\IfNoValueTF{#6}{#5s}{#6}
]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#5}
% \end{macrocode}
% Provide the singular acronym macro.
% \begin{macrocode}
\expandafter\newcommand\csname#3\endcsname{%
- \if@begin@of@sentence{\cGls{#3}}{\cgls{#3}}%
- \IfBooleanTF{#4}{}{\@\xspace}%
+ \if@begin@of@sentence{%
+ \ifglsused{#3}{\cgls{#3}}{\cGls{#3}}%
+ }{\cgls{#3}}%
+ \ifnum\glsentrycurrcount{#3}>1\relax
+ \IfBooleanTF{#4}{}{\@\xspace}%
+ \else\@\xspace\fi
}
% \end{macrocode}
% Expand the singular acronym macro in \PDF labels.
@@ -2028,19 +2335,46 @@
% \begin{macro}{abstract}
% Adjust the |abstract| environment to reset all acronym counters.
% \begin{macrocode}
-\@ifundefined{abstract}{}{%
- \let\end@old@abstract\endabstract%
- \renewcommand\endabstract{\glsresetall\end@old@abstract}%
+\@ifundefined{endabstract}{}{%
+ \let\end@hep@abstract\endabstract%
+ \renewcommand\endabstract{\glsresetall\end@hep@abstract}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tableofcontents}
+% \begin{macro}{\listoffigures}
+% \begin{macro}{\listoftables}
% Adjust the |\tableofcontents| macro to never show the long form of acronyms.
% \begin{macrocode}
-\let\old@table@of@contents\tableofcontents
+\let\hep@table@of@contents\tableofcontents
\renewcommand\tableofcontents{%
- \glsunsetall\old@table@of@contents\glsresetall%
+ \glsunsetall\hep@table@of@contents\glsresetall%
+}
+\let\hep@list@of@figures\listoffigures
+\renewcommand\listoffigures{%
+ \glsunsetall\hep@list@of@figures\glsresetall%
+}
+\let\hep@list@of@tables\listoftables
+\renewcommand\listoftables{%
+ \glsunsetall\hep@list@of@tables\glsresetall%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\acronyms}
+% Add a possibility to have different groups of acronyms.
+% \begin{macrocode}
+\NewDocumentCommand{\acronyms}{om}{%
+ \IfNoValueTF{#1}{
+ \newglossary{#2}{#2.in}{#2.out}{#2}%
+ \renewcommand{\acronymtype}{#2}%
+ }{
+ \newglossary{#1}{#1.in}{#1.out}{#2}%
+ \renewcommand{\acronymtype}{#1}%
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2050,67 +2384,90 @@
\fi
% \end{macrocode}
%
+% \ifshort
%</package>
+%<*datamodel>
+% \fi
%
% \section{Biblatex datamodel file} \label{sec:data model}
%
-%<*datamodel>
-
-% \begin{macro}{reportnumber}
% \begin{macro}{collaboration}
+% \begin{macro}{reportnumber}
+% \begin{macro}{pmid}
+% \begin{macro}{pmcid}
+% \begin{macro}{pmc}
% \begin{macro}{protocollessurl}
% Define the |dbx| file containing the |hep-paper| datamodel.
% \begin{macrocode}
\DeclareDatamodelFields[type=field, datatype=literal]{
- reportnumber,
- collaboration,
+ collaboration, reportnumber, pmid, pmcid, pmc,
}
\DeclareDatamodelFields[type=field, datatype=uri]{protocollessurl}
\DeclareDatamodelEntryfields{
- reportnumber,
- collaboration,
- protocollessurl,
+ collaboration, reportnumber, pmid, pmcid, pmc, protocollessurl,
}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
+% \ifshort
%</datamodel>
+% \fi
%
% \Finale
\endinput
% \PrintIndex
-% makeindex -s gglo.ist -o hep-paper.gls hep-paper.glo
-% makeindex -s gglo.ist -o hep-paper.ind hep-paper.idx
+% makeindex -s gglo.ist -o hep-paper-implementation.gls hep-paper-implementation.glo
+% makeindex -s gglo.ist -o hep-paper-implementation.ind hep-paper-implementation.idx
% \begin{macro}{\refstepcounter@...}
% Adjust the |cleveref| |\refstepcounter@noarg| and |\refstepcounter@optarg| to use the |\@currentlabel| in order to fix problems with |\subref|.
% \begin{macrocode}
-\def\refstepcounter@noarg#1{%
- \cref@old@refstepcounter{#1}%
- \cref@constructprefix{#1}{\cref@result}%
- \@ifundefined{cref@#1@alias}%
- {\def\@tempa{#1}}%
- {\def\@tempa{\csname cref@#1@alias\endcsname}}%
- \protected@edef\cref@currentlabel{%
- [\@tempa][\arabic{#1}][\cref@result]%
- \noexpand\@currentlabel%
- }% changed
-}
+% \def\refstepcounter@noarg#1{%
+% \cref@old@refstepcounter{#1}%
+% \cref@constructprefix{#1}{\cref@result}%
+% \@ifundefined{cref@#1@alias}%
+% {\def\@tempa{#1}}%
+% {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+% \protected@edef\cref@currentlabel{%
+% [\@tempa][\arabic{#1}][\cref@result]%
+% \noexpand\@currentlabel%
+% }% changed
+% }
+%
+% \def\refstepcounter@optarg[#1]#2{%
+% \cref@old@refstepcounter{#2}%
+% \cref@constructprefix{#2}{\cref@result}%
+% \@ifundefined{cref@#1@alias}%
+% {\def\@tempa{#1}}%
+% {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+% \protected@edef\cref@currentlabel{%
+% [\@tempa][\arabic{#2}][\cref@result]%
+% \noexpand\@currentlabel% changed
+% }%
+% }
+% % \end{macrocode}
+% % \end{macro}
+%
+%
+% \usepackage{contour}
+% \renewcommand{\ULdepth}{1.8pt}
+% \contourlength{0.8pt}
+% \newcommand{\myuline}[1]{%
+% \uline{\phantom{#1}}\llap{\contour{white}{#1}}%
+% }
-\def\refstepcounter@optarg[#1]#2{%
- \cref@old@refstepcounter{#2}%
- \cref@constructprefix{#2}{\cref@result}%
- \@ifundefined{cref@#1@alias}%
- {\def\@tempa{#1}}%
- {\def\@tempa{\csname cref@#1@alias\endcsname}}%
- \protected@edef\cref@currentlabel{%
- [\@tempa][\arabic{#2}][\cref@result]%
- \noexpand\@currentlabel% changed
- }%
-}
+% \begin{macro}{\mathpzc}
+% Define the |\mathpzc| math script font based on the Zapf Chancery PostScript font.
+% \begin{macrocode}
+% \DeclareFontFamily{OT1}{pzc}{}
+% \DeclareFontShape{OT1}{pzc}{m}{it}{<-> s * [1.15] pzcmi7t}{}
+% \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins b/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins
index 881f9745b5c..8de85de7c6c 100644
--- a/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins
+++ b/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins
@@ -11,7 +11,6 @@
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
-
\input docstrip.tex
\keepsilent
\usedir{tex/latex/hep-paper}
@@ -29,8 +28,9 @@ LaTeX version 2005/12/01 or later.
\endpreamble
\generate{
- \file{hep-paper.sty}{\from{hep-paper.dtx}{package}}
- \file{hep-paper.dbx}{\from{hep-paper.dtx}{datamodel}}
+ \file{hep-paper.sty}{\from{hep-paper-implementation.dtx}{package}}
+ \file{hep-paper.dbx}{\from{hep-paper-implementation.dtx}{datamodel}}
+ \file{hep-paper-documentation.tex}{\from{hep-paper-implementation.dtx}{documentation}}
}
\Msg{*********************************************************}
diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx
index aa450a9d6ca..d19b0be720e 100644
--- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx
+++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% hep-paper.dtx (with options: `datamodel')
+%% hep-paper-implementation.dtx (with options: `datamodel')
%% This is a generated file.
%% Copyright (C) 2019-2020 by Jan Hajer
%% This file may be distributed and/or modified under the
@@ -14,17 +14,14 @@
%% 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.dbx}[2020/05/01 v1.3 HEP-Paper biblatex data model]
+\ProvidesFile{hep-paper.dbx}[2020/08/01 v1.4 HEP-Paper biblatex data model]
\DeclareDatamodelFields[type=field, datatype=literal]{
- reportnumber,
- collaboration,
+ collaboration, reportnumber, pmid, pmcid, pmc,
}
\DeclareDatamodelFields[type=field, datatype=uri]{protocollessurl}
\DeclareDatamodelEntryfields{
- reportnumber,
- collaboration,
- protocollessurl,
+ collaboration, reportnumber, pmid, pmcid, pmc, protocollessurl,
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty
index de375a04761..3885186def3 100644
--- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty
+++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% hep-paper.dtx (with options: `package')
+%% hep-paper-implementation.dtx (with options: `package')
%% This is a generated file.
%% Copyright (C) 2019-2020 by Jan Hajer
%% This file may be distributed and/or modified under the
@@ -15,7 +15,7 @@
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{hep-paper}[2020/05/01 v1.3 Publications in High Energy Physics]
+\ProvidesPackage{hep-paper}[2020/08/01 v1.4 Publications in High Energy Physics]
\RequirePackage{pdftexcmds}
\RequirePackage{kvoptions}
@@ -25,28 +25,41 @@
}
\DeclareStringOption[a4]{paper}
\DeclareStringOption[11pt]{font}
-\DeclareBoolOption[false]{defaults}
\DeclareStringOption[british]{lang}
-\DeclareBoolOption[true]{parindent}
-\DeclareComplementaryOption{parskip}{parindent}
\DeclareBoolOption[true]{serif}
\DeclareComplementaryOption{sansserif}{serif}
-\DeclareBoolOption[false]{eqnarray}
+\DeclareBoolOption[true]{parindent}
+\DeclareComplementaryOption{parskip}{parindent}
+\DeclareBoolOption[false]{defaults}
+\DeclareBoolOption[true]{title}
\DeclareStringOption[numeric-comp]{bibliography}
\DeclareBoolOption[true]{glossaries}
-\DeclareBoolOption[false]{manualplacement}
-\DeclareBoolOption[true]{title}
+\DeclareBoolOption[true]{references}
+\DeclareBoolOption[false]{beamer}
\DeclareBoolOption[false]{revtex}
\DeclareBoolOption[false]{jhep}
\DeclareBoolOption[false]{jcap}
\DeclareBoolOption[false]{pos}
+\DeclareBoolOption[false]{eqnarray}
+\DeclareBoolOption[false]{manualplacement}
\ProcessKeyvalOptions*
+\@ifclassloaded{PoS}{\setkeys{hep}{pos}}{}
\ifhep@pos
- \setkeys{hep}{title=false, defaults}
+ \setkeys{hep}{defaults, title=false}
+ \DeclareRobustCommand\boldmath{\@nomath\boldmath\mathversion{bold}}
+\fi
+\@ifclassloaded{beamer}{\setkeys{hep}{beamer}}{}
+\ifhep@beamer
+ \setkeys{hep}{defaults, title=false, references=false, sansserif}
\fi
+\@ifclassloaded{revtex4}{\setkeys{hep}{revtex}}{}
+\@ifclassloaded{revtex4-1}{\setkeys{hep}{revtex}}{}
+\@ifclassloaded{revtex4-2}{\setkeys{hep}{revtex}}{}
\ifhep@revtex
- \setkeys{hep}{defaults, title=false, lang=american, bibliography=false}
+ \setkeys{hep}{defaults, title=false, bibliography=false, lang=american}
\fi
+\@ifpackageloaded{jheppub}{\setkeys{hep}{jhep}}{}
+\@ifpackageloaded{jcappub}{\setkeys{hep}{jcap}}{}
\newif\ifhep@sissa
\ifhep@jhep\hep@sissatrue
\else
@@ -61,10 +74,18 @@
urlcolor=blue, anchorcolor=blue, citecolor=blue, filecolor=blue,
linkcolor=blue, menucolor=blue, pagecolor=blue
}{hyperref}
- \hoffset 0pt
- \voffset 0pt
+ \PassOptionsToPackage{reset}{geometry}
+\fi
+\ifhep@jhep
+ \voffset 0in
+ \hoffset 0in
\fi
+\RequirePackage{alphabeta}
+\ifhep@serif\else
+ \RequirePackage{sansmathfonts}
+ \renewcommand\familydefault{\sfdefault}
+\fi
\RequirePackage{ifluatex}
\RequirePackage{ifxetex}
\newif\ifxetexorluatex
@@ -74,30 +95,38 @@
\else\xetexorluatexfalse
\fi
\fi
-
-\RequirePackage{alphabeta}
-\ifhep@serif\else
- \RequirePackage{sansmathfonts}
- \renewcommand\familydefault{\sfdefault}
-\fi
\ifxetexorluatex
- \def\@encoding{TU}
+ \def\hep@encoding{TU}
\else
- \def\@encoding{T1}
+ \def\hep@encoding{T1}
\fi
-\RequirePackage[\@encoding]{fontenc}
+\RequirePackage[\hep@encoding]{fontenc}
+\RequirePackage{fix-cm}
\RequirePackage{lmodern}
\RequirePackage{textcomp}
\RequirePackage{microtype}
\ifxetexorluatex
- \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
- \DeclareFontShape{\@encoding}{lmss}{m}{sc}{%
+ \RequirePackage{fontspec}
+ \setmainfont{Latin Modern Roman}[
+ UprightFeatures={SmallCapsFont={[lmromancaps10-regular.otf]}},
+ BoldFeatures={
+ SmallCapsFeatures={Letters=SmallCaps},
+ SmallCapsFont={[cmunbx.otf]}
+ }
+ ]
+ \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->cmssbxcsc10}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{%
<-9>cmsscsc8<9-10>cmsscsc9<10->cmsscsc10%
}{}
\else
+ \rmfamily
+ \DeclareFontShape{\hep@encoding}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{}
\sffamily
- \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->ssub*xcmss/bx/sc}{}
- \DeclareFontShape{\@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->ssub*xcmss/bx/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->ssub*xcmss/bx/sc}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{}
\fi
\ifxetexorluatex\else
@@ -105,11 +134,11 @@
\fi
\RequirePackage[\hep@lang]{babel}
\RequirePackage{csquotes}
-\RequirePackage{soul}
-\let\underline\ul
+\RequirePackage[normalem]{ulem}
+\let\underline\uline
\ifhep@defaults\else
- \def\remove@pt#1pt{#1}
- \edef\@ptsize{\expandafter\remove@pt\hep@font}
+ \def\hep@remove@pt#1pt{#1}
+ \edef\hep@pt@size{\expandafter\hep@remove@pt\hep@font}
\let\small\relax
\let\footnotesize\relax
\let\scriptsize\relax
@@ -119,7 +148,7 @@
\let\LARGE\relax
\let\huge\relax
\let\Huge\relax
- \input{size\@ptsize.clo}
+ \input{size\hep@pt@size.clo}
\fi
\ifnum\pdf@strcmp{\hep@lang}{american}=0
@@ -151,19 +180,22 @@
\setlist[enum@descript]{label=\arabic*.}
\newenvironment{enumdescript}[1][]{
\begin{enum@descript}[#1]
- \let\old@item\item
+ \let\hep@item\item
\renewcommand{\item}[2][]{
- \ifx&##1&\old@item\else\old@item[##1]\fi
+ \ifx&##1&\hep@item\else\hep@item[##1]\fi
\textbf{##2}\ifx##2\empty\else~\fi\@ifnextchar\par\@gobble\relax
}
}{\end{enum@descript}}
-\let\@foot@note\footnote
-\renewcommand{\footnote}[1]{\unskip\@foot@note{\ignorespaces#1}}
-
\ifhep@defaults\else
- \RequirePackage[\hep@paper paper]{geometry}
- \geometry{hscale=.75, vscale=.8, vmarginratio=3:4, includeheadfoot}
+ \RequirePackage{geometry}
+ \geometry{%
+ \hep@paper paper,
+ hscale=.75,
+ vscale=.8,
+ vmarginratio=3:4,
+ includeheadfoot
+ }
\fi
\ifhep@parindent\else
@@ -186,6 +218,7 @@
\allowdisplaybreaks[1]
\DeclareMathOperator{\diag}{diag}
+\DeclareMathOperator{\sgn}{sgn}
\RequirePackage{xparse}
\DeclareDocumentCommand{\mathdef}{mO{0}m}{%
@@ -203,38 +236,42 @@
\AtBeginDocument{\mathdef{\i}{\operatorname{i}}}
-\def\overline#1{{\setul{-2ex}{}\ul{#1}}}
+\def\overline#1{{\renewcommand{\ULdepth}{-1.9ex}{}\uline{#1}}}
\DeclareRobustCommand{\over@line}[1]{\@@overline{#1}}
\mathdef{\overline}{\over@line}
+\RequirePackage{mleftright}
+\mleftright
+
\ifhep@eqnarray\else
\let\eqnarray\@undefined
\let\endeqnarray\@undefined
\fi
-\newcommand{\bmmax}{2}
+\ifhep@serif\providecommand{\bmmax}{2}\else\providecommand{\bmmax}{1}\fi
\RequirePackage{bm}
\let\mathbf\bm
\g@addto@macro\bfseries{\boldmath}
\ifhep@serif
\RequirePackage{fixmath}
- \DeclareMathAlphabet{\mathsf}{OML}{cmbr}{m}{it}
- \SetMathAlphabet{\mathsf}{bold}{OML}{cmbr}{bx}{it}
+ \newcommand\hep@sf@font{cmbr}
\else
\RequirePackage[slantedGreek]{sfmath}
\RequirePackage{sansmathfonts}
- \DeclareMathAlphabet{\mathsf}{OML}{cmm}{m}{it}
- \SetMathAlphabet{\mathsf}{bold}{OML}{cmm}{bx}{it}
+ \newcommand\hep@sf@font{cmm}
\fi
-\RequirePackage{mathrsfs}
-\RequirePackage{bbm}
+\SetMathAlphabet{\mathsf}{normal}{OML}{\hep@sf@font}{m}{it}
+\SetMathAlphabet{\mathsf}{bold}{OML}{\hep@sf@font}{bx}{it}
+\DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n}
\ifhep@serif
- \let\mathbb\mathbbm
+ \newcommand\hep@bb@font{dsrom}
\else
- \let\mathbb\mathbbmss
+ \newcommand\hep@bb@font{dsss}
\fi
+\SetMathAlphabet{\mathbb}{normal}{U}{\hep@bb@font}{m}{n}
\RequirePackage{physics}
+\RequirePackage{cancel}
\RequirePackage{slashed}
\RequirePackage{units}
@@ -249,11 +286,13 @@
}
\newcommand{\overleftright}[1]{\oset{\leftrightarrow}{#1}}
-\renewcommand{\textfraction}{0.01}
-\setcounter{topnumber}{1}
-\renewcommand{\topfraction}{.9}
-\setcounter{bottomnumber}{0}
-\renewcommand{\floatpagefraction}{.8}
+\setcounter{bottomnumber}{0} % 1
+\setcounter{topnumber}{1} % 2
+\setcounter{dbltopnumber}{1} % 2
+\renewcommand{\topfraction}{.9} % .7
+\renewcommand{\dbltopfraction}{.9} % .7
+\renewcommand{\textfraction}{.1} % .2
+\renewcommand{\floatpagefraction}{.8} % .5
\let\@figure@\figure%
\let\@end@figure@\endfigure%
@@ -275,7 +314,17 @@
}{\@end@table@}
\fi%
-\ifhep@revtex
+\newif\ifhep@journal
+\ifhep@sissa\hep@journaltrue
+\else
+ \ifhep@revtex\hep@journaltrue
+ \else
+ \ifhep@pos\hep@journaltrue
+ \else\hep@journalfalse
+ \fi
+ \fi
+\fi
+\ifhep@journal
\setlength\abovecaptionskip{\f@size\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
@@ -335,13 +384,15 @@
\ifhep@title
\date{}
-
\author{}
-\AtEndOfClass{\newcommand{\email}[1]{%
- \unskip\thanks{\online{mailto:#1}{#1}}
-}}
\RequirePackage{authblk}
\renewcommand\Affilfont{\footnotesize}
+\newcommand{\email}[1]{\online{mailto:#1}{#1}}
+\let\hep@author\author
+\def\author{%
+ \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}%
+ \hep@author
+}
\newcommand\active@comma{,\penalty-5\relax}
\newcommand\cat@comma@active{\catcode`\,\active}
{\cat@comma@active\gdef,{\active@comma}}
@@ -365,9 +416,9 @@
\RequirePackage{atbegshi}
\RequirePackage{picture}
-\let\old@maketitle\maketitle
+\let\hep@maketitle\maketitle
\renewcommand{\maketitle}{%
- \old@maketitle%
+ \hep@maketitle%
\AtBeginShipoutFirst{%
\put(
\textwidth+\oddsidemargin-\widthof{\@preprint@box},
@@ -377,8 +428,8 @@
}
\@ifundefined{abstract}{}{%
- \let\old@abstract\abstract%
- \renewcommand\abstract{\old@abstract\noindent\ignorespaces}%
+ \let\hep@abstract\abstract%
+ \renewcommand\abstract{\hep@abstract\noindent\ignorespaces}%
}
\fi
@@ -387,42 +438,27 @@
\providecommand{\DeclareSortingTemplate}{\DeclareSortingScheme}
\DeclareSortingTemplate{hep-paper}{
\sort{\citeorder}
- \sort[final]{
- \field{sortkey}
- }
- \sort{
- \field{sortyear}
- \field{year}
- \literal{9999}
- }
- \sort{
- \field{month}
- }
- \sort{
- \field{eprint}
- \field{doi}
- }
- \sort{
- \field{sorttitle}
- \field{title}
- }
- \sort{
- \field{subtitle}
- \field{volume}
- }
+ \sort[final]{\field{sortkey}}
+ \sort{\field{sortyear} \field{year} \literal{9999}}
+ \sort{\field{month}}
+ \sort{\field{eprint} \field{doi}}
+ \sort{\field{sorttitle} \field{title}}
+ \sort{\field{subtitle} \field{volume}}
}
\ExecuteBibliographyOptions{
sorting=hep-paper,
giveninits=true
}
-\NewBibliographyString{erratum}
-\DefineBibliographyStrings{english}{erratum={Erratum}}
-\let\old@printbibliography\printbibliography
-\renewcommand{\printbibliography}{\sloppy\old@printbibliography}
+\NewBibliographyString{erratum,erratums}
+\DefineBibliographyStrings{english}{erratum={Erratum},erratums={Errata}}
+\providecommand{\relateddelimerratum}{\addsemicolon\space}
+\let\hep@printbibliography\printbibliography
+\renewcommand{\printbibliography}{\sloppy\hep@printbibliography}
\newcommand{\reg@exp@one}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}}
\newcommand{\reg@exp@two}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}}
\newcommand{\reg@exp@url}{\regexp{\A(ht|f)tp(s)?:\/\/}}
+\newcommand{\reg@exp@pmc}{\regexp{\A(PMC)?}}
\DeclareSourcemap{%
\maps[datatype=bibtex, overwrite=true]{%
\map{%
@@ -444,6 +480,28 @@
\step[fieldset=protocollessurl, origfieldval, final=true]
\step[fieldsource=protocollessurl, match=\reg@exp@url, replace={}]
}
+ \map{
+ \step[fieldsource=pmcid, final=true]
+ \step[fieldset=pmc, origfieldval, final=true]
+ \step[fieldsource=pmc, match=\reg@exp@pmc, replace={}]
+ }
+ }%
+}
+\providecommand{\letbibmacro}[2]{\csletcs{abx@macro@#1}{abx@macro@#2}}
+\renewbibmacro*{author/translator+others}{%
+ \ifboolexpr{
+ test \ifuseauthor and (
+ not test {\ifnameundef{author}} or
+ not test {\iffieldundef{collaboration}}
+ )
+ }
+ {\usebibmacro{author}}
+ {\usebibmacro{translator+others}}
+}
+\letbibmacro{hep@bib@author}{author}
+\renewbibmacro*{author}{%
+ \iffieldundef{collaboration}{%
+ \usebibmacro{hep@bib@author}}{\textit{\printfield{collaboration}}%
}%
}
\renewbibmacro*{in:}{%
@@ -452,24 +510,30 @@
\DeclareFieldFormat{url}{%
\mkbibacro{URL}\addcolon\space\online{#1}{\thefield{protocollessurl}}%
}
-\renewbibmacro*{author}{%
- \iffieldundef{collaboration}{%
- \printnames{author}}{\textbf{\printfield{collaboration}}%
- }%
+\newcommand{\bib@online}[2]{%
+ \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
}
-\providecommand{\letbibmacro}[2]{\csletcs{abx@macro@#1}{abx@macro@#2}}
-\letbibmacro{doi+eprint+url-old}{doi+eprint+url}
+\DeclareFieldFormat{pmid}{%
+ \mkbibacro{PM}\addcolon\space%
+ \bib@online{https://www.ncbi.nlm.nih.gov/pubmed/#1}{#1}%
+}
+\DeclareFieldFormat{pmc}{%
+ \mkbibacro{PMC}\addcolon\space%
+ \bib@online{https://www.ncbi.nlm.nih.gov/pmc/articles/PMC#1}{#1}%
+}
+\letbibmacro{hep-doi+eprint+url}{doi+eprint+url}
\renewbibmacro*{doi+eprint+url}{%
- \usebibmacro{doi+eprint+url-old}
- \iffieldundef{reportnumber}{}{\textls[0]{%
+ \usebibmacro{hep-doi+eprint+url}
+ \iffieldundef{pmc}{%
+ \iffieldundef{pmid}{}{\printfield{pmid}\newunit}%
+ }{\printfield{pmc}\newunit}
+ \iffieldundef{reportnumber}{}{%
\newunitpunct\textnumero\intitlepunct%
\textsc{\small\printfield{reportnumber}}%
- }}%
+ \newunit%
+ }%
}
-\newcommand{\bib@online}[2]{%
- \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
-}
\NewDocumentCommand{\new@eprint}{smm}{
\DeclareFieldFormat{eprint:#2}{%
\newcommand{\@path}{\IfBooleanT{#1}{\thefield{eprintclass}/}##1}%
@@ -492,18 +556,13 @@
HEPForge\addcolon\space\bib@online{https://#1/hepforge.org}{#1}%
}
\DeclareFieldAlias{eprint:HEPForge}{eprint:hepforge}
-
\fi
\RequirePackage{hyperref}
\hypersetup{
- pdfencoding=auto,
- psdextra,
- hidelinks,
- linktoc=all,
- breaklinks=true,
- pdfcreator={},
- pdfproducer={}
+ pdfencoding=auto, psdextra,
+ hidelinks, linktoc=all, breaklinks=true,
+ pdfcreator={}, pdfproducer={}
}
\pdfstringdefDisableCommands{\def\varepsilon{\textepsilon}}
\AtBeginDocument{
@@ -517,19 +576,28 @@
\ifhep@revtex
\AtBeginShipout{\hypersetup{pdftitle={\@title}}}
\else
- \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+ \ifhep@beamer\else
+ \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+ \fi
\fi
\ifhep@title
\AtBeginDocument{\hypersetup{pdfauthor=\AB@authlist}}
\else
- \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
+ \ifhep@beamer\else
+ \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
+ \fi
\fi
+\def\BackrefFootnoteTag{}
+\RequirePackage{footnotebackref}
+\let\@foot@note\footnote
+\renewcommand{\footnote}[1]{\unskip\@foot@note{\ignorespaces#1}}
+
+\ifhep@references
\RequirePackage[noabbrev, nameinlink]{cleveref}
\newcommand{\creflastconjunction}{, and\nobreakspace}
\crefname{enumi}{point}{points}
-\Crefname{enumi}{Point}{Points}
-
+\crefname{inlinelisti}{point}{points}
\newcommand\no@break@before{%
\relax\ifvmode\else%
\ifhmode%
@@ -539,17 +607,16 @@
\fi%
\fi%
}
-
-\let\old@ref\ref
+\let\hep@ref\ref
\AtBeginDocument{\renewcommand\ref{\no@break@before\labelcref}}
\renewcommand\eqref{\no@break@before\labelcref}
-\let\old@subref\subref
-\renewcommand\subref{\no@break@before\old@subref}
+\let\hep@subref\subref
+\renewcommand\subref{\no@break@before\hep@subref}
\renewcommand*\subcaption@ref[2]{\begingroup%
\caption@setoptions{sub}%
- \subcaption@reffmt\p@subref{\old@ref#1{sub@#2}}%
+ \subcaption@reffmt\p@subref{\hep@ref#1{sub@#2}}%
\endgroup}
\newcommand{\subcref}[1]{\cref{sub@#1}}
@@ -562,9 +629,10 @@
\DeclareRobustCommand{\labelcrefrange}[2]{%
\@crefrangenostar{labelcref}{#1}{#2}%
}
+\fi
-\let\old@cite\cite
-\renewcommand\cite{\no@break@before\old@cite}
+\let\hep@cite\cite
+\renewcommand\cite{\no@break@before\hep@cite}
\ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else
\NewBibliographyString{refname}
@@ -630,12 +698,18 @@
\NewDocumentCommand{\acronym}{somsmo}{
\newabbreviation[
- longplural=\IfNoValueTF{#6}{#5s}{#6},
- \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
+ type=\acronymtype,
+ sort=#3,
+ \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}},
+ longplural=\IfNoValueTF{#6}{#5s}{#6}
]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#5}
\expandafter\newcommand\csname#3\endcsname{%
- \if@begin@of@sentence{\cGls{#3}}{\cgls{#3}}%
- \IfBooleanTF{#4}{}{\@\xspace}%
+ \if@begin@of@sentence{%
+ \ifglsused{#3}{\cgls{#3}}{\cGls{#3}}%
+ }{\cgls{#3}}%
+ \ifnum\glsentrycurrcount{#3}>1\relax
+ \IfBooleanTF{#4}{}{\@\xspace}%
+ \else\@\xspace\fi
}
\pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{%
\IfNoValueTF{#2}{#3}{#2} }%
@@ -710,13 +784,30 @@
}
\newcommand{\resetacronym}[1]{\protect\glsreset{#1}}
\newcommand{\dummyacronym}[1]{\protect\glsunset{#1}}
-\@ifundefined{abstract}{}{%
- \let\end@old@abstract\endabstract%
- \renewcommand\endabstract{\glsresetall\end@old@abstract}%
+\@ifundefined{endabstract}{}{%
+ \let\end@hep@abstract\endabstract%
+ \renewcommand\endabstract{\glsresetall\end@hep@abstract}%
}
-\let\old@table@of@contents\tableofcontents
+\let\hep@table@of@contents\tableofcontents
\renewcommand\tableofcontents{%
- \glsunsetall\old@table@of@contents\glsresetall%
+ \glsunsetall\hep@table@of@contents\glsresetall%
+}
+\let\hep@list@of@figures\listoffigures
+\renewcommand\listoffigures{%
+ \glsunsetall\hep@list@of@figures\glsresetall%
+}
+\let\hep@list@of@tables\listoftables
+\renewcommand\listoftables{%
+ \glsunsetall\hep@list@of@tables\glsresetall%
+}
+\NewDocumentCommand{\acronyms}{om}{%
+ \IfNoValueTF{#1}{
+ \newglossary{#2}{#2.in}{#2.out}{#2}%
+ \renewcommand{\acronymtype}{#2}%
+ }{
+ \newglossary{#1}{#1.in}{#1.out}{#2}%
+ \renewcommand{\acronymtype}{#1}%
+ }
}
\fi