summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hep-paper
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-01 21:05:52 +0000
committerKarl Berry <karl@freefriends.org>2020-10-01 21:05:52 +0000
commit28d70ffa5a628286c6163e1384abbbcdf6936be9 (patch)
tree2cd716a072eb484315ebc962ab6098b6709229c8 /Master/texmf-dist/tex/latex/hep-paper
parent71dabe8fbb2ff927963cba1108207c58dd3bc098 (diff)
hep-paper (1oct20)
git-svn-id: svn://tug.org/texlive/trunk@56503 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hep-paper')
-rw-r--r--Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx3
-rw-r--r--Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty218
2 files changed, 153 insertions, 68 deletions
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,