From 8626a9c3cb5dc8d02d779d5b5b1e3933d5626f43 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 2 May 2020 03:03:34 +0000 Subject: CTAN sync 202005020303 --- macros/latex/contrib/hep-paper/bibliography.bib | 304 +++++--- macros/latex/contrib/hep-paper/hep-paper.dtx | 898 +++++++++++++++++------- macros/latex/contrib/hep-paper/hep-paper.ins | 5 +- macros/latex/contrib/hep-paper/hep-paper.pdf | Bin 535697 -> 525662 bytes 4 files changed, 846 insertions(+), 361 deletions(-) (limited to 'macros/latex/contrib/hep-paper') diff --git a/macros/latex/contrib/hep-paper/bibliography.bib b/macros/latex/contrib/hep-paper/bibliography.bib index 5b295b1c37..d63b733947 100644 --- a/macros/latex/contrib/hep-paper/bibliography.bib +++ b/macros/latex/contrib/hep-paper/bibliography.bib @@ -1,4 +1,4 @@ -@manual{hep-paper, +@article{hep-paper, title = "The |hep-paper| package", subtitle = "Publications in High Energy Physics", author = "Jan Hajer", @@ -15,18 +15,34 @@ eprintclass = "janhajer", eprint = "hep-paper", } -@manual{cleveref, +@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", +} + +@manual{kvoptions-1, +eprinttype = "github", +eprintclass = "ho-tex", +eprint = "kvoptions", +} + +@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", } -@manual{foreign, -title = "The |foreign| package for \LaTeX2e", +@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 @@ eprinttype = "ctan", eprint = "foreign", } -@manual{geometry, +@article{geometry, title = "The |geometry| package", subtitle = "Flexible and complete interface to document dimensions", author = "David Carlisle and Hideo Umeki", @@ -50,7 +66,7 @@ eprintclass = "davidcarlisle", eprint = "geometry", } -@manual{a4wide, +@article{a4wide, title = "The |a4wide| package", subtitle = "\enquote{Wide} a4 layout", author = "Alexander Holt and Jean-François Lamy", @@ -60,7 +76,7 @@ eprint = "a4wide", note = "depreciated and not used", } -@manual{microtype, +@article{microtype, title = "The |microtype| package", subtitle = "Subliminal refinements towards typographical perfection", author = "Robert Schlicht", @@ -69,8 +85,8 @@ eprinttype = "ctan", eprint = "microtype", } -@manual{authblk, -title = "A \LaTeX\ Package to Prepare Author and Affiliation Blocks", +@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,24 +94,24 @@ eprinttype = "ctan", eprint = "authblk", } -@manual{bm, +@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", } -@manual{empheq, +@article{empheq, title = "The |empheq| package", author = "Lars Madsen and Morten Høgholm and Will Robertson and Joseph Wright", eprinttype = "ctan", eprint = "empheq", } -@manual{mathtools, +@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 @@ eprinttype = "ctan", eprint = "mathtools", } -@manual{amsmath, +@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", } -@manual{amsfonts, +@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", } -@manual{amssymb, +@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 @@ eprinttype = "ctan", eprint = "amsfonts", } -@manual{slashed, +@article{slashed, title = "The |slashed| package", subtitle = "Put a slash through characters", author = "David Carlisle", @@ -144,7 +160,7 @@ eprinttype = "ctan", eprint = "slashed", } -@manual{physics, +@article{physics, title = "The |physics| package", subtitle = "Macros supporting the Mathematics of Physics", author = "Sergio C. de la Barrera", @@ -153,7 +169,7 @@ eprinttype = "ctan", eprint = "physics", } -@manual{units, +@article{units, title = "The |units| and |nicefrac| packages", subtitle = "Typeset units", author = "Axel Reichert", @@ -162,16 +178,17 @@ eprinttype = "ctan", eprint = "units", } -@manual{subcaption, +@article{subcaption, title = "The |subcaption| package", subtitle = "Support for sub-captions", author = "Axel Sommerfeldt", date = "2007", eprinttype = "ctan", eprint = "subcaption", +related = "caption-1", } -@manual{caption, +@article{caption, title = "The |caption| package", subtitle = "Customising captions in floating environments", author = "Axel Sommerfeldt", @@ -188,9 +205,9 @@ eprint = "caption", } -@manual{biblatex, +@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 @@ eprintclass = "plk", eprint = "biblatex", } -@manual{hyperref, -title = "Hypertext marks in \LaTeX: a manual for |hyperref|", -subtitle = "Extensive support for hypertext in \LaTeX", +@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 @@ eprintclass = "latex3", eprint = "hyperref", } -@manual{graphicx, +@article{graphicx, title = "Packages in the \enquote{graphics} bundle", subtitle = "Enhanced support for graphics", author = "David Carlisle and Sebastian Rahtz", @@ -230,16 +247,16 @@ eprinttype = "ctan", eprint = "graphicx", } -@manual{booktabs, +@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", eprint = "booktabs", } -@manual{multirow, +@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 @@ eprinttype = "ctan", eprint = "multirow", } -@manual{fixmath, -title = "The |fixmath| package for \LaTeX2\epsilon", +@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 @@ eprinttype = "ctan", eprint = "fixmath", } -@manual{alphabeta, +@article{alphabeta, title = "The |alphabeta| package", subtitle = "LICR macros and encoding definition files for Greek", author = "Günter Milde", @@ -266,17 +283,21 @@ eprinttype = "ctan", eprint = "greek-fontenc", } -@manual{arxiv-collector, -title = "arxiv-collector", +@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", } -@manual{biber, -title = "biber", +@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 @@ eprinttype = "sourceforge", eprint = "biblatex-biber", } -@manual{lmodern, +@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", } -@manual{ifluatex, +@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", } -@manual{ifxetex, +@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,47 +346,49 @@ eprintclass = "latex3", eprint = "iftex", } -@manual{fontspec, +@article{fontspec, title = "The |fontspec| package", author = "Will Robertson and Khaled Hosny", eprinttype = "ctan", eprint = "fontspec", } -@manual{fontenc, +@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", } -@manual{inputenc, +@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", } -@manual{textcomp, +@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", eprint = "textcomp", } -@manual{enumitem, +@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 @@ eprintclass = "jbezos", eprint = "enumitem", } -@manual{atbegshi, +@article{atbegshi, title = "The |atbegshi| package", subtitle = "Execute stuff at |shipout| time", author = "Heiko Oberdiek", @@ -393,7 +416,7 @@ eprintclass = "ho-tex", eprint = "atbegshi", } -@manual{picture, +@article{picture, title = "The |picture| package", subtitle = "Dimens for picture macros", author = "Heiko Oberdiek", @@ -409,7 +432,7 @@ eprintclass = "ho-tex", eprint = "picture", } -@manual{varwidth, +@article{varwidth, title = "The |varwidth| package", subtitle = "A variable-width minipage", author = "Donald Arseneau", @@ -418,7 +441,7 @@ eprinttype = "ctan", eprint = "varwidth", } -@manual{csquotes, +@article{csquotes, title = "The |csquotes| Package", subtitle = "Context sensitive quotation facilities", author = "Philipp Lehman and Joseph Wright", @@ -427,9 +450,9 @@ eprinttype = "ctan", eprint = "csquotes", } -@manual{babel, +@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,14 +466,14 @@ eprintclass = "latex3", eprint = "babel", } -@manual{polyglossia, +@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", eprint = "polyglossia", } -@manual{parskip, +@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,24 +490,24 @@ eprint = "fmitex", } -@manual{fntguide, -title = "\LaTeX2\epsilon\ font selection", -subtitle = "Docmentation of \LaTeX\ font commands", -collaboration = "\LaTeX\ Team", -author = "\LaTeX\ Team", +@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", } -@manual{euenc, +@article{euenc, title = "The Experimental Unicode `EUx’ Encodings", author = "Will Robertson and Elie Roux and Khaled Hosny", eprinttype = "ctan", eprint = "euenc", } -@manual{soul, +@article{soul, title = "The |soul| package", subtitle = "Hyphenation for letterspacing, underlining, and more", author = "Melchior Franz", @@ -493,7 +516,7 @@ eprinttype = "ctan", eprint = "soul", } -@manual{glossaries, +@article{glossaries, title = "The |glossaries| package", subtitle = "Create glossaries and lists of acronyms", author = "Nicola Talbot", @@ -502,7 +525,7 @@ eprinttype = "ctan", eprint = "glossaries", } -@manual{glossaries-extra, +@article{glossaries-extra, title = "The |glossaries-extra| package", subtitle = "An extension to the |glossaries| package", author = "Dickimaw Books, Nicola Talbot", @@ -511,34 +534,34 @@ eprinttype = "ctan", eprint = "glossaries-extra", } -@manual{xparse, +@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", } -@manual{pdftexcmds, +@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", eprint = "pdftexcmds", } -@manual{fix-cm, +@article{fix-cm, title = "The |fix-cm| package", author = "Frank Mittelbach and David Carlisle and Chris Rowley and Walter Schmidt", eprinttype = "ctan", eprint = "fix-cm", } -@manual{revtex, -title = "The |revtex| package", +@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 @@ eprinttype = "ctan", eprint = "revtex", } -@manual{encguide, -title = "\LaTeX\ font encodings", -subtitle = "Documentation of \LaTeX\ font encodings", +@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", } -@manual{sfmath, +@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", } -@manual{relsize, +@article{relsize, title = "The |relsize| package", subtitle = "Set the font size relative to the current font size", author = "Donald Arseneau and Matt Swift", @@ -577,12 +600,101 @@ eprinttype = "ctan", eprint = "relsize", } -@manual{everyhook, +@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", eprint = "everyhook", } + +@article{sansmathfonts, +title = "The |sansmathfonts| package", +subtitle = "Correct placement of accents in sans-serif maths", +author = "Ariel Barton", +date = "2013", +eprinttype = "ctan", +eprint = "sansmathfonts", +} + +@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", +} + +@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", +} + +@manual{ragged2e-1, +eprinttype = "gitlab", +eprintclass = "hagenbuch", +eprint = "ragged2e", +} + +@article{url, +title = "The |url| package", +subtitle = "Verbatim with URL-sensitive line breaks", +author = "Donald Arseneau", +date = "1996", +eprinttype = "ctan", +eprint = "url", +} + +@article{jhep, +title = "The |JHEP| package", +author = "SISSA Medialab", +collaboration = "SISSA Medialab", +date = "1997", +url = "https://jhep.sissa.it/jhep/help/JHEP_TeXclass.jsp", +} + +@article{jcap, +title = "The |JCAP| package", +author = "SISSA Medialab", +collaboration = "SISSA Medialab", +date = "2002", +url = "https://jcap.sissa.it/jcap/help/JCAP_TeXclass.jsp", +} + +@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" +} + +@article{bbm, +title = "|bbm|", +subtitle = "\enquote{Blackboard-style} cm fonts", +author = " Gilles Robert", +date = "1993", +eprinttype = "ctan", +eprint = "bbm", +} + +@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", +} diff --git a/macros/latex/contrib/hep-paper/hep-paper.dtx b/macros/latex/contrib/hep-paper/hep-paper.dtx index 9ba0f10dcd..5c9841bc6a 100644 --- a/macros/latex/contrib/hep-paper/hep-paper.dtx +++ b/macros/latex/contrib/hep-paper/hep-paper.dtx @@ -16,10 +16,13 @@ % \fi % % \iffalse +% %\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] +%\ProvidesFile{hep-paper.dbx}[2020/05/01 v1.3 HEP-Paper biblatex data model] +% %<*driver> + \documentclass{ltxdoc} \MacroIndent=1.5em @@ -39,26 +42,27 @@ % \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} \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} + % +% % \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@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,26 +159,36 @@ % % \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} % 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} % -% \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{\enquote} % \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}. % -% \DescribeMacro{inlinelist} -% Using the |enumitem| package \cite{enumitem} the |inlinelist| +% The |inlinelist| and |enumdescript| environments are defined using the |enumitem| package \cite{enumitem}. % -% \begin{example} +% \DescribeMacro{inlinelist} +% \begin{columns} % |The three main points are| % % |\begin{inlinelist}| @@ -234,19 +252,17 @@ % | \item three| % % |\end{inlinelist}| -% \second +% \column % The three main points are % \begin{inlinelist} % \item one % \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,16 +272,21 @@ % | \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} @@ -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@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@pos,\setkeys,\fi} +% \begin{macrocode} +\ifhep@pos + \setkeys{hep}{title=false, defaults} +\fi +% \end{macrocode} +% % Set the |revtex| compatibility options. -% \DoNotIndex{\ifhep@revtex,\setkeys,\fi} +% \DoNotIndex{\ifhep@revtex} % \begin{macrocode} \ifhep@revtex \setkeys{hep}{defaults, title=false, lang=american, bibliography=false} \fi % \end{macrocode} - +% +% Define the SISSA conditional. +% \begin{macrocode} +\newif\ifhep@sissa +\ifhep@jhep\hep@sissatrue +\else + \ifhep@jcap\hep@sissatrue + \else\hep@sissafalse + \fi +\fi +% \end{macrocode} +% +% Set the SISSA compatibility options. +% \begin{macrocode} +\ifhep@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@serif,\renewcommand,\familydefault,\sfdefault} +% \begin{macrocode} +\ifhep@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,22 +762,14 @@ \RequirePackage[utf8]{inputenc} \fi % \end{macrocode} - +% % Load the |babel| \cite{babel} package for hyphenation and the recommended |csquotes| package \cite{csquotes}. % \DoNotIndex{\hep@lang} % \begin{macrocode} \RequirePackage[\hep@lang]{babel} \RequirePackage{csquotes} % \end{macrocode} - -% Set the whole text to sans serif if requested. -% \DoNotIndex{\ifhep@serif,\renewcommand,\familydefault,\sfdefault} -% \begin{macrocode} -\ifhep@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@pt,\edef,\@ptsize,\expandafter,\small,\relax,\footnotesize,\scriptsize} % \begin{macrocode} \ifhep@defaults\else @@ -710,18 +807,25 @@ % Add the missing |\vs| command. % \DoNotIndex{\DeclareRobustCommand,\xperiodafter,\foreignabbrfont,\pdf@strcmp,\hep@lang@foreign} % \begin{macrocode} -\RequirePackage{pdftexcmds} -\newcommand{\hep@lang@foreign}{british} -\ifnum\pdf@strcmp{\hep@lang}{american}=0% - \renewcommand{\hep@lang@foreign}{USenglish}% -\fi -\ifnum\pdf@strcmp{\hep@lang}{USenglish}=0% - \renewcommand{\hep@lang@foreign}{USenglish}% +\ifnum\pdf@strcmp{\hep@lang}{american}=0 + \newcommand{\hep@lang@foreign}{USenglish} +\else + \ifnum\pdf@strcmp{\hep@lang}{USenglish}=0 + \newcommand{\hep@lang@foreign}{USenglish} + \else + \newcommand{\hep@lang@foreign}{british} + \fi \fi \RequirePackage[all, \hep@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@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@defaults,\hep@paper,\geometry} % \begin{macrocode} \ifhep@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@parindent,\setlength,\parskip,\baselineskip,\parindent} % \begin{macrocode} \ifhep@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@line}[1]{\@@overline{#1}} +\mathdef{\overline}{\over@line} +% \end{macrocode} +% \end{macro} + % \begin{macro}{eqnarray} % Undefine the |eqnarray| environment. % \begin{macrocode} -\ifhep@eqnarray\else% +\ifhep@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@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@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@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@minipage| macro. % \begin{macrocode} -\RequirePackage[subrefformat = parens]{subcaption} +\RequirePackage[subrefformat=parens]{subcaption} \captionsetup{font=small} \captionsetup[sub]{font=small} +\providecommand*\subcaption@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@revtex - \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} + \captionsetup{font=small, format=revtex} + \captionsetup[sub]{font=footnotesize, format=plain} + \renewcommand{\figurename}{Figure} + \renewcommand{\tablename}{Table} \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@box}, - -2pt-\topmargin-\heightof{\@preprint@box} - ){\normalfont\@preprint@box} +\let\old@maketitle\maketitle +\renewcommand{\maketitle}{% + \old@maketitle% + \AtBeginShipoutFirst{% + \put( + \textwidth+\oddsidemargin-\widthof{\@preprint@box}, + -2pt-\topmargin-\heightof{\@preprint@box} + ){\normalfont\@preprint@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@abstract\abstract -\renewcommand\abstract{\old@abstract\noindent\ignorespaces} +\@ifundefined{abstract}{}{% + \let\old@abstract\abstract% + \renewcommand\abstract{\old@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@strcmp{\hep@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@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} -\RequirePackage[style=\hep@bibliography]{biblatex} \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} +\let\old@printbibliography\printbibliography +\renewcommand{\printbibliography}{\sloppy\old@printbibliography} +% \end{macrocode} +% \end{macro} + +% \subsection{Sourcemap} +% +% \begin{macro}{\reg@exp@one} +% \begin{macro}{\reg@exp@two} +% \begin{macro}{\reg@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@exp@one}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}} +\newcommand{\reg@exp@two}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}} +\newcommand{\reg@exp@url}{\regexp{\A(ht|f)tp(s)?:\/\/}} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\DeclareSourcemap} +% Use the |\DeclareSourcemap| feature. % \begin{macrocode} -\newcommand{\@reg@exp}{\regexp{\A(\p{L}+)?\d+(\p{L}+)?\Z}} -\newcommand{\@reg@exp@}{\regexp{\A(\p{L}+)?(\d+)(\p{L}+)?\Z}} \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@exp, final] - \step[fieldsource=volume, match=\@reg@exp@, replace={$2}] + \step[fieldsource=volume, match=\reg@exp@one, final] + \step[fieldsource=volume, match=\reg@exp@two, replace={$2}] \step[fieldsource=journal, fieldtarget=journaltitle] \step[fieldset=journaltitle, fieldvalue={\space$1$2}, append=true] } +% \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@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@macro@#1}{abx@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@online} +% Private |\bib@online| macro % \begin{macrocode} -\DeclareFieldFormat{eprint:ctan}{% - CTAN\addcolon\space\ifhyperref{% - \href{https://ctan.org/pkg/#1}{\nolinkurl{#1}}% - }{\nolinkurl{#1}}% +\newcommand{\bib@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@eprint} +% Private |\new@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@eprint}{smm}{ + \DeclareFieldFormat{eprint:#2}{% + \newcommand{\@path}{\IfBooleanT{#1}{\thefield{eprintclass}/}##1}% + #2\addcolon\space\bib@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@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@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@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@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@printbibliography\printbibliography -\renewcommand{\printbibliography}{\sloppy\old@printbibliography} +\new@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@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@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@revtex + \AtBeginShipout{\hypersetup{pdftitle={\@title}}} +\else + \AtBeginDocument{\hypersetup{pdftitle={\@title}}} +\fi \ifhep@title \AtBeginDocument{\hypersetup{pdfauthor=\AB@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@...} -% Adjust the |cleveref| |\refstepcounter@noarg| and |\refstepcounter@optarg| to use the |\@currentlabel| in order to fix problems with |\subref|. -% \begin{macrocode} -\def\refstepcounter@noarg#1{% - \cref@old@refstepcounter{#1}% - \cref@constructprefix{#1}{\cref@result}% - \@ifundefined{cref@#1@alias}% - {\def\@tempa{#1}}% - {\def\@tempa{\csname cref@#1@alias\endcsname}}% - \protected@edef\cref@currentlabel{% - [\@tempa][\arabic{#1}][\cref@result]% - \noexpand\@currentlabel% - }% changed -} - -\def\refstepcounter@optarg[#1]#2{% - \cref@old@refstepcounter{#2}% - \cref@constructprefix{#2}{\cref@result}% - \@ifundefined{cref@#1@alias}% - {\def\@tempa{#1}}% - {\def\@tempa{\csname cref@#1@alias\endcsname}}% - \protected@edef\cref@currentlabel{% - [\@tempa][\arabic{#2}][\cref@result]% - \noexpand\@currentlabel% changed - }% -} -% \end{macrocode} -% \end{macro} - %\begin{macro}{\no@break@before} -% Provide macro able to prevent line breaks. +% Define a macro able to prevent line breaks. % \DoNotIndex{\no@break@before,\ifvmode,\ifhmode,\ifdim,\lastskip,\unskip,\nobreakspace} % \begin{macrocode} \newcommand\no@break@before{% @@ -1431,6 +1695,7 @@ \AtBeginDocument{\renewcommand\ref{\no@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,40 +1827,60 @@ }} % \end{macrocode} -% \begin{macro}{\if@begin@of@sentence} +% \begin{macro}{\begin@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@sentence}{1001} +\PushPostHook{par}{{\spacefactor=\begin@sentence}} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\frenchspacing} +% Adjust the |\frenchspacing| macro to be compatibel with this idea. +% \begin{macrocode} +\def\frenchspacing{% + \sfcode`\.\begin@sentence \sfcode`\?\begin@sentence + \sfcode`\!\begin@sentence \sfcode`\:\begin@sentence + \sfcode`\;\@m \sfcode`\,\@m +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\if@begin@of@sentence} +% Provide a macro checking for the beginning of a sentence by examining the length of the preceeding space. +% \begin{macrocode} \newcommand{\if@begin@of@sentence}[2]{\leavevmode\protecting{% \ifboolexpr{ test {\ifnumcomp{\spacefactor}{=}{3000}} or% - test {\ifnumcomp{\spacefactor}{=}{2000}}% + test {\ifnumcomp{\spacefactor}{=}{2000}} or% + test {\ifnumcomp{\spacefactor}{=}{\begin@sentence}}% }{#1}{#2}% }} % \end{macrocode} % \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@begin@of@sentence{\cGls{#3}}{\cgls{#3}}\@\xspace% + \if@begin@of@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@increment@currcount{#3}% } % \end{macrocode} % Provide the plural acronym macro. % \begin{macrocode} \expandafter\newcommand\csname#3s\endcsname{% - \if@begin@of@sentence{\cGlspl{#3}}{\cglspl{#3}}\@\xspace% + \if@begin@of@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@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@begin@of@sentence{\MakeUppercase#4}{#4}\@\xspace% + \if@begin@of@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@begin@of@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@old@abstract\endabstract% + \renewcommand\endabstract{\glsresetall\end@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@table@of@contents\tableofcontents +\renewcommand\tableofcontents{% + \glsunsetall\old@table@of@contents\glsresetall% +} +% \end{macrocode} +% \end{macro} +% % End of glossaries if. % \begin{macrocode} \fi % \end{macrocode} % +% +% +% \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} +% +% +% % \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@...} +% Adjust the |cleveref| |\refstepcounter@noarg| and |\refstepcounter@optarg| to use the |\@currentlabel| in order to fix problems with |\subref|. +% \begin{macrocode} +\def\refstepcounter@noarg#1{% + \cref@old@refstepcounter{#1}% + \cref@constructprefix{#1}{\cref@result}% + \@ifundefined{cref@#1@alias}% + {\def\@tempa{#1}}% + {\def\@tempa{\csname cref@#1@alias\endcsname}}% + \protected@edef\cref@currentlabel{% + [\@tempa][\arabic{#1}][\cref@result]% + \noexpand\@currentlabel% + }% changed +} + +\def\refstepcounter@optarg[#1]#2{% + \cref@old@refstepcounter{#2}% + \cref@constructprefix{#2}{\cref@result}% + \@ifundefined{cref@#1@alias}% + {\def\@tempa{#1}}% + {\def\@tempa{\csname cref@#1@alias\endcsname}}% + \protected@edef\cref@currentlabel{% + [\@tempa][\arabic{#2}][\cref@result]% + \noexpand\@currentlabel% changed + }% +} +% \end{macrocode} +% \end{macro} diff --git a/macros/latex/contrib/hep-paper/hep-paper.ins b/macros/latex/contrib/hep-paper/hep-paper.ins index b88c8423a5..881f9745b5 100644 --- a/macros/latex/contrib/hep-paper/hep-paper.ins +++ b/macros/latex/contrib/hep-paper/hep-paper.ins @@ -28,7 +28,10 @@ and version 1.3c or later is part of all distributions of 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{*} diff --git a/macros/latex/contrib/hep-paper/hep-paper.pdf b/macros/latex/contrib/hep-paper/hep-paper.pdf index 29b7c506ae..4142b2afe7 100644 Binary files a/macros/latex/contrib/hep-paper/hep-paper.pdf and b/macros/latex/contrib/hep-paper/hep-paper.pdf differ -- cgit v1.2.3