summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hep-paper
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-01 21:34:50 +0000
committerKarl Berry <karl@freefriends.org>2020-09-01 21:34:50 +0000
commit702ea1a475d8ae525aca8ca610b0497254ba513f (patch)
tree438d6319fa302f452917720d3b23adb35bf3f804 /Master/texmf-dist/tex/latex/hep-paper
parent84b22db625f6573c289357aa78ba29ac2a2339fa (diff)
hep-paper (1sep20)
git-svn-id: svn://tug.org/texlive/trunk@56236 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.dbx11
-rw-r--r--Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty347
2 files changed, 223 insertions, 135 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 aa450a9d6ca..d19b0be720e 100644
--- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx
+++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% hep-paper.dtx (with options: `datamodel')
+%% hep-paper-implementation.dtx (with options: `datamodel')
%% This is a generated file.
%% Copyright (C) 2019-2020 by Jan Hajer
%% This file may be distributed and/or modified under the
@@ -14,17 +14,14 @@
%% 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/05/01 v1.3 HEP-Paper biblatex data model]
+\ProvidesFile{hep-paper.dbx}[2020/08/01 v1.4 HEP-Paper biblatex data model]
\DeclareDatamodelFields[type=field, datatype=literal]{
- reportnumber,
- collaboration,
+ collaboration, reportnumber, pmid, pmcid, pmc,
}
\DeclareDatamodelFields[type=field, datatype=uri]{protocollessurl}
\DeclareDatamodelEntryfields{
- reportnumber,
- collaboration,
- protocollessurl,
+ collaboration, reportnumber, pmid, pmcid, pmc, 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 de375a04761..3885186def3 100644
--- a/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty
+++ b/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% hep-paper.dtx (with options: `package')
+%% hep-paper-implementation.dtx (with options: `package')
%% This is a generated file.
%% Copyright (C) 2019-2020 by Jan Hajer
%% This file may be distributed and/or modified under the
@@ -15,7 +15,7 @@
%% 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/05/01 v1.3 Publications in High Energy Physics]
+\ProvidesPackage{hep-paper}[2020/08/01 v1.4 Publications in High Energy Physics]
\RequirePackage{pdftexcmds}
\RequirePackage{kvoptions}
@@ -25,28 +25,41 @@
}
\DeclareStringOption[a4]{paper}
\DeclareStringOption[11pt]{font}
-\DeclareBoolOption[false]{defaults}
\DeclareStringOption[british]{lang}
-\DeclareBoolOption[true]{parindent}
-\DeclareComplementaryOption{parskip}{parindent}
\DeclareBoolOption[true]{serif}
\DeclareComplementaryOption{sansserif}{serif}
-\DeclareBoolOption[false]{eqnarray}
+\DeclareBoolOption[true]{parindent}
+\DeclareComplementaryOption{parskip}{parindent}
+\DeclareBoolOption[false]{defaults}
+\DeclareBoolOption[true]{title}
\DeclareStringOption[numeric-comp]{bibliography}
\DeclareBoolOption[true]{glossaries}
-\DeclareBoolOption[false]{manualplacement}
-\DeclareBoolOption[true]{title}
+\DeclareBoolOption[true]{references}
+\DeclareBoolOption[false]{beamer}
\DeclareBoolOption[false]{revtex}
\DeclareBoolOption[false]{jhep}
\DeclareBoolOption[false]{jcap}
\DeclareBoolOption[false]{pos}
+\DeclareBoolOption[false]{eqnarray}
+\DeclareBoolOption[false]{manualplacement}
\ProcessKeyvalOptions*
+\@ifclassloaded{PoS}{\setkeys{hep}{pos}}{}
\ifhep@pos
- \setkeys{hep}{title=false, defaults}
+ \setkeys{hep}{defaults, title=false}
+ \DeclareRobustCommand\boldmath{\@nomath\boldmath\mathversion{bold}}
+\fi
+\@ifclassloaded{beamer}{\setkeys{hep}{beamer}}{}
+\ifhep@beamer
+ \setkeys{hep}{defaults, title=false, references=false, sansserif}
\fi
+\@ifclassloaded{revtex4}{\setkeys{hep}{revtex}}{}
+\@ifclassloaded{revtex4-1}{\setkeys{hep}{revtex}}{}
+\@ifclassloaded{revtex4-2}{\setkeys{hep}{revtex}}{}
\ifhep@revtex
- \setkeys{hep}{defaults, title=false, lang=american, bibliography=false}
+ \setkeys{hep}{defaults, title=false, bibliography=false, lang=american}
\fi
+\@ifpackageloaded{jheppub}{\setkeys{hep}{jhep}}{}
+\@ifpackageloaded{jcappub}{\setkeys{hep}{jcap}}{}
\newif\ifhep@sissa
\ifhep@jhep\hep@sissatrue
\else
@@ -61,10 +74,18 @@
urlcolor=blue, anchorcolor=blue, citecolor=blue, filecolor=blue,
linkcolor=blue, menucolor=blue, pagecolor=blue
}{hyperref}
- \hoffset 0pt
- \voffset 0pt
+ \PassOptionsToPackage{reset}{geometry}
+\fi
+\ifhep@jhep
+ \voffset 0in
+ \hoffset 0in
\fi
+\RequirePackage{alphabeta}
+\ifhep@serif\else
+ \RequirePackage{sansmathfonts}
+ \renewcommand\familydefault{\sfdefault}
+\fi
\RequirePackage{ifluatex}
\RequirePackage{ifxetex}
\newif\ifxetexorluatex
@@ -74,30 +95,38 @@
\else\xetexorluatexfalse
\fi
\fi
-
-\RequirePackage{alphabeta}
-\ifhep@serif\else
- \RequirePackage{sansmathfonts}
- \renewcommand\familydefault{\sfdefault}
-\fi
\ifxetexorluatex
- \def\@encoding{TU}
+ \def\hep@encoding{TU}
\else
- \def\@encoding{T1}
+ \def\hep@encoding{T1}
\fi
-\RequirePackage[\@encoding]{fontenc}
+\RequirePackage[\hep@encoding]{fontenc}
+\RequirePackage{fix-cm}
\RequirePackage{lmodern}
\RequirePackage{textcomp}
\RequirePackage{microtype}
\ifxetexorluatex
- \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
- \DeclareFontShape{\@encoding}{lmss}{m}{sc}{%
+ \RequirePackage{fontspec}
+ \setmainfont{Latin Modern Roman}[
+ UprightFeatures={SmallCapsFont={[lmromancaps10-regular.otf]}},
+ BoldFeatures={
+ SmallCapsFeatures={Letters=SmallCaps},
+ SmallCapsFont={[cmunbx.otf]}
+ }
+ ]
+ \DeclareFontShape{\hep@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{b}{sc}{<->cmssbxcsc10}{}
+ \DeclareFontShape{\hep@encoding}{lmss}{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}{}
\sffamily
- \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->ssub*xcmss/bx/sc}{}
- \DeclareFontShape{\@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{}
+ \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}{}
\fi
\ifxetexorluatex\else
@@ -105,11 +134,11 @@
\fi
\RequirePackage[\hep@lang]{babel}
\RequirePackage{csquotes}
-\RequirePackage{soul}
-\let\underline\ul
+\RequirePackage[normalem]{ulem}
+\let\underline\uline
\ifhep@defaults\else
- \def\remove@pt#1pt{#1}
- \edef\@ptsize{\expandafter\remove@pt\hep@font}
+ \def\hep@remove@pt#1pt{#1}
+ \edef\hep@pt@size{\expandafter\hep@remove@pt\hep@font}
\let\small\relax
\let\footnotesize\relax
\let\scriptsize\relax
@@ -119,7 +148,7 @@
\let\LARGE\relax
\let\huge\relax
\let\Huge\relax
- \input{size\@ptsize.clo}
+ \input{size\hep@pt@size.clo}
\fi
\ifnum\pdf@strcmp{\hep@lang}{american}=0
@@ -151,19 +180,22 @@
\setlist[enum@descript]{label=\arabic*.}
\newenvironment{enumdescript}[1][]{
\begin{enum@descript}[#1]
- \let\old@item\item
+ \let\hep@item\item
\renewcommand{\item}[2][]{
- \ifx&##1&\old@item\else\old@item[##1]\fi
+ \ifx&##1&\hep@item\else\hep@item[##1]\fi
\textbf{##2}\ifx##2\empty\else~\fi\@ifnextchar\par\@gobble\relax
}
}{\end{enum@descript}}
-\let\@foot@note\footnote
-\renewcommand{\footnote}[1]{\unskip\@foot@note{\ignorespaces#1}}
-
\ifhep@defaults\else
- \RequirePackage[\hep@paper paper]{geometry}
- \geometry{hscale=.75, vscale=.8, vmarginratio=3:4, includeheadfoot}
+ \RequirePackage{geometry}
+ \geometry{%
+ \hep@paper paper,
+ hscale=.75,
+ vscale=.8,
+ vmarginratio=3:4,
+ includeheadfoot
+ }
\fi
\ifhep@parindent\else
@@ -186,6 +218,7 @@
\allowdisplaybreaks[1]
\DeclareMathOperator{\diag}{diag}
+\DeclareMathOperator{\sgn}{sgn}
\RequirePackage{xparse}
\DeclareDocumentCommand{\mathdef}{mO{0}m}{%
@@ -203,38 +236,42 @@
\AtBeginDocument{\mathdef{\i}{\operatorname{i}}}
-\def\overline#1{{\setul{-2ex}{}\ul{#1}}}
+\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
-\newcommand{\bmmax}{2}
+\ifhep@serif\providecommand{\bmmax}{2}\else\providecommand{\bmmax}{1}\fi
\RequirePackage{bm}
\let\mathbf\bm
\g@addto@macro\bfseries{\boldmath}
\ifhep@serif
\RequirePackage{fixmath}
- \DeclareMathAlphabet{\mathsf}{OML}{cmbr}{m}{it}
- \SetMathAlphabet{\mathsf}{bold}{OML}{cmbr}{bx}{it}
+ \newcommand\hep@sf@font{cmbr}
\else
\RequirePackage[slantedGreek]{sfmath}
\RequirePackage{sansmathfonts}
- \DeclareMathAlphabet{\mathsf}{OML}{cmm}{m}{it}
- \SetMathAlphabet{\mathsf}{bold}{OML}{cmm}{bx}{it}
+ \newcommand\hep@sf@font{cmm}
\fi
-\RequirePackage{mathrsfs}
-\RequirePackage{bbm}
+\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
- \let\mathbb\mathbbm
+ \newcommand\hep@bb@font{dsrom}
\else
- \let\mathbb\mathbbmss
+ \newcommand\hep@bb@font{dsss}
\fi
+\SetMathAlphabet{\mathbb}{normal}{U}{\hep@bb@font}{m}{n}
\RequirePackage{physics}
+\RequirePackage{cancel}
\RequirePackage{slashed}
\RequirePackage{units}
@@ -249,11 +286,13 @@
}
\newcommand{\overleftright}[1]{\oset{\leftrightarrow}{#1}}
-\renewcommand{\textfraction}{0.01}
-\setcounter{topnumber}{1}
-\renewcommand{\topfraction}{.9}
-\setcounter{bottomnumber}{0}
-\renewcommand{\floatpagefraction}{.8}
+\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\@figure@\figure%
\let\@end@figure@\endfigure%
@@ -275,7 +314,17 @@
}{\@end@table@}
\fi%
-\ifhep@revtex
+\newif\ifhep@journal
+\ifhep@sissa\hep@journaltrue
+\else
+ \ifhep@revtex\hep@journaltrue
+ \else
+ \ifhep@pos\hep@journaltrue
+ \else\hep@journalfalse
+ \fi
+ \fi
+\fi
+\ifhep@journal
\setlength\abovecaptionskip{\f@size\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
@@ -335,13 +384,15 @@
\ifhep@title
\date{}
-
\author{}
-\AtEndOfClass{\newcommand{\email}[1]{%
- \unskip\thanks{\online{mailto:#1}{#1}}
-}}
\RequirePackage{authblk}
\renewcommand\Affilfont{\footnotesize}
+\newcommand{\email}[1]{\online{mailto:#1}{#1}}
+\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}}
@@ -365,9 +416,9 @@
\RequirePackage{atbegshi}
\RequirePackage{picture}
-\let\old@maketitle\maketitle
+\let\hep@maketitle\maketitle
\renewcommand{\maketitle}{%
- \old@maketitle%
+ \hep@maketitle%
\AtBeginShipoutFirst{%
\put(
\textwidth+\oddsidemargin-\widthof{\@preprint@box},
@@ -377,8 +428,8 @@
}
\@ifundefined{abstract}{}{%
- \let\old@abstract\abstract%
- \renewcommand\abstract{\old@abstract\noindent\ignorespaces}%
+ \let\hep@abstract\abstract%
+ \renewcommand\abstract{\hep@abstract\noindent\ignorespaces}%
}
\fi
@@ -387,42 +438,27 @@
\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}
- }
+ \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,
giveninits=true
}
-\NewBibliographyString{erratum}
-\DefineBibliographyStrings{english}{erratum={Erratum}}
-\let\old@printbibliography\printbibliography
-\renewcommand{\printbibliography}{\sloppy\old@printbibliography}
+\NewBibliographyString{erratum,erratums}
+\DefineBibliographyStrings{english}{erratum={Erratum},erratums={Errata}}
+\providecommand{\relateddelimerratum}{\addsemicolon\space}
+\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{%
@@ -444,6 +480,28 @@
\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:}{%
@@ -452,24 +510,30 @@
\DeclareFieldFormat{url}{%
\mkbibacro{URL}\addcolon\space\online{#1}{\thefield{protocollessurl}}%
}
-\renewbibmacro*{author}{%
- \iffieldundef{collaboration}{%
- \printnames{author}}{\textbf{\printfield{collaboration}}%
- }%
+\newcommand{\bib@online}[2]{%
+ \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
}
-\providecommand{\letbibmacro}[2]{\csletcs{abx@macro@#1}{abx@macro@#2}}
-\letbibmacro{doi+eprint+url-old}{doi+eprint+url}
+\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{doi+eprint+url-old}
- \iffieldundef{reportnumber}{}{\textls[0]{%
+ \usebibmacro{hep-doi+eprint+url}
+ \iffieldundef{pmc}{%
+ \iffieldundef{pmid}{}{\printfield{pmid}\newunit}%
+ }{\printfield{pmc}\newunit}
+ \iffieldundef{reportnumber}{}{%
\newunitpunct\textnumero\intitlepunct%
\textsc{\small\printfield{reportnumber}}%
- }}%
+ \newunit%
+ }%
}
-\newcommand{\bib@online}[2]{%
- \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
-}
\NewDocumentCommand{\new@eprint}{smm}{
\DeclareFieldFormat{eprint:#2}{%
\newcommand{\@path}{\IfBooleanT{#1}{\thefield{eprintclass}/}##1}%
@@ -492,18 +556,13 @@
HEPForge\addcolon\space\bib@online{https://#1/hepforge.org}{#1}%
}
\DeclareFieldAlias{eprint:HEPForge}{eprint:hepforge}
-
\fi
\RequirePackage{hyperref}
\hypersetup{
- pdfencoding=auto,
- psdextra,
- hidelinks,
- linktoc=all,
- breaklinks=true,
- pdfcreator={},
- pdfproducer={}
+ pdfencoding=auto, psdextra,
+ hidelinks, linktoc=all, breaklinks=true,
+ pdfcreator={}, pdfproducer={}
}
\pdfstringdefDisableCommands{\def\varepsilon{\textepsilon}}
\AtBeginDocument{
@@ -517,19 +576,28 @@
\ifhep@revtex
\AtBeginShipout{\hypersetup{pdftitle={\@title}}}
\else
- \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+ \ifhep@beamer\else
+ \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+ \fi
\fi
\ifhep@title
\AtBeginDocument{\hypersetup{pdfauthor=\AB@authlist}}
\else
- \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
+ \ifhep@beamer\else
+ \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
+ \fi
\fi
+\def\BackrefFootnoteTag{}
+\RequirePackage{footnotebackref}
+\let\@foot@note\footnote
+\renewcommand{\footnote}[1]{\unskip\@foot@note{\ignorespaces#1}}
+
+\ifhep@references
\RequirePackage[noabbrev, nameinlink]{cleveref}
\newcommand{\creflastconjunction}{, and\nobreakspace}
\crefname{enumi}{point}{points}
-\Crefname{enumi}{Point}{Points}
-
+\crefname{inlinelisti}{point}{points}
\newcommand\no@break@before{%
\relax\ifvmode\else%
\ifhmode%
@@ -539,17 +607,16 @@
\fi%
\fi%
}
-
-\let\old@ref\ref
+\let\hep@ref\ref
\AtBeginDocument{\renewcommand\ref{\no@break@before\labelcref}}
\renewcommand\eqref{\no@break@before\labelcref}
-\let\old@subref\subref
-\renewcommand\subref{\no@break@before\old@subref}
+\let\hep@subref\subref
+\renewcommand\subref{\no@break@before\hep@subref}
\renewcommand*\subcaption@ref[2]{\begingroup%
\caption@setoptions{sub}%
- \subcaption@reffmt\p@subref{\old@ref#1{sub@#2}}%
+ \subcaption@reffmt\p@subref{\hep@ref#1{sub@#2}}%
\endgroup}
\newcommand{\subcref}[1]{\cref{sub@#1}}
@@ -562,9 +629,10 @@
\DeclareRobustCommand{\labelcrefrange}[2]{%
\@crefrangenostar{labelcref}{#1}{#2}%
}
+\fi
-\let\old@cite\cite
-\renewcommand\cite{\no@break@before\old@cite}
+\let\hep@cite\cite
+\renewcommand\cite{\no@break@before\hep@cite}
\ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else
\NewBibliographyString{refname}
@@ -630,12 +698,18 @@
\NewDocumentCommand{\acronym}{somsmo}{
\newabbreviation[
- longplural=\IfNoValueTF{#6}{#5s}{#6},
- \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
+ 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{%
- \if@begin@of@sentence{\cGls{#3}}{\cgls{#3}}%
- \IfBooleanTF{#4}{}{\@\xspace}%
+ \if@begin@of@sentence{%
+ \ifglsused{#3}{\cgls{#3}}{\cGls{#3}}%
+ }{\cgls{#3}}%
+ \ifnum\glsentrycurrcount{#3}>1\relax
+ \IfBooleanTF{#4}{}{\@\xspace}%
+ \else\@\xspace\fi
}
\pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{%
\IfNoValueTF{#2}{#3}{#2} }%
@@ -710,13 +784,30 @@
}
\newcommand{\resetacronym}[1]{\protect\glsreset{#1}}
\newcommand{\dummyacronym}[1]{\protect\glsunset{#1}}
-\@ifundefined{abstract}{}{%
- \let\end@old@abstract\endabstract%
- \renewcommand\endabstract{\glsresetall\end@old@abstract}%
+\@ifundefined{endabstract}{}{%
+ \let\end@hep@abstract\endabstract%
+ \renewcommand\endabstract{\glsresetall\end@hep@abstract}%
}
-\let\old@table@of@contents\tableofcontents
+\let\hep@table@of@contents\tableofcontents
\renewcommand\tableofcontents{%
- \glsunsetall\old@table@of@contents\glsresetall%
+ \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