diff options
author | Karl Berry <karl@freefriends.org> | 2021-06-02 20:58:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-06-02 20:58:46 +0000 |
commit | 3b90242ab28c1c59546d3cf26e0663803f397407 (patch) | |
tree | 518a210a55e22932ab1cf177f2e30a6a7313e3ab /Master/texmf-dist/tex | |
parent | 8e7ec775b87d1a9b5fef20b5fd8d5b13dcedf0a5 (diff) |
hep-paper (2jun21)
git-svn-id: svn://tug.org/texlive/trunk@59436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-acronyms.sty | 190 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-bibliography.sty | 184 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty | 327 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-paper/hep-title.sty | 230 |
5 files changed, 871 insertions, 69 deletions
diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-acronyms.sty b/Master/texmf-dist/tex/latex/hep-paper/hep-acronyms.sty new file mode 100644 index 00000000000..a7b9da527ed --- /dev/null +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-acronyms.sty @@ -0,0 +1,190 @@ +%% +%% This is file `hep-acronyms.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hep-paper-implementation.dtx (with options: `acronyms') +%% This is a generated file. +%% Copyright (C) 2019-2020 by Jan Hajer +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in: +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{hep-acronyms}[2021/06/01 v1.7 Acronym macros for publications in High Energy Physics] + +\RequirePackage{xparse} +\DeclareDocumentCommand{\mathdef}{mO{0}m}{% + \expandafter\let\csname text\string#1\endcsname=#1 + \expandafter\newcommand\csname math\string#1\endcsname[#2]{#3} + \DeclareRobustCommand#1{% + \ifmmode + \expandafter\let\expandafter\next\csname math\string#1\endcsname + \else + \expandafter\let\expandafter\next\csname text\string#1\endcsname + \fi + \next + }% +} +\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}% +}} +\usepackage{xspace} +\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}% + } +} + +\endinput +%% +%% End of file `hep-acronyms.sty'. diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-bibliography.sty b/Master/texmf-dist/tex/latex/hep-paper/hep-bibliography.sty new file mode 100644 index 00000000000..20199eb5968 --- /dev/null +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-bibliography.sty @@ -0,0 +1,184 @@ +%% +%% This is file `hep-bibliography.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hep-paper-implementation.dtx (with options: `bibliography') +%% This is a generated file. +%% Copyright (C) 2019-2020 by Jan Hajer +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in: +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{hep-bibliography}[2021/06/01 v1.7 Bibliography macros for publications in High Energy Physics] + +\providecommand{\online}[2]{\ttfamily{#2}}% +\providecommand{\email}[1]{\online{mailto:#1}{#1}} +\AtEndOfPackage{\@ifpackageloaded{hyperref}{% + \renewcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}% + }{} +} +\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 +\def\hep@bibliography{numeric-comp} +\newif\ifhep@journal\hep@journalfalse +\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}}% +} +\RequirePackage{relsize} +\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} + +\endinput +%% +%% End of file `hep-bibliography.sty'. 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 721e3334576..2665065e3d7 100644 --- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx @@ -15,14 +15,17 @@ %% and version 1.3c or later is part of all distributions of %% LaTeX version 2005/12/01 or later. -\ProvidesFile{hep-paper.dbx}[2020/12/01 v1.6 HEP-Paper biblatex data model] +\ProvidesFile{hep-paper.dbx}[2021/06/01 v1.7 HEP-Paper biblatex data model] \DeclareDatamodelFields[type=field, datatype=literal]{ - collaboration, reportnumber, pmid, pmcid, pmc, + collaboration, pmid, pmcid, pmc, +} +\DeclareDatamodelFields[type=field, format=xsv, datatype=literal]{ + reportnumber, } \DeclareDatamodelFields[type=field, datatype=uri]{protocollessurl} \DeclareDatamodelEntryfields{ - collaboration, reportnumber, pmid, pmcid, pmc, protocollessurl, + collaboration, pmid, pmcid, pmc, reportnumber, protocollessurl, } \endinput diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty index a27325928df..f66ba6e8180 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/12/01 v1.6 Publications in High Energy Physics] +\ProvidesPackage{hep-paper}[2021/06/01 v1.7 Publications in High Energy Physics] \RequirePackage{pdftexcmds} \RequirePackage{kvoptions} @@ -29,11 +29,12 @@ \DeclareStringOption[british]{lang} \DeclareBoolOption[true]{serif} \DeclareComplementaryOption{sansserif}{serif} +\DeclareBoolOption[true]{lining} +\DeclareComplementaryOption{oldstyle}{lining} \DeclareBoolOption[true]{parindent} \DeclareComplementaryOption{parskip}{parindent} \DeclareStringOption[true]{symbols} \DeclareBoolOption[false]{defaults} -\DeclareBoolOption[false]{lining} \DeclareBoolOption[true]{title} \DeclareBoolOption[true]{physics} \DeclareStringOption[numeric-comp]{bibliography} @@ -128,10 +129,15 @@ \RequirePackage[\hep@encoding]{fontenc} \RequirePackage{fix-cm} \RequirePackage{microtype} -\ifhep@lining - \RequirePackage[rm={lining},sf={lining},tt={lining}]{cfr-lm} +\ifxetexorluatex + \RequirePackage{nfssext-cfr} + \RequirePackage{lmodern} \else - \RequirePackage{cfr-lm} + \ifhep@lining + \RequirePackage[rm={lining},sf={lining},tt={lining}]{cfr-lm} + \else + \RequirePackage{cfr-lm} + \fi \fi \RequirePackage{etoolbox} \RequirePackage{textcomp} @@ -158,8 +164,13 @@ }{} \else \rmfamily + \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}{} \sffamily \hep@sf@fontshape{m}{sc}{<->ssub*xcmss/m/sc}{} \hep@sf@fontshape{b}{sc}{<->ssub*xcmss/bx/sc}{} @@ -167,6 +178,10 @@ \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} @@ -207,8 +222,12 @@ \newcommand{\software}[2][\hspace{-\fontdimen2\font}]{% {\smaller[.5]\textsc{#2}~#1}% } -\newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}} +\providecommand{\online}[2]{\ttfamily{#2}}% \providecommand{\email}[1]{\online{mailto:#1}{#1}} +\AtEndOfPackage{\@ifpackageloaded{hyperref}{% + \renewcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}% + }{} +} \newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2} \RequirePackage[inline]{enumitem} @@ -226,6 +245,18 @@ \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} @@ -255,6 +286,8 @@ \RequirePackage{mathtools} \allowdisplaybreaks[1] +\thickmuskip=5mu plus 3mu minus 1mu +\medmuskip=4mu plus 2mu minus 3mu \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\sgn}{sgn} \RequirePackage{xparse} @@ -290,17 +323,21 @@ \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}{} + \ifxetexorluatex + % missing code + \else + \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}{} + \fi \ifhep@minion \RequirePackage{MnSymbol} \else @@ -378,7 +415,35 @@ \RequirePackage{physics} \RequirePackage{cancel} \RequirePackage{slashed} +\DeclareDocumentCommand\evaluated{sgd[|d(|}{% + \IfNoValueTF{#2}{% + \IfNoValueTF{#3}{% + \IfNoValueTF{#4}{\argopen.\argclose\rvert}{% + \IfBooleanTF{#1}{\vphantom{#4}}{}% + \left(\IfBooleanTF{#1}{\smash{#4}}{#4}\right\rvert% + }% + }{% + \IfBooleanTF{#1}{\vphantom{#3}}{}% + \left[\IfBooleanTF{#1}{\smash{#3}}{#3}\right\rvert% + \IfNoValueTF{#4}{}{(#4|}% + }% + }{% + \IfBooleanTF{#1}{\vphantom{#2}}{}% + \left.\IfBooleanTF{#1}{\smash{#2}}{#2}\right\rvert% + \IfNoValueTF{#3}{}{[#3|}\IfNoValueTF{#4}{}{(#4|}% + }% +} + \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{\textfrac}[2]{\ensuremath{\nicefrac{\text{#1}}{\text{#2}}}} \newcommand{\inv}[2][1]{#2\ensuremath{^{-#1}}} \AtBeginDocument{\mathdef{\d}{\dd}} @@ -451,16 +516,22 @@ \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}% + \endminipage\hfill\begin@subcaption@minipage[#1]{% + \linewidth/#2*\hep@panel@space% + }% }% - \begin@subcaption@minipage[#1]{\linewidth/#2}% + \begin@subcaption@minipage[#1]{\linewidth/#2*\hep@panel@space}% \else% \newcommand{\panel}[2][b]{% \endminipage\hfill\begin@subcaption@minipage[#1]{##2\linewidth}% @@ -487,33 +558,38 @@ }} \newcommand{\graphics}[1]{\graphicspath{{./#1/}}} +\newif\ifhep@first% +\newif\ifnewaffil% \ifhep@title -\date{} +\date{\vspace{-4ex}} \RequirePackage{titling} +\setlength{\thanksmarkwidth}{1.5em} \let\hep@preprint@font\relax \newcommand{\preprintfont}[1]{\def\hep@preprint@font{#1}} +\let\hep@series@font\relax +\newcommand{\seriesfont}[1]{\def\hep@series@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@editor@font\relax +\newcommand{\editorfont}[1]{\def\hep@editor@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{\preseries}[1]{\def\hep@pre@series{#1}} +\newcommand{\series}[1]{\def\hep@series{#1}} +\newcommand{\postseries}[1]{\def\hep@post@series{#1}} \newcommand{\presubtitle}[1]{\def\hep@pre@sub@title{#1}} -\newcommand{\subtitle}[1]{\def\sub@title{#1}} +\newcommand{\subtitle}[1]{\def\hep@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% - }% -} -\titlefont{\ifhep@serif\tistyle\else\qtstyle\fi} +\preseries{\begin{center}\Large\hep@series@font} +\postseries{\par\end{center}} \pretitle{\begin{center}\LARGE\hep@title@font} \posttitle{\par\end{center}} -\subtitlefont{\ifhep@serif\tistyle\else\qtstyle\fi} \presubtitle{\begin{center}\Large\hep@subtitle@font} \postsubtitle{\par\end{center}} \preauthor{% @@ -522,10 +598,101 @@ \postauthor{\end{tabular}\par\end{center}} \predate{\begin{center}\hep@date@font} \postdate{\par\end{center}} -\author{} +\newcounter{editors} +\newcommand\hep@editorlist{} +\newcommand\hep@editors{} +\newcommand{\hep@multi@ref}[1]{% + \hep@firsttrue% + \forcsvlist{% + \ifhep@first\hep@firstfalse\else\textsuperscript,\fi\ref% + }{#1}% +} \RequirePackage{authblk} -\renewcommand{\Affilfont}{\small\hep@affiliation@font} +\newcommand\editor[2][]{% + \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}% + \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% +} +\newcommand{\preeditor}[1]{\def\hep@pre@editor{#1}} +\newcommand{\posteditor}[1]{\def\hep@post@editor{#1}} +\preeditor{\begin{center}\large\hep@editor@font\lineskip.5em + \ifnum\value{editors}>1\relax Editors\else Editor\fi: +} +\posteditor{\par\end{center}} +\renewcommand{\maketitlehookb}{% + \@ifundefined{hep@sub@title}{}{% + \hep@pre@sub@title\hep@sub@title\hep@post@sub@title% + }% + \ifx\hep@editorlist\AB@empty\else% + \hep@pre@editor\hep@editorlist\hep@post@editor% + \fi +} +\ifhep@lining + \renewcommand{\Affilfont}{\small\hep@affiliation@font} +\else + \renewcommand{\Affilfont}{\small\ostyle\hep@affiliation@font} +\fi \renewcommand\Authfont{\hep@author@font} +\newcounter{affiliation} +\renewcommand{\theaffiliation}{% + \textsuperscript{\normalfont\arabic{affiliation}}% +} +\xpatchcmd{\author}{% + \protect\Authfont#2\AB@authnote{\AB@note}% +}{% + \protect\Authfont#2% + \if\relax#1\relax\else\protect\hep@multi@ref{\AB@note}\fi% +}{}{} +\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@author\author \def\author{% \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}% @@ -547,7 +714,6 @@ \newcommand{\affiliation}{% \begingroup\hep@cat@comma@active\hep@affiliation% } - \let\hep@preprint\relax \newcommand\preprint[1]{\def\hep@preprint{#1}} \RequirePackage{varwidth} @@ -567,7 +733,12 @@ ){\normalfont\hep@preprint@box} } } -\renewcommand{\maketitlehooka}{\placepreprint\vspace{-\bigskipamount}} +\renewcommand{\maketitlehooka}{% + \placepreprint\vspace{-\bigskipamount}% + \@ifundefined{hep@series}{}{% + \hep@pre@series\hep@series\hep@post@series% + }% +} \@ifundefined{abstract}{}{% \let\hep@abstract\abstract% @@ -578,7 +749,7 @@ \RequirePackage{abstract} \renewcommand{\abstitleskip}{-3ex} \NewEnviron{abstract*}{% - \twocolumn[\maketitle\vspace{-1.5cm}% + \twocolumn[\maketitle\vspace{-5ex}% \begin{onecolabstract}\noindent\BODY\end{onecolabstract}% \vspace{.5cm}]\saythanks% } @@ -602,7 +773,8 @@ \ExecuteBibliographyOptions{ sorting=hep-paper, safeinputenc, - giveninits=true + giveninits=true, + maxbibnames=7 } \ifhep@journal\else \if@twocolumn @@ -610,9 +782,12 @@ \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} @@ -631,6 +806,7 @@ \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] @@ -668,6 +844,12 @@ \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}}% } @@ -690,8 +872,7 @@ }{\printfield{pmc}\newunit} \iffieldundef{reportnumber}{}{% \newunitpunct\textnumero\intitlepunct% - \textsc{\smaller[.5]\printfield{reportnumber}}% - \newunit% + \printfield{reportnumber}\newunit% }% } @@ -726,6 +907,7 @@ pdfcreator={}, pdfproducer={} } \pdfstringdefDisableCommands{\def\varepsilon{\textepsilon}} +\pdfstringdefDisableCommands{\def\to{\textrightarrow}} \AtBeginDocument{ \pdfstringdefDisableCommands{\let\ensuremath\@gobble} \pdfstringdefDisableCommands{\let\mathsurround\@gobble} @@ -745,7 +927,7 @@ \AtBeginDocument{\hypersetup{pdfauthor=\AB@authlist}} \else \ifhep@beamer\else - \AtBeginDocument{\hypersetup{pdfauthor={\@author}}} + \ifhep@pos\else\AtBeginDocument{\hypersetup{pdfauthor={\@author}}}\fi \fi \fi @@ -785,6 +967,14 @@ \DeclareRobustCommand{\labelcrefrange}[2]{% \@crefrangenostar{labelcref}{#1}{#2}% } +\ifhep@title + \labelcrefmultiformat{affiliation}{#2#1#3}{% + \textsuperscript,#2#1#3}{\textsuperscript,#2#1#3% + }{% + \textsuperscript,#2#1#3% + } + \labelcrefrangeformat{affiliation}{#3#1#4\textsuperscript{--}#5#2#6} +\fi \fi \let\hep@cite\cite @@ -814,25 +1004,30 @@ \ifhep@glossaries \RequirePackage[nostyles]{glossaries-extra} +\setabbreviationstyle{long-hyphen-short-hyphen} \glsenableentrycount \glssetcategoryattribute{abbreviation}{entrycount}{1} -\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}% - }% +\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]{}} } -\glssetcategoryattribute{abbreviation}{nohyperfirst}{true} -\renewcommand*{\glsdonohyperlink}[2]{{% - \glsxtrprotectlinks\edef\fieldvalue{% - \glsxtrusefield{\glslabel}{hastarget}% - }% - \ifdefstring\fieldvalue{true}{#2}{% - \gGlsXtrSetField{\glslabel}{hastarget}{true}% - \glsdohypertarget{#1}{#2}% - }% -}} \RequirePackage[excludeor]{everyhook} \newcommand{\begin@sentence}{1001} \PushPostHook{par}{{\spacefactor=\begin@sentence}} @@ -854,10 +1049,10 @@ \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}, longplural=\IfNoValueTF{#6}{#5s}{#6} ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#5} - \expandafter\newcommand\csname#3\endcsname{% + \expandafter\newcommand\csname#3\endcsname[1][]{% \if@begin@of@sentence{% - \ifglsused{#3}{\cgls{#3}}{\cGls{#3}}% - }{\cgls{#3}}% + \ifglsused{#3}{\cgls{#3}[##1]}{\cGls{#3}[##1]}% + }{\cgls{#3}[##1]}% \ifnum\glsentrycurrcount{#3}>1\relax \IfBooleanTF{#4}{}{\@\xspace}% \else\@\xspace\fi @@ -868,8 +1063,8 @@ \expandafter\mathdef\csname#3\endcsname{% \text{\glsxtrshort{#3}}\@gls@increment@currcount{#3}% } - \expandafter\newcommand\csname#3s\endcsname{% - \if@begin@of@sentence{\cGlspl{#3}}{\cglspl{#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{% @@ -880,8 +1075,8 @@ } } \NewDocumentCommand{\shortacronym}{somsmo}{ - \expandafter\newcommand\csname#3\endcsname{% - \IfNoValueTF{#2}{#3}{#2}\IfBooleanTF{#4}{}{\@\xspace}% + \expandafter\newcommand\csname#3\endcsname[1][]{% + \IfNoValueTF{#2}{#3}{#2}\IfBooleanTF{#4}{}{\@\xspace}##1% } \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{% \IfNoValueTF{#2}{#3}{#2} }% @@ -889,9 +1084,9 @@ \expandafter\mathdef\csname#3\endcsname{% \text{\IfNoValueTF{#2}{#3}{#2}}% } - \expandafter\newcommand\csname#3s\endcsname{% + \expandafter\newcommand\csname#3s\endcsname[1][]{% \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}% - \IfBooleanTF{#4}{}{\@\xspace}% + \IfBooleanTF{#4}{}{\@\xspace}##1% } \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }% @@ -901,16 +1096,16 @@ }% } \NewDocumentCommand{\longacronym}{somsmo}{ - \expandafter\newcommand\csname#3\endcsname{% + \expandafter\newcommand\csname#3\endcsname[1][]{% \if@begin@of@sentence{\MakeUppercase#5}{#5}% - \IfBooleanTF{#4}{}{\@\xspace}% + \IfBooleanTF{#4}{}{\@\xspace}##1% } \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#5 }} - \expandafter\newcommand\csname#3s\endcsname{% + \expandafter\newcommand\csname#3s\endcsname[1][]{% \if@begin@of@sentence{% \IfNoValueTF{#6}{\MakeUppercase#5s}{\MakeUppercase#6}% }{% - \IfNoValueTF{#6}{#5s}{#6}}\IfBooleanTF{#4}{}{\@\xspace}% + \IfNoValueTF{#6}{#5s}{#6}}\IfBooleanTF{#4}{}{\@\xspace}##1% } \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{% \IfNoValueTF{#6}{#5s}{#6} }% diff --git a/Master/texmf-dist/tex/latex/hep-paper/hep-title.sty b/Master/texmf-dist/tex/latex/hep-paper/hep-title.sty new file mode 100644 index 00000000000..6a9c236ac0e --- /dev/null +++ b/Master/texmf-dist/tex/latex/hep-paper/hep-title.sty @@ -0,0 +1,230 @@ +%% +%% This is file `hep-title.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hep-paper-implementation.dtx (with options: `title') +%% This is a generated file. +%% Copyright (C) 2019-2020 by Jan Hajer +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. The latest version of this license is in: +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{hep-title}[2021/06/01 v1.7 Title macros for publications in High Energy Physics] + +\providecommand{\online}[2]{\ttfamily{#2}}% +\providecommand{\email}[1]{\online{mailto:#1}{#1}} +\AtEndOfPackage{\@ifpackageloaded{hyperref}{% + \renewcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}% + }{} +} +\newif\ifhep@first% +\date{\vspace{-4ex}} +\RequirePackage{titling} +\setlength{\thanksmarkwidth}{1.5em} +\let\hep@preprint@font\relax +\newcommand{\preprintfont}[1]{\def\hep@preprint@font{#1}} +\let\hep@series@font\relax +\newcommand{\seriesfont}[1]{\def\hep@series@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@editor@font\relax +\newcommand{\editorfont}[1]{\def\hep@editor@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{\preseries}[1]{\def\hep@pre@series{#1}} +\newcommand{\series}[1]{\def\hep@series{#1}} +\newcommand{\postseries}[1]{\def\hep@post@series{#1}} +\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}} +\preseries{\begin{center}\Large\hep@series@font} +\postseries{\par\end{center}} +\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}} +\newcounter{editors} +\newcommand\hep@editorlist{} +\newcommand\hep@editors{} +\newcommand{\hep@multi@ref}[1]{% + \hep@firsttrue% + \forcsvlist{% + \ifhep@first\hep@firstfalse\else\textsuperscript,\fi\ref% + }{#1}% +} +\RequirePackage{authblk} +\newcommand\editor[2][]{% + \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}% + \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% +} +\newcommand{\preeditor}[1]{\def\hep@pre@editor{#1}} +\newcommand{\posteditor}[1]{\def\hep@post@editor{#1}} +\preeditor{\begin{center}\large\hep@editor@font\lineskip.5em + \ifnum\value{editors}>1\relax Editors\else Editor\fi: +} +\posteditor{\par\end{center}} +\renewcommand{\maketitlehookb}{% + \@ifundefined{hep@sub@title}{}{% + \hep@pre@sub@title\hep@sub@title\hep@post@sub@title% + }% + \ifx\hep@editorlist\AB@empty\else% + \hep@pre@editor\hep@editorlist\hep@post@editor% + \fi +} +\newif\ifhep@lining\hep@liningtrue +\ifhep@lining + \renewcommand{\Affilfont}{\small\hep@affiliation@font} +\else + \renewcommand{\Affilfont}{\small\ostyle\hep@affiliation@font} +\fi +\renewcommand\Authfont{\hep@author@font} +\newcounter{affiliation} +\renewcommand{\theaffiliation}{% + \textsuperscript{\normalfont\arabic{affiliation}}% +} +\RequirePackage{xpatch} +\xpatchcmd{\author}{% + \protect\Authfont#2\AB@authnote{\AB@note}% +}{% + \protect\Authfont#2% + \if\relax#1\relax\else\protect\hep@multi@ref{\AB@note}\fi% +}{}{} +\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@author\author +\def\author{% + \renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}% + \hep@author +} +\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% +} +\let\hep@preprint\relax +\newcommand\preprint[1]{\def\hep@preprint{#1}} +\RequirePackage{varwidth} +\RequirePackage{relsize} +\newcommand{\hep@preprint@box}{% + \begin{varwidth}{\textwidth}% + \smaller[.5]\hep@preprint@font\hep@preprint% + \end{varwidth}% +} +\preprintfont{\scshape} +\RequirePackage{calc} +\RequirePackage{atbegshi} +\RequirePackage{picture} +\newcommand{\placepreprint}{% + \AtBeginShipoutFirst{% + \put( + \textwidth+\oddsidemargin-\widthof{\hep@preprint@box}, + -2pt-\topmargin-\heightof{\hep@preprint@box} + ){\normalfont\hep@preprint@box} + } +} +\renewcommand{\maketitlehooka}{% + \placepreprint\vspace{-\bigskipamount}% + \@ifundefined{hep@series}{}{% + \hep@pre@series\hep@series\hep@post@series% + }% +} + +\@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 + +\endinput +%% +%% End of file `hep-title.sty'. |