texlive[54974] Master/texmf-dist: hep-paper (2may20)

commits+karl at tug.org commits+karl at tug.org
Sat May 2 23:03:03 CEST 2020


Revision: 54974
          http://tug.org/svn/texlive?view=revision&revision=54974
Author:   karl
Date:     2020-05-02 23:03:03 +0200 (Sat, 02 May 2020)
Log Message:
-----------
hep-paper (2may20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib
    trunk/Master/texmf-dist/doc/latex/hep-paper/hep-paper.pdf
    trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx
    trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins
    trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx

Modified: trunk/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib	2020-05-02 21:02:43 UTC (rev 54973)
+++ trunk/Master/texmf-dist/doc/latex/hep-paper/bibliography.bib	2020-05-02 21:03:03 UTC (rev 54974)
@@ -1,4 +1,4 @@
- at manual{hep-paper,
+ at article{hep-paper,
 title = "The |hep-paper| package",
 subtitle = "Publications in High Energy Physics",
 author = "Jan Hajer",
@@ -15,18 +15,34 @@
 eprint = "hep-paper",
 }
 
- at manual{cleveref,
+ at article{kvoptions,
+title = "The |kvoptions| package",
+subtitle = "Key value format for package options",
+author = "Heiko Oberdiek",
+year = "2004",
+eprinttype = "ctan",
+eprint = "kvoptions",
+related = "kvoptions-1",
+}
+
+ at manual{kvoptions-1,
+eprinttype = "github",
+eprintclass = "ho-tex",
+eprint = "kvoptions",
+}
+
+ at article{cleveref,
 title = "The |cleveref| package",
 subtitle = "Intelligent cross-referencing",
 author = "Toby Cubitt",
 date = "2006",
-url = "http://www.dr-qubit.org/cleveref.html",
+url = "http://dr-qubit.org/cleveref",
 eprinttype = "ctan",
 eprint = "cleveref",
 }
 
- at manual{foreign,
-title = "The |foreign| package for \LaTeX2e",
+ at article{foreign,
+title = "The |foreign| package for \hologo{LaTeX2e}",
 subtitle = "Systematic treatment of \enquote{foreign} words in documents",
 author = "Philip G. Ratcliffe",
 date = "2012",
@@ -34,7 +50,7 @@
 eprint = "foreign",
 }
 
- at manual{geometry,
+ at article{geometry,
 title = "The |geometry| package",
 subtitle = "Flexible and complete interface to document dimensions",
 author = "David Carlisle and Hideo Umeki",
@@ -50,7 +66,7 @@
 eprint = "geometry",
 }
 
- at manual{a4wide,
+ at article{a4wide,
 title = "The |a4wide| package",
 subtitle = "\enquote{Wide} a4 layout",
 author = "Alexander Holt and Jean-François Lamy",
@@ -60,7 +76,7 @@
 note = "depreciated and not used",
 }
 
- at manual{microtype,
+ at article{microtype,
 title = "The |microtype| package",
 subtitle = "Subliminal refinements towards typographical perfection",
 author = "Robert Schlicht",
@@ -69,8 +85,8 @@
 eprint = "microtype",
 }
 
- at manual{authblk,
-title = "A \LaTeX\ Package to Prepare Author and Affiliation Blocks",
+ at article{authblk,
+title = "A \hologo{LaTeX} Package to Prepare Author and Affiliation Blocks",
 subtitle = "Support for footnote style author/affiliation",
 author = "Patrick W. Daly",
 date = "2001",
@@ -78,17 +94,17 @@
 eprint = "authblk",
 }
 
- at manual{bm,
+ at article{bm,
 title = "The |bm| package",
 subtitle = "Access bold symbols in maths mode",
 author = "David Carlisle and Frank Mittelbach",
-collaboration = "\LaTeX\ Team",
+collaboration = "\hologo{LaTeX} Team",
 date = "1993",
 eprinttype = "ctan",
 eprint = "bm",
 }
 
- at manual{empheq,
+ at article{empheq,
 title = "The |empheq| package",
 author = "Lars Madsen and Morten Høgholm and Will Robertson and Joseph Wright",
 eprinttype = "ctan",
@@ -95,7 +111,7 @@
 eprint = "empheq",
 }
 
- at manual{mathtools,
+ at article{mathtools,
 title = "The |mathtools| package",
 subtitle = "Mathematical tools to use with |amsmath|",
 author = "Lars Madsen and Morten Høgholm and Will Robertson and Joseph Wright",
@@ -104,29 +120,29 @@
 eprint = "mathtools",
 }
 
- at manual{amsmath,
+ at article{amsmath,
 title = "The |amsmath| package",
-subtitle = "AMS mathematical facilities for \LaTeX",
-author = "\LaTeX",
-collaboration = "\LaTeX\ Team",
+subtitle = "AMS mathematical facilities for \hologo{LaTeX}",
+author = "\hologo{LaTeX}",
+collaboration = "\hologo{LaTeX} Team",
 date = "1994",
-url = "http://www.ams.org/tex/amslatex.html",
+url = "https://ams.org/tex/amslatex",
 eprinttype = "ctan",
 eprint = "amsmath",
 }
 
- at manual{amsfonts,
+ at article{amsfonts,
 title = "The |amsfonts| package",
-subtitle = "\TeX\ fonts from the American Mathematical Society",
+subtitle = "\hologo{TeX} fonts from the American Mathematical Society",
 author = "Michael Downes and David M. Jones and Frank Mittelbach and Rainer Schöpf",
 collaboration = "American Mathematical Society",
 date = "1995",
-url = "http://www.ams.org/tex/amsfonts.html",
+url = "https://ams.org/tex/amsfonts",
 eprinttype = "ctan",
 eprint = "amsfonts",
 }
 
- at manual{amssymb,
+ at article{amssymb,
 title = "The |amssymb| package",
 author = "Michael Downes and David M. Jones and Frank Mittelbach and Rainer Schöpf",
 collaboration = "American Mathematical Society",
@@ -135,7 +151,7 @@
 eprint = "amsfonts",
 }
 
- at manual{slashed,
+ at article{slashed,
 title = "The |slashed| package",
 subtitle = "Put a slash through characters",
 author = "David Carlisle",
@@ -144,7 +160,7 @@
 eprint = "slashed",
 }
 
- at manual{physics,
+ at article{physics,
 title = "The |physics| package",
 subtitle = "Macros supporting the Mathematics of Physics",
 author = "Sergio C. de la Barrera",
@@ -153,7 +169,7 @@
 eprint = "physics",
 }
 
- at manual{units,
+ at article{units,
 title = "The |units| and |nicefrac| packages",
 subtitle = "Typeset units",
 author = "Axel Reichert",
@@ -162,7 +178,7 @@
 eprint = "units",
 }
 
- at manual{subcaption,
+ at article{subcaption,
 title = "The |subcaption| package",
 subtitle = "Support for sub-captions",
 author = "Axel Sommerfeldt",
@@ -169,9 +185,10 @@
 date = "2007",
 eprinttype = "ctan",
 eprint = "subcaption",
+related = "caption-1",
 }
 
- at manual{caption,
+ at article{caption,
 title = "The |caption| package",
 subtitle = "Customising captions in floating environments",
 author = "Axel Sommerfeldt",
@@ -188,9 +205,9 @@
 }
 
 
- at manual{biblatex,
+ at article{biblatex,
 title = "The |biblatex| Package",
-subtitle = "Sophisticated Bibliographies in \LaTeX",
+subtitle = "Sophisticated Bibliographies in \hologo{LaTeX}",
 author = "Philipp Lehman and Joseph Wright and Audrey Boruvka and Philip Kime",
 date = "2006",
 eprinttype = "ctan",
@@ -204,11 +221,11 @@
 eprint = "biblatex",
 }
 
- at manual{hyperref,
-title = "Hypertext marks in \LaTeX: a manual for |hyperref|",
-subtitle = "Extensive support for hypertext in \LaTeX",
+ at article{hyperref,
+title = "Hypertext marks in \hologo{LaTeX}: a manual for |hyperref|",
+subtitle = "Extensive support for hypertext in \hologo{LaTeX}",
 author = "Sebastian Rahtz and Heiko Oberdiek",
-collaboration = "\LaTeX3 Project",
+collaboration = "\hologo{LaTeX3} Project",
 date = "1995",
 eprinttype = "ctan",
 eprint = "hyperref",
@@ -221,7 +238,7 @@
 eprint = "hyperref",
 }
 
- at manual{graphicx,
+ at article{graphicx,
 title = "Packages in the \enquote{graphics} bundle",
 subtitle = "Enhanced support for graphics",
 author = "David Carlisle and Sebastian Rahtz",
@@ -230,9 +247,9 @@
 eprint = "graphicx",
 }
 
- at manual{booktabs,
+ at article{booktabs,
 title = "The |booktabs| package",
-subtitle = "Publication quality tables in \LaTeX",
+subtitle = "Publication quality tables in \hologo{LaTeX}",
 author = "Danie Els and Simon Fear",
 date = "1995",
 eprinttype = "ctan",
@@ -239,7 +256,7 @@
 eprint = "booktabs",
 }
 
- at manual{multirow,
+ at article{multirow,
 title = "The |multirow|, |bigstrut| and |bigdelim| packages",
 subtitle = "Create tabular cells spanning multiple rows",
 author = "Piet van Oostrum and Jerry Leichter",
@@ -248,8 +265,8 @@
 eprint = "multirow",
 }
 
- at manual{fixmath,
-title = "The |fixmath| package for \LaTeX2\epsilon",
+ at article{fixmath,
+title = "The |fixmath| package for \hologo{LaTeX2e}",
 subtitle = "Make maths comply with ISO 31-0:1992 to ISO 31-13:1992",
 author = "Walter Schmidt",
 date = "2000",
@@ -257,7 +274,7 @@
 eprint = "fixmath",
 }
 
- at manual{alphabeta,
+ at article{alphabeta,
 title = "The |alphabeta| package",
 subtitle = "LICR macros and encoding definition files for Greek",
 author = "Günter Milde",
@@ -266,17 +283,21 @@
 eprint = "greek-fontenc",
 }
 
- at manual{arxiv-collector,
-title = "arxiv-collector",
+ at article{arxiv-collector,
+title = "|arxiv-collector|",
+subtitle = "A little Python script to collect \hologo{LaTeX} sources for upload to the arXiv",
 author = "Dougal Sutherland",
+date = "2018",
 eprinttype = "github",
 eprintclass = "dougalsutherland",
 eprint = "arxiv-collector",
 }
 
- at manual{biber,
-title = "biber",
+ at article{biber,
+title = "\hologo{biber}",
+subtitle = "Backend processor for Bib\hologo{LaTeX}",
 author = "François Charette and Philip Kime",
+date = "2009",
 eprinttype = "github",
 eprintclass = "plk",
 eprint = "biber",
@@ -288,30 +309,30 @@
 eprint = "biblatex-biber",
 }
 
- at manual{lmodern,
+ at article{lmodern,
 title = "Latin Modern Family of Fonts",
 subtitle = "Latin modern fonts in outline formats",
 date = "2003",
 author = "B. Jackowski and J.M. Nowacki",
-url = "http://www.gust.org.pl/projects/e-foundry/latin-modern",
+url = "http://gust.org.pl/projects/e-foundry/latin-modern",
 eprinttype = "ctan",
 eprint = "lm",
 }
 
- at manual{ifluatex,
+ at article{ifluatex,
 title = "The |ifluatex| package",
 subtitle = "Provides the |\textbackslash ifluatex| switch",
 author = "Heiko Oberdiek",
-collaboration = "\LaTeX\ Team",
+collaboration = "\hologo{LaTeX} Team",
 date = "2007",
 eprinttype = "ctan",
 eprint = "ifluatex",
 }
 
- at manual{ifxetex,
+ at article{ifxetex,
 title = "The |iftex| package",
-subtitle = "Am I running under XeTeX?",
-collaboration = "\LaTeX\ Team",
+subtitle = "Am I running under \hologo{XeTeX}?",
+collaboration = "\hologo{LaTeX} Team",
 author = "Will Robertson",
 date = "2006",
 eprinttype = "ctan",
@@ -325,7 +346,7 @@
 eprint = "iftex",
 }
 
- at manual{fontspec,
+ at article{fontspec,
 title = "The |fontspec| package",
 author = "Will Robertson and Khaled Hosny",
 eprinttype = "ctan",
@@ -332,28 +353,30 @@
 eprint = "fontspec",
 }
 
- at manual{fontenc,
+ at article{fontenc,
 title = "The |fontenc| package",
 subtitle = "Standard package for selecting font encodings",
-collaboration = "\LaTeX\ Team",
-author = "\LaTeX\ Team",
+collaboration = "\hologo{LaTeX} Team",
+author = "Frank Mittelbach and Robin Fairbairns and Werner Lemberg",
+date = "1995",
 eprinttype = "ctan",
 eprint = "fontenc",
 }
 
- at manual{inputenc,
+ at article{inputenc,
 title = "The |inputenc| package",
 subtitle = "Accept different input encodings",
-collaboration = "\LaTeX\ Team",
+collaboration = "\hologo{LaTeX} Team",
 author = "Frank Mittelbach and Alan Jeffrey",
+date = "1989",
 eprinttype = "ctan",
 eprint = "inputenc",
 }
 
- at manual{textcomp,
+ at article{textcomp,
 title = "The |textcomp| package",
-subtitle = "\LaTeX\ support for the Text Companion fonts",
-collaboration = "\LaTeX\ Team",
+subtitle = "\hologo{LaTeX} support for the Text Companion fonts",
+collaboration = "\hologo{LaTeX} Team",
 author = "Sebastian Rahtz",
 date = "1995",
 eprinttype = "ctan",
@@ -360,12 +383,12 @@
 eprint = "textcomp",
 }
 
- at manual{enumitem,
+ at article{enumitem,
 title = "Customizing lists with the |enumitem| package",
 subtitle = "Control layout of itemize, enumerate, description",
 author = "Javier Bezos",
 date = "2003",
-url = "	http://www.texnia.com/enumitem.html",
+url = "https://texnia.com/enumitem.html",
 eprinttype = "ctan",
 eprint = "enumitem",
 related = "enumitem-1",
@@ -377,7 +400,7 @@
 eprint = "enumitem",
 }
 
- at manual{atbegshi,
+ at article{atbegshi,
 title = "The |atbegshi| package",
 subtitle = "Execute stuff at |shipout| time",
 author = "Heiko Oberdiek",
@@ -393,7 +416,7 @@
 eprint = "atbegshi",
 }
 
- at manual{picture,
+ at article{picture,
 title = "The |picture| package",
 subtitle = "Dimens for picture macros",
 author = "Heiko Oberdiek",
@@ -409,7 +432,7 @@
 eprint = "picture",
 }
 
- at manual{varwidth,
+ at article{varwidth,
 title = "The |varwidth| package",
 subtitle = "A variable-width minipage",
 author = "Donald Arseneau",
@@ -418,7 +441,7 @@
 eprint = "varwidth",
 }
 
- at manual{csquotes,
+ at article{csquotes,
 title = "The |csquotes| Package",
 subtitle = "Context sensitive quotation facilities",
 author = "Philipp Lehman and Joseph Wright",
@@ -427,9 +450,9 @@
 eprint = "csquotes",
 }
 
- at manual{babel,
+ at article{babel,
 title = "|Babel| Localization and internationalization",
-subtitle = "Multilingual support for Plain \TeX\ or \LaTeX",
+subtitle = "Multilingual support for Plain \hologo{TeX} or \hologo{LaTeX}",
 author = "Johannes Braams and Javier Bezos and at al.",
 date = "1989",
 eprinttype = "ctan",
@@ -443,7 +466,7 @@
 eprint = "babel",
 }
 
- at manual{polyglossia,
+ at article{polyglossia,
 title = "The |polyglossia| package",
 author = "Arthur Reutenauer and François Charette and Elie Roux and Bastien Roucariès and Jürgen Spitzmüller",
 eprinttype = "ctan",
@@ -450,7 +473,7 @@
 eprint = "polyglossia",
 }
 
- at manual{parskip,
+ at article{parskip,
 title = "The |parskip| package",
 subtitle = "Layout with zero |\textbackslash parindent|, non-zero |\textbackslash parskip|",
 author = "Robin Fairbairns and Frank Mittelbach and H. Partl",
@@ -467,17 +490,17 @@
 }
 
 
- at manual{fntguide,
-title = "\LaTeX2\epsilon\ font selection",
-subtitle = "Docmentation of \LaTeX\ font commands",
-collaboration = "\LaTeX\ Team",
-author = "\LaTeX\ Team",
+ at article{fntguide,
+title = "\hologo{LaTeX2e}\ font selection",
+subtitle = "Docmentation of \hologo{LaTeX} font commands",
+collaboration = "\hologo{LaTeX} Team",
+author = "\hologo{LaTeX} Team",
 date = "1995",
 eprinttype = "ctan",
 eprint = "fntguide",
 }
 
- at manual{euenc,
+ at article{euenc,
 title = "The Experimental Unicode `EUx’ Encodings",
 author = "Will Robertson and Elie Roux and Khaled Hosny",
 eprinttype = "ctan",
@@ -484,7 +507,7 @@
 eprint = "euenc",
 }
 
- at manual{soul,
+ at article{soul,
 title = "The |soul| package",
 subtitle = "Hyphenation for letterspacing, underlining, and more",
 author = "Melchior Franz",
@@ -493,7 +516,7 @@
 eprint = "soul",
 }
 
- at manual{glossaries,
+ at article{glossaries,
 title = "The |glossaries| package",
 subtitle = "Create glossaries and lists of acronyms",
 author = "Nicola Talbot",
@@ -502,7 +525,7 @@
 eprint = "glossaries",
 }
 
- at manual{glossaries-extra,
+ at article{glossaries-extra,
 title = "The |glossaries-extra| package",
 subtitle = "An extension to the |glossaries| package",
 author = "Dickimaw Books, Nicola Talbot",
@@ -511,19 +534,19 @@
 eprint = "glossaries-extra",
 }
 
- at manual{xparse,
+ at article{xparse,
 title = "The |xparse| package",
 subtitle = "A generic document command parser",
 author = "Frank Mittelbach and Chris Rowley and David Carlisle",
-collaboration = "\LaTeX3 Project",
+collaboration = "\hologo{LaTeX3} Project",
 date = "1999",
 eprinttype = "ctan",
 eprint = "xparse",
 }
 
- at manual{pdftexcmds,
+ at article{pdftexcmds,
 title = "The |pdftexcmds| package",
-subtitle = "LuaTeX support for pdfTeX utility functions",
+subtitle = "\hologo{LuaTeX} support for \hologo{pdfTeX} utility functions",
 author = "Heiko Oberdiek",
 date = "2007",
 eprinttype = "ctan",
@@ -530,7 +553,7 @@
 eprint = "pdftexcmds",
 }
 
- at manual{fix-cm,
+ at article{fix-cm,
 title = "The |fix-cm| package",
 author = "Frank Mittelbach and David Carlisle and Chris Rowley and Walter Schmidt",
 eprinttype = "ctan",
@@ -537,8 +560,8 @@
 eprint = "fix-cm",
 }
 
- at manual{revtex,
-title = "The |revtex| package",
+ at article{revtex,
+title = "The REV\hologo{TeX} package",
 subtitle = "Styles for various Physics Journals",
 author = "Mark Doyle and Arthur Ogawa",
 collaboration = "American Physical Society",
@@ -548,27 +571,27 @@
 eprint = "revtex",
 }
 
- at manual{encguide,
-title = "\LaTeX\ font encodings",
-subtitle = "Documentation of \LaTeX\ font encodings",
+ at article{encguide,
+title = "\hologo{LaTeX} font encodings",
+subtitle = "Documentation of \hologo{LaTeX} font encodings",
 author = "Frank Mittelbach and Robin Fairbairns and Werner Lemberg",
-collaboration = "\LaTeX3 Project Team",
+collaboration = "\hologo{LaTeX3} Project Team",
 date = "1995",
 eprinttype = "ctan",
 eprint = "encguide",
 }
 
- at manual{sfmath,
+ at article{sfmath,
 title = "The |sfmath| package",
 subtitle = "Sans-serif mathematics",
 author = "Olaf Dietrich",
 date = "2005",
-url = "http://dtrx.de/od/tex/sfmath.html",
+url = "https://dtrx.de/od/tex/sfmath",
 eprinttype = "ctan",
 eprint = "sfmath",
 }
 
- at manual{relsize,
+ at article{relsize,
 title = "The |relsize| package",
 subtitle = "Set the font size relative to the current font size",
 author = "Donald Arseneau and Matt Swift",
@@ -577,9 +600,9 @@
 eprint = "relsize",
 }
 
- at manual{everyhook,
+ at article{everyhook,
 title = "The |everyhook| package",
-subtitle = "Hooks for standard \TeX\ token lists",
+subtitle = "Hooks for standard \hologo{TeX} token lists",
 author = "Stephen Checkoway",
 date = "2010",
 eprinttype = "ctan",
@@ -586,3 +609,92 @@
 eprint = "everyhook",
 }
 
+
+ at article{sansmathfonts,
+title = "The |sansmathfonts| package",
+subtitle = "Correct placement of accents in sans-serif maths",
+author = "Ariel Barton",
+date = "2013",
+eprinttype = "ctan",
+eprint = "sansmathfonts",
+}
+
+ at article{xspace,
+title = "The |xspace| package",
+subtitle = "Define commands that appear not to eat spaces",
+author = "David Carlisle and Morten Høgholm",
+collaboration = "\hologo{LaTeX} Team",
+date = "1993",
+eprinttype = "ctan",
+eprint = "xspace",
+}
+
+ at article{ragged2e,
+title = "The |ragged2e|-package",
+subtitle = "Alternative versions of \enquote{ragged}-type commands",
+author = "Martin Schröder",
+date = "1996",
+eprinttype = "ctan",
+eprint = "ragged2e",
+related = "ragged2e-1",
+}
+
+ at manual{ragged2e-1,
+eprinttype = "gitlab",
+eprintclass = "hagenbuch",
+eprint = "ragged2e",
+}
+
+ at article{url,
+title = "The |url| package",
+subtitle = "Verbatim with URL-sensitive line breaks",
+author = "Donald Arseneau",
+date = "1996",
+eprinttype = "ctan",
+eprint = "url",
+}
+
+ at article{jhep,
+title = "The |JHEP| package",
+author = "SISSA Medialab",
+collaboration = "SISSA Medialab",
+date = "1997",
+url = "https://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp",
+}
+
+ at article{jcap,
+title = "The |JCAP| package",
+author = "SISSA Medialab",
+collaboration = "SISSA Medialab",
+date = "2002",
+url = "https://jcap.sissa.it/jcap/help/JCAP_TeXclass.jsp",
+}
+
+ at article{bbm-macros,
+title = "A package for using the |bbm| fonts in math environment",
+author = "Torsten Hilbrich",
+date = "1994",
+eprinttype = "ctan",
+eprint = "bbm-macros",
+related = "bbm"
+}
+
+ at article{bbm,
+title = "|bbm|",
+subtitle = "\enquote{Blackboard-style} cm fonts",
+author = "	Gilles Robert",
+date = "1993",
+eprinttype = "ctan",
+eprint = "bbm",
+}
+
+ at online{arxiv,
+title = "arXiv",
+subtitle = "free distribution service and an open archive for scholarly articles",
+url = "https://arxiv.org",
+author = "Paul Ginsparg",
+collaboration = "arXiv Team",
+year = "1991",
+organization = "Cornell University",
+ReportNumber = "test",
+}

Modified: trunk/Master/texmf-dist/doc/latex/hep-paper/hep-paper.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx	2020-05-02 21:02:43 UTC (rev 54973)
+++ trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.dtx	2020-05-02 21:03:03 UTC (rev 54974)
@@ -16,10 +16,13 @@
 % \fi
 %
 % \iffalse
+%
 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-%<package>\ProvidesPackage{hep-paper}[2020/03/01 v1.2 Publications in High Energy Physics]
+%<package>\ProvidesPackage{hep-paper}[2020/05/01 v1.3 Publications in High Energy Physics]
+%<datamodel>\ProvidesFile{hep-paper.dbx}[2020/05/01 v1.3 HEP-Paper biblatex data model]
+%
+%<*driver>
 
-%<*driver>
 \documentclass{ltxdoc}
 
 \MacroIndent=1.5em
@@ -39,15 +42,6 @@
 %      \vspace{2.3ex}\vskip -\parskip}
 % \makeatother
 
-\newenvironment{example}[1][.5]{%
-  \begin{minipage}[t]{\linewidth}%
-  \begin{minipage}[t]{#1\linewidth}
-  \newcommand{\second}{%
-    \end{minipage}%
-    \begin{minipage}[t]{\linewidth-#1\linewidth}%
-  }%
-}{\end{minipage}\end{minipage}}
-
 \usepackage[parskip]{hep-paper}
 
 \bibliography{bibliography}
@@ -54,11 +48,21 @@
 
 \acronym{PDF}{portable document format}
 
-\listfiles
+\usepackage{hologo}
+\usepackage{multicol}
 
 \usepackage{titletoc}
 \titlecontents{section}[0em]{\medskip\bfseries}{\thecontentslabel\hspace{.8em}}{}{\hfill\contentspage}
 
+\newenvironment{columns}[1][.5]{%
+  \begin{minipage}[t]{\linewidth}%
+  \begin{minipage}[t]{#1\linewidth}
+  \newcommand{\column}{%
+    \end{minipage}%
+    \begin{minipage}[t]{\linewidth-#1\linewidth}%
+  }%
+}{\end{minipage}\end{minipage}}
+
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -66,10 +70,12 @@
 \begin{document}
 \DocInput{hep-paper.dtx}
 \end{document}
+
 %</driver>
+%
 % \fi
 %
-% \CheckSum{0}
+% \CheckSum{1140}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -88,8 +94,9 @@
 %   Right brace   \}     Tilde         \~}
 %
 % \changes{v1.0}{2019/01/01}{Initial version of the style file}
-% \changes{v1.1}{2020/01/01}{Transition to documented \LaTeX\ source file}
-% \changes{v1.2}{2020/03/01}{Inclusion of package options}
+% \changes{v1.1}{2020/01/01}{Transition to documented \hologo{LaTeX} source file}
+% \changes{v1.2}{2020/03/01}{Introduction of package options}
+% \changes{v1.3}{2020/05/01}{Inclusion of JHEP and JCAP package options, fix incompatibility with recent subcaption package version, move biblatex datamodel into its own file}
 %
 % \GetFileInfo{hep-paper.sty}
 %
@@ -100,8 +107,7 @@
 % \author{Jan Hajer \email{jan.hajer at uclouvain.be}}
 % \affiliation{Centre for Cosmology, Particle Physics and Phenomenology, Université catholique de Louvain, Louvain-la-Neuve B-1348, Belgium}
 % \preprint{Preprint-Number}
-% \date{\today}
-% \date{\normalsize\filedate}
+% \date{\normalfont\filedate}
 %
 % \maketitle
 %
@@ -121,11 +127,11 @@
 % | \documentclass{article}|\\
 % | \usepackage{hep-paper}|
 %
-% The most notable changes after loading the |hep-paper| package is the change of some \LaTeX\ defaults.
+% The most notable changes after loading the |hep-paper| package is the change of some \hologo{LaTeX} defaults.
 % The paper and font sizes are set to A4 and \unit[11]{pt}, respectively.
 % Additionally, the paper geometry is set to the values known from the (depreciated) |a4wide| package \cite{a4wide} using the |geometry| package \cite{geometry}.
-% Finally, the font is changed to |lmodern| \cite{lmodern} with |microtype| \cite{microtype} optimizations.
-% \PDF hyperlinks are implemented with the |hyperref| package \cite{hyperref}.
+% Furthermore, the font is changed to |lmodern| \cite{lmodern} with |microtype| \cite{microtype} optimizations.
+% Finally, \PDF hyperlinks are implemented with the |hyperref| package \cite{hyperref}.
 %
 % \subsection{Options}
 %
@@ -153,7 +159,7 @@
 %
 % \DescribeMacro{parskip}
 % The |parskip| option makes use of the |parskip| package \cite{parskip} and changes how two paragraphs are separated from each other.
-% The \LaTeX\ default is separation via indentation the |parskip| option switches to separation via vertical space.
+% The \hologo{LaTeX} default is separation via indentation the |parskip| option switches to separation via vertical space.
 % \footnote{The |parskip| option is used for this document.}
 %
 % \DescribeMacro{sansserif}
@@ -160,20 +166,30 @@
 % The |sansserif| option switches the document including math to sans serif font shape.
 %
 % \DescribeMacro{title}
-% The |title=false| option deactivates the titlepage adjustments.
+% The |title=false| option deactivates the title page adjustments.
 %
 % \DescribeMacro{manualplacement}
 % The |manualplacement| option reactivates manual float placement.
 %
 % \DescribeMacro{bibliography}
-% The |bibliography|=\meta{key} option prevents the automatic loading of the |biblatex| package \cite{biblatex} for \meta{key}=|false| or passes the \meta{key} as |style| string to the |biblatex| package.
+% The |bibliography|=\meta{key} option prevents the automatic loading of the |biblatex| package \cite{biblatex} if \meta{key}=|false|.
+% Otherwise the \meta{key} is passed as |style| string to the |biblatex| package.
 %
 % \DescribeMacro{glossaries}
-% The |glossaries=false| option deactives the use of the |glossaries| package \cite{glossaries, glossaries-extra}.
+% The |glossaries=false| option deactives the use of the |glossaries| package \cite{glossaries}.
 %
+% \DescribeMacro{jhep}
+% The |jhep| option activates the |JHEP| \cite{jhep} compatibility mode.
+%
+% \DescribeMacro{jcap}
+% The |jcap| option activates the |JCAP| \cite{jcap} compatibility mode.
+%
 % \DescribeMacro{revtex}
-% The |revtex| option switches the |hep-paper| package into a |revtex| \cite{revtex} compatibility mode.
+% The |revtex| option activates the REV\hologo{TeX} \cite{revtex} compatibility mode.
 %
+% \DescribeMacro{pos}
+% The |pos| option activates the |PoS| compatibility mode.
+%
 % \DescribeMacro{eqnarray}
 % The |eqnarray| option reactivates the depreciated |eqnarray| environment.
 %
@@ -181,7 +197,6 @@
 %
 % \subsection{Title page}
 %
-% The \PDF meta information is set according to the |\title|\marg{text} and |\author|\marg{text} information.
 % \DescribeMacro{\author}
 % \DescribeMacro{\affiliation}
 % \DescribeMacro{\email}
@@ -193,18 +208,21 @@
 % | \author[2]{Author two \email{Email two}}|\\
 % | \affiliation[1,2]{Affiliation two}|
 %
+% \DescribeMacro{\title}
+% The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information.
+%
 % \DescribeMacro{\preprint}
-% The |\preprint|\marg{numer} macro places a pre-print number in the upper right corner of the first page.
+% The |\preprint|\marg{numer} macro places a pre-print number in the upper right corner of the title page.
 %
 % \DescribeEnv{abstract}
-% The |abstract| environment has been adjusted to not start with an indentation.
+% The |abstract| environment is adjusted to not start with an indentation.
 %
 % \subsection{Text}
 %
+% Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |babel| package.
 % \DescribeMacro{\enquote}
-% Hyphenation is provided by the |babel| package \cite{babel} and quotation commands are provided by the |csquotes| package \cite{csquotes} recommended by the |babel| package.
 % \DescribeMacro{\MakeOuterQuote}
-% The latter package provides the convenient macro |\MakeOuterQuote{"}| allowing to simply use |"| instead of the pair |``| and |''|.
+% The latter package provides the convenient macros |\enquote|\marg{text} and |\MakeOuterQuote{"}| allowing to leave the choice of quotation marks to \hologo{LaTeX} and use |"| instead of the pair |``| and |''|, respectively.
 %
 % \DescribeMacro{\eg}
 % \DescribeMacro{\vs}
@@ -217,12 +235,12 @@
 % The |\software|\oarg{version}\marg{name} macro is typeset as \software[\fileversion]{HEP-Paper}.
 %
 % \DescribeMacro{\online}
-% The |\online|\marg{url}\marg{text} macro combines the features of the |\href|\marg{url}\marg{text} and the |\url|\marg{text} macros, resulting in \eg \online{https://ctan.org/pkg/hep-paper}{ctan.org/pkg/hep-paper}.
+% The |\online|\marg{url}\marg{text} macro combines the features of the |\href|\marg{url} \marg{text} \cite{hyperref} and the |\url|\marg{text} \cite{url} macros, resulting in \eg \online{https://ctan.org/pkg/hep-paper}{ctan.org/pkg/hep-paper}.
 %
+% The |inlinelist| and |enumdescript| environments are defined using the |enumitem| package \cite{enumitem}.
+%
 % \DescribeMacro{inlinelist}
-% Using the |enumitem| package \cite{enumitem} the |inlinelist|
-%
-% \begin{example}
+% \begin{columns}
 % |The three main points are|
 %
 % |\begin{inlinelist}|
@@ -234,7 +252,7 @@
 % | \item three|
 %
 % |\end{inlinelist}|
-% \second
+% \column
 % The three main points are
 % \begin{inlinelist}
 %  \item one
@@ -241,12 +259,10 @@
 %  \item two
 %  \item three
 % \end{inlinelist}
-% \end{example}
+% \end{columns}
 %
 % \DescribeMacro{enumdescript}
-% and the |enumdescript| environments are defined
-%
-% \begin{example}[.6]
+% \begin{columns}[.6]
 % |\begin{enumdescript}[label=\Roman*)]|
 %
 % | \item{First} one|
@@ -256,17 +272,22 @@
 % | \item{Third} three|
 %
 % |\end{enumdescript}|
-% \second
+% \column
 % \begin{enumdescript}[label=\Roman*)]
 %  \item{First} one
 %  \item{Second} two
 %  \item{Third} three
 % \end{enumdescript}
-% \end{example}
+% \end{columns}
 %
 % \DescribeMacro{\textsc}
-% A sans serif version of \textsf{\textsc{Small Caps}} is provided.
+% A sans serif version of \textsf{\textsc{Small Caps}} is provided, using the |sansmathfonts| package \cite{sansmathfonts}.
 %
+% \DescribeMacro{\underline}
+% \DescribeMacro{\overline}
+% The |\underline| macro is redefined to allow linebreaks using the |soul| package \cite{soul}.
+% The |\overline| macro is extended to also \overline{overline} text outside of math environments.
+%
 % \DescribeMacro{\useparskip}
 % \DescribeMacro{\useparindent}
 % If the |parskip| option is activated the |\useparindent| macro switches back the usual parindent mode, while the |\useparskip| macro switches to the parskip mode.
@@ -274,8 +295,8 @@
 % \subsubsection{References and footnotes}
 %
 % \DescribeMacro{\cref}
-% References are extended with the |cleveref| package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key}  in order to write 'Figure 1'.
-% Furthermore, the |cleveref| package allows to reference multiple objects within one |\cref|\marg{key} (similar to the |\cite|\marg{key} macro).
+% References are extended with the |cleveref| package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key}  in order to write \enquote{Figure 1}.
+% Furthermore, the |cleveref| package allows to reference multiple objects within one |\cref|\marg{key1,key2}.
 %
 % \DescribeMacro{\cite}
 % Citations are adjusted to not start on a new line in order to avoid the repeated use of |~\cite|\marg{key}.
@@ -293,8 +314,9 @@
 % \DescribeMacro{\acronym}
 % \DescribeMacro{\shortacronym}
 % \DescribeMacro{\longacronym}
-% The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\marg{definition}\oarg{plural\linebreak[4]definition} macro generates the singluar |\|\meta{abbreviation} and plural |\|\meta{abbreviation}|s| macros.
-% The starred version does not add an \enquote{s} to the abbreviation plural.
+% The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\meta{*}\marg{definition}\oarg{plural\linebreak[4]definition} macro generates the singluar |\|\meta{abbreviation} and plural |\|\meta{abbreviation}|s| macros.
+% % The first star prevents the addition of an \enquote{s} to the abbreviation plural.
+% The second star restores the \hologo{TeX} default of swallowing subsequent white space.
 % The long form is only shown at the first appearance of these macros, later appearances generate the abbreviation with a hyperlink to the long form.
 % Capitalization at the beginning of paragraphs and sentences is ensured.
 % The |\shortacronym| and |\longacronym| macros only show the short or long form of their acronym.
@@ -307,7 +329,8 @@
 % \subsection{Math}
 %
 % The |mathtools| \cite{mathtools} and |amssymb| \cite{amsfonts} packages are loaded.
-% They in turn load the |amsmath| \cite{amsmath} and |amsfonts| \cite{amsfonts} packages.
+% They in turn load the \hologo{AmSLaTeX} |amsmath| \cite{amsmath} and |amsfonts| \cite{amsfonts} packages.
+% Details about the font handling in \hologo{TeX} can be found in \cite{fntguide}.
 % \DescribeMacro{\mathbf}
 % Bold math, including |\mathbf| is provided by the |bm| package \cite{bm}, \ie ($ A  b  \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$).
 % Macros switching to |bfseries| such as |\section|\marg{text} are ensured to also typeset math in bold.
@@ -318,32 +341,34 @@
 % This behaviour conflicts \eg with the |sansserif| package option.
 % \DescribeMacro{\mathsf}
 % The math sans serif alphabet is redefined to be italic sans serif if the main text is serif and italic serif if the main text is sans serif, \ie ($\mathsf A \mathsf b \mathsf \Gamma \mathsf \delta \mathbf{\mathsf A} \mathbf{\mathsf b} \mathbf{\mathsf \Gamma} \mathbf{\mathsf \delta}$).
-% Details about the font handling in \TeX\ can be found in \cite{fntguide}.
 % \DescribeMacro{\mathscr}
 % The |\mathcal| font \ie ($\mathcal{ABCD}$) is accompanied by the |\mathscr| font \ie ($\mathscr{ABCD}$).
+% \DescribeMacro{\mathbb}
+% The |\mathbb| font is changed by the |bbm| \cite{bbm-macros} package and adjusted depending on the |sansserif| option \ie ($\mathbb{Ab1}${\mathversion{bold}$\mathbb{Ab1}$}).
 %
 % \DescribeMacro{\nicefrac}
 % \DescribeMacro{\flatfrac}
-% The |\frac|\marg{number}\marg{number} macro is accompanied by |\nicefrac|\linebreak[1]\marg{number}\linebreak[1]\marg{number} and |\flatfrac|\marg{number}\marg{number}
-% \begin{align}
-% \frac12 \ ,&& \nicefrac 12 \ ,&& \flatfrac 12\ .
-% \end{align}
+% The |\frac|\marg{number}\marg{number} macro is accompanied by |\nicefrac|\linebreak[1]\marg{number}\linebreak[1]\marg{number} and |\flatfrac|\marg{number}\marg{number} leading to $\frac12$, $\nicefrac 12$, and $\flatfrac 12$.
 % \DescribeMacro{\diag}
+%
 % A diagonal matrix operator is defined |\diag|.
 %
 % \DescribeMacro{\mathdef}
 % The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro (re-)defines macros only within math mode without changing the text mode definition.
+%
 % \DescribeMacro{\i}
-% The imaginary unit $\i$ is defined using this functionality.
+% \DescribeMacro{\d}
+% The imaginary unit $\i$ and the differential $\d$ are defined using this functionality.
 %
 % \DescribeMacro{\numberwithin}
 % For longer paper it can be useful to re-number the equation in accordance with the section numbering |\numberwithin{equation}{section}|.
-% \DescribeMacro{\subequations}
+% \DescribeMacro{subequations}
 % In order to further reduce the size the of equation counter it can be useful to wrap |align| environments with multiple rows in a |subequations| environment.
+% Both macros are provided by the \hologo{AmSLaTeX} package.
 %
 % \DescribeMacro{eqnarray}
 % The depreciated |eqnarray| environment is undefined as long this behaviour is not prevented by the |eqnarray| package option.
-% The |align| environment should be used instead.
+% The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments should be used instead.
 %
 % \subsubsection{Physics}
 %
@@ -353,7 +378,7 @@
 % \sigma &= \unit[5]{fb} \ , & &\text{at \unit[5]{\sigma} C.L.} \ , & \mu &= \unit[5]{cm} \ , & l &= \text{\unit[5]{\mu m}} \ ,
 % \label{eq:greek}
 % \end{align}
-% and \eg to distinguish gauge $\nu$ and mass \nu\ eigenstates in models with massive light neutrinos.
+% and \eg to distinguish gauge $\nu$ and mass \nu\ eigenstates in models with massive neutrinos.
 % Additionally, Greek letters can also be directly typed using Unicode.
 %
 % \DescribeMacro{\ev}
@@ -374,10 +399,11 @@
 % The |\slashed|\marg{character} macro from the |slashed| \cite{slashed} package allows to use the Dirac slash notation.
 %
 % \DescribeMacro{\overleftright}
-% A better looking over left right arrow is defined $\overleftright{\partial}$.
+% A better looking over left right arrow is defined \ie $\overleftright{\partial}$.
+%
 % \DescribeMacro{\unit}
 % \DescribeMacro{\inv}
-% The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value}\marg{unit} from the |units| package \cite{units} which can also be used in text mode.
+% The correct spacing for units, \cf \cref{eq:greek}, is provided by the macro |\unit|\oarg{value} \marg{unit} from the |units| package \cite{units} which can also be used in text mode.
 % The macro |\inv|\oarg{power}\marg{text} allows to avoid math mode also for inverse units such as \unit[5]{\inv{fb}} typeset via |\unit[5]{\inv{fb}}|.
 %
 % \subsection{Floats}
@@ -420,7 +446,7 @@
 % \DescribeMacro{\panel}
 % The |panels| environment makes use of the |subcaption| package \cite{subcaption}.
 % It provides sub-floats and takes as mandatory argument either the number of sub-floats (default~2) or the width of the first sub-float as fraction of the |\linewidth|.
-% Within the |\begin{panels}|\oarg{vert}\marg{width} environment the |\panel| macro initiates a new sub-float.
+% Within the |\begin{panels}|\oarg{vertical alignment}\marg{width} environment the |\panel| macro initiates a new sub-float.
 % In the case that the width of the first sub-float has been given as an optional argument to the |panels| environment the |\panel|\marg{width} macro takes the width of the next sub-float as mandatory argument.
 % The example code is presented in \cref{tab:panels}.
 %
@@ -438,9 +464,9 @@
 % \DescribeMacro{\printbibliography}
 % The |biblatex| package \cite{biblatex} is loaded for bibliography management.
 % The user has to add the line |\bibliography|\marg{my.bib} to the preamble of the document and |\printbibliography| at the end of the document.
-% The bibliography is generated by |biber| \cite{biber}.
+% The bibliography is generated by \software{Biber} \cite{biber}.
 % |biblatex| is extended to be able to cope with the |collaboration| and |reportNumber| fields provided by \online{https://inspirehep.net}{inspirehep.net} and a bug in the volume number is fixed.
-% Additionally, \online{https://ctan.org}{ctan.org}, \online{https://github.com}{github.com}, \online{https://gitlab.com}{gitlab.com}, \online{https://sourceforge.net}{sourceforge.net}, and \online{https://hepforge.org}{hepforge.org} are recognized as |eprinttype|s.
+% Additionally, \online{https://ctan.org}{ctan.org}, \online{https://github.com}{github.com}, \online{https://gitlab.com}{gitlab.com}, \online{https://bitbucket.org}{bitbucket.org}, \online{https://www.launchpad.net}{launchpad.net}, \online{https://sourceforge.net}{sourceforge.net}, and \online{https://hepforge.org}{hepforge.org} are recognized as |eprinttype|s.
 % \DescribeMacro{erratum}
 % Errata can be included using the |related| feature.
 %
@@ -459,7 +485,7 @@
 % The majority of the loaded packages are fairly lightweight, the others can be deactivated with package options.
 %
 % \DescribeMacro{arxiv-collector}
-% ArXiv requires the setup dependent |bbl| files instead of the original |bib| files, which causes trouble if the local \LaTeX\ version differs from the one used by arXiv.
+% ArXiv.org \cite{arxiv} requires the setup dependent |bbl| files instead of the original |bib| files, which causes trouble if the local \hologo{LaTeX} version differs from the one used by arXiv.
 % The |arxiv-collector| python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures).
 %
 % \StopEventually{
@@ -471,9 +497,12 @@
 %
 % \section{Options}
 %
-% Load the |kvoptions| package and define a |hep| namespace.
+%<*package>
+
+% Load the |pdftexcmds| \cite{pdftexcmds} and |kvoptions| \cite{kvoptions} packages and define a |hep| namespace.
 % \DoNotIndex{\RequirePackage,\SetupKeyvalOptions}
 %    \begin{macrocode}
+\RequirePackage{pdftexcmds}
 \RequirePackage{kvoptions}
 \SetupKeyvalOptions{
   family=hep,
@@ -548,7 +577,7 @@
 % \end{macro}
 %
 % \begin{macro}{glossaries}
-% Provide the option |glossaries| able to turn of the use of the |glossaries-extra| package \cite{glossaries-extra}.
+% Provide the option |glossaries| able to turn of the use of the |glossaries| package \cite{glossaries}.
 % \DoNotIndex{\ifhep at glossaries}
 %    \begin{macrocode}
 \DeclareBoolOption[true]{glossaries}
@@ -572,39 +601,94 @@
 % \end{macro}
 %
 % \begin{macro}{revtex}
-% Provide the option |revtex| for |revtex| \cite{revtex} compatibility mode.
+% Provide the option |revtex| for REV\hologo{TeX} \cite{revtex} compatibility mode.
 %    \begin{macrocode}
 \DeclareBoolOption[false]{revtex}
 %    \end{macrocode}
 % \end{macro}
-
+%
+% \begin{macro}{jhep}
+% Provide the option |jhep| for |JHEP| \cite{jhep} compatibility mode.
+%    \begin{macrocode}
+\DeclareBoolOption[false]{jhep}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{jcap}
+% Provide the option |jcap| for |JCAP| \cite{jcap} compatibility mode.
+%    \begin{macrocode}
+\DeclareBoolOption[false]{jcap}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{pos}
+% Provide the option |pos| for |PoS| compatibility mode.
+%    \begin{macrocode}
+\DeclareBoolOption[false]{pos}
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Process options}
 %
 %    \begin{macrocode}
 \ProcessKeyvalOptions*
 %    \end{macrocode}
+%
+% Set the |pos| compatibility options.
+% \DoNotIndex{\ifhep at pos,\setkeys,\fi}
+%    \begin{macrocode}
+\ifhep at pos
+  \setkeys{hep}{title=false, defaults}
+\fi
+%    \end{macrocode}
+%
 % Set the |revtex| compatibility options.
-% \DoNotIndex{\ifhep at revtex,\setkeys,\fi}
+% \DoNotIndex{\ifhep at revtex}
 %    \begin{macrocode}
 \ifhep at revtex
   \setkeys{hep}{defaults, title=false, lang=american, bibliography=false}
 \fi
 %    \end{macrocode}
+%
+% Define the SISSA conditional.
+%    \begin{macrocode}
+\newif\ifhep at sissa
+\ifhep at jhep\hep at sissatrue
+\else
+  \ifhep at jcap\hep at sissatrue
+  \else\hep at sissafalse
+  \fi
+\fi
+%    \end{macrocode}
+%
+% Set the SISSA compatibility options.
+%    \begin{macrocode}
+\ifhep at sissa
+  \setkeys{hep}{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}
+  \hoffset 0pt
+  \voffset 0pt
+\fi
+%    \end{macrocode}
 
-
 % \section{Engine}
 %
 % \begin{macro}{\ifxetexorluatex}
 % Load the |ifluatex| \cite{ifluatex} and |ifxetex| \cite{ifxetex} packages.
-% Define the |\ifxetexorluatex| conditional.
+% Define the |\ifxetexorluatex| conditional checking if the package is executed by \hologo{LuaLaTeX} or \hologo{XeLaTeX}.
 % \DoNotIndex{\newif,\ifxetex,\xetexorluatextrue,\else,\ifluatex,\xetexorluatexfalse,\fi}
 %    \begin{macrocode}
 \RequirePackage{ifluatex}
 \RequirePackage{ifxetex}
 \newif\ifxetexorluatex
-\ifxetex\xetexorluatextrue\else
+\ifxetex\xetexorluatextrue
+\else
   \ifluatex\xetexorluatextrue
-    \else\xetexorluatexfalse
+  \else\xetexorluatexfalse
   \fi
 \fi
 %    \end{macrocode}
@@ -612,12 +696,23 @@
 
 % \section{Text}
 %
-% Load |alphabeta| package \cite{alphabeta} first in order to archive the correct behaviour.
+% Load the |alphabeta| package \cite{alphabeta} first in order to archive the correct behaviour.
 % The |alphabeta| package provides upright Greek letters in text mode.
 %    \begin{macrocode}
 \RequirePackage{alphabeta}
 %    \end{macrocode}
 %
+% Set the whole text to sans serif if requested.
+% Load the |sansmathfonts| package \cite{sansmathfonts} first.
+% Although, most fonts will later be overwritten by the |lmodern| package \cite{lmodern} some mathematical objects are ensured to be in sans serif.
+% \DoNotIndex{\ifhep at serif,\renewcommand,\familydefault,\sfdefault}
+%    \begin{macrocode}
+\ifhep at serif\else
+  \RequirePackage{sansmathfonts}
+  \renewcommand\familydefault{\sfdefault}
+\fi
+%    \end{macrocode}
+%
 % Pick the correct font encoding depending on the engine used and load the |fontenc| package \cite{fontenc} with this encoding.
 % For details of the font encoding see \cite{encguide}.
 % \DoNotIndex{\def,\@encoding}
@@ -635,8 +730,18 @@
 \RequirePackage{textcomp}
 \RequirePackage{microtype}
 %    \end{macrocode}
-
+%
 % Define sans serif small caps font shapes.
+% The font abbreviations are
+% \begin{description}[nosep]
+%  \item[lmss] Latin modern sans serif font
+%  \item[cmss] Computer modern sans serif font
+%  \item[xcmss] Extended computer modern sans serif font (from the |sansmathfonts| package \cite{sansmathfonts})
+%  \item[bx] Bold extended series
+%  \item[m] Medium weight and width series
+%  \item[c] Medium weight, condensed width series
+%  \item[sc] Caps and small caps font shape
+% \end{description}
 % \DoNotIndex{\DeclareFontShape,\sffamily}
 %    \begin{macrocode}
 \ifxetexorluatex
@@ -657,7 +762,7 @@
   \RequirePackage[utf8]{inputenc}
 \fi
 %    \end{macrocode}
-
+%
 % Load the |babel| \cite{babel} package for hyphenation and the recommended |csquotes| package \cite{csquotes}.
 % \DoNotIndex{\hep at lang}
 %    \begin{macrocode}
@@ -664,15 +769,7 @@
 \RequirePackage[\hep at lang]{babel}
 \RequirePackage{csquotes}
 %    \end{macrocode}
-
-% Set the whole text to sans serif if requested.
-% \DoNotIndex{\ifhep at serif,\renewcommand,\familydefault,\sfdefault}
-%    \begin{macrocode}
-\ifhep at serif\else
-  \renewcommand\familydefault{\sfdefault}
-\fi
-%    \end{macrocode}
-
+%
 % \begin{macro}{\underline}
 % Load the |soul| package \cite{soul} for hyphenable underlined text.
 % \DoNotIndex{\let}
@@ -681,10 +778,10 @@
 \let\underline\ul
 %    \end{macrocode}
 % \end{macro}
-
-% \subsection{Font size}
 %
-% Undefine previously defined font sizes and load the \LaTeX\ font size file corresponding to the font size option.
+% \subsection{Font size} \label{sec:font size}
+%
+% Undefine previously defined font sizes and load the \hologo{LaTeX} font size file corresponding to the font size option.
 % \DoNotIndex{\remove at pt,\edef,\@ptsize,\expandafter,\small,\relax,\footnotesize,\scriptsize}
 %    \begin{macrocode}
 \ifhep at defaults\else
@@ -710,18 +807,25 @@
 % Add the missing |\vs| command.
 % \DoNotIndex{\DeclareRobustCommand,\xperiodafter,\foreignabbrfont,\pdf at strcmp,\hep at lang@foreign}
 %    \begin{macrocode}
-\RequirePackage{pdftexcmds}
-\newcommand{\hep at lang@foreign}{british}
-\ifnum\pdf at strcmp{\hep at lang}{american}=0%
-  \renewcommand{\hep at lang@foreign}{USenglish}%
+\ifnum\pdf at strcmp{\hep at lang}{american}=0
+  \newcommand{\hep at lang@foreign}{USenglish}
+\else
+  \ifnum\pdf at strcmp{\hep at lang}{USenglish}=0
+    \newcommand{\hep at lang@foreign}{USenglish}
+  \else
+    \newcommand{\hep at lang@foreign}{british}
+  \fi
 \fi
-\ifnum\pdf at strcmp{\hep at lang}{USenglish}=0%
-  \renewcommand{\hep at lang@foreign}{USenglish}%
-\fi
 \RequirePackage[all, \hep at lang@foreign]{foreign}
 \DeclareRobustCommand\vs{\xperiodafter{{\foreignabbrfont{vs}}}}
 %    \end{macrocode}
 % \end{macro}
+%
+% The |foreign| package relies on the |xspace| package \cite{xspace}.
+% Ensure that |\xspace| is compatible with the |\enquote| macro from the |csquote| package.
+%    \begin{macrocode}
+\xspaceaddexceptions{\csq at qclose@i}
+%    \end{macrocode}
 
 %\begin{macro}{\no}
 % Define the macro |\no|\marg{number} for the use of \textnumero\ with appropriate spacing.
@@ -729,7 +833,7 @@
 \newcommand{\no}[1]{\textnumero~#1}
 %    \end{macrocode}
 % \end{macro}
-
+%
 %\begin{macro}{\software}
 % Define a macro for software with optional version information |\software|\linebreak[1]\oarg{version}\linebreak[1]\marg{name}, using the |relsize| package \cite{relsize}.
 % \DoNotIndex{\hspace,\fontdimen,\font,\smaller,\textsc}
@@ -740,17 +844,17 @@
 }
 %    \end{macrocode}
 % \end{macro}
-
+%
 % \begin{macro}{\online}
 % The |\online|\marg{text}\marg{url} macro combines the features of the |\href| and the |\url| macros.
 % \DoNotIndex{\href,\url}
 %    \begin{macrocode}
-\newcommand{\online}[2]{\href{#1}{\url{#2}}}
+\newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}
 %    \end{macrocode}
 % \end{macro}
 
 % \subsection{Lists}
-
+%
 % Load the |enumitem| package \cite{enumitem}.
 %    \begin{macrocode}
 \RequirePackage[inline]{enumitem}
@@ -798,6 +902,7 @@
 % \section{Geometry}
 %
 % Load the |geometry| package \cite{geometry} and adjust the text width and height to the values of the |a4wide| package \cite{a4wide}.
+% This step must happen after readjusting the font size in \cref{sec:font size}.
 % \DoNotIndex{\ifhep at defaults,\hep at paper,\geometry}
 %    \begin{macrocode}
 \ifhep at defaults\else
@@ -808,7 +913,7 @@
 
 %\begin{macro}{\useparskip}
 %\begin{macro}{\useparindent}
-% Load the |parskip| package \cite{parskip} and provide two commands switching between the two paragraph modes.
+% Load the |parskip| package \cite{parskip} if requested and provide two commands switching between the two paragraph modes.
 % \DoNotIndex{\ifhep at parindent,\setlength,\parskip,\baselineskip,\parindent}
 %    \begin{macrocode}
 \ifhep at parindent\else
@@ -853,13 +958,13 @@
 %    \begin{macrocode}
 \RequirePackage{xparse}
 \DeclareDocumentCommand{\mathdef}{mO{0}m}{%
-  \expandafter\let\csname old\string#1\endcsname=#1
-  \expandafter\newcommand\csname new\string#1\endcsname[#2]{#3}
+  \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 new\string#1\endcsname
+      \expandafter\let\expandafter\next\csname math\string#1\endcsname
     \else
-      \expandafter\let\expandafter\next\csname old\string#1\endcsname
+      \expandafter\let\expandafter\next\csname text\string#1\endcsname
     \fi
     \next
   }%
@@ -874,10 +979,20 @@
 %    \end{macrocode}
 % \end{macro}
 
+% \begin{macro}{\overline}
+% Redefine |\overline| to be a text macro using the |soul| package \cite{soul}.
+% Extend it as a math macro with the original definition from |amsmath| \cite{amsmath}.
+%    \begin{macrocode}
+\def\overline#1{{\setul{-2ex}{}\ul{#1}}}
+\DeclareRobustCommand{\over at line}[1]{\@@overline{#1}}
+\mathdef{\overline}{\over at line}
+%    \end{macrocode}
+% \end{macro}
+
 % \begin{macro}{eqnarray}
 % Undefine the |eqnarray| environment.
 %    \begin{macrocode}
-\ifhep at eqnarray\else%
+\ifhep at eqnarray\else
   \let\eqnarray\@undefined
   \let\endeqnarray\@undefined
 \fi
@@ -887,9 +1002,10 @@
 % \subsection{Math fonts}
 %
 % \begin{macro}{\mathbf}
-% Load the |bm| package \cite{bm} for superior boldmath.
+% Load the |bm| package \cite{bm} for superior boldmath after limiting the number of allocated math alphabets.
 % Make math symbols bold whenever they appear in bold macros such as |\section|\marg{text}.
 %    \begin{macrocode}
+\newcommand{\bmmax}{2}
 \RequirePackage{bm}
 \let\mathbf\bm
 \g at addto@macro\bfseries{\boldmath}
@@ -900,6 +1016,15 @@
 % Load the |fixmath| package \cite{fixmath} which ensures that upper Greek letters in math mode are italic.
 % Ensure that also math mode is sans serif using the |sfmath| package \cite{sfmath} if the option sans serif is passed to the package.
 % Ensure that |\mathsf| is italic as well as sans serif and sans for sans and sans serif documents, respectively.
+% The font abbreviations are
+% \begin{description}[nosep]
+%  \item[OML] \hologo{TeX} math italic font encoding
+%  \item[cmm] Computer modern math italic font
+%  \item[cmbr] Computer modern bright font
+%  \item[bx] Bold extended series
+%  \item[m] Medium weight and width series
+%  \item[it] Italic font shape
+% \end{description}
 %    \begin{macrocode}
 \ifhep at serif
   \RequirePackage{fixmath}
@@ -907,6 +1032,7 @@
   \SetMathAlphabet{\mathsf}{bold}{OML}{cmbr}{bx}{it}
 \else
   \RequirePackage[slantedGreek]{sfmath}
+  \RequirePackage{sansmathfonts}
   \DeclareMathAlphabet{\mathsf}{OML}{cmm}{m}{it}
   \SetMathAlphabet{\mathsf}{bold}{OML}{cmm}{bx}{it}
 \fi
@@ -918,11 +1044,22 @@
 \RequirePackage{mathrsfs}
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\mathbb}
+% Load the |bbm| package \cite{bbm-macros} for the |\mathbb| math blackboard style font in (sans-) serif.
+%    \begin{macrocode}
+\RequirePackage{bbm}
+\ifhep at serif
+  \let\mathbb\mathbbm
+\else
+  \let\mathbb\mathbbmss
+\fi
+%    \end{macrocode}
+% \end{macro}
 
 % \subsection{Physics notation}
 %
 % \begin{macro}{\slashed}
-% \begin{macro}{\units}
+% \begin{macro}{\unit}
 % Load the |physics| package \cite{physics} which provides macros useful for publications in physics.
 % Additionally, load the |slashed| package \cite{slashed} which provides the slashed macro for Dirac notation.
 % Finally, load the |units| package \cite{units} which provides the |\units| and |\nicefrac| macros.
@@ -941,6 +1078,13 @@
 %    \end{macrocode}
 % \end{macro}
 
+% \begin{macro}{\d}
+% Provide a differential |\d|.
+%    \begin{macrocode}
+\AtBeginDocument{\mathdef{\d}{\dd}}
+%    \end{macrocode}
+% \end{macro}
+
 % \begin{macro}{\oset}
 % Define a new overset macro |\oset|\oarg{offset}\marg{over}\marg{base}
 %    \begin{macrocode}
@@ -960,7 +1104,7 @@
 
 % \section{Floats}
 %
-% Adjust the \LaTeX\ float placement defaults
+% Adjust the \hologo{LaTeX} float placement defaults
 %    \begin{macrocode}
 \renewcommand{\textfraction}{0.01}
 \setcounter{topnumber}{1}
@@ -1019,14 +1163,18 @@
 %    \end{macrocode}
 %
 % Load the |subcaption| package \cite{subcaption}.
+% Provide old |\subcaption at minipage| macro.
 %    \begin{macrocode}
-\RequirePackage[subrefformat = parens]{subcaption}
+\RequirePackage[subrefformat=parens]{subcaption}
 \captionsetup{font=small}
 \captionsetup[sub]{font=small}
+\providecommand*\subcaption at minipage[2]{%
+  \minipage#1{#2}\setcaptionsubtype\relax%
+}
 %    \end{macrocode}
 % \begin{environment}{panels}
 % \begin{macro}{\panel}
-% Load the |subcaption| package \cite{subcaption} and define the |panels| environment as well as the |\panel| macro.
+% Define the |panels| environment and the |\panel| macro.
 %    \begin{macrocode}
 \newenvironment{panels}[2][b]{%
 %    \end{macrocode}
@@ -1058,15 +1206,15 @@
 % \end{macro}
 % \end{environment}
 
-% Reajust the captions to the revtex class.
+% Reajust the captions to the revtex class using the |ragged2e| package \cite{ragged2e}.
 %    \begin{macrocode}
 \ifhep at revtex
+  \RequirePackage{ragged2e}
+  \DeclareCaptionFormat{revtex}{#1#2\justifying{#3}}
+  \captionsetup{font=small, format=revtex}
+  \captionsetup[sub]{font=footnotesize, format=plain}
   \renewcommand{\figurename}{Figure}
   \renewcommand{\tablename}{Table}
-  \RequirePackage{ragged2e}
-  \DeclareCaptionFormat{revtex}{#1#2\justifying{#3}}
-  \captionsetup{font = small, format = revtex}
-  \captionsetup[sub]{font = footnotesize, format = plain}
 \fi
 %    \end{macrocode}
 
@@ -1088,7 +1236,7 @@
 \RequirePackage{graphicx}
 \providecommand{\tikzsetnextfilename}[1]{}
 \newcommand{\graphic}[2][1]{\tikzsetnextfilename{#2}{%
-  \centering\includegraphics[width=#1\linewidth]{#2}%
+  \centering\includegraphics[width=#1\linewidth]{#2}\par%
 }}
 %    \end{macrocode}
 % \end{macro}
@@ -1119,7 +1267,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\email}
-% Provide macro for the email of authors used as |\author{|$\langle name\rangle$| \email{|$\langle email\rangle$|}}|.
+% Define a macro for the email of authors used as |\author{|$\langle name\rangle$| \email{|$\langle email\rangle$|}}|.
 %    \begin{macrocode}
 \AtEndOfClass{\newcommand{\email}[1]{%
   \unskip\thanks{\online{mailto:#1}{#1}}
@@ -1153,8 +1301,7 @@
 % \subsection{Preprint}
 %
 % \begin{macro}{\preprint}
-% Places a preprint number in the top right corner of the first page.
-% This code uses the |varwidth| \cite{varwidth}, |atbegshi| \cite{atbegshi}, and |picture| \cite{picture} packages.
+% Define the |\preprint| macro using the |varwidth| package \cite{varwidth}.
 %    \begin{macrocode}
 \let\@preprint\relax
 \newcommand\preprint[1]{\long\gdef\@preprint{#1}}
@@ -1164,13 +1311,23 @@
     \textsc{\small\@preprint}%
   \end{varwidth}%
 }
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\maketitle}
+% Places a preprint number in the top right corner of the title page using the |atbegshi| \cite{atbegshi} and |picture| \cite{picture} packages.
+%    \begin{macrocode}
 \RequirePackage{atbegshi}
 \RequirePackage{picture}
-\AtBeginShipoutFirst{%
-  \put(
-    \textwidth+\oddsidemargin-\widthof{\@preprint at box},
-    -2pt-\topmargin-\heightof{\@preprint at box}
-  ){\normalfont\@preprint at box}
+\let\old at maketitle\maketitle
+\renewcommand{\maketitle}{%
+  \old at maketitle%
+  \AtBeginShipoutFirst{%
+    \put(
+      \textwidth+\oddsidemargin-\widthof{\@preprint at box},
+      -2pt-\topmargin-\heightof{\@preprint at box}
+    ){\normalfont\@preprint at box}
+  }
 }
 %    \end{macrocode}
 % \end{macro}
@@ -1180,8 +1337,10 @@
 % \begin{environment}{abstract}
 % Adjust the |abstract| environment to not start with indentation.
 %    \begin{macrocode}
-\let\old at abstract\abstract
-\renewcommand\abstract{\old at abstract\noindent\ignorespaces}
+\@ifundefined{abstract}{}{%
+  \let\old at abstract\abstract%
+  \renewcommand\abstract{\old at abstract\noindent\ignorespaces}%
+}
 %    \end{macrocode}
 % \end{environment}
 % End of check for |title| option.
@@ -1191,143 +1350,272 @@
 
 % \section{Bibliography}
 %
-% Check if bibliography management is requested using the |pdftexcmds| package \cite{pdftexcmds}.
+% Check if bibliography management is requested.
 %    \begin{macrocode}
 \ifnum\pdf at strcmp{\hep at bibliography}{false}=0\else
 %    \end{macrocode}
 %
 % \begin{macro}{\bibliography}
-% Load the |biblatex| package \cite{biblatex} with a JHEP like bibliography style.
+% Load the |biblatex| package \cite{biblatex} with the datamodel defined in \cref{sec:data model}.
 %    \begin{macrocode}
-\RequirePackage[style=\hep at bibliography]{biblatex}
+\RequirePackage[style=\hep at bibliography, datamodel=hep-paper]{biblatex}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{hep-paper}
+% Define a new sorting template that sorts only multi key |\cite| entries according to their date and leaves the rest of the bibliography entries in the order they appear in the text.
+% Provide the |\DeclareSortingTemplate| macro for older |biblatex| installations.
+%    \begin{macrocode}
+\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}
+  }
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% Use the new sorting scheme and abbreviat all first names.
+%    \begin{macrocode}
 \ExecuteBibliographyOptions{
-  sorting=none,
+  sorting=hep-paper,
   giveninits=true
 }
 %    \end{macrocode}
+%
+% \begin{macro}{erratum}
+% Add new bibliography string \enquote{Erratum} for the use in the |relatedtype| field.
+%    \begin{macrocode}
+\NewBibliographyString{erratum}
+\DefineBibliographyStrings{english}{erratum={Erratum}}
+%    \end{macrocode}
 % \end{macro}
-% Read the collaboration and pre-print information if present.
-% Move letters from the volume field to the journal field.
+%
+% \begin{macro}{\printbibliography}
+% Allow the bibliography to be printed sloppy
 %    \begin{macrocode}
-\newcommand{\@reg at exp}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}}
-\newcommand{\@reg at exp@}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}}
+\let\old at printbibliography\printbibliography
+\renewcommand{\printbibliography}{\sloppy\old at printbibliography}
+%    \end{macrocode}
+% \end{macro}
+
+% \subsection{Sourcemap}
+%
+% \begin{macro}{\reg at exp@one}
+% \begin{macro}{\reg at exp@two}
+% \begin{macro}{\reg at exp@url}
+% Define regular expressions in order to deal with inconsistent journal title and volume naming as well as URL protocols.
+%    \begin{macrocode}
+\newcommand{\reg at exp@one}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}}
+\newcommand{\reg at exp@two}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}}
+\newcommand{\reg at exp@url}{\regexp{\A(ht|f)tp(s)?:\/\/}}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\DeclareSourcemap}
+% Use the |\DeclareSourcemap| feature.
+%    \begin{macrocode}
 \DeclareSourcemap{%
-  \maps[datatype=bibtex,overwrite=true]{%
+  \maps[datatype=bibtex, overwrite=true]{%
+%    \end{macrocode}
+% \begin{macro}{collaboration}
+% Read the collaboration information if present.
+%    \begin{macrocode}
     \map{%
-      \step[fieldsource=Collaboration,final=true]%
-      \step[fieldset=usere,origfieldval,final=true]
+      \step[fieldsource=Collaboration, final=true]%
+      \step[fieldset=collaboration, origfieldval, final=true]
     }%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{reportnumber}
+% Read the pre-print information if present.
+%    \begin{macrocode}
     \map{%
-      \step[fieldsource=reportNumber,final=true]%
-      \step[fieldset=userf,origfieldval,final=true]
+      \step[fieldsource=reportNumber, final=true]%
+      \step[fieldset=reportnumber, origfieldval, final=true]
     }%
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{journal}
+% Move letters from the volume field to the journal field.
+%    \begin{macrocode}
     \map[overwrite]{
-      \step[fieldsource=volume, match=\@reg at exp, final]
-      \step[fieldsource=volume, match=\@reg at exp@, replace={$2}]
+      \step[fieldsource=volume, match=\reg at exp@one, final]
+      \step[fieldsource=volume, match=\reg at exp@two, replace={$2}]
       \step[fieldsource=journal, fieldtarget=journaltitle]
       \step[fieldset=journaltitle, fieldvalue={\space$1$2}, append=true]
     }
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{url}
+% Remove the protocol from URL.
+%    \begin{macrocode}
+    \map{
+      \step[fieldsource=url, final=true]
+      \step[fieldset=protocollessurl, origfieldval, final=true]
+      \step[fieldsource=protocollessurl, match=\reg at exp@url, replace={}]
+    }
   }%
 }
 %    \end{macrocode}
-
-% Override the author information with collaboration information if present.
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{In:}
+% Remove spurious \enquote{In:} if no journal is present.
 %    \begin{macrocode}
-\renewbibmacro*{author}{%
-  \iffieldundef{usere}{\printnames{author}}{\textbf{\printfield{usere}}}%
+\renewbibmacro*{in:}{%
+  \iffieldundef{journaltitle}{}{\printtext{\bibstring{in}\intitlepunct}}%
 }
 %    \end{macrocode}
-
-% Remove spurious `In:' if no journal is present.
+% \end{macro}
+%
+% \begin{macro}{url}
+% Show URLs without the protocol.
 %    \begin{macrocode}
-\renewbibmacro*{in:}{%
-  \iffieldundef{journal}{}{\printtext{\bibstring{in}\intitlepunct}}%
+\DeclareFieldFormat{url}{%
+  \mkbibacro{URL}\addcolon\space\online{#1}{\thefield{protocollessurl}}%
 }
 %    \end{macrocode}
-
+% \end{macro}
+%
+% \begin{macro}{collaboration}
+% Override the author information with collaboration information if present.
+%    \begin{macrocode}
+\renewbibmacro*{author}{%
+  \iffieldundef{collaboration}{%
+    \printnames{author}}{\textbf{\printfield{collaboration}}%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\letbibmacro}
 % Provide the |\letbibmacro| macro for old |biblatex| installations.
 %    \begin{macrocode}
 \providecommand{\letbibmacro}[2]{\csletcs{abx at macro@#1}{abx at macro@#2}}
 %    \end{macrocode}
-
+% \end{macro}
+%
+% \begin{macro}{reportnumber}
 % Add the pre-print information if present.
 %    \begin{macrocode}
 \letbibmacro{doi+eprint+url-old}{doi+eprint+url}
 \renewbibmacro*{doi+eprint+url}{%
   \usebibmacro{doi+eprint+url-old}
-  \iffieldundef{userf}{}{\textls[0]{%
+  \iffieldundef{reportnumber}{}{\textls[0]{%
     \newunitpunct\textnumero\intitlepunct%
-    \textsc{\small\printfield{userf}}%
+    \textsc{\small\printfield{reportnumber}}%
   }}%
 }
 %    \end{macrocode}
+% \end{macro}
 
-% Add CTAN as a pre-print option
+% \subsection{Eprints}
+%
+% \begin{macro}{\bib at online}
+% Private |\bib at online| macro
 %    \begin{macrocode}
-\DeclareFieldFormat{eprint:ctan}{%
-  CTAN\addcolon\space\ifhyperref{%
-    \href{https://ctan.org/pkg/#1}{\nolinkurl{#1}}%
-  }{\nolinkurl{#1}}%
+\newcommand{\bib at online}[2]{%
+  \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
 }
-\DeclareFieldAlias{eprint:CTAN}{eprint:ctan}
 %    \end{macrocode}
-
-% Add GitHub as a pre-print option
+% \end{macro}
+%
+% \begin{macro}{\new at eprint}
+% Private |\new at eprint| macro
 %    \begin{macrocode}
-\DeclareFieldFormat{eprint:github}{%
-  GitHub\addcolon\space\ifhyperref{\href{%
-      https://github.com/\thefield{eprintclass}/#1%
-    }{\nolinkurl{\thefield{eprintclass}/#1}}%
-  }{\nolinkurl{\thefield{eprintclass}/#1}}%
+\NewDocumentCommand{\new at eprint}{smm}{
+  \DeclareFieldFormat{eprint:#2}{%
+    \newcommand{\@path}{\IfBooleanT{#1}{\thefield{eprintclass}/}##1}%
+    #2\addcolon\space\bib at online{#3/\@path}{\@path}%
+  }%
 }
-\DeclareFieldAlias{eprint:GitHub}{eprint:github}
 %    \end{macrocode}
-
-% Add GitLab as a pre-print option
+% \end{macro}
+%
+% \begin{macro}{CTAN}
+% Add CTAN as a eprint option
 %    \begin{macrocode}
-\DeclareFieldFormat{eprint:gitlab}{%
-  GitLab\addcolon\space\ifhyperref{\href{%
-      https://gitlab.com/\thefield{eprintclass}/#1%
-    }{\nolinkurl{\thefield{eprintclass}/#1}}%
-  }{\nolinkurl{\thefield{eprintclass}/#1}}%
-}
-\DeclareFieldAlias{eprint:GitLab}{eprint:gitlab}
+\new at eprint{CTAN}{https://ctan.org/pkg}
+\DeclareFieldAlias{eprint:ctan}{eprint:CTAN}
 %    \end{macrocode}
-
-% Add SourceForge as a pre-print option
+% \end{macro}
+%
+% \begin{macro}{GitHub}
+% Add GitHub as a eprint option
 %    \begin{macrocode}
-\DeclareFieldFormat{eprint:sourceforge}{%
-  SourceForge\addcolon\space\ifhyperref{%
-    \href{https://sourceforge.net/projects/#1}{\nolinkurl{#1}}%
-  }{\nolinkurl{#1}}%
-}
-\DeclareFieldAlias{eprint:SourceForge}{eprint:sourceforge}
+\new at eprint*{GitHub}{https://github.com}
+\DeclareFieldAlias{eprint:github}{eprint:GitHub}
 %    \end{macrocode}
-
-% Add HEPForge as a pre-print option
+% \end{macro}
+%
+% \begin{macro}{GitLab}
+% Add GitLab as a eprint option
 %    \begin{macrocode}
-\DeclareFieldFormat{eprint:hepforge}{%
-  HEPForge\addcolon\space\ifhyperref{%
-    \href{https://#1/hepforge.org/}{\nolinkurl{#1}}%
-  }{\nolinkurl{#1}}%
-}
-\DeclareFieldAlias{eprint:HEPForge}{eprint:hepforge}
+\new at eprint*{GitLab}{https://gitlab.com}
+\DeclareFieldAlias{eprint:gitlab}{eprint:GitLab}
 %    \end{macrocode}
-
-% Add new bibliography string \enquote{Erratum} for the use in the |relatedtype| field.
+% \end{macro}
+%
+% \begin{macro}{Bitbucket}
+% Add Bitbucket as a eprint option
 %    \begin{macrocode}
-\NewBibliographyString{erratum}
-\DefineBibliographyStrings{english}{erratum={Erratum:}}
+\new at eprint*{Bitbucket}{https://bitbucket.org}
+\DeclareFieldAlias{eprint:bitbucket}{eprint:Bitbucket}
 %    \end{macrocode}
-
-% \begin{macro}{\printbibliography}
-% Allow the bibliography to be printed sloppy
+% \end{macro}
+%
+% \begin{macro}{Launchpad}
+% Add Launchpad as a eprint option
 %    \begin{macrocode}
-\let\old at printbibliography\printbibliography
-\renewcommand{\printbibliography}{\sloppy\old at printbibliography}
+\new at eprint{Launchpad}{https://launchpad.net}
+\DeclareFieldAlias{eprint:launchpad}{eprint:Launchpad}
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{SourceForge}
+% Add SourceForge as a eprint option
+%    \begin{macrocode}
+\new at eprint{SourceForge}{https://sourceforge.net/projects}
+\DeclareFieldAlias{eprint:launchpad}{eprint:SourceForge}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{HEPForge}
+% Add HEPForge as a eprint option
+%    \begin{macrocode}
+\DeclareFieldFormat{eprint:hepforge}{%
+  HEPForge\addcolon\space\bib at online{https://#1/hepforge.org}{#1}%
+}
+\DeclareFieldAlias{eprint:HEPForge}{eprint:hepforge}
+%    \end{macrocode}
+% \end{macro}
+%
+
 % End check for bibliography option.
 %    \begin{macrocode}
 \fi
@@ -1361,7 +1649,11 @@
   \pdfstringdefDisableCommands{\let\footnote\@gobble}
   \pdfstringdefDisableCommands{\let\\\@gobble}
 }
-\AtBeginShipout{\hypersetup{pdftitle={\@title}}}
+\ifhep at revtex
+  \AtBeginShipout{\hypersetup{pdftitle={\@title}}}
+\else
+  \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+\fi
 \ifhep at title
   \AtBeginDocument{\hypersetup{pdfauthor=\AB at authlist}}
 \else
@@ -1373,43 +1665,15 @@
 % Improve reference using the |cleveref| package \cite{cleveref}.
 %
 %    \begin{macrocode}
-\RequirePackage[noabbrev, capitalize, nameinlink]{cleveref}
+\RequirePackage[noabbrev, nameinlink]{cleveref}
+\newcommand{\creflastconjunction}{, and\nobreakspace}
 \crefname{enumi}{point}{points}
 \Crefname{enumi}{Point}{Points}
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}{\refstepcounter at ...}
-% Adjust the |cleveref| |\refstepcounter at noarg| and |\refstepcounter at optarg| to use the |\@currentlabel| in order to fix problems with |\subref|.
-%    \begin{macrocode}
-\def\refstepcounter at noarg#1{%
-  \cref at old@refstepcounter{#1}%
-  \cref at constructprefix{#1}{\cref at result}%
-  \@ifundefined{cref@#1 at alias}%
-    {\def\@tempa{#1}}%
-    {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
-  \protected at edef\cref at currentlabel{%
-    [\@tempa][\arabic{#1}][\cref at result]%
-    \noexpand\@currentlabel%
-  }% changed
-}
-
-\def\refstepcounter at optarg[#1]#2{%
-  \cref at old@refstepcounter{#2}%
-  \cref at constructprefix{#2}{\cref at result}%
-  \@ifundefined{cref@#1 at alias}%
-    {\def\@tempa{#1}}%
-    {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
-  \protected at edef\cref at currentlabel{%
-    [\@tempa][\arabic{#2}][\cref at result]%
-    \noexpand\@currentlabel% changed
-  }%
-}
-%    \end{macrocode}
-% \end{macro}
-
 %\begin{macro}{\no at break@before}
-% Provide macro able to prevent line breaks.
+% Define a macro able to prevent line breaks.
 % \DoNotIndex{\no at break@before,\ifvmode,\ifhmode,\ifdim,\lastskip,\unskip,\nobreakspace}
 %    \begin{macrocode}
 \newcommand\no at break@before{%
@@ -1431,6 +1695,7 @@
 \AtBeginDocument{\renewcommand\ref{\no at break@before\labelcref}}
 %    \end{macrocode}
 % \end{macro}
+% ! Bug ! in equations the additional brackets from the cleveref macro conflict with the traditional |(\ref|\marg{key}|)| approach
 
 % \begin{macro}{\eqref}
 % Adjust |\eqref|\marg{key} in order to prevent preceding line breaks and to enable the possibility to reference multiple equations at once.
@@ -1461,7 +1726,7 @@
 % \begin{macro}{\eqcrefname}
 % Define the |\eqcrefname| macro for named equation types.
 %    \begin{macrocode}
-\DeclareDocumentCommand{\eqcrefname}{mmo}{
+\NewDocumentCommand{\eqcrefname}{mmo}{
   \crefname{#1}{#2}{\IfValueTF{#3}{#3}{#2s}}
   \creflabelformat{#1}{(##2##1##3)}
 }
@@ -1477,7 +1742,7 @@
 %    \end{macrocode}
 % \end{macro}
 
-% \subsection{Citation macros}
+% \subsection{Citations}
 %
 % \begin{macro}{\cite}
 % Adjust |\cite|\marg{key} in order to prevent preceding line breaks.
@@ -1496,8 +1761,8 @@
 \NewBibliographyString{refname}
 \NewBibliographyString{refsname}
 \DefineBibliographyStrings{english}{%
-  refname = {Reference},
-  refsname = {References}
+  refname = {reference},
+  refsname = {references}
 }
 %    \end{macrocode}
 % \begin{macro}{\ccite}
@@ -1505,7 +1770,7 @@
 % Define \emph{clever} citation macros.
 % \begin{macrocode}
 \DeclareCiteCommand{\ccite}{%
-  \ifnum\thecitetotal=1%
+  \ifnum\thecitetotal=1
     \bibstring{refname}%
   \else%
     \bibstring{refsname}%
@@ -1562,15 +1827,33 @@
 }}
 %    \end{macrocode}
 
-% \begin{macro}{\if at begin@of at sentence}
+% \begin{macro}{\begin at sentence}
 % Mark the beginning of a paragraph as if it would follow a full stop using the |everyhook| package \cite{everyhook}.
-% Provide a macro checking for the beginning of a sentence by examining the length of the preceeding space. (This breaks if |\frenchspacing| is activated)
 %    \begin{macrocode}
-\usepackage[excludeor]{everyhook}
-\PushPostHook{par}{{\spacefactor=3000}}
+\RequirePackage[excludeor]{everyhook}
+\newcommand{\begin at sentence}{1001}
+\PushPostHook{par}{{\spacefactor=\begin at sentence}}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\frenchspacing}
+% Adjust the |\frenchspacing| macro to be compatibel with this idea.
+%    \begin{macrocode}
+\def\frenchspacing{%
+  \sfcode`\.\begin at sentence \sfcode`\?\begin at sentence
+  \sfcode`\!\begin at sentence \sfcode`\:\begin at sentence
+  \sfcode`\;\@m \sfcode`\,\@m
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\if at begin@of at sentence}
+% Provide a macro checking for the beginning of a sentence by examining the length of the preceeding space.
+%    \begin{macrocode}
 \newcommand{\if at begin@of at sentence}[2]{\leavevmode\protecting{%
   \ifboolexpr{ test {\ifnumcomp{\spacefactor}{=}{3000}} or%
-               test {\ifnumcomp{\spacefactor}{=}{2000}}%
+               test {\ifnumcomp{\spacefactor}{=}{2000}} or%
+               test {\ifnumcomp{\spacefactor}{=}{\begin at sentence}}%
   }{#1}{#2}%
 }}
 %    \end{macrocode}
@@ -1577,25 +1860,27 @@
 % \end{macro}
 
 % \begin{macro}{\acronym}
-% The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\marg{definition}\oarg{plural\linebreak[4] definition} macro is defined.
+% The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\meta{*}\marg{definition}\oarg{plural\linebreak[4] definition} macro is defined.
 % \begin{enumerate}[nosep, label=\#\arabic*]
 % \item star for omitting the \enquote{s} in the short plural
 % \item optional typeset abbreviation
 % \item mandatory abbreviation
+% \item star for restoring the \hologo{TeX} default for space after text macros
 % \item mandatory long form
 % \item optional plural long form
 % \end{enumerate}
 %    \begin{macrocode}
-\DeclareDocumentCommand{\acronym}{sommo}{
+\NewDocumentCommand{\acronym}{somsmo}{
   \newabbreviation[
-    longplural=\IfNoValueTF{#5}{#4s}{#5},
+    longplural=\IfNoValueTF{#6}{#5s}{#6},
     \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
-  ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#4}
+  ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#5}
 %    \end{macrocode}
 % Provide the singular acronym macro.
 %    \begin{macrocode}
   \expandafter\newcommand\csname#3\endcsname{%
-    \if at begin@of at sentence{\cGls{#3}}{\cgls{#3}}\@\xspace%
+    \if at begin@of at sentence{\cGls{#3}}{\cgls{#3}}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
   }
 %    \end{macrocode}
 % Expand the singular acronym macro in \PDF labels.
@@ -1607,13 +1892,14 @@
 % Provide the singular acronym macro in math mode.
 %    \begin{macrocode}
   \expandafter\mathdef\csname#3\endcsname{%
-    \text{\glsxtrshort{#3}}\glsunset{#3}%
+    \text{\glsxtrshort{#3}}\@gls at increment@currcount{#3}%
   }
 %    \end{macrocode}
 % Provide the plural acronym macro.
 %    \begin{macrocode}
   \expandafter\newcommand\csname#3s\endcsname{%
-    \if at begin@of at sentence{\cGlspl{#3}}{\cglspl{#3}}\@\xspace%
+    \if at begin@of at sentence{\cGlspl{#3}}{\cglspl{#3}}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
   }
 %    \end{macrocode}
 % Expand the plural acronym macro in \PDF labels.
@@ -1625,7 +1911,7 @@
 % Provide the plural acronym macro in math mode.
 %    \begin{macrocode}
   \expandafter\mathdef\csname#3s\endcsname{%
-    \text{\glsxtrshortpl{#3}}\glsunset{#3}%
+    \text{\glsxtrshortpl{#3}}\@gls at increment@currcount{#3}%
   }
 }
 %    \end{macrocode}
@@ -1634,14 +1920,13 @@
 % \begin{macro}{\shortacronym}
 % The |\shortacronym| never expands into the long form.
 %    \begin{macrocode}
-\DeclareDocumentCommand{\shortacronym}{somm}{
-  \newabbreviation[
-    \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
-  ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#4}
+\NewDocumentCommand{\shortacronym}{somsmo}{
 %    \end{macrocode}
 % Provide the singular acronym macro.
 %    \begin{macrocode}
-  \expandafter\newcommand\csname#3\endcsname{\cgls*{#3}\@\xspace}
+  \expandafter\newcommand\csname#3\endcsname{%
+    \IfNoValueTF{#2}{#3}{#2}\IfBooleanTF{#4}{}{\@\xspace}%
+  }
 %    \end{macrocode}
 % Expand the singular acronym macro in \PDF labels.
 %    \begin{macrocode}
@@ -1651,11 +1936,16 @@
 %    \end{macrocode}
 % Provide the singular acronym macro in math mode.
 %    \begin{macrocode}
-  \expandafter\mathdef\csname#3\endcsname{\text{\glsxtrshort*{#3}}}
+  \expandafter\mathdef\csname#3\endcsname{%
+    \text{\IfNoValueTF{#2}{#3}{#2}}%
+  }
 %    \end{macrocode}
 % Provide the plural acronym macro.
 %    \begin{macrocode}
-  \expandafter\newcommand\csname#3s\endcsname{\cglspl*{#3}\@\xspace}
+  \expandafter\newcommand\csname#3s\endcsname{%
+    \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
+  }
 %    \end{macrocode}
 % Expand the plural acronym macro in \PDF labels.
 %    \begin{macrocode}
@@ -1665,8 +1955,9 @@
 %    \end{macrocode}
 % Provide the plural acronym macro in math mode.
 %    \begin{macrocode}
-  \expandafter\mathdef\csname#3s\endcsname{\text{\glsxtrshortpl*{#3}}}%
-  \glsunset{#3}
+  \expandafter\mathdef\csname#3s\endcsname{%
+    \text{\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}}%
+  }%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -1674,31 +1965,32 @@
 % \begin{macro}{\longacronym}
 % The |\longacronym| never shows the abbreviated form.
 %    \begin{macrocode}
-\DeclareDocumentCommand{\longacronym}{sommo}{
+\NewDocumentCommand{\longacronym}{somsmo}{
 %    \end{macrocode}
 % Provide the singular acronym macro.
 %    \begin{macrocode}
   \expandafter\newcommand\csname#3\endcsname{%
-    \if at begin@of at sentence{\MakeUppercase#4}{#4}\@\xspace%
+    \if at begin@of at sentence{\MakeUppercase#5}{#5}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
   }
 %    \end{macrocode}
 % Expand the singular acronym macro in \PDF labels.
 %    \begin{macrocode}
-  \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#4 }}
+  \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#5 }}
 %    \end{macrocode}
 % Provide the plural acronym macro.
 %    \begin{macrocode}
   \expandafter\newcommand\csname#3s\endcsname{%
     \if at begin@of at sentence{%
-      \IfNoValueTF{#5}{\MakeUppercase#4s}{\MakeUppercase#5}%
+      \IfNoValueTF{#6}{\MakeUppercase#5s}{\MakeUppercase#6}%
     }{%
-      \IfNoValueTF{#5}{#4s}{#5}}\@\xspace%
+      \IfNoValueTF{#6}{#5s}{#6}}\IfBooleanTF{#4}{}{\@\xspace}%
   }
 %    \end{macrocode}
 % Expand the plural acronym macro in \PDF labels.
 %    \begin{macrocode}
   \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{%
-    \IfNoValueTF{#5}{#4s}{#5} }%
+    \IfNoValueTF{#6}{#5s}{#6} }%
   }
 }
 %    \end{macrocode}
@@ -1732,11 +2024,60 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
+%
+% \begin{macro}{abstract}
+% Adjust the |abstract| environment to reset all acronym counters.
+%    \begin{macrocode}
+\@ifundefined{abstract}{}{%
+  \let\end at old@abstract\endabstract%
+  \renewcommand\endabstract{\glsresetall\end at old@abstract}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tableofcontents}
+% Adjust the |\tableofcontents| macro to never show the long form of acronyms.
+%    \begin{macrocode}
+\let\old at table@of at contents\tableofcontents
+\renewcommand\tableofcontents{%
+  \glsunsetall\old at table@of at contents\glsresetall%
+}
+%    \end{macrocode}
+% \end{macro}
+%
 % End of glossaries if.
 %    \begin{macrocode}
 \fi
 %    \end{macrocode}
 %
+%</package>
+%
+% \section{Biblatex datamodel file} \label{sec:data model}
+%
+%<*datamodel>
+
+% \begin{macro}{reportnumber}
+% \begin{macro}{collaboration}
+% \begin{macro}{protocollessurl}
+% Define the |dbx| file containing the |hep-paper| datamodel.
+%    \begin{macrocode}
+\DeclareDatamodelFields[type=field, datatype=literal]{
+  reportnumber,
+  collaboration,
+}
+\DeclareDatamodelFields[type=field, datatype=uri]{protocollessurl}
+\DeclareDatamodelEntryfields{
+  reportnumber,
+  collaboration,
+  protocollessurl,
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%</datamodel>
+%
 % \Finale
 
 \endinput
@@ -1744,3 +2085,32 @@
 % \PrintIndex
 % makeindex -s gglo.ist -o hep-paper.gls hep-paper.glo
 % makeindex -s gglo.ist -o hep-paper.ind hep-paper.idx
+
+% \begin{macro}{\refstepcounter at ...}
+% Adjust the |cleveref| |\refstepcounter at noarg| and |\refstepcounter at optarg| to use the |\@currentlabel| in order to fix problems with |\subref|.
+%    \begin{macrocode}
+\def\refstepcounter at noarg#1{%
+  \cref at old@refstepcounter{#1}%
+  \cref at constructprefix{#1}{\cref at result}%
+  \@ifundefined{cref@#1 at alias}%
+    {\def\@tempa{#1}}%
+    {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
+  \protected at edef\cref at currentlabel{%
+    [\@tempa][\arabic{#1}][\cref at result]%
+    \noexpand\@currentlabel%
+  }% changed
+}
+
+\def\refstepcounter at optarg[#1]#2{%
+  \cref at old@refstepcounter{#2}%
+  \cref at constructprefix{#2}{\cref at result}%
+  \@ifundefined{cref@#1 at alias}%
+    {\def\@tempa{#1}}%
+    {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
+  \protected at edef\cref at currentlabel{%
+    [\@tempa][\arabic{#2}][\cref at result]%
+    \noexpand\@currentlabel% changed
+  }%
+}
+%    \end{macrocode}
+% \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins	2020-05-02 21:02:43 UTC (rev 54973)
+++ trunk/Master/texmf-dist/source/latex/hep-paper/hep-paper.ins	2020-05-02 21:03:03 UTC (rev 54974)
@@ -28,7 +28,10 @@
 LaTeX version 2005/12/01 or later.
 \endpreamble
 
-\generate{\file{hep-paper.sty}{\from{hep-paper.dtx}{package}}}
+\generate{
+  \file{hep-paper.sty}{\from{hep-paper.dtx}{package}}
+  \file{hep-paper.dbx}{\from{hep-paper.dtx}{datamodel}}
+}
 
 \Msg{*********************************************************}
 \Msg{*}

Added: trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.dbx	2020-05-02 21:03:03 UTC (rev 54974)
@@ -0,0 +1,32 @@
+%%
+%% This is file `hep-paper.dbx',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% hep-paper.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
+%% 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.
+\ProvidesFile{hep-paper.dbx}[2020/05/01 v1.3 HEP-Paper biblatex data model]
+
+\DeclareDatamodelFields[type=field, datatype=literal]{
+  reportnumber,
+  collaboration,
+}
+\DeclareDatamodelFields[type=field, datatype=uri]{protocollessurl}
+\DeclareDatamodelEntryfields{
+  reportnumber,
+  collaboration,
+  protocollessurl,
+}
+
+\endinput
+%%
+%% End of file `hep-paper.dbx'.

Modified: trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty	2020-05-02 21:02:43 UTC (rev 54973)
+++ trunk/Master/texmf-dist/tex/latex/hep-paper/hep-paper.sty	2020-05-02 21:03:03 UTC (rev 54974)
@@ -15,8 +15,9 @@
 %% 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/03/01 v1.2 Publications in High Energy Physics]
+\ProvidesPackage{hep-paper}[2020/05/01 v1.3 Publications in High Energy Physics]
 
+\RequirePackage{pdftexcmds}
 \RequirePackage{kvoptions}
 \SetupKeyvalOptions{
   family=hep,
@@ -36,22 +37,49 @@
 \DeclareBoolOption[false]{manualplacement}
 \DeclareBoolOption[true]{title}
 \DeclareBoolOption[false]{revtex}
-
+\DeclareBoolOption[false]{jhep}
+\DeclareBoolOption[false]{jcap}
+\DeclareBoolOption[false]{pos}
 \ProcessKeyvalOptions*
+\ifhep at pos
+  \setkeys{hep}{title=false, defaults}
+\fi
 \ifhep at revtex
   \setkeys{hep}{defaults, title=false, lang=american, bibliography=false}
 \fi
+\newif\ifhep at sissa
+\ifhep at jhep\hep at sissatrue
+\else
+  \ifhep at jcap\hep at sissatrue
+  \else\hep at sissafalse
+  \fi
+\fi
+\ifhep at sissa
+  \setkeys{hep}{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}
+  \hoffset 0pt
+  \voffset 0pt
+\fi
 
 \RequirePackage{ifluatex}
 \RequirePackage{ifxetex}
 \newif\ifxetexorluatex
-\ifxetex\xetexorluatextrue\else
+\ifxetex\xetexorluatextrue
+\else
   \ifluatex\xetexorluatextrue
-    \else\xetexorluatexfalse
+  \else\xetexorluatexfalse
   \fi
 \fi
 
 \RequirePackage{alphabeta}
+\ifhep at serif\else
+  \RequirePackage{sansmathfonts}
+  \renewcommand\familydefault{\sfdefault}
+\fi
 \ifxetexorluatex
   \def\@encoding{TU}
 \else
@@ -61,7 +89,6 @@
 \RequirePackage{lmodern}
 \RequirePackage{textcomp}
 \RequirePackage{microtype}
-
 \ifxetexorluatex
   \DeclareFontShape{\@encoding}{lmss}{bx}{sc}{<->cmssbxcsc10}{}
   \DeclareFontShape{\@encoding}{lmss}{m}{sc}{%
@@ -76,17 +103,10 @@
 \ifxetexorluatex\else
   \RequirePackage[utf8]{inputenc}
 \fi
-
 \RequirePackage[\hep at lang]{babel}
 \RequirePackage{csquotes}
-
-\ifhep at serif\else
-  \renewcommand\familydefault{\sfdefault}
-\fi
-
 \RequirePackage{soul}
 \let\underline\ul
-
 \ifhep at defaults\else
   \def\remove at pt#1pt{#1}
   \edef\@ptsize{\expandafter\remove at pt\hep at font}
@@ -102,27 +122,26 @@
   \input{size\@ptsize.clo}
 \fi
 
-\RequirePackage{pdftexcmds}
-\newcommand{\hep at lang@foreign}{british}
-\ifnum\pdf at strcmp{\hep at lang}{american}=0%
-  \renewcommand{\hep at lang@foreign}{USenglish}%
+\ifnum\pdf at strcmp{\hep at lang}{american}=0
+  \newcommand{\hep at lang@foreign}{USenglish}
+\else
+  \ifnum\pdf at strcmp{\hep at lang}{USenglish}=0
+    \newcommand{\hep at lang@foreign}{USenglish}
+  \else
+    \newcommand{\hep at lang@foreign}{british}
+  \fi
 \fi
-\ifnum\pdf at strcmp{\hep at lang}{USenglish}=0%
-  \renewcommand{\hep at lang@foreign}{USenglish}%
-\fi
 \RequirePackage[all, \hep at lang@foreign]{foreign}
 \DeclareRobustCommand\vs{\xperiodafter{{\foreignabbrfont{vs}}}}
+\xspaceaddexceptions{\csq at 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{\online}[2]{\href{#1}{\url{#2}}}
-
-
 \RequirePackage[inline]{enumitem}
 \newlist{inlinelist}{enumerate*}{1}
 \setlist*[inlinelist,1]{%
@@ -170,13 +189,13 @@
 
 \RequirePackage{xparse}
 \DeclareDocumentCommand{\mathdef}{mO{0}m}{%
-  \expandafter\let\csname old\string#1\endcsname=#1
-  \expandafter\newcommand\csname new\string#1\endcsname[#2]{#3}
+  \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 new\string#1\endcsname
+      \expandafter\let\expandafter\next\csname math\string#1\endcsname
     \else
-      \expandafter\let\expandafter\next\csname old\string#1\endcsname
+      \expandafter\let\expandafter\next\csname text\string#1\endcsname
     \fi
     \next
   }%
@@ -184,11 +203,16 @@
 
 \AtBeginDocument{\mathdef{\i}{\operatorname{i}}}
 
-\ifhep at eqnarray\else%
+\def\overline#1{{\setul{-2ex}{}\ul{#1}}}
+\DeclareRobustCommand{\over at line}[1]{\@@overline{#1}}
+\mathdef{\overline}{\over at line}
+
+\ifhep at eqnarray\else
   \let\eqnarray\@undefined
   \let\endeqnarray\@undefined
 \fi
 
+\newcommand{\bmmax}{2}
 \RequirePackage{bm}
 \let\mathbf\bm
 \g at addto@macro\bfseries{\boldmath}
@@ -198,10 +222,17 @@
   \SetMathAlphabet{\mathsf}{bold}{OML}{cmbr}{bx}{it}
 \else
   \RequirePackage[slantedGreek]{sfmath}
+  \RequirePackage{sansmathfonts}
   \DeclareMathAlphabet{\mathsf}{OML}{cmm}{m}{it}
   \SetMathAlphabet{\mathsf}{bold}{OML}{cmm}{bx}{it}
 \fi
 \RequirePackage{mathrsfs}
+\RequirePackage{bbm}
+\ifhep at serif
+  \let\mathbb\mathbbm
+\else
+  \let\mathbb\mathbbmss
+\fi
 
 \RequirePackage{physics}
 \RequirePackage{slashed}
@@ -209,6 +240,8 @@
 
 \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}%
@@ -257,9 +290,12 @@
     \vskip\belowcaptionskip%
   }
 \fi
-\RequirePackage[subrefformat = parens]{subcaption}
+\RequirePackage[subrefformat=parens]{subcaption}
 \captionsetup{font=small}
 \captionsetup[sub]{font=small}
+\providecommand*\subcaption at minipage[2]{%
+  \minipage#1{#2}\setcaptionsubtype\relax%
+}
 \newenvironment{panels}[2][b]{%
   \newcommand{\begin at subcaption@minipage}[2][b]{%
     \caption at withoptargs\subcaption at minipage[##1]{##2}%
@@ -279,12 +315,12 @@
 }{\endminipage}
 
 \ifhep at revtex
+  \RequirePackage{ragged2e}
+  \DeclareCaptionFormat{revtex}{#1#2\justifying{#3}}
+  \captionsetup{font=small, format=revtex}
+  \captionsetup[sub]{font=footnotesize, format=plain}
   \renewcommand{\figurename}{Figure}
   \renewcommand{\tablename}{Table}
-  \RequirePackage{ragged2e}
-  \DeclareCaptionFormat{revtex}{#1#2\justifying{#3}}
-  \captionsetup{font = small, format = revtex}
-  \captionsetup[sub]{font = footnotesize, format = plain}
 \fi
 
 \RequirePackage{booktabs}
@@ -293,7 +329,7 @@
 \RequirePackage{graphicx}
 \providecommand{\tikzsetnextfilename}[1]{}
 \newcommand{\graphic}[2][1]{\tikzsetnextfilename{#2}{%
-  \centering\includegraphics[width=#1\linewidth]{#2}%
+  \centering\includegraphics[width=#1\linewidth]{#2}\par%
 }}
 \newcommand{\graphics}[1]{\graphicspath{{./#1/}}}
 
@@ -326,107 +362,137 @@
     \textsc{\small\@preprint}%
   \end{varwidth}%
 }
+
 \RequirePackage{atbegshi}
 \RequirePackage{picture}
-\AtBeginShipoutFirst{%
-  \put(
-    \textwidth+\oddsidemargin-\widthof{\@preprint at box},
-    -2pt-\topmargin-\heightof{\@preprint at box}
-  ){\normalfont\@preprint at box}
+\let\old at maketitle\maketitle
+\renewcommand{\maketitle}{%
+  \old at maketitle%
+  \AtBeginShipoutFirst{%
+    \put(
+      \textwidth+\oddsidemargin-\widthof{\@preprint at box},
+      -2pt-\topmargin-\heightof{\@preprint at box}
+    ){\normalfont\@preprint at box}
+  }
 }
 
-\let\old at abstract\abstract
-\renewcommand\abstract{\old at abstract\noindent\ignorespaces}
+\@ifundefined{abstract}{}{%
+  \let\old at abstract\abstract%
+  \renewcommand\abstract{\old at abstract\noindent\ignorespaces}%
+}
 \fi
 
 \ifnum\pdf at strcmp{\hep at bibliography}{false}=0\else
-\RequirePackage[style=\hep at bibliography]{biblatex}
+\RequirePackage[style=\hep at 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=none,
+  sorting=hep-paper,
   giveninits=true
 }
-\newcommand{\@reg at exp}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}}
-\newcommand{\@reg at exp@}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}}
+\NewBibliographyString{erratum}
+\DefineBibliographyStrings{english}{erratum={Erratum}}
+\let\old at printbibliography\printbibliography
+\renewcommand{\printbibliography}{\sloppy\old at printbibliography}
+
+\newcommand{\reg at exp@one}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}}
+\newcommand{\reg at exp@two}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}}
+\newcommand{\reg at exp@url}{\regexp{\A(ht|f)tp(s)?:\/\/}}
 \DeclareSourcemap{%
-  \maps[datatype=bibtex,overwrite=true]{%
+  \maps[datatype=bibtex, overwrite=true]{%
     \map{%
-      \step[fieldsource=Collaboration,final=true]%
-      \step[fieldset=usere,origfieldval,final=true]
+      \step[fieldsource=Collaboration, final=true]%
+      \step[fieldset=collaboration, origfieldval, final=true]
     }%
     \map{%
-      \step[fieldsource=reportNumber,final=true]%
-      \step[fieldset=userf,origfieldval,final=true]
+      \step[fieldsource=reportNumber, final=true]%
+      \step[fieldset=reportnumber, origfieldval, final=true]
     }%
     \map[overwrite]{
-      \step[fieldsource=volume, match=\@reg at exp, final]
-      \step[fieldsource=volume, match=\@reg at exp@, replace={$2}]
+      \step[fieldsource=volume, match=\reg at exp@one, final]
+      \step[fieldsource=volume, match=\reg at 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 at exp@url, replace={}]
+    }
   }%
 }
-
+\renewbibmacro*{in:}{%
+  \iffieldundef{journaltitle}{}{\printtext{\bibstring{in}\intitlepunct}}%
+}
+\DeclareFieldFormat{url}{%
+  \mkbibacro{URL}\addcolon\space\online{#1}{\thefield{protocollessurl}}%
+}
 \renewbibmacro*{author}{%
-  \iffieldundef{usere}{\printnames{author}}{\textbf{\printfield{usere}}}%
+  \iffieldundef{collaboration}{%
+    \printnames{author}}{\textbf{\printfield{collaboration}}%
+  }%
 }
-
-\renewbibmacro*{in:}{%
-  \iffieldundef{journal}{}{\printtext{\bibstring{in}\intitlepunct}}%
-}
-
 \providecommand{\letbibmacro}[2]{\csletcs{abx at macro@#1}{abx at macro@#2}}
-
 \letbibmacro{doi+eprint+url-old}{doi+eprint+url}
 \renewbibmacro*{doi+eprint+url}{%
   \usebibmacro{doi+eprint+url-old}
-  \iffieldundef{userf}{}{\textls[0]{%
+  \iffieldundef{reportnumber}{}{\textls[0]{%
     \newunitpunct\textnumero\intitlepunct%
-    \textsc{\small\printfield{userf}}%
+    \textsc{\small\printfield{reportnumber}}%
   }}%
 }
 
-\DeclareFieldFormat{eprint:ctan}{%
-  CTAN\addcolon\space\ifhyperref{%
-    \href{https://ctan.org/pkg/#1}{\nolinkurl{#1}}%
-  }{\nolinkurl{#1}}%
+\newcommand{\bib at online}[2]{%
+  \ifhyperref{\online{#1}{#2}}{\nolinkurl{#2}}%
 }
-\DeclareFieldAlias{eprint:CTAN}{eprint:ctan}
-
-\DeclareFieldFormat{eprint:github}{%
-  GitHub\addcolon\space\ifhyperref{\href{%
-      https://github.com/\thefield{eprintclass}/#1%
-    }{\nolinkurl{\thefield{eprintclass}/#1}}%
-  }{\nolinkurl{\thefield{eprintclass}/#1}}%
+\NewDocumentCommand{\new at eprint}{smm}{
+  \DeclareFieldFormat{eprint:#2}{%
+    \newcommand{\@path}{\IfBooleanT{#1}{\thefield{eprintclass}/}##1}%
+    #2\addcolon\space\bib at online{#3/\@path}{\@path}%
+  }%
 }
-\DeclareFieldAlias{eprint:GitHub}{eprint:github}
-
-\DeclareFieldFormat{eprint:gitlab}{%
-  GitLab\addcolon\space\ifhyperref{\href{%
-      https://gitlab.com/\thefield{eprintclass}/#1%
-    }{\nolinkurl{\thefield{eprintclass}/#1}}%
-  }{\nolinkurl{\thefield{eprintclass}/#1}}%
-}
-\DeclareFieldAlias{eprint:GitLab}{eprint:gitlab}
-
-\DeclareFieldFormat{eprint:sourceforge}{%
-  SourceForge\addcolon\space\ifhyperref{%
-    \href{https://sourceforge.net/projects/#1}{\nolinkurl{#1}}%
-  }{\nolinkurl{#1}}%
-}
-\DeclareFieldAlias{eprint:SourceForge}{eprint:sourceforge}
-
+\new at eprint{CTAN}{https://ctan.org/pkg}
+\DeclareFieldAlias{eprint:ctan}{eprint:CTAN}
+\new at eprint*{GitHub}{https://github.com}
+\DeclareFieldAlias{eprint:github}{eprint:GitHub}
+\new at eprint*{GitLab}{https://gitlab.com}
+\DeclareFieldAlias{eprint:gitlab}{eprint:GitLab}
+\new at eprint*{Bitbucket}{https://bitbucket.org}
+\DeclareFieldAlias{eprint:bitbucket}{eprint:Bitbucket}
+\new at eprint{Launchpad}{https://launchpad.net}
+\DeclareFieldAlias{eprint:launchpad}{eprint:Launchpad}
+\new at eprint{SourceForge}{https://sourceforge.net/projects}
+\DeclareFieldAlias{eprint:launchpad}{eprint:SourceForge}
 \DeclareFieldFormat{eprint:hepforge}{%
-  HEPForge\addcolon\space\ifhyperref{%
-    \href{https://#1/hepforge.org/}{\nolinkurl{#1}}%
-  }{\nolinkurl{#1}}%
+  HEPForge\addcolon\space\bib at online{https://#1/hepforge.org}{#1}%
 }
 \DeclareFieldAlias{eprint:HEPForge}{eprint:hepforge}
 
-\NewBibliographyString{erratum}
-\DefineBibliographyStrings{english}{erratum={Erratum:}}
-
-\let\old at printbibliography\printbibliography
-\renewcommand{\printbibliography}{\sloppy\old at printbibliography}
 \fi
 
 \RequirePackage{hyperref}
@@ -448,7 +514,11 @@
   \pdfstringdefDisableCommands{\let\footnote\@gobble}
   \pdfstringdefDisableCommands{\let\\\@gobble}
 }
-\AtBeginShipout{\hypersetup{pdftitle={\@title}}}
+\ifhep at revtex
+  \AtBeginShipout{\hypersetup{pdftitle={\@title}}}
+\else
+  \AtBeginDocument{\hypersetup{pdftitle={\@title}}}
+\fi
 \ifhep at title
   \AtBeginDocument{\hypersetup{pdfauthor=\AB at authlist}}
 \else
@@ -455,34 +525,11 @@
   \AtBeginDocument{\hypersetup{pdfauthor={\@author}}}
 \fi
 
-\RequirePackage[noabbrev, capitalize, nameinlink]{cleveref}
+\RequirePackage[noabbrev, nameinlink]{cleveref}
+\newcommand{\creflastconjunction}{, and\nobreakspace}
 \crefname{enumi}{point}{points}
 \Crefname{enumi}{Point}{Points}
 
-\def\refstepcounter at noarg#1{%
-  \cref at old@refstepcounter{#1}%
-  \cref at constructprefix{#1}{\cref at result}%
-  \@ifundefined{cref@#1 at alias}%
-    {\def\@tempa{#1}}%
-    {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
-  \protected at edef\cref at currentlabel{%
-    [\@tempa][\arabic{#1}][\cref at result]%
-    \noexpand\@currentlabel%
-  }% changed
-}
-
-\def\refstepcounter at optarg[#1]#2{%
-  \cref at old@refstepcounter{#2}%
-  \cref at constructprefix{#2}{\cref at result}%
-  \@ifundefined{cref@#1 at alias}%
-    {\def\@tempa{#1}}%
-    {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
-  \protected at edef\cref at currentlabel{%
-    [\@tempa][\arabic{#2}][\cref at result]%
-    \noexpand\@currentlabel% changed
-  }%
-}
-
 \newcommand\no at break@before{%
   \relax\ifvmode\else%
     \ifhmode%
@@ -507,7 +554,7 @@
 
 \newcommand{\subcref}[1]{\cref{sub@#1}}
 
-\DeclareDocumentCommand{\eqcrefname}{mmo}{
+\NewDocumentCommand{\eqcrefname}{mmo}{
   \crefname{#1}{#2}{\IfValueTF{#3}{#3}{#2s}}
   \creflabelformat{#1}{(##2##1##3)}
 }
@@ -523,11 +570,11 @@
 \NewBibliographyString{refname}
 \NewBibliographyString{refsname}
 \DefineBibliographyStrings{english}{%
-  refname = {Reference},
-  refsname = {References}
+  refname = {reference},
+  refsname = {references}
 }
 \DeclareCiteCommand{\ccite}{%
-  \ifnum\thecitetotal=1%
+  \ifnum\thecitetotal=1
     \bibstring{refname}%
   \else%
     \bibstring{refsname}%
@@ -564,67 +611,84 @@
   }%
 }}
 
-\usepackage[excludeor]{everyhook}
-\PushPostHook{par}{{\spacefactor=3000}}
+\RequirePackage[excludeor]{everyhook}
+\newcommand{\begin at sentence}{1001}
+\PushPostHook{par}{{\spacefactor=\begin at sentence}}
+
+\def\frenchspacing{%
+  \sfcode`\.\begin at sentence \sfcode`\?\begin at sentence
+  \sfcode`\!\begin at sentence \sfcode`\:\begin at sentence
+  \sfcode`\;\@m \sfcode`\,\@m
+}
+
 \newcommand{\if at begin@of at sentence}[2]{\leavevmode\protecting{%
   \ifboolexpr{ test {\ifnumcomp{\spacefactor}{=}{3000}} or%
-               test {\ifnumcomp{\spacefactor}{=}{2000}}%
+               test {\ifnumcomp{\spacefactor}{=}{2000}} or%
+               test {\ifnumcomp{\spacefactor}{=}{\begin at sentence}}%
   }{#1}{#2}%
 }}
 
-\DeclareDocumentCommand{\acronym}{sommo}{
+\NewDocumentCommand{\acronym}{somsmo}{
   \newabbreviation[
-    longplural=\IfNoValueTF{#5}{#4s}{#5},
+    longplural=\IfNoValueTF{#6}{#5s}{#6},
     \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
-  ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#4}
+  ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#5}
   \expandafter\newcommand\csname#3\endcsname{%
-    \if at begin@of at sentence{\cGls{#3}}{\cgls{#3}}\@\xspace%
+    \if at begin@of at sentence{\cGls{#3}}{\cgls{#3}}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
   }
   \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{%
     \IfNoValueTF{#2}{#3}{#2} }%
   }
   \expandafter\mathdef\csname#3\endcsname{%
-    \text{\glsxtrshort{#3}}\glsunset{#3}%
+    \text{\glsxtrshort{#3}}\@gls at increment@currcount{#3}%
   }
   \expandafter\newcommand\csname#3s\endcsname{%
-    \if at begin@of at sentence{\cGlspl{#3}}{\cglspl{#3}}\@\xspace%
+    \if at begin@of at sentence{\cGlspl{#3}}{\cglspl{#3}}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
   }
   \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{%
     \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }%
   }
   \expandafter\mathdef\csname#3s\endcsname{%
-    \text{\glsxtrshortpl{#3}}\glsunset{#3}%
+    \text{\glsxtrshortpl{#3}}\@gls at increment@currcount{#3}%
   }
 }
-\DeclareDocumentCommand{\shortacronym}{somm}{
-  \newabbreviation[
-    \glsshortpluralkey=\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}
-  ]{#3}{\IfNoValueTF{#2}{#3}{#2}}{#4}
-  \expandafter\newcommand\csname#3\endcsname{\cgls*{#3}\@\xspace}
+\NewDocumentCommand{\shortacronym}{somsmo}{
+  \expandafter\newcommand\csname#3\endcsname{%
+    \IfNoValueTF{#2}{#3}{#2}\IfBooleanTF{#4}{}{\@\xspace}%
+  }
   \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{%
     \IfNoValueTF{#2}{#3}{#2} }%
   }
-  \expandafter\mathdef\csname#3\endcsname{\text{\glsxtrshort*{#3}}}
-  \expandafter\newcommand\csname#3s\endcsname{\cglspl*{#3}\@\xspace}
+  \expandafter\mathdef\csname#3\endcsname{%
+    \text{\IfNoValueTF{#2}{#3}{#2}}%
+  }
+  \expandafter\newcommand\csname#3s\endcsname{%
+    \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
+  }
   \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{%
     \IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}} }%
   }
-  \expandafter\mathdef\csname#3s\endcsname{\text{\glsxtrshortpl*{#3}}}%
-  \glsunset{#3}
+  \expandafter\mathdef\csname#3s\endcsname{%
+    \text{\IfBooleanTF{#1}{#3}{\IfNoValueTF{#2}{#3s}{#2s}}}%
+  }%
 }
-\DeclareDocumentCommand{\longacronym}{sommo}{
+\NewDocumentCommand{\longacronym}{somsmo}{
   \expandafter\newcommand\csname#3\endcsname{%
-    \if at begin@of at sentence{\MakeUppercase#4}{#4}\@\xspace%
+    \if at begin@of at sentence{\MakeUppercase#5}{#5}%
+    \IfBooleanTF{#4}{}{\@\xspace}%
   }
-  \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#4 }}
+  \pdfstringdefDisableCommands{\expandafter\def\csname#3\endcsname{#5 }}
   \expandafter\newcommand\csname#3s\endcsname{%
     \if at begin@of at sentence{%
-      \IfNoValueTF{#5}{\MakeUppercase#4s}{\MakeUppercase#5}%
+      \IfNoValueTF{#6}{\MakeUppercase#5s}{\MakeUppercase#6}%
     }{%
-      \IfNoValueTF{#5}{#4s}{#5}}\@\xspace%
+      \IfNoValueTF{#6}{#5s}{#6}}\IfBooleanTF{#4}{}{\@\xspace}%
   }
   \pdfstringdefDisableCommands{\expandafter\def\csname#3s\endcsname{%
-    \IfNoValueTF{#5}{#4s}{#5} }%
+    \IfNoValueTF{#6}{#5s}{#6} }%
   }
 }
 \renewcommand*{\@gls at write@entrycounts}{%
@@ -646,6 +710,14 @@
 }
 \newcommand{\resetacronym}[1]{\protect\glsreset{#1}}
 \newcommand{\dummyacronym}[1]{\protect\glsunset{#1}}
+\@ifundefined{abstract}{}{%
+  \let\end at old@abstract\endabstract%
+  \renewcommand\endabstract{\glsresetall\end at old@abstract}%
+}
+\let\old at table@of at contents\tableofcontents
+\renewcommand\tableofcontents{%
+  \glsunsetall\old at table@of at contents\glsresetall%
+}
 \fi
 
 \endinput



More information about the tex-live-commits mailing list.