diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-27 21:24:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-27 21:24:29 +0000 |
commit | 6311dfbf83eb2863ae6338376a9c2b3933fdf993 (patch) | |
tree | c3646b7b206d9d2089cd6c75a52993bc96808fef /Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty | |
parent | 055f995839a011f758e09b539b6a692189be36d9 (diff) |
hep-paper (27nov21)
git-svn-id: svn://tug.org/texlive/trunk@61171 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty | 1217 |
1 files changed, 16 insertions, 1201 deletions
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 f3d78d9bea6..c51e71fe5dc 100644 --- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty @@ -14,11 +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}[2021/08/01 v1.8 Publications in High Energy Physics] +\ProvidesPackage{hep-paper}[2021/09/01 v2.0 Publications in High Energy Physics] -\RequirePackage{pdftexcmds} \RequirePackage{kvoptions} \SetupKeyvalOptions{ family=hep, @@ -102,244 +100,19 @@ \fi \fi \ifhep@sissa - \setkeys{hep}{title=false, bibliography=false} + \setkeys{hep}{defaults, title=false, bibliography=false} \PassOptionsToPackage{ colorlinks=true, linktocpage=true, pdfproducer=medialab, pdfa=true, urlcolor=blue, anchorcolor=blue, citecolor=blue, filecolor=blue, linkcolor=blue, menucolor=blue, pagecolor=blue }{hyperref} - \PassOptionsToPackage{reset}{geometry} \AtBeginDocument{\renewcommand{\foreignabbrfont}{}} \fi -\ifhep@jhep - \voffset 0in - \hoffset 0in -\fi \ifhep@serif\else \renewcommand{\familydefault}{\sfdefault} \fi -\RequirePackage{ifluatex} -\RequirePackage{ifxetex} -\newif\ifxetexorluatex -\ifxetex\xetexorluatextrue -\else - \ifluatex\xetexorluatextrue - \else\xetexorluatexfalse - \fi -\fi -\ifxetexorluatex - \def\hep@encoding{TU} -\else - \def\hep@encoding{T1} -\fi -\RequirePackage[\hep@encoding]{fontenc} -\RequirePackage{fix-cm} -\RequirePackage{microtype} -\ifxetexorluatex - \RequirePackage{nfssext-cfr} - \RequirePackage{lmodern} -\else - \ifhep@lining - \RequirePackage[rm={lining},sf={lining},tt={lining}]{cfr-lm} - \else - \RequirePackage{cfr-lm} - \fi -\fi -\RequirePackage{etoolbox} -\RequirePackage{textcomp} -\newcommand{\hep@sf@fontshape}[3]{% - \DeclareFontShape{\hep@encoding}{\sfdefault}{#1}{#2}{#3}{}% -} -\newcommand{\hep@rm@fontshape}[3]{% - \DeclareFontShape{\hep@encoding}{\rmdefault}{#1}{#2}{#3}{}% -} -\ifxetexorluatex - \RequirePackage{fontspec} - \setmainfont{Latin Modern Roman}[ - UprightFeatures={SmallCapsFont={[lmromancaps10-regular.otf]}}, - BoldFeatures={ - SmallCapsFeatures={Letters=SmallCaps}, - SmallCapsFont={[cmunbx.otf]} - } - ] - \hep@sf@fontshape{bx}{sc}{<->cmssbxcsc10}{} - \hep@sf@fontshape{b}{sc}{<->cmssbxcsc10}{} - \hep@sf@fontshape{m}{scit}{<->cmsscsci10}{} - \hep@sf@fontshape{m}{sc}{% - <-9>cmsscsc8<9-10>cmsscsc9<10->cmsscsc10% - }{} -\else - \rmfamily - \ifhep@lining - \RequirePackage{slantsc} - \hep@rm@fontshape{b}{sc}{<->ssub*cmr/bx/sc}{} - \hep@rm@fontshape{bx}{sc}{<->ssub*cmr/bx/sc}{} - \hep@rm@fontshape{b}{scsl}{<->ssub*cmr/bx/scsl}{} - \hep@rm@fontshape{bx}{scsl}{<->ssub*cmr/bx/scit}{} - \hep@rm@fontshape{b}{scit}{<->ssub*cmr/bx/scsl}{} - \hep@rm@fontshape{bx}{scit}{<->ssub*cmr/bx/scit}{} - \else - \DeclareFontFamily{\hep@encoding}{hfor}{} - \DeclareFontShape{\hep@encoding}{hfor}{bx}{sc}{ - <-6>hfoxc0500<6-7>hfoxc0600<7-8>hfoxc0700<8-9>hfoxc0800 - <9-10>hfoxc0900<10-12>hfoxc1000<12-17>hfoxc1200<17->hfoxc1728 - }{} - \DeclareFontShape{\hep@encoding}{hfor}{bx}{scsl}{ - <-6>hfooc0500<6-7>hfooc0600<7-8>hfooc0700<8-9>hfooc0800 - <9-10>hfooc0900<10-12>hfooc1000<12-17>hfooc1200<17->hfooc1728 - }{} - \hep@rm@fontshape{b}{sc}{<->ssub*hfor/bx/sc}{} - \hep@rm@fontshape{bx}{sc}{<->ssub*hfor/bx/sc}{} - \hep@rm@fontshape{bx}{scsl}{<->ssub*hfor/bx/scsl}{} - \hep@rm@fontshape{b}{scit}{<->ssub*hfor/bx/scsl}{} - \hep@rm@fontshape{bx}{scit}{<->ssub*hfor/bx/scsl}{} - \hep@rm@fontshape{b}{scsl}{<->ssub*hfor/bx/scsl}{} - \fi - \sffamily - \hep@sf@fontshape{m}{sc}{<->ssub*xcmss/m/sc}{} - \hep@sf@fontshape{b}{sc}{<->ssub*xcmss/bx/sc}{} - \hep@sf@fontshape{bx}{sc}{<->ssub*xcmss/bx/sc}{} - \hep@sf@fontshape{m}{scit}{<->ssub*xcmss/m/scit}{} - \hep@sf@fontshape{b}{scit}{<->ssub*xcmss/bx/scit}{} - \hep@sf@fontshape{bx}{scit}{<->ssub*xcmss/bx/scit}{} - \hep@sf@fontshape{m}{scsl}{<->ssub*xcmss/m/scit}{} - \hep@sf@fontshape{b}{scsl}{<->ssub*xcmss/bx/scit}{} - \hep@sf@fontshape{bx}{scsl}{<->ssub*xcmss/bx/scit}{} - \hep@sf@fontshape{m}{ui}{<->cmssu10}{} -\fi -\ifxetexorluatex\else - \RequirePackage[utf8]{inputenc} -\fi -\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{fixmath} - \RequirePackage{textalpha} - \def\hep@greek#1{% - \expandafter\let\csname math% - \expandafter\@gobble\string#1\endcsname=#1% - \edef#1{% - \noexpand\TextOrMath{% - \expandafter\noexpand\csname text% - \expandafter\@gobble\string#1\endcsname% - }{% - \noexpand\ifnum\noexpand\fam=0 - \noexpand\text{% - \expandafter\noexpand\csname text% - \expandafter\@gobble\string#1\endcsname% - }% - \noexpand\else - \expandafter\noexpand\csname math% - \expandafter\@gobble\string#1\endcsname% - \noexpand\fi - }% - }% - } - \hep@greek\alpha \hep@greek\beta \hep@greek\gamma - \hep@greek\delta \hep@greek\epsilon \hep@greek\zeta - \hep@greek\eta \hep@greek\theta \hep@greek\iota - \hep@greek\kappa \hep@greek\lambda \hep@greek\mu - \hep@greek\nu \hep@greek\xi \hep@greek\pi - \hep@greek\rho \hep@greek\sigma \hep@greek\tau - \hep@greek\upsilon \hep@greek\phi \hep@greek\chi - \hep@greek\psi \hep@greek\omega - \hep@greek\Gamma \hep@greek\Delta \hep@greek\Theta - \hep@greek\Lambda \hep@greek\Xi \hep@greek\Pi - \hep@greek\Sigma \hep@greek\Upsilon \hep@greek\Phi - \hep@greek\Psi \hep@greek\Omega - \ifxetexorluatex - % missing code - \else - \RequirePackage{substitutefont} - \substitutefont{LGR}{\rmdefault}{lmr} - \DeclareFontFamily{LGR}{\rmdefault}{} - \DeclareFontShape{LGR}{\rmdefault}{b}{n}{<->ssub*lmr/bx/n}{} - \DeclareFontShape{LGR}{\rmdefault}{b}{sc}{<->ssub*lmr/bx/sc}{} - \substitutefont{LGR}{\ttdefault}{lmtt} - \DeclareFontFamily{LGR}{\ttdefault}{} - \DeclareFontShape{LGR}{\ttdefault}{b}{n}{<->ssub*lmtt/bx/n}{} - \substitutefont{LGR}{\sfdefault}{lmss} - \DeclareFontFamily{LGR}{\sfdefault}{} - \DeclareFontShape{LGR}{\sfdefault}{b}{n}{<->ssub*lmss/bx/n}{} - \DeclareFontShape{LGR}{\sfdefault}{b}{sc}{<->ssub*lmss/bx/sc}{} - \fi - \ifhep@minion - \RequirePackage{MnSymbol} - \else - \RequirePackage{exscale} - \RequirePackage{amssymb} - \fi -\fi -\ifhep@serif - \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@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{\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{\mathtt}{OT1}{lmtt}{m}{n} - \SetMathAlphabet{\mathtt}{bold}{OT1}{lmtt}{bx}{n} - \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 +\RequirePackage[lining=\ifhep@lining true\else false \fi]{hep-font} +\RequirePackage[symbols=\hep@symbols]{hep-math-font} \ifhep@defaults\else \def\hep@remove@pt#1pt{#1} \edef\hep@pt@size{\expandafter\hep@remove@pt\hep@font} @@ -354,62 +127,6 @@ \let\Huge\relax \input{size\hep@pt@size.clo} \fi -\RequirePackage[\hep@lang]{babel} -\RequirePackage[autostyle]{csquotes} -\RequirePackage[normalem]{ulem} -\let\underline\uline -\ifnum\pdf@strcmp{\hep@lang}{american}=0 - \newcommand{\hep@lang@foreign}{USenglish} -\else - \ifnum\pdf@strcmp{\hep@lang}{USenglish}=0 - \newcommand{\hep@lang@foreign}{USenglish} - \else - \newcommand{\hep@lang@foreign}{british} - \fi -\fi -\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[.5]\textsc{#2}~#1}% -} -\providecommand{\online}[2]{\ttfamily{#2}}% -\newcommand{\hep@email}[1]{\online{mailto:#1}{#1}} -\providecommand\email{\hep@email} -\AtEndOfPackage{\@ifpackageloaded{hyperref}{% - \renewcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}% - }{} -} -\newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2} -\RequirePackage[inline]{enumitem} -\newlist{inlinelist}{enumerate*}{1} -\setlist*[inlinelist,1]{% - label=\roman*), itemjoin={,\ }, itemjoin*={, and\ }, after=.% -} -\newlist{enum@descript}{enumerate}{2} -\setlist[enum@descript]{label=\arabic*.} -\newenvironment{enumdescript}[1][]{ -\begin{enum@descript}[#1] - \let\hep@item\item - \renewcommand{\item}[2][]{ - \ifx&##1&\hep@item\else\hep@item[##1]\fi - \textbf{##2}\ifx##2\empty\else~\fi\@ifnextchar\par\@gobble\relax - } -}{\end{enum@descript}} -\RequirePackage{xparse} -\ExplSyntaxOn -\NewDocumentEnvironment{commalist}{O{\space}+b}{ - \hep@comma@list:n{#2} -}{#1} -\seq_new:N \hep@items@sequence -\cs_new_protected:Npn \hep@comma@list:n #1{ - \seq_set_split:Nnn \hep@items@sequence{\item}{#1} - \seq_pop_left:NN \hep@items@sequence \l_tmpa_tl - \seq_use:Nnnn \hep@items@sequence{~and~}{,~}{,~and~} -} -\ExplSyntaxOff \ifhep@defaults\else \RequirePackage{geometry} \geometry{\hep@paper paper, includeheadfoot} @@ -435,300 +152,16 @@ \fi } \fi -\ifhep@physics -\RequirePackage{mathtools} -\allowdisplaybreaks[1] -\thickmuskip=5mu plus 3mu minus 1mu -\medmuskip=4mu plus 2mu minus 3mu -\RequirePackage{xparse} -\DeclareDocumentCommand{\mathdef}{mO{0}m}{% - \expandafter\let\csname hep@text\string#1\endcsname=#1 - \expandafter\newcommand\csname hep@math\string#1\endcsname[#2]{#3} - \DeclareRobustCommand#1{% - \ifmmode - \expandafter\let\expandafter\next\csname% - hep@math\string#1\endcsname% - \else - \expandafter\let\expandafter\next\csname% - hep@text\string#1\endcsname% - \fi - \next - }% -} -\AtBeginDocument{\mathdef{\i}{\operatorname{i}}} -\RequirePackage{ulem} -\def\overline#1{{\renewcommand{\ULdepth}{-1.9ex}{}\uline{#1}}} -\DeclareRobustCommand{\over@line}[1]{\@@overline{#1}} -\mathdef{\overline}{\over@line} -\newcommand{\oset}[3][-1pt]{% - \text{\raisebox{.2ex}{$\mathop{#3}\limits^{% - \vbox to#1{\kern-2\ex@\hbox{$\scriptscriptstyle#2$}\vss}% - }$}}% -} -\newcommand{\overleftright}[1]{\oset{\leftrightarrow}{#1}} -\ifhep@eqnarray\else - \let\eqnarray\@undefined - \let\endeqnarray\@undefined -\fi -\DeclareMathOperator{\tr}{tr} -\DeclareMathOperator{\Tr}{Tr} -\DeclareMathOperator{\rank}{rank} -\DeclareMathOperator{\erf}{erf} -\DeclareMathOperator{\Res}{Res} -\DeclareMathOperator{\sgn}{sgn} -\DeclareMathOperator{\diag}{diag} - -\let\Re\relax\DeclareMathOperator{\Re}{Re} -\let\Im\relax\DeclareMathOperator{\Im}{Im} - -\let\cos\undefined\DeclareMathOperator{\cos}{cos\vphantom{i}} -\let\tan\undefined\DeclareMathOperator{\tan}{tan\vphantom{i}} -\DeclareMathOperator{\arccsc}{arccsc} -\DeclareMathOperator{\arcsec}{arcsec} -\DeclareMathOperator{\arccot}{arccot} -\DeclareMathOperator{\asin}{asin} -\DeclareMathOperator{\acos}{acos} -\DeclareMathOperator{\atan}{atan} -\DeclareMathOperator{\acsc}{acsc} -\DeclareMathOperator{\asec}{asec} -\DeclareMathOperator{\acot}{acot} -\DeclareMathOperator{\csch}{csch} -\DeclareMathOperator{\sech}{sech} -\RequirePackage{units} -\RequirePackage{xpatch} -\ifhep@lining\else - \xpatchcmd{\unit}{\else#1}{% - \else\ifthenelse{\boolean{mmode}}{#1}{\textl{#1}}% - }{}{} - \xpatchcmd{\unitfrac}{\else#1}{% - \else\ifthenelse{\boolean{mmode}}{#1}{\textl{#1}}% - }{}{} -\fi -\newcommand{\inv}[2][1]{#2\ensuremath{^{-#1}}} -\DeclarePairedDelimiterX{\hep@flatfrac}[2]{.}{.}{% - #1\delimsize/\makeleftdelim#2% -} -\NewDocumentCommand{\flatfrac}{somm}{% - \IfBooleanTF{#1}{% - \hep@flatfrac*{#3}{#4}% - }{% - \IfNoValueTF{#2}{\,\makeleftdelim#3/\makeleftdelim#4\,% - }{% - \hep@flatfrac[#2]{#3}{#4}% - }% - }% -} -\newcommand{\textfrac}[2]{\ensuremath{\nicefrac{\text{#1}}{\text{#2}}}} -\newcommand{\makedifferential}[1]{\mathop{}\!#1} -\providecommand{\differentialsymbol}{d} -\newcommand{\differential}{\makedifferential\differentialsymbol} -\AtBeginDocument{\mathdef{\d}{\differential}} - -\newcommand\makederivative[2]{ - \NewDocumentCommand{#1}{somso}{% - \IfBooleanTF{##4}{% - \IfBooleanTF{##1}{\nicefrac}{\frac}% - }{% - \IfBooleanTF{##1}{\flatfrac}{\dfrac}% - }{% - \makedifferential#2\IfValueT{##2}{^{##2}}\IfValueT{##5}{##5}% - }{% - \makedifferential#2{##3}\IfValueT{##2}{^{##2}}% - }% - } -} -\makederivative{\derivative}{d} -\newcommand\dv{\derivative} - -\newcommand\variation{\makedifferential\delta} -\newcommand\var{\variation} - -\makederivative{\functionalderivative}{\delta} -\newcommand\fdv{\functionalderivative} - -\RequirePackage{etoolbox} -\newcommand\makepartialderivative[2]{ - \NewDocumentCommand{#1}{sO{}O{}msoo}{% - \IfBooleanTF{##5}{% - \IfBooleanTF{##1}{\nicefrac}{\frac}% - }{% - \IfBooleanTF{##1}{\flatfrac}{\dfrac}% - }{% - \makedifferential#2\IfValueTF{##7}{% - \ifblank{##2}{ - \ifblank{##3}{^2}{^{\the\numexpr##3+1\relax}}% - }{% - \ifblank{##3}{% - ^{\the\numexpr##2+1\relax}}{^{{\the\numexpr##2+##3\relax}}% - }% - }% - }{\IfValueT{##2}{^{##2}}}\IfValueT{##6}{##6}% - }{% - \makedifferential#2{##4}\IfValueT{##2}{^{##2}}% - \IfValueT{##7}{#2##7\IfValueT{##3}{^{##3}}}% - }% - } -} - -\makepartialderivative{\partialderivative}{\partial} -\newcommand\pdv{\partialderivative} -\RequirePackage{cancel} -\RequirePackage{slashed} -\RequirePackage{mleftright} -\mleftright -\newcommand{\noargumentsymbol}{\:\cdot\:} -\newcommand{\optionalargument}[1]{\ifblank{#1}{\noargumentsymbol}{#1}} -\DeclarePairedDelimiterX\abs[1]\lvert\rvert{\optionalargument{#1}} -\DeclarePairedDelimiterX\norm[1]\lVert\rVert{\optionalargument{#1}} -\DeclarePairedDelimiterXPP\hep@pnorm[2]{}\lVert\rVert{_{#1}}{#2} -\NewDocumentCommand{\pnorm}{som}{% - \IfValueTF{#2}{% - \IfBooleanTF{#1}{\hep@pnorm*}{\hep@pnorm}{#2}% - }{% - \IfBooleanTF{#1}{\norm*}{\norm}% - }{\optionalargument{#3}}% -} - -\providecommand{\ordersymbol}{\mathcal{O}} -\DeclarePairedDelimiterXPP\order[1]{\ordersymbol}(){}{#1} - -\DeclarePairedDelimiter{\hep@evaluated}{.}{\rvert} -\NewDocumentCommand{\evaluated}{som}{% - \IfBooleanTF{#1}{% - \hep@evaluated*{#3}% - }{% - \IfNoValueTF{#2}{#3\rvert}{\hep@evaluated[#2]{#3}}% - }% -} -\newcommand\eval{\evaluated} - -\newcommand\makeleftdelim{\mathopen{}} -\providecommand{\midbar}[1][]{% - \nonscript\:#1\vert\allowbreak\nonscript\:\makeleftdelim% -} - -\providecommand\suchthat{\midbar} -\DeclarePairedDelimiterX\set[1]\{\}{% - \renewcommand\suchthat{\midbar[\delimsize]}#1% -} - -\providecommand{\probabilitysymbol}{\operatorname{Pr}} -\providecommand\given{\midbar} -\DeclarePairedDelimiterXPP\hep@Pr[1]{% - \probabilitysymbol}(){}{% - \renewcommand\given{\midbar[\delimsize]}#1% -} -\let\Pr\relax -\NewDocumentCommand{\Pr}{so}{% - \IfValueTF{#2}{% - \IfBooleanTF{#1}{\hep@Pr*}{\hep@Pr}{#2}% - }{% - \probabilitysymbol% - }% -} - -\DeclarePairedDelimiterX\innerproduct[2]{% - \langle}{\rangle}{\optionalargument{#1},\optionalargument{#2}% -} -\DeclarePairedDelimiterX\poissonbracket[2]{% - \lbrace}{\rbrace}{\optionalargument{#1},\optionalargument{#2}% -} -\newcommand\pb{\poissonbracket} -\DeclarePairedDelimiterX\commutator[2]{% - \lbrack}{\rbrack}{\optionalargument{#1},\optionalargument{#2}% -} -\newcommand\comm{\commutator} -\DeclarePairedDelimiterX\anticommutator[2]{% - \lbrace}{\rbrace}{\optionalargument{#1},\optionalargument{#2}% -} -\newcommand\acomm{\anticommutator} -\providecommand\braketspace{\mskip1mu} -\newcommand\hep@midvert{% - \braketspace\delimsize\vert\braketspace\makeleftdelim% -} -\DeclarePairedDelimiterX\braket[2]{\langle}{\rangle}{\braketspace#1\hep@midvert#2\braketspace} - -\DeclarePairedDelimiterXPP\hep@bra[1]{% - }{\langle}{\rvert}{\braketspace}{\braketspace#1\braketspace% -} -\NewDocumentCommand{\bra}{smt\ket sgt\ketbra sgg}{% - \IfBooleanTF{#6}{% - \IfBooleanTF{#1}{\braket*{#2}{#8}}{\braket{#2}{#8}}% - \IfBooleanTF{#7}{\bra*{#9}}{\bra{#9}}% - }{ - \IfBooleanTF{#3}{% - \IfBooleanTF{#1}{\braket*}{% - \IfBooleanTF{#4}{\braket*}{\braket}}{#2}{#5% - }% - }{% - \IfBooleanTF{#1}{\hep@bra*}{\hep@bra}{#2}% - }% - }% -} - -\DeclarePairedDelimiterXPP\ket[1]{% - \braketspace}{\lvert}{\rangle}{}{\braketspace\makeleftdelim#1\braketspace% -} - -\NewDocumentCommand{\ketbra}{smm}{% - \IfBooleanTF{#1}{% - \ket*{#2}\bra*{#3}% - }{% - \ket{#2}\bra{#3}% - }% -} - -\DeclarePairedDelimiterX\matrixelement[3]{% - \langle}{\rangle}{\braketspace#1\hep@midvert#2\hep@midvert#3\braketspace% -} -\newcommand\matrixel{\matrixelement} -\newcommand\mel{\matrixelement} - -\DeclarePairedDelimiterX\hep@expvalue[1]{\langle}{\rangle}{\braketspace#1\braketspace} -\NewDocumentCommand{\expectationvalue}{som}{% - \IfNoValueTF{#2}{% - \IfBooleanTF{#1}{\hep@expvalue*}{\hep@expvalue}{#3}% - }{% - \IfBooleanTF{#1}{\matrixelement*}{\matrixelement}{#2}{#3}{#2}% - }% -} -\newcommand\ev{\expectationvalue} -\newcommand\vev[1]{\expectationvalue[0]{#1}} -\fi -\setcounter{bottomnumber}{0} % 1 -\setcounter{topnumber}{1} % 2 -\setcounter{dbltopnumber}{1} % 2 -\renewcommand{\topfraction}{.9} % .7 -\renewcommand{\dbltopfraction}{.9} % .7 -\renewcommand{\textfraction}{.1} % .2 -\renewcommand{\floatpagefraction}{.8} % .5 -\let\hep@figure\figure% -\let\end@hep@figure\endfigure% -\let\hep@table\table% -\let\end@hep@table\endtable% -\ifhep@manualplacement% - \renewenvironment{figure}[1][tbp]{% - \hep@figure[#1]\centering% - }{\end@hep@figure}% - \renewenvironment{table}[1][tbp]{% - \hep@table[#1]\centering% - }{\end@hep@table}% -\else% - \renewenvironment{figure}[1][]{% - \hep@figure\centering% - }{\end@hep@figure}% - \renewenvironment{table}[1][]{% - \hep@table\centering% - }{\end@hep@table} -\fi% +\RequirePackage[lang=\hep@lang]{hep-text} +\ifhep@physics\RequirePackage{hep-math}\fi +\RequirePackage[ + manualplacement=\ifhep@manualplacement true\else false \fi +]{hep-float} \newif\ifhep@journal \ifhep@sissa\hep@journaltrue -\else - \ifhep@revtex\hep@journaltrue - \else - \ifhep@pos\hep@journaltrue - \else - \ifhep@springer\hep@journaltrue +\else\ifhep@revtex\hep@journaltrue + \else\ifhep@pos\hep@journaltrue + \else\ifhep@springer\hep@journaltrue \else\hep@journalfalse \fi \fi @@ -749,35 +182,6 @@ \vskip\belowcaptionskip% } \fi -\RequirePackage[subrefformat=parens]{subcaption} -\captionsetup{font=small} -\captionsetup[sub]{font=small} -\providecommand*\subcaption@minipage[2]{% - \minipage#1{#2}\setcaptionsubtype\relax% -} -\newcommand{\hep@panels@space}{20} -\newenvironment{panels}[2][b]{% - \newcommand{\begin@subcaption@minipage}[2][b]{% - \caption@withoptargs\subcaption@minipage[##1]{##2}% - \centering\vskip 0pt% - } - \ifdim#2pt>1pt% - \newcommand{\hep@panel@space}{% - (1-#2+\hep@panels@space)/\hep@panels@space% - }% - \newcommand{\panel}[1][b]{% - \endminipage\hfill\begin@subcaption@minipage[#1]{% - \linewidth/#2*\hep@panel@space% - }% - }% - \begin@subcaption@minipage[#1]{\linewidth/#2*\hep@panel@space}% - \else% - \newcommand{\panel}[2][b]{% - \endminipage\hfill\begin@subcaption@minipage[#1]{##2\linewidth}% - }% - \begin@subcaption@minipage[#1]{#2\linewidth}% - \fi% -}{\endminipage} \ifhep@revtex \RequirePackage{ragged2e} \DeclareCaptionFormat{revtex}{#1#2\justifying{#3}} @@ -786,423 +190,10 @@ \renewcommand{\figurename}{Figure} \renewcommand{\tablename}{Table} \fi -\RequirePackage{booktabs} -\RequirePackage{multirow} - -\RequirePackage{graphicx} -\providecommand{\tikzsetnextfilename}[1]{} -\newcommand{\graphic}[2][1]{\tikzsetnextfilename{#2}{% - \centering\includegraphics[width=#1\linewidth]{#2}\par% -}} -\newcommand{\graphics}[1]{\graphicspath{{./#1/}}} -\newif\ifhep@first% -\newif\ifnewaffil% -\ifhep@title -\newcommand{\hep@multi@ref}[1]{% - \hep@firsttrue% - \forcsvlist{% - \ifhep@first\hep@firstfalse\else\textsuperscript,\fi\ref% - }{#1}% -} -\renewcommand{\email}[2][]{\unskip\thanks[#1]{\hep@email{#2}}}% -\AtBeginDocument{ - \let\hep@maketitle\maketitle - \renewcommand\maketitle{\hep@maketitle\let\email\hep@email} -} -\let\hep@preprint@font\relax -\newcommand{\preprintfont}[1]{\def\hep@preprint@font{#1}} -\preprintfont{\scshape\small} -\let\hep@preprint\relax -\newcommand\preprint[1]{\def\hep@preprint{#1}} -\RequirePackage{varwidth} -\newcommand{\hep@preprint@box}{% - \begin{varwidth}{\textwidth}% - \hep@preprint@font\hep@preprint% - \end{varwidth}% -} -\RequirePackage{atbegshi} -\RequirePackage{picture} -\newcommand{\placepreprint}{% - \AtBeginShipoutFirst{% - \put( - \textwidth+\oddsidemargin-\widthof{\hep@preprint@box}, - -2pt-\topmargin-\heightof{\hep@preprint@box} - ){\normalfont\hep@preprint@box} - } -} -\newcommand{\preseries}[1]{\def\hep@pre@series{#1}} -\newcommand{\series}[1]{\def\hep@series{#1}} -\newcommand{\postseries}[1]{\def\hep@post@series{#1}} -\let\hep@series@font\relax -\newcommand{\seriesfont}[1]{\def\hep@series@font{#1}} -\preseries{\begin{center}\Large\hep@series@font} -\postseries{\par\end{center}} -\RequirePackage{titling} -\setlength{\thanksmarkwidth}{1.5em} -\renewcommand{\maketitlehooka}{% - \placepreprint\vspace{-\bigskipamount}% - \@ifundefined{hep@series}{}{% - \hep@pre@series\hep@series\hep@post@series% - }% - \vspace{-\bigskipamount}% -} -\let\hep@title@font\relax -\newcommand{\titlefont}[1]{\def\hep@title@font{#1}} -\pretitle{\begin{center}\LARGE\hep@title@font} -\posttitle{\par\end{center}} - -\newcommand{\presubtitle}[1]{\def\hep@pre@sub@title{#1}} -\newcommand{\subtitle}[1]{\def\hep@sub@title{#1}} -\newcommand{\postsubtitle}[1]{\def\hep@post@sub@title{#1}} - -\let\hep@subtitle@font\relax -\newcommand{\subtitlefont}[1]{\def\hep@subtitle@font{#1}} -\presubtitle{\begin{center}\Large\hep@subtitle@font} -\postsubtitle{\par\end{center}} -\RequirePackage{authblk} -\newcounter{editors} -\newcommand\hep@editorlist{} -\newcommand\hep@editors{} -\newcommand\editor[2][]{% - \ifnewaffil% - \addtocounter{affil}{1}% - \edef\AB@thenote{\arabic{affil}}% - \fi% - \if\relax#1\relax% - \def\AB@note{\AB@thenote}% - \else% - \def\AB@note{#1}\setcounter{Maxaffil}{0}% - \fi% - \ifnum\value{editors}>1\relax% - \@namedef{@sep\number\c@editors}{\Authsep}% - \fi% - \addtocounter{editors}{1}% - \begingroup% - \let\protect\@unexpandable@protect \let\and\AB@pand% - \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}% - \@temptokena=\expandafter{\hep@editors}{% - \def\\{% - \protect\\[\@affilsep]\protect\Affilfont\protect\AB@resetsep% - }% - \xdef\hep@editor{\AB@blk@and#2}% - \ifnewaffil% - \gdef\AB@las{}\gdef\AB@lasx{\protect\Authand}\gdef\AB@as{}% - \xdef\hep@editors{\the\@temptokena\AB@blk@and}% - \else% - \xdef\hep@editors{\the\@temptokena\AB@as\AB@au@str}% - \global\let\AB@las\AB@lasx\gdef\AB@lasx{\protect\Authands}% - \gdef\AB@as{\Authsep}% - \fi% - \gdef\AB@au@str{#2}% - }% - \@temptokena=\expandafter{\hep@editorlist}% - \let\\=\editorcr% - \xdef\hep@editorlist{% - \the\@temptokena% - \protect\@nameuse{@sep\number\c@editors}% - \protect\Authfont#2% - \if\relax#1\relax\else% - \protect\hep@multi@ref{\AB@note}% - \fi% - }% - \endgroup% - \ifnum\value{editors}>2\relax% - \@namedef{@sep\number\c@editors}{\Authands}% - \fi% - \newaffilfalse% -} -\let\hep@editor@font\relax -\newcommand{\editorfont}[1]{\def\hep@editor@font{#1}} -\newcommand{\preeditor}[1]{\def\hep@pre@editor{#1}} -\newcommand{\posteditor}[1]{\def\hep@post@editor{#1}} -\newcommand{\editortitle}[2]{ - \def\hep@editor@title{#1} - \def\hep@editor@title@pl{#2} -} -\newcommand{\editortitlefont}[1]{\def\hep@editor@title@font{#1}} -\newcommand{\preeditortitle}[1]{\def\hep@pre@editor@title{#1}} -\newcommand{\posteditortitle}[1]{\def\hep@post@editor@title{#1}} -\editortitle{Editor}{Editors} -\editortitlefont{\itshape} -\preeditortitle{\hep@editor@title@font} -\posteditortitle{: } -\preeditor{% - \begin{center}% - \large\hep@editor@font\lineskip.5em% - \begin{tabular}[t]{c}{% - \hep@pre@editor@title% - \ifnum\value{editors}>1\relax% - \hep@editor@title@pl% - \else% - \hep@editor@title% - \fi% - \hep@post@editor@title% - }% -} -\posteditor{\end{tabular}\par\end{center}} -\renewcommand{\maketitlehookb}{% - \@ifundefined{hep@sub@title}{}{% - \hep@pre@sub@title\hep@sub@title\hep@post@sub@title% - }% - \smallskip% - \ifx\hep@editorlist\AB@empty\else% - \hep@pre@editor\hep@editorlist\hep@post@editor% - \fi -} -\xpatchcmd{\author}{% - \protect\Authfont#2\AB@authnote{\AB@note}% -}{% - \protect\Authfont#2% - \if\relax#1\relax\else\unskip\protect\hep@multi@ref{\AB@note}\fi% -}{}{} -\let\hep@author@font\relax -\newcommand{\authorfont}[1]{\def\hep@author@font{#1}} -\renewcommand\Authfont{\hep@author@font} -\newcommand{\authortitle}[2]{ - \def\hep@author@title{#1} - \def\hep@author@title@pl{#2} -} -\newcommand{\authortitlefont}[1]{\def\hep@author@title@font{#1}} -\newcommand{\preauthortitle}[1]{\def\hep@pre@author@title{#1}} -\newcommand{\postauthortitle}[1]{\def\hep@post@author@title{#1}} -\authortitle{Author}{Authors} -\authortitlefont{\itshape} -\preauthortitle{\hep@author@title@font} -\postauthortitle{: } -\preauthor{% - \begin{center}% - \large\hep@author@font\lineskip.5em% - \begin{tabular}[t]{c}{% - \ifnum\value{editors}>0\relax% - \hep@pre@author@title% - \ifnum\value{authors}>1\relax% - \hep@author@title@pl\else\hep@author@title% - \fi\hep@post@author@title% - \fi% - }% -} -\postauthor{\end{tabular}\par\end{center}} -\newcounter{affiliation} -\renewcommand{\theaffiliation}{% - \textsuperscript{\normalfont\alph{affiliation}}% -} -\xpatchcmd{\affil}{% - \AB@affilnote{\AB@note}% -}{% - \protect\refstepcounter{affiliation}\protect\label{\AB@note}% - \if\relax#1\relax\else\protect\ref{\AB@note}\fi% -}{}{} -\let\hep@affiliation@font\relax -\newcommand{\affiliationfont}[1]{\def\hep@affiliation@font{#1}} -\ifhep@lining - \renewcommand{\Affilfont}{\small\hep@affiliation@font} -\else - \renewcommand{\Affilfont}{\small\ostyle\hep@affiliation@font} -\fi -\newcommand\hep@penalty{\if@twocolumn85\else50\fi} -\newcommand\hep@active@comma{,\penalty-\hep@penalty\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\hep@affil@opt[#1]#2{% - \endgroup\@flushglue=0pt plus .5\linewidth\affil[#1]{#2}% -} -\DeclareRobustCommand\hep@affiliation{% - \@ifnextchar[{\hep@affil@opt}{\hep@affil}% -} -\newcommand{\affiliation}{% - \begingroup\hep@cat@comma@active\hep@affiliation% -} -\date{\vspace{-4ex}} -\let\hep@date@font\relax -\newcommand{\datefont}[1]{\def\hep@date@font{#1}} -\predate{\begin{center}\hep@date@font} -\postdate{\par\end{center}} -\@ifundefined{abstract}{}{% - \let\hep@abstract\abstract% - \renewcommand\abstract{\hep@abstract\noindent\ignorespaces}% - \if@twocolumn - \RequirePackage{environ} - \RequirePackage{abstract} - \renewcommand{\abstitleskip}{-3ex} - \NewEnviron{abstract*}{% - \twocolumn[\maketitle\vspace{-5ex}% - \begin{onecolabstract}\noindent\BODY\end{onecolabstract}% - \vspace{.5cm}]\saythanks% - }% - \else - \newenvironment{abstract*}{% - \maketitle\begin{abstract}% - }{% - \end{abstract}% - } - \fi -} -\let\hep@thanks\thanks -\AtEndDocument{\let\thanks\hep@thanks} -\DeclareRobustCommand\thanks[2][]{% - \AfterEndPreamble{% - \if\relax#1\relax% - \footnotemark% - \else% - \renewcommand\thefootnote{\textsuperscript{\@fnsymbol\c@footnote}}% - \protect\refstepcounter{footnote}\protect\label{#1}% - \renewcommand\thefootnote{\@arabic\c@footnote}% - \fi% - \protected@xdef\@thanks{% - \@thanks\protect\footnotetext[\the\c@footnote]{#2}% - } - \if@twocolumn - \protected@xdef\@bs@thanks{% - \@bs@thanks\protect\footnotetext[\the\c@footnote]{#2}% - }% - \fi% - }% -} -\fi - +\ifhep@title\RequirePackage{hep-title}\fi +\RequirePackage{pdftexcmds} \ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else -\RequirePackage[style=\hep@bibliography, datamodel=hep-paper]{biblatex} -\providecommand{\DeclareSortingTemplate}{\DeclareSortingScheme} -\DeclareSortingTemplate{hep-paper}{ - \sort{\citeorder} - \sort[final]{\field{sortkey}} - \sort{\field{sortyear} \field{year} \literal{9999}} - \sort{\field{month}} - \sort{\field{eprint} \field{doi}} - \sort{\field{sorttitle} \field{title}} - \sort{\field{subtitle} \field{volume}} -} -\ExecuteBibliographyOptions{ - sorting=hep-paper, - safeinputenc, - giveninits=true, - maxbibnames=7 -} -\ifhep@journal\else - \if@twocolumn - \AtBeginBibliography{\small} - \setlength\biblabelsep{\labelsep} - \fi -\fi -\DefineBibliographyStrings{english}{translationof={Original}} -\NewBibliographyString{erratum,erratums} -\DefineBibliographyStrings{english}{erratum={Erratum},erratums={Errata}} -\providecommand{\relateddelimerratum}{\addsemicolon\space} -\DefineBibliographyExtras{british}{\def\finalandcomma{\addcomma}} -\renewcommand{\subtitlepunct}{\addcolon\addspace} -\let\hep@printbibliography\printbibliography -\renewcommand{\printbibliography}{\sloppy\hep@printbibliography} - -\newcommand{\reg@exp@one}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}} -\newcommand{\reg@exp@two}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}} -\newcommand{\reg@exp@url}{\regexp{\A(ht|f)tp(s)?:\/\/}} -\newcommand{\reg@exp@pmc}{\regexp{\A(PMC)?}} -\DeclareSourcemap{% - \maps[datatype=bibtex, overwrite=true]{% - \map{% - \step[fieldsource=Collaboration, final=true]% - \step[fieldset=collaboration, origfieldval, final=true] - }% - \map{% - \step[fieldsource=reportNumber, final=true]% - \step[fieldset=reportnumber, origfieldval, final=true] - }% - \map[overwrite]{ - \pertype{article} - \step[fieldsource=volume, match=\reg@exp@one, final] - \step[fieldsource=volume, match=\reg@exp@two, replace={$2}] - \step[fieldsource=journal, fieldtarget=journaltitle] - \step[fieldset=journaltitle, fieldvalue={\space$1$2}, append=true] - } - \map{ - \step[fieldsource=url, final=true] - \step[fieldset=protocollessurl, origfieldval, final=true] - \step[fieldsource=protocollessurl, match=\reg@exp@url, replace={}] - } - \map{ - \step[fieldsource=pmcid, final=true] - \step[fieldset=pmc, origfieldval, final=true] - \step[fieldsource=pmc, match=\reg@exp@pmc, replace={}] - } - }% -} -\providecommand{\letbibmacro}[2]{\csletcs{abx@macro@#1}{abx@macro@#2}} -\renewbibmacro*{author/translator+others}{% - \ifboolexpr{ - test \ifuseauthor and ( - not test {\ifnameundef{author}} or - not test {\iffieldundef{collaboration}} - ) - } - {\usebibmacro{author}} - {\usebibmacro{translator+others}} -} -\letbibmacro{hep@bib@author}{author} -\renewbibmacro*{author}{% - \iffieldundef{collaboration}{% - \usebibmacro{hep@bib@author}}{\textit{\printfield{collaboration}}% - }% -} -\renewbibmacro*{in:}{% - \iffieldundef{journaltitle}{}{\printtext{\bibstring{in}\intitlepunct}}% -} -\DeclareFieldFormat{reportnumber}{% - \edef\commalistbody{\forcsvfield{% - \egroup\noexpand\item\unexpanded{\bgroup\smaller[.5]\textsc} - }{reportnumber}}% - \expandafter\commalist\commalistbody\egroup\endcommalist% -} -\DeclareFieldFormat{url}{% - \mkbibacro{URL}\addcolon\space\online{#1}{\thefield{protocollessurl}}% -} -\newcommand{\bib@online}[2]{% - \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}% -} -\DeclareFieldFormat{pmid}{% - \mkbibacro{PM}\addcolon\space% - \bib@online{https://www.ncbi.nlm.nih.gov/pubmed/#1}{#1}% -} -\DeclareFieldFormat{pmc}{% - \mkbibacro{PMC}\addcolon\space% - \bib@online{https://www.ncbi.nlm.nih.gov/pmc/articles/PMC#1}{#1}% -} -\letbibmacro{hep-doi+eprint+url}{doi+eprint+url} -\renewbibmacro*{doi+eprint+url}{% - \usebibmacro{hep-doi+eprint+url} - \iffieldundef{pmc}{% - \iffieldundef{pmid}{}{\printfield{pmid}\newunit}% - }{\printfield{pmc}\newunit} - \iffieldundef{reportnumber}{}{% - \newunitpunct\textnumero\intitlepunct% - \printfield{reportnumber}\newunit% - }% -} - -\NewDocumentCommand{\new@eprint}{smm}{ - \DeclareFieldFormat{eprint:#2}{% - \newcommand{\@path}{\IfBooleanT{#1}{\thefield{eprintclass}/}##1}% - #2\addcolon\space\bib@online{#3/\@path}{\@path}% - }% -} -\new@eprint{CTAN}{https://ctan.org/pkg} -\DeclareFieldAlias{eprint:ctan}{eprint:CTAN} -\new@eprint*{GitHub}{https://github.com} -\DeclareFieldAlias{eprint:github}{eprint:GitHub} -\new@eprint*{GitLab}{https://gitlab.com} -\DeclareFieldAlias{eprint:gitlab}{eprint:GitLab} -\new@eprint*{Bitbucket}{https://bitbucket.org} -\DeclareFieldAlias{eprint:bitbucket}{eprint:Bitbucket} -\new@eprint{Launchpad}{https://launchpad.net} -\DeclareFieldAlias{eprint:launchpad}{eprint:Launchpad} -\new@eprint{SourceForge}{https://sourceforge.net/projects} -\DeclareFieldAlias{eprint:launchpad}{eprint:SourceForge} -\DeclareFieldFormat{eprint:hepforge}{% - HEPForge\addcolon\space\bib@online{https://#1/hepforge.org}{#1}% -} -\DeclareFieldAlias{eprint:HEPForge}{eprint:hepforge} + \RequirePackage[style=\hep@bibliography]{hep-bibliography} \fi \RequirePackage{hyperref} @@ -1284,183 +275,7 @@ \let\hep@cite\cite \renewcommand\cite{\no@break@before\hep@cite} -\ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else -\NewBibliographyString{refname} -\NewBibliographyString{refsname} -\DefineBibliographyStrings{english}{% - refname = {reference}, - refsname = {references} -} -\DeclareCiteCommand{\ccite}{% - \ifnum\thecitetotal=1 - \bibstring{refname}% - \else% - \bibstring{refsname}% - \fi% - \addnbspace\bibopenbracket% - \usebibmacro{cite:init}\usebibmacro{prenote}% -}{\usebibmacro{citeindex}\usebibmacro{cite:comp}}{}{% - \usebibmacro{cite:dump}\usebibmacro{postnote}% - \bibclosebracket% -} - -\newrobustcmd*{\Ccite}{\bibsentence\ccite} -\fi - -\ifhep@glossaries -\RequirePackage[nostyles]{glossaries-extra} -\setabbreviationstyle{long-hyphen-short-hyphen} -\glsenableentrycount -\glssetcategoryattribute{abbreviation}{entrycount}{1} -\AtEndOfPackage{ - \@ifpackageloaded{hyperref}{ - \providecommand{\glsxtrusefield}[2]{\@gls@entry@field{#1}{#2}} - \providecommand{\glsxtrsetfieldifexists}[3]{\glsdoifexists{#1}{#3}} - \providecommand{\gGlsXtrSetField}[3]{% - \glsxtrsetfieldifexists{#1}{#2}{% - \csgdef{glo@\glsdetoklabel{#1}@#2}{#3}% - }% - } - \glssetcategoryattribute{abbreviation}{nohyperfirst}{true} - \renewcommand*{\glsdonohyperlink}[2]{{% - \glsxtrprotectlinks\edef\fieldvalue{% - \glsxtrusefield{\glslabel}{hastarget}% - }% - \ifdefstring\fieldvalue{true}{#2}{% - \gGlsXtrSetField{\glslabel}{hastarget}{true}% - \glsdohypertarget{#1}{#2}% - }% - }} - }{\providecommand{\pdfstringdefDisableCommands}[1]{}} -} -\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, - sort=#3, - \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}, - longplural=\IfNoValueTF{#6}{#5s}{#6} - ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#5} - \expandafter\newcommand\csname#3\endcsname[1][]{% - \if@begin@of@sentence{% - \ifglsused{#3}{\cgls{#3}[##1]}{\cGls{#3}[##1]}% - }{\cgls{#3}[##1]}% - \ifnum\glsentrycurrcount{#3}>1\relax - \IfBooleanTF{#4}{}{\@\xspace}% - \else\@\xspace\fi - } - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% - \IfNoValueTF{#2}{#3}{#2} }% - } - \expandafter\mathdef\csname#3\endcsname{% - \text{\glsxtrshort{#3}}\@gls@increment@currcount{#3}% - } - \expandafter\newcommand\csname#3s\endcsname[1][]{% - \if@begin@of@sentence{\cGlspl{#3}[##1]}{\cglspl{#3}[##1]}% - \IfBooleanTF{#4}{}{\@\xspace}% - } - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% - \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% - } - \expandafter\mathdef\csname#3s\endcsname{% - \text{\glsxtrshortpl{#3}}\@gls@increment@currcount{#3}% - } -} -\NewDocumentCommand{\shortacronym}{somsmo}{ - \expandafter\newcommand\csname#3\endcsname[1][]{% - \IfNoValueTF{#2}{#3}{#2}\IfBooleanTF{#4}{}{\@\xspace}##1% - } - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% - \IfNoValueTF{#2}{#3}{#2} }% - } - \expandafter\mathdef\csname#3\endcsname{% - \text{\IfNoValueTF{#2}{#3}{#2}}% - } - \expandafter\newcommand\csname#3s\endcsname[1][]{% - \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}% - \IfBooleanTF{#4}{}{\@\xspace}##1% - } - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% - \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% - } - \expandafter\mathdef\csname#3s\endcsname{% - \text{\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}}% - }% -} -\NewDocumentCommand{\longacronym}{somsmo}{ - \expandafter\newcommand\csname#3\endcsname[1][]{% - \if@begin@of@sentence{\MakeUppercase#5}{#5}% - \IfBooleanTF{#4}{}{\@\xspace}##1% - } - \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#5 }} - \expandafter\newcommand\csname#3s\endcsname[1][]{% - \if@begin@of@sentence{% - \IfNoValueTF{#6}{\MakeUppercase#5s}{\MakeUppercase#6}% - }{% - \IfNoValueTF{#6}{#5s}{#6}}\IfBooleanTF{#4}{}{\@\xspace}##1% - } - \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% - \IfNoValueTF{#6}{#5s}{#6} }% - } -} -\renewcommand*{\@gls@write@entrycounts}{% - \immediate\write\@auxout{% - \string\providecommand*{\string\@gls@entry@count}[2]{} - }% - \count@=0\relax - \forallglsentries{\@glsentry}{% - \glshasattribute{\@glsentry}{entrycount}{% - \ifglsused{\@glsentry}{% - \immediate\write\@auxout{% - \string\@gls@entry@count{\@glsentry}{% - \glsentrycurrcount{\@glsentry}% - } - }% - }{}\advance\count@ by \@ne - }{}% - }% -} -\newcommand{\resetacronym}[1]{\protect\glsreset{#1}} -\newcommand{\dummyacronym}[1]{\protect\glsunset{#1}} -\@ifundefined{endabstract}{}{% - \let\end@hep@abstract\endabstract% - \renewcommand\endabstract{\glsresetall\end@hep@abstract}% -} -\let\hep@table@of@contents\tableofcontents -\renewcommand\tableofcontents{% - \glsunsetall\hep@table@of@contents\glsresetall% -} -\let\hep@list@of@figures\listoffigures -\renewcommand\listoffigures{% - \glsunsetall\hep@list@of@figures\glsresetall% -} -\let\hep@list@of@tables\listoftables -\renewcommand\listoftables{% - \glsunsetall\hep@list@of@tables\glsresetall% -} -\NewDocumentCommand{\acronyms}{om}{% - \IfNoValueTF{#1}{ - \newglossary{#2}{#2.in}{#2.out}{#2}% - \renewcommand{\acronymtype}{#2}% - }{ - \newglossary{#1}{#1.in}{#1.out}{#2}% - \renewcommand{\acronymtype}{#1}% - } -} -\fi +\ifhep@glossaries\RequirePackage{hep-acronym}\fi \endinput %% |