From 98fbc49a186b505a7d34b7a5c887cd489c04fffa Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 1 Dec 2020 22:35:25 +0000 Subject: hep-paper (1dec20) git-svn-id: svn://tug.org/texlive/trunk@57045 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/hep-paper/hep-paper.dbx | 2 +- .../texmf-dist/tex/latex/hep-paper/hep-paper.sty | 131 ++++++++++++++++----- 2 files changed, 100 insertions(+), 33 deletions(-) (limited to 'Master/texmf-dist/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 b938786aa26..721e3334576 100644 --- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx @@ -15,7 +15,7 @@ %% and version 1.3c or later is part of all distributions of %% LaTeX version 2005/12/01 or later. -\ProvidesFile{hep-paper.dbx}[2020/10/01 v1.5 HEP-Paper biblatex data model] +\ProvidesFile{hep-paper.dbx}[2020/12/01 v1.6 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 3aeb445e722..a27325928df 100644 --- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty @@ -16,7 +16,7 @@ %% LaTeX version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{hep-paper}[2020/10/01 v1.5 Publications in High Energy Physics] +\ProvidesPackage{hep-paper}[2020/12/01 v1.6 Publications in High Energy Physics] \RequirePackage{pdftexcmds} \RequirePackage{kvoptions} @@ -33,7 +33,9 @@ \DeclareComplementaryOption{parskip}{parindent} \DeclareStringOption[true]{symbols} \DeclareBoolOption[false]{defaults} +\DeclareBoolOption[false]{lining} \DeclareBoolOption[true]{title} +\DeclareBoolOption[true]{physics} \DeclareStringOption[numeric-comp]{bibliography} \DeclareBoolOption[true]{glossaries} \DeclareBoolOption[true]{references} @@ -42,6 +44,7 @@ \DeclareBoolOption[false]{jhep} \DeclareBoolOption[false]{jcap} \DeclareBoolOption[false]{pos} +\DeclareBoolOption[false]{springer} \DeclareBoolOption[false]{eqnarray} \DeclareBoolOption[false]{manualplacement} \ProcessKeyvalOptions* @@ -57,6 +60,13 @@ \@ifclasswith{\hep@class}{executivepaper}{% \setkeys{hep}{paper=executive}% }{} +\@ifclassloaded{svjour}{\setkeys{hep}{springer}}{} +\@ifclassloaded{svjour2}{\setkeys{hep}{springer}}{} +\@ifclassloaded{svjour3}{\setkeys{hep}{springer}}{} +\ifhep@springer + \setkeys{hep}{defaults, title=false} + \let\cl@chapter\undefined +\fi \@ifclassloaded{PoS}{\setkeys{hep}{pos}}{} \ifhep@pos \setkeys{hep}{defaults, title=false} @@ -66,6 +76,7 @@ \ifhep@beamer \setkeys{hep}{defaults, title=false, references=false, sansserif} \@ifpackageloaded{beamerbasefont}{\usefonttheme{professionalfonts}}{} + \setbeamertemplate{navigation symbols}{} \fi \@ifclassloaded{revtex4}{\setkeys{hep}{revtex}}{} \@ifclassloaded{revtex4-1}{\setkeys{hep}{revtex}}{} @@ -90,6 +101,7 @@ linkcolor=blue, menucolor=blue, pagecolor=blue }{hyperref} \PassOptionsToPackage{reset}{geometry} + \AtBeginDocument{\renewcommand{\foreignabbrfont}{}} \fi \ifhep@jhep \voffset 0in @@ -115,10 +127,20 @@ \fi \RequirePackage[\hep@encoding]{fontenc} \RequirePackage{fix-cm} -\RequirePackage{lmodern} -\renewcommand{\ttdefault}{lmvtt} -\RequirePackage{textcomp} \RequirePackage{microtype} +\ifhep@lining + \RequirePackage[rm={lining},sf={lining},tt={lining}]{cfr-lm} +\else + \RequirePackage{cfr-lm} +\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}[ @@ -128,25 +150,29 @@ SmallCapsFont={[cmunbx.otf]} } ] - \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{} - \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->cmssbxcsc10}{} - \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{% + \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 - \DeclareFontShape{\hep@encoding}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{} - \DeclareFontShape{\hep@encoding}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{} + \hep@rm@fontshape{b}{sc}{<->ssub*cmr/bx/sc}{} + \hep@rm@fontshape{bx}{sc}{<->ssub*cmr/bx/sc}{} \sffamily - \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->ssub*xcmss/bx/sc}{} - \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->ssub*xcmss/bx/sc}{} - \DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{} + \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}{} \fi \ifxetexorluatex\else \RequirePackage[utf8]{inputenc} \fi \RequirePackage[\hep@lang]{babel} -\RequirePackage{csquotes} +\RequirePackage[autostyle]{csquotes} \RequirePackage[normalem]{ulem} \let\underline\uline \ifhep@defaults\else @@ -179,10 +205,10 @@ \newcommand{\no}[1]{\textnumero~#1} \RequirePackage{relsize} \newcommand{\software}[2][\hspace{-\fontdimen2\font}]{% - {\smaller\textsc{#2}~#1}% + {\smaller[.5]\textsc{#2}~#1}% } \newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}} -\newcommand{\email}[1]{\online{mailto:#1}{#1}} +\providecommand{\email}[1]{\online{mailto:#1}{#1}} \newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2} \RequirePackage[inline]{enumitem} @@ -203,13 +229,14 @@ \ifhep@defaults\else \RequirePackage{geometry} - \geometry{% - \hep@paper paper, - hscale=.75, - vscale=.8, - vmarginratio=3:4, - includeheadfoot - } + \geometry{\hep@paper paper, includeheadfoot} + \if@twocolumn + \geometry{hscale=.85, vscale=.925, vmarginratio=1:1} + \geometry{headsep=2ex, footskip=6ex} + \setlength{\columnsep}{1.1em} + \else + \geometry{hscale=.75, vscale=.8, vmarginratio=3:4} + \fi \fi \ifhep@parindent\else \RequirePackage{parskip} @@ -260,8 +287,20 @@ \newif\ifhep@minion \ifnum\pdf@strcmp{\hep@symbols}{minion}=0 \hep@miniontrue\fi \ifhep@symbols - \RequirePackage{alphabeta} \RequirePackage{fixmath} + \RequirePackage{alphabeta} + \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*cmtt/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}{} \ifhep@minion \RequirePackage{MnSymbol} \else @@ -335,18 +374,21 @@ \fi \fi +\ifhep@physics \RequirePackage{physics} \RequirePackage{cancel} \RequirePackage{slashed} \RequirePackage{units} +\newcommand{\textfrac}[2]{\ensuremath{\nicefrac{\text{#1}}{\text{#2}}}} \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}% - }}}% + \text{\raisebox{.2ex}{$\mathop{#3}\limits^{% + \vbox to#1{\kern-2\ex@\hbox{$\scriptscriptstyle#2$}\vss}% + }$}}% } \newcommand{\overleftright}[1]{\oset{\leftrightarrow}{#1}} +\fi \setcounter{bottomnumber}{0} % 1 \setcounter{topnumber}{1} % 2 @@ -381,7 +423,10 @@ \ifhep@revtex\hep@journaltrue \else \ifhep@pos\hep@journaltrue - \else\hep@journalfalse + \else + \ifhep@springer\hep@journaltrue + \else\hep@journalfalse + \fi \fi \fi \fi @@ -465,9 +510,11 @@ \hep@pre@sub@title\sub@title\hep@post@sub@title% }% } +\titlefont{\ifhep@serif\tistyle\else\qtstyle\fi} \pretitle{\begin{center}\LARGE\hep@title@font} \posttitle{\par\end{center}} -\presubtitle{\begin{center}\large\hep@subtitle@font} +\subtitlefont{\ifhep@serif\tistyle\else\qtstyle\fi} +\presubtitle{\begin{center}\Large\hep@subtitle@font} \postsubtitle{\par\end{center}} \preauthor{% \begin{center}\large\hep@author@font\lineskip.5em\begin{tabular}[t]{c}% @@ -484,7 +531,8 @@ \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}% \hep@author } -\newcommand\hep@active@comma{,\penalty-5\relax} +\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]{% @@ -505,10 +553,10 @@ \RequirePackage{varwidth} \newcommand{\hep@preprint@box}{% \begin{varwidth}{\textwidth}% - \small\hep@preprint@font\hep@preprint% + \smaller[.5]\hep@preprint@font\hep@preprint% \end{varwidth}% } -\preprintfont{\sc} +\preprintfont{\scshape} \RequirePackage{atbegshi} \RequirePackage{picture} \newcommand{\placepreprint}{% @@ -525,6 +573,18 @@ \let\hep@abstract\abstract% \renewcommand\abstract{\hep@abstract\noindent\ignorespaces}% } +\if@twocolumn + \RequirePackage{environ} + \RequirePackage{abstract} + \renewcommand{\abstitleskip}{-3ex} + \NewEnviron{abstract*}{% + \twocolumn[\maketitle\vspace{-1.5cm}% + \begin{onecolabstract}\noindent\BODY\end{onecolabstract}% + \vspace{.5cm}]\saythanks% + } +\else + \newenvironment{abstract*}{\maketitle\begin{abstract}}{\end{abstract}} +\fi \fi \ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else @@ -541,8 +601,15 @@ } \ExecuteBibliographyOptions{ sorting=hep-paper, + safeinputenc, giveninits=true } +\ifhep@journal\else + \if@twocolumn + \AtBeginBibliography{\small} + \setlength\biblabelsep{\labelsep} + \fi +\fi \NewBibliographyString{erratum,erratums} \DefineBibliographyStrings{english}{erratum={Erratum},erratums={Errata}} \providecommand{\relateddelimerratum}{\addsemicolon\space} @@ -623,7 +690,7 @@ }{\printfield{pmc}\newunit} \iffieldundef{reportnumber}{}{% \newunitpunct\textnumero\intitlepunct% - \textsc{\small\printfield{reportnumber}}% + \textsc{\smaller[.5]\printfield{reportnumber}}% \newunit% }% } -- cgit v1.2.3