diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-paper/bibliography.bib | 58 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdf | bin | 454890 -> 455632 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex | 313 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdf | bin | 535891 -> 551058 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx | 851 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hep-paper/hep-paper.ins | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty | 218 |
8 files changed, 915 insertions, 531 deletions
diff --git a/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib b/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib index 63e5ad9916e..2ff83993b12 100644 --- a/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib +++ b/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib @@ -697,7 +697,7 @@ eprinttype = "ctan", eprint = "bbm", } -@online{arxiv, +@article{arxiv, title = "arXiv", subtitle = "free distribution service and an open archive for scholarly articles", url = "https://arxiv.org", @@ -705,7 +705,6 @@ author = "Paul Ginsparg", collaboration = "arXiv Team", year = "1991", organization = "Cornell University", -ReportNumber = "test", } @article{dsfont, @@ -768,3 +767,58 @@ eprinttype = "github", eprintclass = "josephwright", eprint = "beamer", } + +@article{exscale, +title = "The |exscale| package", +subtitle = "Implements scaling of the \enquote{cmex} fonts", +author = "Frank Mittelbach and Rainer Schöpf", +date = "1993", +eprinttype = "ctan", +eprint = "exscale", +} + +@article{mathrsfs, +title = "The |mathrsfs| package", +subtitle = "Support for using RSFS fonts in maths", +author = "Jörg Knappen", +date = "1995", +eprinttype = "ctan", +eprint = "mathrsfs", +} + +@article{esint, +title = "The |esint| package", +subtitle = "Extended set of integrals for Computer Modern", +author = "Eddie Saudrais", +date = "2005", +eprinttype = "ctan", +eprint = "esint", +} + +@article{cmbright, +title = "The |cmbright| package", +subtitle = "Using the CM Bright typeface with \hologo{LaTeX}", +author = "Walter A. Schmidt", +date = "1996", +eprinttype = "ctan", +eprint = "cmbright", +} + +@article{titling, +title = "The |titling| package", +subtitle = "Control over the typesetting of the |\textbackslash maketitle| command", +author = "Peter R. Wilson", +date = "2000", +eprinttype = "ctan", +eprint = "titling", +} + +@article{MnSymbol, +title = "The |MnSymbol| package", +subtitle = "Mathematical symbol font for Adobe MinionPro", +author = "Achim Blumensath", +date = "2005", +eprinttype = "ctan", +eprint = "MnSymbol", +} + 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 Binary files differindex 7e8d9dbdb59..7e6298b2b56 100644 --- a/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdf +++ b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.pdf 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 index 0f5e7957649..5b2f88049c0 100644 --- a/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex +++ b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-documentation.tex @@ -14,12 +14,16 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of %% LaTeX version 2005/12/01 or later. + +\ProvidesFile{hep-paper-documentation.tex}[2020/10/01 v1.5 HEP-Paper documentation] + \RequirePackage[l2tabu, orthodox]{nag} \documentclass{ltxdoc} \EnableCrossrefs \CodelineIndex \RecordChanges +\def\MacroFont{\fontencoding\encodingdefault\fontfamily{lmtt}\fontseries\mddefault\fontshape\shapedefault\small} \MacroIndent=1.5em @@ -29,35 +33,39 @@ \acronym{PDF}{portable document format} \acronym{URL}{uniform resource locator} +\acronym{CM}{computer modern} +\acronym{LM}{latin modern} \usepackage{hologo} \newenvironment{columns}[1][.5]{% + \par\vspace{-\bigskipamount}% \begin{minipage}[t]{\linewidth}% \begin{minipage}[t]{#1\linewidth}% \newcommand{\column}{% \end{minipage}% \begin{minipage}[t]{\linewidth-#1\linewidth}% }% -}{\end{minipage}\end{minipage}} +}{\end{minipage}\end{minipage}\par} \setlength{\fboxsep}{1pt} -\begin{document} - \GetFileInfo{hep-paper.sty} -\title{The |hep-paper| package\thanks{This document corresponds to \protecting{|hep-paper|}~\fileversion.}} +\title{The \software{hep-paper} package\thanks{This document corresponds to \software{hep-paper}~\fileversion.}} +\subtitle{Publications in high energy physics} \author{Jan Hajer \email{jan.hajer@uclouvain.be}} \affiliation{Centre for Cosmology, Particle Physics and Phenomenology, Université catholique de Louvain, Louvain-la-Neuve B-1348, Belgium} \preprint{Preprint-Number} -\date{\normalfont\filedate} +\date{\filedate} + +\begin{document} \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. +The \software{hep-paper} package aims to provide a single style file containing most configurations and macros necessary to write appealing publications in High Energy Physics. +Instead of reinventing the wheel by introducing newly created macros \software{hep-paper} preferably loads third party packages as long as they are lightweight enough. \end{abstract} \tableofcontents\clearpage @@ -66,16 +74,16 @@ Instead of reinventing the wheel by introducing newly created macros |hep-paper| \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. +For usual publications it is enough to load additionally to the |article| class without optional arguments only the \software{hep-paper} package \cite{hep-paper}. +\begin{verbatim} +\documentclass{article} +\usepackage{hep-paper} +\end{verbatim} +The most notable changes after loading the \software{hep-paper} package is the change of some \hologo{LaTeX} defaults. The paper and font sizes are set to A4 and \unit[11]{pt}, respectively. -Additionally, the paper geometry is 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}. +Additionally, the paper geometry is adjusted using the \software{geometry} package \cite{geometry}. +Furthermore, the font is changed to \LM using the \software{lmodern} package \cite{lmodern} with \software{microtype} \cite{microtype} optimizations. +Finally, \PDF hyperlinks are implemented with the \software{hyperref} package \cite{hyperref}. \subsection{Options} @@ -96,18 +104,24 @@ The possible \meta{sizes} are: 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 |lang|=\meta{name} option switches the document language to one of the values values provided by the \software{babel} package \cite{babel}. The default is |british|. \DescribeMacro{sansserif} -The |sansserif| option switches the document including math to the sans serif font shape. +The |sansserif| option switches the document including math to 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 |parskip| option changes how paragraphs are separated from each other using the \software{parskip} package \cite{parskip}. The \hologo{LaTeX} default is separation via indentation the |parskip| option switches to separation via vertical space. \footnote{Although the |parskip| option is used for this document, it is recommended only for very few document types such as technical manuals or answers to referees.} +\DescribeMacro{symbols} +The |symbols|=\meta{family} set the family of the symbol fonts. +|symbols=ams| loads two \hologo{AmS} fonts \cite{amsfonts} and the \software{bm} bold fonts. +The default setting replaces additionally the blackboard font with the \software{dsfont} \cite{dsfont}. +|symbols=minion| switches the symbol fonts to the Adobe MinionPro companion font from the \software{MnSymbol} package \cite{MnSymbol}. +|symbols=false| deactivates additional symbol fonts. + \subsubsection{Deactivation} The \software{hep-paper} package loads few bigger packages which have a large impact on the document. @@ -120,14 +134,14 @@ The |defaults| option prevents the adjustment of the page geometry and the font 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. +The |bibliography|=\meta{key} option prevents the automatic loading of the \software{biblatex} package \cite{biblatex} if \meta{key}=|false|. +Otherwise the \meta{key} is passed as |style| string to the \software{biblatex} package. \DescribeMacro{glossaries} -The |glossaries=false| option deactives acronyms and the use of the |glossaries| package \cite{glossaries}. +The |glossaries=false| option deactives acronyms and the use of the \software{glossaries} package \cite{glossaries}. \DescribeMacro{references} -The |references=false| option prevents the |cleveref| pacakge \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros. +The |references=false| option prevents the \software{cleveref} package \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros. \subsubsection{Compatibility} @@ -164,19 +178,23 @@ The |eqnarray| option reactivates the depreciated |eqnarray| environment. \subsection{Title page} +\DescribeMacro{\title} +The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information. + +\DescribeMacro{\subtitle} +The |\subtitle|\marg{subtitle} macro is defined using the \software{titling} package \cite{titling}. + \DescribeMacro{\author} \DescribeMacro{\affiliation} \DescribeMacro{\email} -In order to facilitate multiple authors with different affiliations the |authblk| package \cite{authblk} is loaded. +In order to facilitate multiple authors with different affiliations the \software{authblk} package \cite{authblk} is loaded. The following lines add \eg two authors with different affiliations - -| \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. +\begin{verbatim} +\author[1]{Author one \email{email one}} +\affiliation[1]{Affiliation one} +\author[2]{Author two \email{email two}} +\affiliation[1,2]{Affiliation two} +\end{verbatim} \DescribeMacro{\preprint} The |\preprint|\marg{numer} macro places a pre-print number in the upper right corner of the title page. @@ -184,16 +202,23 @@ The |\preprint|\marg{numer} macro places a pre-print number in the upper right c \DescribeEnv{abstract} The |abstract| environment is adjusted to not start with an indentation. +\DescribeMacro{\titlefont} +\DescribeMacro{\subtitlefont} +\DescribeMacro{\authorfont} +\DescribeMacro{\affiliationfont} +\DescribeMacro{\preprintfont} +Various title font macros are defined, allowing to change the appearance of the |\maketitle| output. + \subsection{Text} -Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |babel| package. +Hyphenation is provided by the \software{babel} package \cite{babel} and quotation commands are provided by the \software{csquotes} package \cite{csquotes} recommended by the \software{babel} package. \DescribeMacro{\enquote} \DescribeMacro{\MakeOuterQuote} The latter package provides the convenient macros |\enquote|\marg{text} and |\MakeOuterQuote{"}| allowing to leave the choice of quotation marks to \hologo{LaTeX} and use |"| instead of the pair |``| and |''|, respectively. \DescribeMacro{\eg} \DescribeMacro{\vs} -The |foreign| package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs. +The \software{foreign} package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs. \DescribeMacro{\no} The |\no|\marg{number} macro is typeset as \no{123}. @@ -204,20 +229,18 @@ The |\software|\oarg{version}\marg{name} macro is typeset as \software[\filevers \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} +\DescribeMacro{enumdescript} +The |inlinelist| and |enumdescript| environments are defined using the \software{enumitem} package \cite{enumitem}. \begin{columns} -|The three main points are| -|\begin{inlinelist}| - -| \item one| - -| \item two| - -| \item three| - -|\end{inlinelist}| +\begin{verbatim} +The three main points are +\begin{inlinelist} + \item one + \item two + \item three +\end{inlinelist} +\end{verbatim} \column The three main points are \begin{inlinelist} @@ -226,18 +249,15 @@ The three main points are \item three \end{inlinelist} \end{columns} - -\DescribeMacro{enumdescript} +\vspace{4ex} \begin{columns}[.6] -|\begin{enumdescript}[label=\Roman*)]| - -| \item{First} one| - -| \item{Second} two| - -| \item{Third} three| - -|\end{enumdescript}| +\begin{verbatim} +\begin{enumdescript}[label=\Roman*)] + \item{First} one + \item{Second} two + \item{Third} three +\end{enumdescript} +\end{verbatim} \column \begin{enumdescript}[label=\Roman*)] \item{First} one @@ -247,11 +267,11 @@ The three main points are \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}. +A bold versions \textbf{\textsc{Small Caps}} and a sans serif version of \textsf{\textsc{Small Caps}} based on the \CM font is provided, the latter using the \software{sansmathfonts} package \cite{sansmathfonts}. \DescribeMacro{\underline} \DescribeMacro{\overline} -The |\underline| macro is redefined to allow line-breaks using the |ulem| package \cite{ulem}. +The |\underline| macro is redefined to allow line-breaks using the \software{ulem} package \cite{ulem}. The |\overline| macro is extended to also \overline{overline} text outside of math environments. \DescribeMacro{\useparskip} @@ -261,8 +281,8 @@ If the |parskip| option is activated the |\useparindent| macro switches back the \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}. +References are extended with the \software{cleveref} package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{figure 1}. +Furthermore, the \software{cleveref} package allows to reference multiple objects within one |\cref|\marg{key1,key2}. \DescribeMacro{\cite} Citations are adjusted to not start on a new line in order to avoid the repeated use of |~\cite|\marg{key}. @@ -270,7 +290,7 @@ Citations are adjusted to not start on a new line in order to avoid the repeated \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. +References are also adjusted to not start on a new line. \DescribeMacro{\footnote} Footnotes are adjusted to swallow white space before the footnote mark and at the beginning of the footnote text. @@ -294,22 +314,21 @@ Placing a |\dummyacronym|\marg{key} at the end of the document ensures that the \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. +The \software{mathtools} \cite{mathtools} and \software{amssymb} \cite{amsfonts} packages are loaded. +They in turn load the \hologo{AmSLaTeX} \software{amsmath} \cite{amsmath} and \software{amsfonts} \cite{amsfonts} packages. \DescribeMacro{\mathbf} -Bold math, via |\mathbf| is improved by the |bm| package \cite{bm}, \ie ($ A b \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$). +Bold math, via |\mathbf| is improved by the \software{bm} package \cite{bm}, \ie ($ A b \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$). Macros switching to |bfseries| such as |\section|\marg{text} are ensured to also typeset math in bold. This may cause trouble if bold symbols carry an additional non-implicit meaning. \DescribeMacro{\text} The |\text|\marg{text} macro makes it possible to write text within math mode, \ie ($ \text A \text b \text \Gamma \text \delta \text{\textbf A} \text{\textbf b} \text{\textbf \Gamma} \text{\textbf \delta}$). -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. +This behaviour conflicts \eg with the \software{sansserif} package option. \DescribeMacro{\mathsf} The math sans serif alphabet is redefined to be italic sans serif if the main text is serif and italic serif if the main text is sans serif, \ie ($\mathsf A \mathsf b \mathsf \Gamma \mathsf \delta \mathbf{\mathsf A} \mathbf{\mathsf b} \mathbf{\mathsf \Gamma} \mathbf{\mathsf \delta}$). \DescribeMacro{\mathscr} The |\mathcal| font \ie ($\mathcal{ABCD}$) is accompanied by the |\mathscr| font \ie ($\mathscr{ABCD}$). \DescribeMacro{\mathbb} -The |\mathbb| font is improved by the |doublestroke| package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$). +The |\mathbb| font is improved by the \software{doublestroke} package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$). \DescribeMacro{\mathfrak} Finally, the |\mathfrak| font is also available \ie ($\mathfrak{AaBb12}$). Details about the font handling in \hologo{TeX} can be found in \ccite{fntguide}. @@ -322,7 +341,7 @@ The |\frac|\marg{number}\marg{number} macro is accompanied by |\nicefrac|\linebr 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. +The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro \prefix{re}{defines} macros only within math mode without changing the text mode definition. \DescribeMacro{\i} \DescribeMacro{\d} @@ -332,21 +351,20 @@ The imaginary unit $\i$ and the differential $\d$ are defined using this functio 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. +Both macros are provided by the \software{amsmath} package. \DescribeMacro{eqnarray} The depreciated |eqnarray| environment is undefined as long this behaviour is not prevented by the |eqnarray| package option. -The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the |amsmath| and |mathtools| packages should be used instead. +The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the \software{amsmath} and \software{mathtools} packages should be used instead. \DescribeMacro{equation} Use the |equation| environment for short equations. - \begin{columns} -|\begin{equation}| - -| left = right \ .| - -|\end{equation}| +\begin{verbatim} +\begin{equation} + left = right \ . +\end{equation} +\end{verbatim} \column \begin{equation} \framebox[2em]{left\strut} = \framebox[7em]{right\strut} \ . @@ -355,33 +373,29 @@ Use the |equation| environment for short equations. \DescribeMacro{multline} Use the |multline| environment for longer equations. - \begin{columns} -|\begin{multline}| - -| left = right 1 \\| - -| + right 2 \ .| - -|\end{multline}| +\begin{verbatim} +\begin{multline} + left = right 1 \\ + + right 2 \ . +\end{multline} +\end{verbatim} \column \begin{multline} \framebox[2em]{left\strut} = \framebox[7em]{right 1\strut} \\ \framebox[7em]{+ right 2\strut} \ . - \end{multline} +\end{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}| +\begin{verbatim} +\begin{equation} \begin{split} + left &= right 1 \\ + &= right 2 \ . +\end{split} \end{equation} +\end{verbatim} \column \begin{equation} \begin{split} @@ -393,18 +407,15 @@ Use the |split| sub environment for equations in which multiple equal signs shou \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}| +\begin{verbatim} +\begin{subequations} \begin{align} + left &= right \ , & + left &= right \ , \\ + left &= right \ , & + left &= right \ . +\end{align} \end{subequations} +\end{verbatim} \column \begin{subequations} \begin{align} @@ -421,15 +432,15 @@ Use the |aligned| environment within a |equation| environment if the aligned equ \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}| +\begin{verbatim} +\begin{equation} \begin{split} + left &= right 1 \\ &= + \begin{multlined}[t] + right 2 \\ + right 3 \ . + \end{multlined} +\end{split} \end{equation} +\end{verbatim} \column \begin{equation} \begin{split} @@ -444,18 +455,16 @@ Use the |multlined| environment if either |split| or |align| contain very long l \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}| +\begin{verbatim} +\begin{subequations} +\begin{alignat}{2} + left &= long right && \ , \\ + le. 2 &= ri. 2 \ , & + \mathllap{le. 3 = ri. 3} & \ . +\end{alignat} +\end{subequations} +\end{verbatim} \column \begin{subequations} \begin{alignat}{2} @@ -473,7 +482,7 @@ As a rule of thumb if you have to use |\notag|, |\nonumber|, or perform manual s \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. +Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the \software{fixmath} \cite{fixmath} and \software{alphabeta} \cite{alphabeta} packages. This allows differentiations like \begin{align} \sigma &= \unit[5]{fb} \ , & &\text{at \unit[5]{\sigma} C.L.} \ , & \mu &= \unit[5]{cm} \ , & l &= \text{\unit[5]{\mu m}} \ , @@ -486,7 +495,7 @@ Additionally, Greek letters can also be directly typed using Unicode. \DescribeMacro{\pdv} \DescribeMacro{\comm} \DescribeMacro{\order} -The |physics| package \cite{physics} provides additional macros such as +The \software{physics} package \cite{physics} provides additional macros such as \begin{align} &\ev{\phi} \ , &&\pdv[n]{f}{x} \ , @@ -498,14 +507,14 @@ The |physics| package \cite{physics} provides additional macros such as \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. +The |\cancel|\marg{characters} macro from the \software{cancel} package \cite{cancel} and the |\slashed| \marg{character} macro from the \software{slashed} package \cite{slashed} allow to $\cancel{\text{cancel}}$ math and use the Dirac slash notation \ie $\slashed \partial$, respectively. \DescribeMacro{\overleftright} A better looking over left right arrow is defined \ie $\overleftright{\partial}$. \DescribeMacro{\unit} \DescribeMacro{\inv} -The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value} \marg{unit} from the |units| package \cite{units} which can also be used in text mode. +The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value} \marg{unit} from the \software{units} package \cite{units} which can also be used in text mode. The macro |\inv|\oarg{power}\marg{text} allows to avoid math mode also for inverse units such as \unit[5]{\inv{fb}} typeset via |\unit[5]{\inv{fb}}|. \subsection{Floats} @@ -531,12 +540,13 @@ 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}|\\ +\begin{verbatim} +\begin{panels}{.6} + code +\panel{.4} + \begin{tabular}...\end{tabular} +\end{panels} +\end{verbatim} \caption{Code for this panel environment.} \label{tab:panels} \panel{.4} @@ -550,55 +560,56 @@ The usual behaviour can be reactivated using |\raggedright|. \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}. +\caption{Example use of the \protecting{|panels|} environment in Panel \subref{tab:panels} and the features from the \software{booktabs} and \software{multirow} packages in Panel \subref{tab:booktabs}. } \label{tab:table} \end{table} \DescribeEnv{panels} \DescribeMacro{\panel} -The |panels| environment makes use of the |subcaption| package \cite{subcaption}. +The |panels| environment makes use of the \software{subcaption} package \cite{subcaption}. It provides sub-floats and takes as mandatory argument either the number of sub-floats (default~2) or the width of the first sub-float as fraction of the |\linewidth|. Within the |\begin{panels}|\oarg{vertical alignment}\marg{width} environment the |\panel| macro initiates a new sub-float. In the case that the width of the first sub-float has been given as an optional argument to the |panels| environment the |\panel|\marg{width} macro takes the width of the next sub-float as mandatory argument. The example code is presented in \cref{tab:panels}. \DescribeEnv{tabular} -The |booktabs| \cite{booktabs} and |multirow| \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}. +The \software{booktabs} \cite{booktabs} and \software{multirow} \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}. \DescribeMacro{\graphic} \DescribeMacro{\graphics} -The |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). +The \software{graphicx} package \cite{graphicx} is loaded and the |\graphic|\oarg{width}\marg{figure} macro is defined, which is a wrapper for the |\includegraphics|\marg{figure} macro and takes the figure width as fraction of the |\linewidth| as optional argument (default~1). If the graphics are located in a sub-folder its path can be indicated by |\graphics|\marg{subfolder}. \subsection{Bibliography} \DescribeMacro{\bibliography} \DescribeMacro{\printbibliography} -The |biblatex| package \cite{biblatex} is loaded for bibliography management. +The \software{biblatex} package \cite{biblatex} is loaded for bibliography management. The user has to add the line |\bibliography|\marg{my.bib} to the preamble of the document and |\printbibliography| at the end of the document. The bibliography is generated by \software{Biber} \cite{biber}. |biblatex| is extended to be able to cope with the |collaboration| and |reportNumber| fields provided by \online{https://inspirehep.net}{inspirehep.net} and a bug in the volume number is fixed. Additionally, the PubMed IDs are recognized and \online{https://ctan.org}{ctan.org}, \online{https://github.com}{github.com}, \online{https://gitlab.com}{gitlab.com}, \online{https://bitbucket.org}{bitbucket.org}, \online{https://www.launchpad.net}{launchpad.net}, \online{https://sourceforge.net}{sourceforge.net}, and \online{https://hepforge.org}{hepforge.org} are valid |eprinttype|s. \DescribeMacro{erratum} Errata can be included using the |related| feature. - -| \article{|\meta{key1}|,|\\ -| |\dots|,|\\ -| relatedtype="erratum",|\\ -| related="|\meta{key2}|",|\\ -| }|\\ -| \article{|\meta{key2}|,|\\ -| |\dots|,|\\ -| }| +\begin{verbatim} +\article{key1, + ..., + relatedtype="erratum", + related="key2", +} +\article{key2, + ..., +} +\end{verbatim} \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 \software{hep-paper} package provides a matching selection of preloaded packages and additional macros enabling the user to focus on the content instead of the layout by reducing the amount of manual tasks. The majority of the loaded packages are fairly lightweight, the others can be deactivated with package options. \DescribeMacro{arxiv-collector} \nolinkurl{arxiv.org} \cite{arxiv} requires the setup dependent |bbl| files instead of the original |bib| files, which causes trouble if the local \hologo{LaTeX} version differs from the one used by arXiv. -The |arxiv-collector| python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures). +The \software{arxiv-collector} python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures). \printbibliography 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 Binary files differindex b087bd542ea..56e949b7305 100644 --- a/Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdf +++ b/Master/texmf-dist/doc/latex/hep-paper/hep-paper-implementation.pdf diff --git a/Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx b/Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx index f8bddd02e49..f74dfd72d9c 100644 --- a/Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx +++ b/Master/texmf-dist/source/latex/hep-paper/hep-paper-implementation.dtx @@ -16,18 +16,21 @@ % \fi % % \iffalse -% + %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] -%<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] +%<package>\ProvidesPackage{hep-paper}[2020/10/01 v1.5 Publications in High Energy Physics] +%<datamodel>\ProvidesFile{hep-paper.dbx}[2020/10/01 v1.5 HEP-Paper biblatex data model] +%<documentation>\ProvidesFile{hep-paper-documentation.tex}[2020/10/01 v1.5 HEP-Paper documentation] % %<*documentation> + \RequirePackage[l2tabu, orthodox]{nag} \documentclass{ltxdoc} \EnableCrossrefs \CodelineIndex \RecordChanges +\def\MacroFont{\fontencoding\encodingdefault\fontfamily{lmtt}\fontseries\mddefault\fontshape\shapedefault\small} \MacroIndent=1.5em @@ -37,17 +40,20 @@ \acronym{PDF}{portable document format} \acronym{URL}{uniform resource locator} +\acronym{CM}{computer modern} +\acronym{LM}{latin modern} \usepackage{hologo} \newenvironment{columns}[1][.5]{% + \par\vspace{-\bigskipamount}% \begin{minipage}[t]{\linewidth}% \begin{minipage}[t]{#1\linewidth}% \newcommand{\column}{% \end{minipage}% \begin{minipage}[t]{\linewidth-#1\linewidth}% }% -}{\end{minipage}\end{minipage}} +}{\end{minipage}\end{minipage}\par} \setlength{\fboxsep}{1pt} %</documentation> @@ -62,7 +68,7 @@ % % \fi % -% \CheckSum{1302} +% \CheckSum{1551} % % \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 @@ -84,27 +90,31 @@ % \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.} +% \changes{v1.4}{2020/09/01}{If possible the compatibility options are selected automatically. Inclusion of PubMed IDs in bibliography.} +% \changes{v1.5}{2020/10/01}{Reduce the numer of math alphabets used in sans serif mode. Add more title options such as a subtitle. Use standard class options.} % % \ifshort %<*documentation> -% -\begin{document} % \fi - +% \GetFileInfo{hep-paper.sty} -\title{The |hep-paper| package\thanks{This document corresponds to \protecting{|hep-paper|}~\fileversion.}} +\title{The \software{hep-paper} package\thanks{This document corresponds to \software{hep-paper}~\fileversion.}} +\subtitle{Publications in high energy physics} \author{Jan Hajer \email{jan.hajer@uclouvain.be}} \affiliation{Centre for Cosmology, Particle Physics and Phenomenology, Université catholique de Louvain, Louvain-la-Neuve B-1348, Belgium} \preprint{Preprint-Number} -\date{\normalfont\filedate} +\date{\filedate} + +% \ifshort +\begin{document} +% \fi \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. +The \software{hep-paper} package aims to provide a single style file containing most configurations and macros necessary to write appealing publications in High Energy Physics. +Instead of reinventing the wheel by introducing newly created macros \software{hep-paper} preferably loads third party packages as long as they are lightweight enough. \end{abstract} \tableofcontents\clearpage @@ -113,16 +123,16 @@ Instead of reinventing the wheel by introducing newly created macros |hep-paper| \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. +For usual publications it is enough to load additionally to the |article| class without optional arguments only the \software{hep-paper} package \cite{hep-paper}. +\begin{verbatim} +\documentclass{article} +\usepackage{hep-paper} +\end{verbatim} +The most notable changes after loading the \software{hep-paper} package is the change of some \hologo{LaTeX} defaults. The paper and font sizes are set to A4 and \unit[11]{pt}, respectively. -Additionally, the paper geometry is 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}. +Additionally, the paper geometry is adjusted using the \software{geometry} package \cite{geometry}. +Furthermore, the font is changed to \LM using the \software{lmodern} package \cite{lmodern} with \software{microtype} \cite{microtype} optimizations. +Finally, \PDF hyperlinks are implemented with the \software{hyperref} package \cite{hyperref}. \subsection{Options} @@ -143,18 +153,24 @@ The possible \meta{sizes} are: 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 |lang|=\meta{name} option switches the document language to one of the values values provided by the \software{babel} package \cite{babel}. The default is |british|. \DescribeMacro{sansserif} -The |sansserif| option switches the document including math to the sans serif font shape. +The |sansserif| option switches the document including math to 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 |parskip| option changes how paragraphs are separated from each other using the \software{parskip} package \cite{parskip}. The \hologo{LaTeX} default is separation via indentation the |parskip| option switches to separation via vertical space. \footnote{Although the |parskip| option is used for this document, it is recommended only for very few document types such as technical manuals or answers to referees.} +\DescribeMacro{symbols} +The |symbols|=\meta{family} set the family of the symbol fonts. +|symbols=ams| loads two \hologo{AmS} fonts \cite{amsfonts} and the \software{bm} bold fonts. +The default setting replaces additionally the blackboard font with the \software{dsfont} \cite{dsfont}. +|symbols=minion| switches the symbol fonts to the Adobe MinionPro companion font from the \software{MnSymbol} package \cite{MnSymbol}. +|symbols=false| deactivates additional symbol fonts. + \subsubsection{Deactivation} The \software{hep-paper} package loads few bigger packages which have a large impact on the document. @@ -167,14 +183,14 @@ The |defaults| option prevents the adjustment of the page geometry and the font 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. +The |bibliography|=\meta{key} option prevents the automatic loading of the \software{biblatex} package \cite{biblatex} if \meta{key}=|false|. +Otherwise the \meta{key} is passed as |style| string to the \software{biblatex} package. \DescribeMacro{glossaries} -The |glossaries=false| option deactives acronyms and the use of the |glossaries| package \cite{glossaries}. +The |glossaries=false| option deactives acronyms and the use of the \software{glossaries} package \cite{glossaries}. \DescribeMacro{references} -The |references=false| option prevents the |cleveref| pacakge \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros. +The |references=false| option prevents the \software{cleveref} package \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros. \subsubsection{Compatibility} @@ -211,19 +227,23 @@ The |eqnarray| option reactivates the depreciated |eqnarray| environment. \subsection{Title page} +\DescribeMacro{\title} +The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information. + +\DescribeMacro{\subtitle} +The |\subtitle|\marg{subtitle} macro is defined using the \software{titling} package \cite{titling}. + \DescribeMacro{\author} \DescribeMacro{\affiliation} \DescribeMacro{\email} -In order to facilitate multiple authors with different affiliations the |authblk| package \cite{authblk} is loaded. +In order to facilitate multiple authors with different affiliations the \software{authblk} package \cite{authblk} is loaded. The following lines add \eg two authors with different affiliations - -| \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. +\begin{verbatim} +\author[1]{Author one \email{email one}} +\affiliation[1]{Affiliation one} +\author[2]{Author two \email{email two}} +\affiliation[1,2]{Affiliation two} +\end{verbatim} \DescribeMacro{\preprint} The |\preprint|\marg{numer} macro places a pre-print number in the upper right corner of the title page. @@ -231,16 +251,23 @@ The |\preprint|\marg{numer} macro places a pre-print number in the upper right c \DescribeEnv{abstract} The |abstract| environment is adjusted to not start with an indentation. +\DescribeMacro{\titlefont} +\DescribeMacro{\subtitlefont} +\DescribeMacro{\authorfont} +\DescribeMacro{\affiliationfont} +\DescribeMacro{\preprintfont} +Various title font macros are defined, allowing to change the appearance of the |\maketitle| output. + \subsection{Text} -Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |babel| package. +Hyphenation is provided by the \software{babel} package \cite{babel} and quotation commands are provided by the \software{csquotes} package \cite{csquotes} recommended by the \software{babel} package. \DescribeMacro{\enquote} \DescribeMacro{\MakeOuterQuote} The latter package provides the convenient macros |\enquote|\marg{text} and |\MakeOuterQuote{"}| allowing to leave the choice of quotation marks to \hologo{LaTeX} and use |"| instead of the pair |``| and |''|, respectively. \DescribeMacro{\eg} \DescribeMacro{\vs} -The |foreign| package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs. +The \software{foreign} package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs. \DescribeMacro{\no} The |\no|\marg{number} macro is typeset as \no{123}. @@ -251,20 +278,19 @@ The |\software|\oarg{version}\marg{name} macro is typeset as \software[\filevers \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} +\DescribeMacro{enumdescript} +The |inlinelist| and |enumdescript| environments are defined using the \software{enumitem} package \cite{enumitem}. \begin{columns} -|The three main points are| -|\begin{inlinelist}| - -| \item one| - -| \item two| - -| \item three| - -|\end{inlinelist}| +\begin{verbatim} +The three main points are +\begin{inlinelist} + \item one + \item two + \item three +\end{inlinelist} +\end{verbatim} \column The three main points are \begin{inlinelist} @@ -273,18 +299,15 @@ The three main points are \item three \end{inlinelist} \end{columns} - -\DescribeMacro{enumdescript} +\vspace{4ex} \begin{columns}[.6] -|\begin{enumdescript}[label=\Roman*)]| - -| \item{First} one| - -| \item{Second} two| - -| \item{Third} three| - -|\end{enumdescript}| +\begin{verbatim} +\begin{enumdescript}[label=\Roman*)] + \item{First} one + \item{Second} two + \item{Third} three +\end{enumdescript} +\end{verbatim} \column \begin{enumdescript}[label=\Roman*)] \item{First} one @@ -294,11 +317,11 @@ The three main points are \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}. +A bold versions \textbf{\textsc{Small Caps}} and a sans serif version of \textsf{\textsc{Small Caps}} based on the \CM font is provided, the latter using the \software{sansmathfonts} package \cite{sansmathfonts}. \DescribeMacro{\underline} \DescribeMacro{\overline} -The |\underline| macro is redefined to allow line-breaks using the |ulem| package \cite{ulem}. +The |\underline| macro is redefined to allow line-breaks using the \software{ulem} package \cite{ulem}. The |\overline| macro is extended to also \overline{overline} text outside of math environments. \DescribeMacro{\useparskip} @@ -308,8 +331,8 @@ If the |parskip| option is activated the |\useparindent| macro switches back the \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}. +References are extended with the \software{cleveref} package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{figure 1}. +Furthermore, the \software{cleveref} package allows to reference multiple objects within one |\cref|\marg{key1,key2}. \DescribeMacro{\cite} Citations are adjusted to not start on a new line in order to avoid the repeated use of |~\cite|\marg{key}. @@ -317,7 +340,7 @@ Citations are adjusted to not start on a new line in order to avoid the repeated \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. +References are also adjusted to not start on a new line. \DescribeMacro{\footnote} Footnotes are adjusted to swallow white space before the footnote mark and at the beginning of the footnote text. @@ -341,22 +364,21 @@ Placing a |\dummyacronym|\marg{key} at the end of the document ensures that the \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. +The \software{mathtools} \cite{mathtools} and \software{amssymb} \cite{amsfonts} packages are loaded. +They in turn load the \hologo{AmSLaTeX} \software{amsmath} \cite{amsmath} and \software{amsfonts} \cite{amsfonts} packages. \DescribeMacro{\mathbf} -Bold math, via |\mathbf| is improved by the |bm| package \cite{bm}, \ie ($ A b \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$). +Bold math, via |\mathbf| is improved by the \software{bm} package \cite{bm}, \ie ($ A b \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$). Macros switching to |bfseries| such as |\section|\marg{text} are ensured to also typeset math in bold. This may cause trouble if bold symbols carry an additional non-implicit meaning. \DescribeMacro{\text} The |\text|\marg{text} macro makes it possible to write text within math mode, \ie ($ \text A \text b \text \Gamma \text \delta \text{\textbf A} \text{\textbf b} \text{\textbf \Gamma} \text{\textbf \delta}$). -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. +This behaviour conflicts \eg with the \software{sansserif} package option. \DescribeMacro{\mathsf} The math sans serif alphabet is redefined to be italic sans serif if the main text is serif and italic serif if the main text is sans serif, \ie ($\mathsf A \mathsf b \mathsf \Gamma \mathsf \delta \mathbf{\mathsf A} \mathbf{\mathsf b} \mathbf{\mathsf \Gamma} \mathbf{\mathsf \delta}$). \DescribeMacro{\mathscr} The |\mathcal| font \ie ($\mathcal{ABCD}$) is accompanied by the |\mathscr| font \ie ($\mathscr{ABCD}$). \DescribeMacro{\mathbb} -The |\mathbb| font is improved by the |doublestroke| package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$). +The |\mathbb| font is improved by the \software{doublestroke} package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$). \DescribeMacro{\mathfrak} Finally, the |\mathfrak| font is also available \ie ($\mathfrak{AaBb12}$). Details about the font handling in \hologo{TeX} can be found in \ccite{fntguide}. @@ -369,7 +391,7 @@ The |\frac|\marg{number}\marg{number} macro is accompanied by |\nicefrac|\linebr 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. +The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro \prefix{re}{defines} macros only within math mode without changing the text mode definition. \DescribeMacro{\i} \DescribeMacro{\d} @@ -379,21 +401,20 @@ The imaginary unit $\i$ and the differential $\d$ are defined using this functio 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. +Both macros are provided by the \software{amsmath} package. \DescribeMacro{eqnarray} The depreciated |eqnarray| environment is undefined as long this behaviour is not prevented by the |eqnarray| package option. -The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the |amsmath| and |mathtools| packages should be used instead. +The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the \software{amsmath} and \software{mathtools} packages should be used instead. \DescribeMacro{equation} Use the |equation| environment for short equations. - \begin{columns} -|\begin{equation}| - -| left = right \ .| - -|\end{equation}| +\begin{verbatim} +\begin{equation} + left = right \ . +\end{equation} +\end{verbatim} \column \begin{equation} \framebox[2em]{left\strut} = \framebox[7em]{right\strut} \ . @@ -402,33 +423,29 @@ Use the |equation| environment for short equations. \DescribeMacro{multline} Use the |multline| environment for longer equations. - \begin{columns} -|\begin{multline}| - -| left = right 1 \\| - -| + right 2 \ .| - -|\end{multline}| +\begin{verbatim} +\begin{multline} + left = right 1 \\ + + right 2 \ . +\end{multline} +\end{verbatim} \column \begin{multline} \framebox[2em]{left\strut} = \framebox[7em]{right 1\strut} \\ \framebox[7em]{+ right 2\strut} \ . - \end{multline} +\end{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}| +\begin{verbatim} +\begin{equation} \begin{split} + left &= right 1 \\ + &= right 2 \ . +\end{split} \end{equation} +\end{verbatim} \column \begin{equation} \begin{split} @@ -440,18 +457,15 @@ Use the |split| sub environment for equations in which multiple equal signs shou \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}| +\begin{verbatim} +\begin{subequations} \begin{align} + left &= right \ , & + left &= right \ , \\ + left &= right \ , & + left &= right \ . +\end{align} \end{subequations} +\end{verbatim} \column \begin{subequations} \begin{align} @@ -468,15 +482,15 @@ Use the |aligned| environment within a |equation| environment if the aligned equ \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}| +\begin{verbatim} +\begin{equation} \begin{split} + left &= right 1 \\ &= + \begin{multlined}[t] + right 2 \\ + right 3 \ . + \end{multlined} +\end{split} \end{equation} +\end{verbatim} \column \begin{equation} \begin{split} @@ -491,18 +505,16 @@ Use the |multlined| environment if either |split| or |align| contain very long l \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}| +\begin{verbatim} +\begin{subequations} +\begin{alignat}{2} + left &= long right && \ , \\ + le. 2 &= ri. 2 \ , & + \mathllap{le. 3 = ri. 3} & \ . +\end{alignat} +\end{subequations} +\end{verbatim} \column \begin{subequations} \begin{alignat}{2} @@ -520,7 +532,7 @@ As a rule of thumb if you have to use |\notag|, |\nonumber|, or perform manual s \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. +Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the \software{fixmath} \cite{fixmath} and \software{alphabeta} \cite{alphabeta} packages. This allows differentiations like \begin{align} \sigma &= \unit[5]{fb} \ , & &\text{at \unit[5]{\sigma} C.L.} \ , & \mu &= \unit[5]{cm} \ , & l &= \text{\unit[5]{\mu m}} \ , @@ -533,7 +545,7 @@ Additionally, Greek letters can also be directly typed using Unicode. \DescribeMacro{\pdv} \DescribeMacro{\comm} \DescribeMacro{\order} -The |physics| package \cite{physics} provides additional macros such as +The \software{physics} package \cite{physics} provides additional macros such as \begin{align} &\ev{\phi} \ , &&\pdv[n]{f}{x} \ , @@ -545,14 +557,14 @@ The |physics| package \cite{physics} provides additional macros such as \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. +The |\cancel|\marg{characters} macro from the \software{cancel} package \cite{cancel} and the |\slashed| \marg{character} macro from the \software{slashed} package \cite{slashed} allow to $\cancel{\text{cancel}}$ math and use the Dirac slash notation \ie $\slashed \partial$, respectively. \DescribeMacro{\overleftright} A better looking over left right arrow is defined \ie $\overleftright{\partial}$. \DescribeMacro{\unit} \DescribeMacro{\inv} -The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value} \marg{unit} from the |units| package \cite{units} which can also be used in text mode. +The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value} \marg{unit} from the \software{units} package \cite{units} which can also be used in text mode. The macro |\inv|\oarg{power}\marg{text} allows to avoid math mode also for inverse units such as \unit[5]{\inv{fb}} typeset via |\unit[5]{\inv{fb}}|. \subsection{Floats} @@ -578,12 +590,13 @@ 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}|\\ +\begin{verbatim} +\begin{panels}{.6} + code +\panel{.4} + \begin{tabular}...\end{tabular} +\end{panels} +\end{verbatim} \caption{Code for this panel environment.} \label{tab:panels} \panel{.4} @@ -597,55 +610,56 @@ The usual behaviour can be reactivated using |\raggedright|. \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}. +\caption{Example use of the \protecting{|panels|} environment in Panel \subref{tab:panels} and the features from the \software{booktabs} and \software{multirow} packages in Panel \subref{tab:booktabs}. } \label{tab:table} \end{table} \DescribeEnv{panels} \DescribeMacro{\panel} -The |panels| environment makes use of the |subcaption| package \cite{subcaption}. +The |panels| environment makes use of the \software{subcaption} package \cite{subcaption}. It provides sub-floats and takes as mandatory argument either the number of sub-floats (default~2) or the width of the first sub-float as fraction of the |\linewidth|. Within the |\begin{panels}|\oarg{vertical alignment}\marg{width} environment the |\panel| macro initiates a new sub-float. In the case that the width of the first sub-float has been given as an optional argument to the |panels| environment the |\panel|\marg{width} macro takes the width of the next sub-float as mandatory argument. The example code is presented in \cref{tab:panels}. \DescribeEnv{tabular} -The |booktabs| \cite{booktabs} and |multirow| \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}. +The \software{booktabs} \cite{booktabs} and \software{multirow} \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}. \DescribeMacro{\graphic} \DescribeMacro{\graphics} -The |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). +The \software{graphicx} package \cite{graphicx} is loaded and the |\graphic|\oarg{width}\marg{figure} macro is defined, which is a wrapper for the |\includegraphics|\marg{figure} macro and takes the figure width as fraction of the |\linewidth| as optional argument (default~1). If the graphics are located in a sub-folder its path can be indicated by |\graphics|\marg{subfolder}. \subsection{Bibliography} \DescribeMacro{\bibliography} \DescribeMacro{\printbibliography} -The |biblatex| package \cite{biblatex} is loaded for bibliography management. +The \software{biblatex} package \cite{biblatex} is loaded for bibliography management. The user has to add the line |\bibliography|\marg{my.bib} to the preamble of the document and |\printbibliography| at the end of the document. The bibliography is generated by \software{Biber} \cite{biber}. |biblatex| is extended to be able to cope with the |collaboration| and |reportNumber| fields provided by \online{https://inspirehep.net}{inspirehep.net} and a bug in the volume number is fixed. Additionally, the PubMed IDs are recognized and \online{https://ctan.org}{ctan.org}, \online{https://github.com}{github.com}, \online{https://gitlab.com}{gitlab.com}, \online{https://bitbucket.org}{bitbucket.org}, \online{https://www.launchpad.net}{launchpad.net}, \online{https://sourceforge.net}{sourceforge.net}, and \online{https://hepforge.org}{hepforge.org} are valid |eprinttype|s. \DescribeMacro{erratum} Errata can be included using the |related| feature. - -| \article{|\meta{key1}|,|\\ -| |\dots|,|\\ -| relatedtype="erratum",|\\ -| related="|\meta{key2}|",|\\ -| }|\\ -| \article{|\meta{key2}|,|\\ -| |\dots|,|\\ -| }| +\begin{verbatim} +\article{key1, + ..., + relatedtype="erratum", + related="key2", +} +\article{key2, + ..., +} +\end{verbatim} \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 \software{hep-paper} package provides a matching selection of preloaded packages and additional macros enabling the user to focus on the content instead of the layout by reducing the amount of manual tasks. The majority of the loaded packages are fairly lightweight, the others can be deactivated with package options. \DescribeMacro{arxiv-collector} \nolinkurl{arxiv.org} \cite{arxiv} requires the setup dependent |bbl| files instead of the original |bib| files, which causes trouble if the local \hologo{LaTeX} version differs from the one used by arXiv. -The |arxiv-collector| python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures). +The \software{arxiv-collector} python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures). % \ifshort \printbibliography @@ -668,9 +682,51 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl %<*package> % \fi % +% \section{Allocation of math alphabets} +% +% Of the 16 available math alphabets, \hologo{TeX} loads four alphabets by default +% \begin{enumdescript}[start=0] +% \item{OT1} \label{it:math text} Text (latin, greek, numerals, text symbols) +% \item{OML} \label{it:math italic} Math Italic (latin, greek, numerals, text symbols) +% \item{OMS} \label{it:math symbol} Symbol (|\mathcal|, operators) +% \item{OMX} \label{it:math extension} Math Extension (big operators, delimiters) +% \end{enumdescript} +% The text font \ref{it:math text}\strut\ of \CM is \textbf{cmr10} |\OT1/cmr/m/n/10|, which is relaced by \LM to be \textbf{rm-lmr10} |\OT1/lmr/m/n/10|, the |sansserif| option uses \textbf{rm-lmss10} |\OT1/lmss/m/n/10|. +% The italic math font \ref{it:math italic} of \CM is \textbf{cmmi10} |\OML/cmm/m/it/|\allowbreak|10|, and is repalced by \LM to be \textbf{lmmi10} |\OML/lmm/m/it/10|, the |sansserif| options uses \textbf{cmbrmi10} |\OML/cmbrm/m/it/10| from the \software{cmbright} package \cite{cmbright}. +% The symbol font \ref{it:math symbol}\strut\ of \CM is \textbf{cmsy10} |\OMS/cmsy/m/n/10|, and is repalced by \LM to be \textbf{lmsy10} |\OMS/lmsy/m/n/10|, the |sansserif| options uses \textbf{cmsssy10} |\OMS/cmsssy/m/n/10| from the \software{sansmathfonts} package \cite{sansmathfonts}. +% The extension font \ref{it:math extension}\strut\ of \CM is \textbf{cmex10} |\OMX/cmex/m/n/5|, and is replaced by the \software{exscale} package \cite{exscale} to be \textbf{cmex10} |\OMX/cmex/m/n/10|, the |sansserif| option loads \textbf{cmssex10} |\OMX/cmssex/m/n/10|. +% The \software{amssymb} (\software{amsfonts}) packages \cite{amssymb} load two more symbol fonts +% \begin{enumdescript}[start=4] +% \item{msam10} \label{it:math ams a} |\U/msa/m/n/10| AMS symbol font A (special math operators) +% \item{msbm10} \label{it:math ams b} |\U/msb/m/n/10| AMS symbol font B (|\mathbb|, negated operators) +% \end{enumdescript} +% The |sansserif| option replaces them with \textbf{ssmsam10} |\U/ssmsa/m/n/10| and \textbf{ssmsbm10} |\U/ssmsb/m/n/10| from the \software{sansmathfonts} package \cite{sansmathfonts}, respectively. +% The \software{bm} package \cite{bm} loads the bold version for the fonts \labelcref{it:math text,it:math italic,it:math symbol}. +% +% Other math alphabets are only loaded on demand, \eg |\mathsf| uses a sans serif font and |\mathbf| without \software{bm} uses a bold font. +% The |\mathscr| macro uses the script font from the \software{mathrsfs} package \cite{mathrsfs} +% \begin{enumdescript}[start=9] +% \item{rsfs10} |\U/rsfs/m/n/10| Math script font (capital letters) +% \end{enumdescript} +% The |\mathbb| macro loads the double stroke font from the \software{dsfont} package \cite{dsfont}, this can be prevented with the |symbols=ams| option. +% \begin{enumdescript}[start=10] +% \item{dsrom10} |\U/dsrom/m/n/10| Double stroke font +% \end{enumdescript} +% The |\mathfrak| macro loads the fractur font from the \software{amssymb} package \cite{amssymb} +% \begin{enumdescript}[start=11] +% \item{eufm10} |\U/euf/m/n/10| Math fraktur (Basic Latin) +% \end{enumdescript} +% +% The \software{hep-paper} package uses nine of the available 16 math alphabets. +% This number can be reduced by three using |\newcommand{\bmmax}{0}| from the \software{bm} package \cite{bm}. +% +% The |symbols=minion| options replaces the fonts \labelcref{it:math symbol,it:math extension,it:math ams a,it:math ams b} with corresponding fonts from the \software{MnSymbol} package \cite{MnSymbol}. +% Additionally, two more symbol alphabets are allocated, the \software{bm} package \cite{bm} loads one more font and now |\mathcal| triggers the use of one additional alphabet. +% Hence, the minion option uses three to four more math alphabets than a usual setup. +% % \section{Options} % -% Load the |pdftexcmds| \cite{pdftexcmds} and |kvoptions| \cite{kvoptions} packages and define a |hep| namespace. +% Load the \software{pdftexcmds} \cite{pdftexcmds} and \software{kvoptions} \cite{kvoptions} packages and define a |hep| namespace. % \begin{macrocode} \RequirePackage{pdftexcmds} \RequirePackage{kvoptions} @@ -697,7 +753,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macro} % % \begin{macro}{lang} -% Define the |lang| option, which takes the values provided by the |babel| package \cite{babel}. +% Define the |lang| option, which takes the values provided by the \software{babel} package \cite{babel}. % Make |british| the default language. % \begin{macrocode} \DeclareStringOption[british]{lang} @@ -720,6 +776,13 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % \end{macro} % +% \begin{macro}{symbols} +% Provide the option |symbols| allowing to switch the symbol font. +% \begin{macrocode} +\DeclareStringOption[true]{symbols} +% \end{macrocode} +% \end{macro} +% % \subsection{Deactivation} % % \begin{macro}{defaults} @@ -737,21 +800,21 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macro} % % \begin{macro}{bibliography} -% Provide the option |bibliography| for passing a |style| string to the |biblatex| package \cite{biblatex} or disabling the automatic loading of |biblatex|. +% Provide the option |bibliography| for passing a |style| string to the \software{biblatex} package \cite{biblatex} or disabling the automatic loading of |biblatex|. % \begin{macrocode} \DeclareStringOption[numeric-comp]{bibliography} % \end{macrocode} % \end{macro} % % \begin{macro}{glossaries} -% Provide the option |glossaries| able to turn of the use of the |glossaries| package \cite{glossaries}. +% Provide the option |glossaries| able to turn of the use of the \software{glossaries} package \cite{glossaries}. % \begin{macrocode} \DeclareBoolOption[true]{glossaries} % \end{macrocode} % \end{macro} % % \begin{macro}{references} -% Provide the option |references| for preventing the |cleveref| package from being loaded redefinitions of reference macros. +% Provide the option |references| for preventing the \software{cleveref} package from being loaded redefinitions of reference macros. % \begin{macrocode} \DeclareBoolOption[true]{references} % \end{macrocode} @@ -774,21 +837,21 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macro} % % \begin{macro}{jhep} -% Provide the option |jhep| for |JHEP| \cite{jhep} compatibility mode. +% Provide the option |jhep| for JHEP \cite{jhep} compatibility mode. % \begin{macrocode} \DeclareBoolOption[false]{jhep} % \end{macrocode} % \end{macro} % % \begin{macro}{jcap} -% Provide the option |jcap| for |JCAP| \cite{jcap} compatibility mode. +% Provide the option |jcap| for JCAP \cite{jcap} compatibility mode. % \begin{macrocode} \DeclareBoolOption[false]{jcap} % \end{macrocode} % \end{macro} % % \begin{macro}{pos} -% Provide the option |pos| for |PoS| compatibility mode. +% Provide the option |pos| for PoS compatibility mode. % \begin{macrocode} \DeclareBoolOption[false]{pos} % \end{macrocode} @@ -816,6 +879,22 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \ProcessKeyvalOptions* % \end{macrocode} % +% Read the class options regarding font and paper size. +% \begin{macrocode} +\def\hep@get@class#1.cls#2\relax{\def\hep@class{#1}} +\def\hep@getclass{\expandafter\hep@get@class\@filelist\relax} +\hep@getclass +\@ifclasswith{\hep@class}{10pt}{\setkeys{hep}{font=10pt}}{} +\@ifclasswith{\hep@class}{12pt}{\setkeys{hep}{font=12pt}}{} +\@ifclasswith{\hep@class}{a5paper}{\setkeys{hep}{paper=a5}}{} +\@ifclasswith{\hep@class}{b5paper}{\setkeys{hep}{paper=b5}}{} +\@ifclasswith{\hep@class}{letterpaper}{\setkeys{hep}{paper=letter}}{} +\@ifclasswith{\hep@class}{legalpaper}{\setkeys{hep}{paper=legal}}{} +\@ifclasswith{\hep@class}{executivepaper}{% + \setkeys{hep}{paper=executive}% +}{} +% \end{macrocode} +% % \subsection{Set compatibility} % % Set the |pos| compatibility options. @@ -832,6 +911,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \@ifclassloaded{beamer}{\setkeys{hep}{beamer}}{} \ifhep@beamer \setkeys{hep}{defaults, title=false, references=false, sansserif} + \@ifpackageloaded{beamerbasefont}{\usefonttheme{professionalfonts}}{} \fi % \end{macrocode} % @@ -880,24 +960,15 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \section{Text} % -% Load the |alphabeta| package \cite{alphabeta} first in order to archive the correct behaviour. -% The |alphabeta| package provides upright Greek letters in text mode. -% \begin{macrocode} -\RequirePackage{alphabeta} -% \end{macrocode} -% % 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. % \begin{macrocode} \ifhep@serif\else - \RequirePackage{sansmathfonts} - \renewcommand\familydefault{\sfdefault} + \renewcommand{\familydefault}{\sfdefault} \fi % \end{macrocode} % % \begin{macro}{\ifxetexorluatex} -% Load the |ifluatex| \cite{ifluatex} and |ifxetex| \cite{ifxetex} packages. +% Load the \software{ifluatex} \cite{ifluatex} and \software{ifxetex} \cite{ifxetex} packages. % Define the |\ifxetexorluatex| conditional checking if the package is executed by \hologo{LuaLaTeX} or \hologo{XeLaTeX}. % \begin{macrocode} \RequirePackage{ifluatex} @@ -912,7 +983,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % \end{macro} % -% Pick the correct font encoding depending on the engine used and load the |fontenc| package \cite{fontenc} with this encoding. +% Pick the correct font encoding depending on the engine used and load the \software{fontenc} package \cite{fontenc} with this encoding. % For details of the font encoding see \cite{encguide}. % \begin{macrocode} \ifxetexorluatex @@ -922,21 +993,22 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \fi \RequirePackage[\hep@encoding]{fontenc} % \end{macrocode} -% 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}. +% Fix the remaining \CM fonts \cite{fix-cm}, load the \software{lmodern} font \cite{lmodern}, the |textcomp| extension \cite{textcomp}, and the \software{microtype} font optimization \cite{microtype}. % \begin{macrocode} \RequirePackage{fix-cm} \RequirePackage{lmodern} +\renewcommand{\ttdefault}{lmvtt} \RequirePackage{textcomp} \RequirePackage{microtype} % \end{macrocode} % -% Define bold and sans serif small caps font shapes using the fontspec package \cite{fontspec}. +% Define bold and sans serif small caps font shapes using the \software{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[lmr] \LM regular font +% \item[lmss] \LM sans serif font +% \item[cmss] \CM sans serif font +% \item[xcmss] Extended \CM sans serif font (from the \software{sansmathfonts} package \cite{sansmathfonts}) % \item[bx] Bold extended series % \item[b] Bold series % \item[m] Medium weight and width series @@ -968,22 +1040,22 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{} \fi % \end{macrocode} - -% Load the |inputenc| \cite{inputenc} package. +% +% Load the \software{inputenc} package \cite{inputenc}. % \begin{macrocode} \ifxetexorluatex\else \RequirePackage[utf8]{inputenc} \fi % \end{macrocode} % -% Load the |babel| \cite{babel} package for hyphenation and the recommended |csquotes| package \cite{csquotes}. +% Load the \software{babel} package \cite{babel} for hyphenation and the recommended \software{csquotes} package \cite{csquotes}. % \begin{macrocode} \RequirePackage[\hep@lang]{babel} \RequirePackage{csquotes} % \end{macrocode} % % \begin{macro}{\underline} -% Load the |ulem| package \cite{ulem} for hyphenable underlined text. +% Load the \software{ulem} package \cite{ulem} for hyphenable underlined text. % \begin{macrocode} \RequirePackage[normalem]{ulem} \let\underline\uline @@ -1013,7 +1085,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \subsection{Text macros} % %\begin{macro}{\vs} -% Load the |foreign| package \cite{foreign} in order to highlight abbreviations and vocabularies from foreign languages. +% Load the \software{foreign} package \cite{foreign} in order to highlight abbreviations and vocabularies from foreign languages. % Add the missing |\vs| command. % \begin{macrocode} \ifnum\pdf@strcmp{\hep@lang}{american}=0 @@ -1030,12 +1102,12 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % \end{macro} % -% The |foreign| package relies on the |xspace| package \cite{xspace}. -% Ensure that |\xspace| is compatible with the |\enquote| macro from the |csquote| package. +% The \software{foreign} package relies on the \software{xspace} package \cite{xspace}. +% Ensure that |\xspace| is compatible with the |\enquote| macro from the \software{csquote} package. % \begin{macrocode} \xspaceaddexceptions{\csq@qclose@i} % \end{macrocode} - +% %\begin{macro}{\no} % Define the macro |\no|\marg{number} for the use of \textnumero\ with appropriate spacing. % \begin{macrocode} @@ -1044,7 +1116,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macro} % %\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}. +% Define a macro for software with optional version information |\software|\linebreak[1]\oarg{version}\linebreak[1]\marg{name}, using the \software{relsize} package \cite{relsize}. % \begin{macrocode} \RequirePackage{relsize} \newcommand{\software}[2][\hspace{-\fontdimen2\font}]{% @@ -1054,15 +1126,26 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macro} % % \begin{macro}{\online} +% \begin{macro}{\email} % Define the |\online|\marg{text}\marg{url} macro combining the features of the |\href| and the |\url| macros. +% Define a macro for typesetting emails. % \begin{macrocode} \newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}} +\newcommand{\email}[1]{\online{mailto:#1}{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\prefix} +% Define the |\prefix|\marg{prefix}\marg{word} macro ensuring the correct linebreak in \prefix{prefix}{word}. +% \begin{macrocode} +\newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2} % \end{macrocode} % \end{macro} % \subsection{Lists} % -% Load the |enumitem| package \cite{enumitem}. +% Load the \software{enumitem} package \cite{enumitem}. % \begin{macrocode} \RequirePackage[inline]{enumitem} % \end{macrocode} @@ -1095,7 +1178,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \section{Geometry} % -% Load the |geometry| package \cite{geometry} and adjust the text width and height to the values of the |a4wide| package \cite{a4wide}. +% Load the \software{geometry} package \cite{geometry} and adjust the text width and height. % This step must happen after readjusting the font size in \cref{sec:font size}. % \begin{macrocode} \ifhep@defaults\else @@ -1109,10 +1192,10 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl } \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. +% Load the \software{parskip} package \cite{parskip} if requested and provide two commands switching between the two paragraph modes. % \begin{macrocode} \ifhep@parindent\else \RequirePackage{parskip} @@ -1134,15 +1217,13 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \section{Math} % -% Load the |mathtools| package \cite{mathtools} which loads the |amsmath| package \cite{amsmath}. -% Additionally, load the |amssymb| package \cite{amsfonts} which provides further math symbols and also loads the |amsfont| package \cite{amsfonts}. +% Load the \software{mathtools} package \cite{mathtools} which loads the \software{amsmath} package \cite{amsmath}. % Allow page breaks within equations if necessary. % \begin{macrocode} \RequirePackage{mathtools} -\RequirePackage{amssymb} \allowdisplaybreaks[1] % \end{macrocode} - +% % \begin{macro}{\diag} % \begin{macro}{\sgn} % Provide the |\diag| and |\sgn| operators @@ -1152,10 +1233,10 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \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. -% This macro is implemented using the |xparse| package \cite{xparse}. +% Define the |\mathdef|\marg{name}\oarg{arguments}\marg{macro} macro which \prefix{re}{defines} macros in math mode only. +% This macro is implemented using the \software{xparse} package \cite{xparse}. % \begin{macrocode} \RequirePackage{xparse} \DeclareDocumentCommand{\mathdef}{mO{0}m}{% @@ -1172,35 +1253,34 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl } % \end{macrocode} % \end{macro} - +% % \begin{macro}{\i} % Provide an upright imaginary unit in math mode. % \begin{macrocode} \AtBeginDocument{\mathdef{\i}{\operatorname{i}}} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\overline} -% 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}. +% Redefine |\overline| to be a text macro using the \software{ulem} package \cite{ulem}. +% Extend it as a math macro with the original definition from the \software{amsmath} package \cite{amsmath}. % \begin{macrocode} \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|. +% Load the \software{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 if not prevented by package option. % \begin{macrocode} @@ -1210,61 +1290,154 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \fi % \end{macrocode} % \end{macro} - +% % \subsection{Math fonts} % -% \begin{macro}{\mathbf} -% 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}. +% Define conditionals based on the |symbols| package option. % \begin{macrocode} -\ifhep@serif\providecommand{\bmmax}{2}\else\providecommand{\bmmax}{1}\fi -\RequirePackage{bm} -\let\mathbf\bm -\g@addto@macro\bfseries{\boldmath} +\newif\ifhep@symbols +\ifnum\pdf@strcmp{\hep@symbols}{false}=0\else\hep@symbolstrue\fi +\newif\ifhep@ams +\ifnum\pdf@strcmp{\hep@symbols}{ams}=0 \hep@amstrue\fi +\newif\ifhep@minion +\ifnum\pdf@strcmp{\hep@symbols}{minion}=0 \hep@miniontrue\fi +% \end{macrocode} +% +% Load the \software{fixmath} \cite{fixmath} and \software{alphabeta} \cite{alphabeta} packages ensuring that upper Greek letters in math mode are italic and providing upright Greek letters in text mode, respectively. +% \begin{macrocode} +\ifhep@symbols + \RequirePackage{alphabeta} + \RequirePackage{fixmath} +% \end{macrocode} +% +% Either load the \software{MnSymbol} package \cite{MnSymbol} or the the \software{exscale} package in order to fix Latin Modern |lmex| fonts. +% Additionally, load the \software{amssymb} package \cite{amsfonts} which provides further math symbols and also loads the \software{amsfonts} package \cite{amsfonts}. +% \begin{macrocode} + \ifhep@minion + \RequirePackage{MnSymbol} + \else + \RequirePackage{exscale} + \RequirePackage{amssymb} + \fi +\fi % \end{macrocode} -% \end{macro} % % \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 sans serif option is used. +% If the |sansserif| package option is active use the \software{cmbright} font \cite{cmbright} and code adjusted from the \software{sansmathfonts} package \cite{sansmathfonts}. % 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] -% \item[OML] \hologo{TeX} math italic font encoding -% \item[cmm] Computer modern math italic font -% \item[cmbr] Computer modern bright font -% \item[bx] Bold extended series -% \item[m] Medium weight and width series -% \item[it] Italic font shape -% \end{description} % \begin{macrocode} \ifhep@serif - \RequirePackage{fixmath} - \newcommand\hep@sf@font{cmbr} + \newcommand\hep@font@sf{cmbrm} + \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it} + \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{b}{it} \else - \RequirePackage[slantedGreek]{sfmath} - \RequirePackage{sansmathfonts} - \newcommand\hep@sf@font{cmm} + \newcommand\hep@font@sf{lmr} + \newcommand\hep@font@text{lmss} + \newcommand\hep@font@math{cmbrm} + \newcommand\hep@font@symbol{cmsssy} + \newcommand\hep@font@extra{cmssex} + \newcommand\hep@font@amsa{ssmsa} + \newcommand\hep@font@amsb{ssmsb} +% \end{macrocode} +% Declare font substitutions. +% \begin{macrocode} + \DeclareFontSubstitution{OML}{\hep@font@math}{m}{it} + \ifhep@symbols\ifhep@minion\else + \DeclareFontSubstitution{OMS}{\hep@font@symbol}{m}{n} + \DeclareFontSubstitution{OMX}{\hep@font@extra}{m}{n} + \fi\fi +% \end{macrocode} +% Declare the symbol fonts. +% \begin{macrocode} + \DeclareSymbolFont{operators}{OT1}{\hep@font@text}{m}{n} + \DeclareSymbolFont{letters}{OML}{\hep@font@math}{m}{it} + \ifhep@symbols\ifhep@minion\else + \DeclareSymbolFont{symbols}{OMS}{\hep@font@symbol}{m}{n} + \DeclareSymbolFont{largesymbols}{OMX}{\hep@font@extra}{m}{n} + \fi\fi +% \end{macrocode} +% Set bold symbol fonts. +% \begin{macrocode} + \SetSymbolFont{operators}{bold}{OT1}{\hep@font@text}{b}{n} + \SetSymbolFont{letters}{bold}{OML}{\hep@font@math}{b}{it} + \ifhep@symbols\ifhep@minion\else + \SetSymbolFont{symbols}{bold}{OMS}{\hep@font@symbol}{b}{n} + \fi\fi +% \end{macrocode} +% Adjust the fonts loaded by the \software{amsfonts} \cite{amsfonts} and \software{esint} \cite{esint} packages. +% \begin{macrocode} + \ifhep@symbols\ifhep@minion\else + \DeclareSymbolFont{AMSa}{U}{\hep@font@amsa}{m}{n} + \DeclareSymbolFont{AMSb}{U}{\hep@font@amsb}{m}{n} + \fi\fi + \AtBeginDocument{% + \@ifpackageloaded{esint}{% + \DeclareSymbolFont{largesymbolsA}{U}{ssesint}{m}{n} + }{} + } +% \end{macrocode} +% Declare the symbol font alphabets. +% \begin{macrocode} + \DeclareSymbolFontAlphabet{\mathrm}{operators} + \DeclareSymbolFontAlphabet{\mathnormal}{letters} + \ifhep@minion\else + \DeclareSymbolFontAlphabet{\mathcal}{symbols} + \fi +% \end{macrocode} +% Declare |\mathit|. +% \begin{macrocode} + \DeclareMathAlphabet{\mathit}{OML}{\hep@font@text}{m}{it} + \SetMathAlphabet\mathit{bold}{OML}{\hep@font@text}{bx}{it} +% \end{macrocode} +% Declare |\mathtt|. +% \begin{macrocode} + \DeclareMathAlphabet{\mathtt}{OT1}{cmtl}{m}{n} +% \end{macrocode} +% \begin{macrocode} +% \end{macrocode} +% Declare |\mathsf|. +% \begin{macrocode} + \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it} + \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{bx}{it} +% \end{macrocode} +% \end{macro} +% End of |sansserif|. +% \begin{macrocode} \fi -\SetMathAlphabet{\mathsf}{normal}{OML}{\hep@sf@font}{m}{it} -\SetMathAlphabet{\mathsf}{bold}{OML}{\hep@sf@font}{bx}{it} +% \end{macrocode} +% +% \begin{macro}{\mathbf} +% Load the \software{bm} package \cite{bm} for superior boldmath. +% Make math symbols bold whenever they appear in bold macros such as |\section|\marg{text}. +% \begin{macrocode} +\ifhep@symbols + \RequirePackage{bm} + \AtBeginDocument{\let\mathbf\bm} + \g@addto@macro\bfseries{\boldmath} % \end{macrocode} % \end{macro} +% % \begin{macro}{\mathscr} -% Load the |mathrsfs| package for the |\mathscr| math script font. +% Provid the |\mathscr| math script font from the \software{mathrsfs} package \cite{mathrsfs}. % \begin{macrocode} -\DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n} + \DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n} % \end{macrocode} % \end{macro} % \begin{macro}{\mathbb} -% Load the |dsfont| package \cite{dsfont} and adjust the |\mathbb| math blackboard style font according to the (sans-) serif option. +% Redefine the the |\mathbb| math blackboard style font according to the \prefix{sans}{serif} option with the font from the \software{dsfont} package \cite{dsfont}. % \begin{macrocode} -\ifhep@serif - \newcommand\hep@bb@font{dsrom} -\else - \newcommand\hep@bb@font{dsss} + \ifhep@minion + \DeclareMathAlphabet{\mathbb}{U}{% + \ifhep@serif dsrom\else dsss\fi% + }{m}{n} + \else + \ifhep@ams\else + \SetMathAlphabet{\mathbb}{normal}{U}{% + \ifhep@serif dsrom\else dsss\fi% + }{m}{n} + \fi + \fi \fi -\SetMathAlphabet{\mathbb}{normal}{U}{\hep@bb@font}{m}{n} % \end{macrocode} % \end{macro} @@ -1273,9 +1446,9 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \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 |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. +% Load the \software{physics} package \cite{physics} which provides macros useful for publications in physics. +% Additionally, load the \software{cancel} \cite{cancel} and \software{slashed} \cite{slashed} packages which provide the |\cancel| and |\slashed| macros. +% Finally, load the \software{units} package \cite{units} which provides the |\units| and |\nicefrac| macros. % \begin{macrocode} \RequirePackage{physics} \RequirePackage{cancel} @@ -1285,21 +1458,21 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \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. % \begin{macrocode} \newcommand{\inv}[2][1]{#2\ensuremath{^{-#1}}} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\d} % Provide a differential |\d|. % \begin{macrocode} \AtBeginDocument{\mathdef{\d}{\dd}} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\oset} % Define a new overset macro |\oset|\oarg{offset}\marg{over}\marg{base} % \begin{macrocode} @@ -1329,7 +1502,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \renewcommand{\textfraction}{.1} % .2 \renewcommand{\floatpagefraction}{.8} % .5 % \end{macrocode} - +% % \begin{environment}{figure} % \begin{environment}{table} % Center the content of |figure| and |table| environments. @@ -1376,7 +1549,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % \end{macro} % -% Prevent the |caption| package \cite{caption} from complaining about the journal classes and packages. +% Prevent the \software{caption} package \cite{caption} from complaining about the journal classes and packages. % \begin{macrocode} \ifhep@journal \setlength\abovecaptionskip{\f@size\p@} @@ -1395,7 +1568,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \fi % \end{macrocode} % -% Load the |subcaption| package \cite{subcaption}. +% Load the \software{subcaption} package \cite{subcaption}. % Provide the old |\subcaption@minipage| macro. % \begin{macrocode} \RequirePackage[subrefformat=parens]{subcaption} @@ -1438,8 +1611,8 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % \end{macro} % \end{environment} - -% Reajust the captions to the revtex class using the |ragged2e| package \cite{ragged2e}. +% +% Reajust the captions to the revtex class using the \software{ragged2e} package \cite{ragged2e}. % \begin{macrocode} \ifhep@revtex \RequirePackage{ragged2e} @@ -1454,7 +1627,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \subsection{Tables} % % \begin{environment}{tabular} -% Enhance tabulars with the |booktabs| and |multirow| packages \cite{booktabs, multirow}. +% Enhance tabulars with the \software{booktabs} and \software{multirow} packages \cite{booktabs, multirow}. % \begin{macrocode} \RequirePackage{booktabs} \RequirePackage{multirow} @@ -1464,7 +1637,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \subsection{Figures} % % \begin{macro}{\graphic} -% Provide the |\graphic| macro for the inclusion of figures using the |graphicx| package \cite{graphicx}. +% Provide the |\graphic| macro for the inclusion of figures using the \software{graphicx} package \cite{graphicx}. % \begin{macrocode} \RequirePackage{graphicx} \providecommand{\tikzsetnextfilename}[1]{} @@ -1495,26 +1668,85 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % \end{macro} % -% \subsection{Authors} +% \subsection{Titles} % -% \begin{macro}{\author} -% Allow absent author field. +% Extend the title using the \software{titling} package \cite{titling}. % \begin{macrocode} -\author{} +\RequirePackage{titling} +% \end{macrocode} +% +% \begin{macro}{\preprintfont} +% \begin{macro}{\titlefont} +% \begin{macro}{\subtitlefont} +% \begin{macro}{\authorfont} +% \begin{macro}{\affiliationfont} +% \begin{macro}{\datefont} +% Allow to change the fontface of the individual parts of the title. +% \begin{macrocode} +\let\hep@preprint@font\relax +\newcommand{\preprintfont}[1]{\def\hep@preprint@font{#1}} +\let\hep@title@font\relax +\newcommand{\titlefont}[1]{\def\hep@title@font{#1}} +\let\hep@subtitle@font\relax +\newcommand{\subtitlefont}[1]{\def\hep@subtitle@font{#1}} +\let\hep@author@font\relax +\newcommand{\authorfont}[1]{\def\hep@author@font{#1}} +\let\hep@affiliation@font\relax +\newcommand{\affiliationfont}[1]{\def\hep@affiliation@font{#1}} +\let\hep@date@font\relax +\newcommand{\datefont}[1]{\def\hep@date@font{#1}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\subtitle} +% Define a subtitle. +% \begin{macrocode} +\newcommand{\presubtitle}[1]{\def\hep@pre@sub@title{#1}} +\newcommand{\subtitle}[1]{\def\sub@title{#1}} +\newcommand{\postsubtitle}[1]{\def\hep@post@sub@title{#1}} +\renewcommand{\maketitlehookb}{% + \@ifundefined{sub@title}{}{% + \hep@pre@sub@title\sub@title\hep@post@sub@title% + }% +} % \end{macrocode} % \end{macro} % -% Enable the handling of multiple authors with different affiliations using the |authblk| package \cite{authblk}. +% Set standard values mostly taken from the \software{titling} package, add the font hook, and reduce the |date| font size. +% \begin{macrocode} +\pretitle{\begin{center}\LARGE\hep@title@font} +\posttitle{\par\end{center}} +\presubtitle{\begin{center}\large\hep@subtitle@font} +\postsubtitle{\par\end{center}} +\preauthor{% + \begin{center}\large\hep@author@font\lineskip.5em\begin{tabular}[t]{c}% +} +\postauthor{\end{tabular}\par\end{center}} +\predate{\begin{center}\hep@date@font} +\postdate{\par\end{center}} +% \end{macrocode} +% +% \subsection{Authors} +% +% \begin{macro}{\author} +% Allow absent author field. +% Enable the handling of multiple authors with different affiliations using the \software{authblk} package \cite{authblk}. % \begin{macrocode} +\author{} \RequirePackage{authblk} -\renewcommand\Affilfont{\footnotesize} +\renewcommand{\Affilfont}{\small\hep@affiliation@font} +\renewcommand\Authfont{\hep@author@font} % \end{macrocode} +% \end{macro} % % \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$|}}|. +% Redefine the email 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}}}% @@ -1526,51 +1758,55 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \begin{macro}{\affiliation} % Define the |\affiliation| macro, ensure that linebreaks happen after a comma. % \begin{macrocode} -\newcommand\active@comma{,\penalty-5\relax} -\newcommand\cat@comma@active{\catcode`\,\active} -{\cat@comma@active\gdef,{\active@comma}} -\newcommand\@affil[1]{% +\newcommand\hep@active@comma{,\penalty-5\relax} +\newcommand\hep@cat@comma@active{\catcode`\,\active} +{\hep@cat@comma@active\gdef,{\hep@active@comma}} +\newcommand\hep@affil[1]{% \endgroup\@flushglue=0pt plus .5\linewidth\affil{#1}% } -\def\@affil@opt[#1]#2{% +\def\hep@affil@opt[#1]#2{% \endgroup\@flushglue=0pt plus .5\linewidth\affil[#1]{#2}% } -\DeclareRobustCommand\@affiliation{\@ifnextchar[{\@affil@opt}{\@affil}} -\newcommand{\affiliation}{\begingroup\cat@comma@active\@affiliation} +\DeclareRobustCommand\hep@affiliation{% + \@ifnextchar[{\hep@affil@opt}{\hep@affil}% +} +\newcommand{\affiliation}{% + \begingroup\hep@cat@comma@active\hep@affiliation% +} % \end{macrocode} % \end{macro} % \subsection{Preprint} % % \begin{macro}{\preprint} -% Define the |\preprint| macro using the |varwidth| package \cite{varwidth}. +% Define the |\preprint| macro using the \software{varwidth} package \cite{varwidth}. % \begin{macrocode} -\let\@preprint\relax -\newcommand\preprint[1]{\long\gdef\@preprint{#1}} +\let\hep@preprint\relax +\newcommand\preprint[1]{\def\hep@preprint{#1}} \RequirePackage{varwidth} -\newcommand{\@preprint@box}{% +\newcommand{\hep@preprint@box}{% \begin{varwidth}{\textwidth}% - \textsc{\small\@preprint}% + \small\hep@preprint@font\hep@preprint% \end{varwidth}% } +\preprintfont{\sc} % \end{macrocode} % \end{macro} - -% \begin{macro}{\maketitle} -% Places a preprint number in the top right corner of the title page using the |atbegshi| \cite{atbegshi} and |picture| \cite{picture} packages. +% +% \begin{macro}{\placepreprint} +% Places a preprint number in the top right corner of the title page using the \software{atbegshi} \cite{atbegshi} and \software{picture} \cite{picture} packages. % \begin{macrocode} \RequirePackage{atbegshi} \RequirePackage{picture} -\let\hep@maketitle\maketitle -\renewcommand{\maketitle}{% - \hep@maketitle% +\newcommand{\placepreprint}{% \AtBeginShipoutFirst{% \put( - \textwidth+\oddsidemargin-\widthof{\@preprint@box}, - -2pt-\topmargin-\heightof{\@preprint@box} - ){\normalfont\@preprint@box} + \textwidth+\oddsidemargin-\widthof{\hep@preprint@box}, + -2pt-\topmargin-\heightof{\hep@preprint@box} + ){\normalfont\hep@preprint@box} } } +\renewcommand{\maketitlehooka}{\placepreprint\vspace{-\bigskipamount}} % \end{macrocode} % \end{macro} @@ -1598,7 +1834,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % % \begin{macro}{\bibliography} -% Load the |biblatex| package \cite{biblatex} with the datamodel defined in \cref{sec:data model}. +% Load the \software{biblatex} package \cite{biblatex} with the datamodel defined in \cref{sec:data model}. % \begin{macrocode} \RequirePackage[style=\hep@bibliography, datamodel=hep-paper]{biblatex} % \end{macrocode} @@ -1897,7 +2133,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \section{Hyperlinks, Footnotes and References} \label{sec:hyperlinks} % -% Load the |hyperref| package \cite{hyperref} enable Unicode encoding and hide links. +% Load the \software{hyperref} package \cite{hyperref} enable Unicode encoding and hide links. % % \begin{macrocode} \RequirePackage{hyperref} @@ -1937,7 +2173,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \subsection{Footnotes} % -% Place a hyperlink from the footnote back to its referencing label using the |footnotebackref| package \cite{footnotebackref}. +% Place a hyperlink from the footnote back to its referencing label using the \software{footnotebackref} package \cite{footnotebackref}. % \begin{macrocode} \def\BackrefFootnoteTag{} \RequirePackage{footnotebackref} @@ -1959,7 +2195,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \end{macrocode} % % \begin{macro}{\cref} -% Improve reference using the |cleveref| package \cite{cleveref}. +% Improve reference using the \software{cleveref} package \cite{cleveref}. % % \begin{macrocode} \RequirePackage[noabbrev, nameinlink]{cleveref} @@ -1985,21 +2221,20 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \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. +% Adjust |\ref|\marg{key} in order to prevent preceding line breaks. % \begin{macrocode} \let\hep@ref\ref -\AtBeginDocument{\renewcommand\ref{\no@break@before\labelcref}} +\AtBeginDocument{\renewcommand\ref{\no@break@before\hep@ref}} % \end{macrocode} % \end{macro} -% ! Bug ! in equations the additional brackets from the cleveref macro conflict with the traditional |(\ref|\marg{key}|)| approach - +% % \begin{macro}{\eqref} -% Adjust |\eqref|\marg{key} in order to prevent preceding line breaks and to enable the possibility to reference multiple equations at once. +% Adjust |\eqref|\marg{key} in order to prevent preceding line breaks. % \begin{macrocode} \renewcommand\eqref{\no@break@before\labelcref} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\subref} % Adjust |\subref|\marg{key} in order to prevent preceding line breaks. % \begin{macrocode} @@ -2011,14 +2246,14 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \endgroup} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\subcref} % Provide the |\subcref| macro. % \begin{macrocode} \newcommand{\subcref}[1]{\cref{sub@#1}} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\eqcrefname} % Define the |\eqcrefname| macro for named equation types. % \begin{macrocode} @@ -2028,7 +2263,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl } % \end{macrocode} % \end{macro} - +% % \begin{macro}{\labelcrefrange} % Define the missing |\labelcrefrange|\marg{key1}\marg{key2} macro. % \begin{macrocode} @@ -2052,7 +2287,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl \renewcommand\cite{\no@break@before\hep@cite} % \end{macrocode} % \end{macro} - +% % Begin of bibliography if. % \begin{macrocode} \ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else @@ -2094,7 +2329,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl % \section{Acronyms} % -% 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}. +% Acronyms are implemented with the \software{glossaries-extra} package \cite{glossaries-extra} which is an extension of the \software{glossaries} package \cite{glossaries} and must be loaded after the \software{hyperref} pacakge in \cref{sec:hyperlinks}. % \begin{macrocode} \ifhep@glossaries \RequirePackage[nostyles]{glossaries-extra} @@ -2127,16 +2362,16 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl }% }} % \end{macrocode} - +% % \begin{macro}{\begin@sentence} -% Mark the beginning of a paragraph as if it would follow a full stop using the |everyhook| package \cite{everyhook}. +% Mark the beginning of a paragraph as if it would follow a full stop using the \software{everyhook} package \cite{everyhook}. % \begin{macrocode} \RequirePackage[excludeor]{everyhook} \newcommand{\begin@sentence}{1001} \PushPostHook{par}{{\spacefactor=\begin@sentence}} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\frenchspacing} % Adjust the |\frenchspacing| macro to be compatibel with this idea. % \begin{macrocode} @@ -2147,7 +2382,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl } % \end{macrocode} % \end{macro} - +% % \begin{macro}{\if@begin@of@sentence} % Provide a macro checking for the beginning of a sentence by examining the length of the preceeding space. % \begin{macrocode} @@ -2159,7 +2394,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl }} % \end{macrocode} % \end{macro} - +% % \begin{macro}{\acronym} % The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\meta{*}\marg{definition}\oarg{plural\linebreak[4] definition} macro is defined. % \begin{enumerate}[nosep, label=\#\arabic*] 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 8de85de7c6c..ab97a338cf2 100644 --- a/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins +++ b/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins @@ -1,4 +1,3 @@ -%% %% Copyright (C) 2019-2020 by Jan Hajer %% %% This file may be distributed and/or modified under the @@ -10,7 +9,7 @@ %% %% 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} 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 d19b0be720e..b938786aa26 100644 --- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx @@ -14,7 +14,8 @@ %% 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/08/01 v1.4 HEP-Paper biblatex data model] + +\ProvidesFile{hep-paper.dbx}[2020/10/01 v1.5 HEP-Paper biblatex data model] \DeclareDatamodelFields[type=field, datatype=literal]{ collaboration, reportnumber, pmid, pmcid, pmc, 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 3885186def3..3aeb445e722 100644 --- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty @@ -14,8 +14,9 @@ %% 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. + \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{hep-paper}[2020/08/01 v1.4 Publications in High Energy Physics] +\ProvidesPackage{hep-paper}[2020/10/01 v1.5 Publications in High Energy Physics] \RequirePackage{pdftexcmds} \RequirePackage{kvoptions} @@ -30,6 +31,7 @@ \DeclareComplementaryOption{sansserif}{serif} \DeclareBoolOption[true]{parindent} \DeclareComplementaryOption{parskip}{parindent} +\DeclareStringOption[true]{symbols} \DeclareBoolOption[false]{defaults} \DeclareBoolOption[true]{title} \DeclareStringOption[numeric-comp]{bibliography} @@ -43,6 +45,18 @@ \DeclareBoolOption[false]{eqnarray} \DeclareBoolOption[false]{manualplacement} \ProcessKeyvalOptions* +\def\hep@get@class#1.cls#2\relax{\def\hep@class{#1}} +\def\hep@getclass{\expandafter\hep@get@class\@filelist\relax} +\hep@getclass +\@ifclasswith{\hep@class}{10pt}{\setkeys{hep}{font=10pt}}{} +\@ifclasswith{\hep@class}{12pt}{\setkeys{hep}{font=12pt}}{} +\@ifclasswith{\hep@class}{a5paper}{\setkeys{hep}{paper=a5}}{} +\@ifclasswith{\hep@class}{b5paper}{\setkeys{hep}{paper=b5}}{} +\@ifclasswith{\hep@class}{letterpaper}{\setkeys{hep}{paper=letter}}{} +\@ifclasswith{\hep@class}{legalpaper}{\setkeys{hep}{paper=legal}}{} +\@ifclasswith{\hep@class}{executivepaper}{% + \setkeys{hep}{paper=executive}% +}{} \@ifclassloaded{PoS}{\setkeys{hep}{pos}}{} \ifhep@pos \setkeys{hep}{defaults, title=false} @@ -51,6 +65,7 @@ \@ifclassloaded{beamer}{\setkeys{hep}{beamer}}{} \ifhep@beamer \setkeys{hep}{defaults, title=false, references=false, sansserif} + \@ifpackageloaded{beamerbasefont}{\usefonttheme{professionalfonts}}{} \fi \@ifclassloaded{revtex4}{\setkeys{hep}{revtex}}{} \@ifclassloaded{revtex4-1}{\setkeys{hep}{revtex}}{} @@ -81,10 +96,8 @@ \hoffset 0in \fi -\RequirePackage{alphabeta} \ifhep@serif\else - \RequirePackage{sansmathfonts} - \renewcommand\familydefault{\sfdefault} + \renewcommand{\familydefault}{\sfdefault} \fi \RequirePackage{ifluatex} \RequirePackage{ifxetex} @@ -103,6 +116,7 @@ \RequirePackage[\hep@encoding]{fontenc} \RequirePackage{fix-cm} \RequirePackage{lmodern} +\renewcommand{\ttdefault}{lmvtt} \RequirePackage{textcomp} \RequirePackage{microtype} \ifxetexorluatex @@ -128,7 +142,6 @@ \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->ssub*xcmss/bx/sc}{} \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{} \fi - \ifxetexorluatex\else \RequirePackage[utf8]{inputenc} \fi @@ -163,13 +176,14 @@ \RequirePackage[all, \hep@lang@foreign]{foreign} \DeclareRobustCommand\vs{\xperiodafter{{\foreignabbrfont{vs}}}} \xspaceaddexceptions{\csq@qclose@i} - \newcommand{\no}[1]{\textnumero~#1} \RequirePackage{relsize} \newcommand{\software}[2][\hspace{-\fontdimen2\font}]{% {\smaller\textsc{#2}~#1}% } \newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}} +\newcommand{\email}[1]{\online{mailto:#1}{#1}} +\newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2} \RequirePackage[inline]{enumitem} \newlist{inlinelist}{enumerate*}{1} @@ -197,7 +211,6 @@ includeheadfoot } \fi - \ifhep@parindent\else \RequirePackage{parskip} \newcommand{\useparskip}{% @@ -214,12 +227,9 @@ \fi \RequirePackage{mathtools} -\RequirePackage{amssymb} \allowdisplaybreaks[1] - \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\sgn}{sgn} - \RequirePackage{xparse} \DeclareDocumentCommand{\mathdef}{mO{0}m}{% \expandafter\let\csname text\string#1\endcsname=#1 @@ -233,52 +243,104 @@ \next }% } - \AtBeginDocument{\mathdef{\i}{\operatorname{i}}} - \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 - -\ifhep@serif\providecommand{\bmmax}{2}\else\providecommand{\bmmax}{1}\fi -\RequirePackage{bm} -\let\mathbf\bm -\g@addto@macro\bfseries{\boldmath} -\ifhep@serif +\newif\ifhep@symbols +\ifnum\pdf@strcmp{\hep@symbols}{false}=0\else\hep@symbolstrue\fi +\newif\ifhep@ams +\ifnum\pdf@strcmp{\hep@symbols}{ams}=0 \hep@amstrue\fi +\newif\ifhep@minion +\ifnum\pdf@strcmp{\hep@symbols}{minion}=0 \hep@miniontrue\fi +\ifhep@symbols + \RequirePackage{alphabeta} \RequirePackage{fixmath} - \newcommand\hep@sf@font{cmbr} -\else - \RequirePackage[slantedGreek]{sfmath} - \RequirePackage{sansmathfonts} - \newcommand\hep@sf@font{cmm} + \ifhep@minion + \RequirePackage{MnSymbol} + \else + \RequirePackage{exscale} + \RequirePackage{amssymb} + \fi \fi -\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 - \newcommand\hep@bb@font{dsrom} + \newcommand\hep@font@sf{cmbrm} + \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it} + \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{b}{it} \else - \newcommand\hep@bb@font{dsss} + \newcommand\hep@font@sf{lmr} + \newcommand\hep@font@text{lmss} + \newcommand\hep@font@math{cmbrm} + \newcommand\hep@font@symbol{cmsssy} + \newcommand\hep@font@extra{cmssex} + \newcommand\hep@font@amsa{ssmsa} + \newcommand\hep@font@amsb{ssmsb} + \DeclareFontSubstitution{OML}{\hep@font@math}{m}{it} + \ifhep@symbols\ifhep@minion\else + \DeclareFontSubstitution{OMS}{\hep@font@symbol}{m}{n} + \DeclareFontSubstitution{OMX}{\hep@font@extra}{m}{n} + \fi\fi + \DeclareSymbolFont{operators}{OT1}{\hep@font@text}{m}{n} + \DeclareSymbolFont{letters}{OML}{\hep@font@math}{m}{it} + \ifhep@symbols\ifhep@minion\else + \DeclareSymbolFont{symbols}{OMS}{\hep@font@symbol}{m}{n} + \DeclareSymbolFont{largesymbols}{OMX}{\hep@font@extra}{m}{n} + \fi\fi + \SetSymbolFont{operators}{bold}{OT1}{\hep@font@text}{b}{n} + \SetSymbolFont{letters}{bold}{OML}{\hep@font@math}{b}{it} + \ifhep@symbols\ifhep@minion\else + \SetSymbolFont{symbols}{bold}{OMS}{\hep@font@symbol}{b}{n} + \fi\fi + \ifhep@symbols\ifhep@minion\else + \DeclareSymbolFont{AMSa}{U}{\hep@font@amsa}{m}{n} + \DeclareSymbolFont{AMSb}{U}{\hep@font@amsb}{m}{n} + \fi\fi + \AtBeginDocument{% + \@ifpackageloaded{esint}{% + \DeclareSymbolFont{largesymbolsA}{U}{ssesint}{m}{n} + }{} + } + \DeclareSymbolFontAlphabet{\mathrm}{operators} + \DeclareSymbolFontAlphabet{\mathnormal}{letters} + \ifhep@minion\else + \DeclareSymbolFontAlphabet{\mathcal}{symbols} + \fi + \DeclareMathAlphabet{\mathit}{OML}{\hep@font@text}{m}{it} + \SetMathAlphabet\mathit{bold}{OML}{\hep@font@text}{bx}{it} + \DeclareMathAlphabet{\mathtt}{OT1}{cmtl}{m}{n} + \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it} + \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{bx}{it} +\fi +\ifhep@symbols + \RequirePackage{bm} + \AtBeginDocument{\let\mathbf\bm} + \g@addto@macro\bfseries{\boldmath} + \DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n} + \ifhep@minion + \DeclareMathAlphabet{\mathbb}{U}{% + \ifhep@serif dsrom\else dsss\fi% + }{m}{n} + \else + \ifhep@ams\else + \SetMathAlphabet{\mathbb}{normal}{U}{% + \ifhep@serif dsrom\else dsss\fi% + }{m}{n} + \fi + \fi \fi -\SetMathAlphabet{\mathbb}{normal}{U}{\hep@bb@font}{m}{n} \RequirePackage{physics} \RequirePackage{cancel} \RequirePackage{slashed} \RequirePackage{units} - \newcommand{\inv}[2][1]{#2\ensuremath{^{-#1}}} - \AtBeginDocument{\mathdef{\d}{\dd}} - \newcommand{\oset}[3][-1pt]{% \raisebox{1pt}{\ensuremath{\mathop{#3}\limits^{% \vbox to#1{\kern-2\ex@\hbox{$\scriptscriptstyle#2$}\vss}% @@ -293,7 +355,6 @@ \renewcommand{\dbltopfraction}{.9} % .7 \renewcommand{\textfraction}{.1} % .2 \renewcommand{\floatpagefraction}{.8} % .5 - \let\@figure@\figure% \let\@end@figure@\endfigure% \let\@table@\table% @@ -362,7 +423,6 @@ \begin@subcaption@minipage[#1]{#2\linewidth}% \fi% }{\endminipage} - \ifhep@revtex \RequirePackage{ragged2e} \DeclareCaptionFormat{revtex}{#1#2\justifying{#3}} @@ -384,48 +444,82 @@ \ifhep@title \date{} +\RequirePackage{titling} +\let\hep@preprint@font\relax +\newcommand{\preprintfont}[1]{\def\hep@preprint@font{#1}} +\let\hep@title@font\relax +\newcommand{\titlefont}[1]{\def\hep@title@font{#1}} +\let\hep@subtitle@font\relax +\newcommand{\subtitlefont}[1]{\def\hep@subtitle@font{#1}} +\let\hep@author@font\relax +\newcommand{\authorfont}[1]{\def\hep@author@font{#1}} +\let\hep@affiliation@font\relax +\newcommand{\affiliationfont}[1]{\def\hep@affiliation@font{#1}} +\let\hep@date@font\relax +\newcommand{\datefont}[1]{\def\hep@date@font{#1}} +\newcommand{\presubtitle}[1]{\def\hep@pre@sub@title{#1}} +\newcommand{\subtitle}[1]{\def\sub@title{#1}} +\newcommand{\postsubtitle}[1]{\def\hep@post@sub@title{#1}} +\renewcommand{\maketitlehookb}{% + \@ifundefined{sub@title}{}{% + \hep@pre@sub@title\sub@title\hep@post@sub@title% + }% +} +\pretitle{\begin{center}\LARGE\hep@title@font} +\posttitle{\par\end{center}} +\presubtitle{\begin{center}\large\hep@subtitle@font} +\postsubtitle{\par\end{center}} +\preauthor{% + \begin{center}\large\hep@author@font\lineskip.5em\begin{tabular}[t]{c}% +} +\postauthor{\end{tabular}\par\end{center}} +\predate{\begin{center}\hep@date@font} +\postdate{\par\end{center}} \author{} \RequirePackage{authblk} -\renewcommand\Affilfont{\footnotesize} -\newcommand{\email}[1]{\online{mailto:#1}{#1}} +\renewcommand{\Affilfont}{\small\hep@affiliation@font} +\renewcommand\Authfont{\hep@author@font} \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}} -\newcommand\@affil[1]{% +\newcommand\hep@active@comma{,\penalty-5\relax} +\newcommand\hep@cat@comma@active{\catcode`\,\active} +{\hep@cat@comma@active\gdef,{\hep@active@comma}} +\newcommand\hep@affil[1]{% \endgroup\@flushglue=0pt plus .5\linewidth\affil{#1}% } -\def\@affil@opt[#1]#2{% +\def\hep@affil@opt[#1]#2{% \endgroup\@flushglue=0pt plus .5\linewidth\affil[#1]{#2}% } -\DeclareRobustCommand\@affiliation{\@ifnextchar[{\@affil@opt}{\@affil}} -\newcommand{\affiliation}{\begingroup\cat@comma@active\@affiliation} +\DeclareRobustCommand\hep@affiliation{% + \@ifnextchar[{\hep@affil@opt}{\hep@affil}% +} +\newcommand{\affiliation}{% + \begingroup\hep@cat@comma@active\hep@affiliation% +} -\let\@preprint\relax -\newcommand\preprint[1]{\long\gdef\@preprint{#1}} +\let\hep@preprint\relax +\newcommand\preprint[1]{\def\hep@preprint{#1}} \RequirePackage{varwidth} -\newcommand{\@preprint@box}{% +\newcommand{\hep@preprint@box}{% \begin{varwidth}{\textwidth}% - \textsc{\small\@preprint}% + \small\hep@preprint@font\hep@preprint% \end{varwidth}% } - +\preprintfont{\sc} \RequirePackage{atbegshi} \RequirePackage{picture} -\let\hep@maketitle\maketitle -\renewcommand{\maketitle}{% - \hep@maketitle% +\newcommand{\placepreprint}{% \AtBeginShipoutFirst{% \put( - \textwidth+\oddsidemargin-\widthof{\@preprint@box}, - -2pt-\topmargin-\heightof{\@preprint@box} - ){\normalfont\@preprint@box} + \textwidth+\oddsidemargin-\widthof{\hep@preprint@box}, + -2pt-\topmargin-\heightof{\hep@preprint@box} + ){\normalfont\hep@preprint@box} } } +\renewcommand{\maketitlehooka}{\placepreprint\vspace{-\bigskipamount}} \@ifundefined{abstract}{}{% \let\hep@abstract\abstract% @@ -608,24 +702,19 @@ \fi% } \let\hep@ref\ref -\AtBeginDocument{\renewcommand\ref{\no@break@before\labelcref}} - +\AtBeginDocument{\renewcommand\ref{\no@break@before\hep@ref}} \renewcommand\eqref{\no@break@before\labelcref} - \let\hep@subref\subref \renewcommand\subref{\no@break@before\hep@subref} \renewcommand*\subcaption@ref[2]{\begingroup% \caption@setoptions{sub}% \subcaption@reffmt\p@subref{\hep@ref#1{sub@#2}}% \endgroup} - \newcommand{\subcref}[1]{\cref{sub@#1}} - \NewDocumentCommand{\eqcrefname}{mmo}{ \crefname{#1}{#2}{\IfValueTF{#3}{#3}{#2s}} \creflabelformat{#1}{(##2##1##3)} } - \DeclareRobustCommand{\labelcrefrange}[2]{% \@crefrangenostar{labelcref}{#1}{#2}% } @@ -633,7 +722,6 @@ \let\hep@cite\cite \renewcommand\cite{\no@break@before\hep@cite} - \ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else \NewBibliographyString{refname} \NewBibliographyString{refsname} @@ -678,24 +766,20 @@ \glsdohypertarget{#1}{#2}% }% }} - \RequirePackage[excludeor]{everyhook} \newcommand{\begin@sentence}{1001} \PushPostHook{par}{{\spacefactor=\begin@sentence}} - \def\frenchspacing{% \sfcode`\.\begin@sentence \sfcode`\?\begin@sentence \sfcode`\!\begin@sentence \sfcode`\:\begin@sentence \sfcode`\;\@m \sfcode`\,\@m } - \newcommand{\if@begin@of@sentence}[2]{\leavevmode\protecting{% \ifboolexpr{ test {\ifnumcomp{\spacefactor}{=}{3000}} or% test {\ifnumcomp{\spacefactor}{=}{2000}} or% test {\ifnumcomp{\spacefactor}{=}{\begin@sentence}}% }{#1}{#2}% }} - \NewDocumentCommand{\acronym}{somsmo}{ \newabbreviation[ type=\acronymtype, |