summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-02 03:03:29 +0000
committerNorbert Preining <norbert@preining.info>2020-10-02 03:03:29 +0000
commit37f9a57b2f39142fbccb20b758af8e0502499671 (patch)
tree3ad423febb91fa4309d19667a0423ae94e2ecb89 /macros/latex
parentd2a6bb90e56a2836bb59477b8f27248aab9149f5 (diff)
CTAN sync 202010020303
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdfbin107065 -> 119424 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex143
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx15
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx60
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.dbx41
-rw-r--r--macros/latex/contrib/hep-paper/bibliography.bib58
-rw-r--r--macros/latex/contrib/hep-paper/hep-paper-documentation.pdfbin454890 -> 455632 bytes
-rw-r--r--macros/latex/contrib/hep-paper/hep-paper-implementation.dtx851
-rw-r--r--macros/latex/contrib/hep-paper/hep-paper-implementation.pdfbin535891 -> 551058 bytes
-rw-r--r--macros/latex/contrib/hep-paper/hep-paper.ins3
-rw-r--r--macros/latex/contrib/pict2e/p2e-drivers.pdfbin216023 -> 216021 bytes
-rw-r--r--macros/latex/contrib/pict2e/pict2e.dtx196
-rw-r--r--macros/latex/contrib/pict2e/pict2e.pdfbin894989 -> 899947 bytes
-rw-r--r--macros/latex/required/firstaid/README.md9
-rw-r--r--macros/latex/required/firstaid/changes.txt12
-rw-r--r--macros/latex/required/firstaid/firstaid.ins75
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx351
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdfbin0 -> 209652 bytes
19 files changed, 1338 insertions, 478 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes
index 821434949e..b782b0cd37 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/Changes
@@ -1,4 +1,6 @@
+0.23 2020-10-01 - remove the usea, userb, ... definitions and use the corerct
+ biblatex interface with a *.dbx file
0.22 2020-09-24 - do not use \mkbibemph for the the style firstnamefont=italic to prevent
\emph \emph, hich is like normal font. (hv)
0.21 2020-03-24 - do not use a biber.conf file, definition now in *.bbx (hv)
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf
index 22173d9003..72ec5ba375 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex
index 027537a032..e93bb96e84 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/doc/biblatex-juradiss.tex
@@ -113,7 +113,7 @@
author = {Hirte, Heribert},
title = {Stellungnahme zum Fraktionsentwurf eines Gesetzes zur Angemessenheit
der Vorstandsvergütung (VorstAG) für den Deutschen Bundestag},
- url = {http://www.jura.uni-augsburg.de/fakultaet/lehrstuehle/moellers/materialien/materialdateien/040_deutsche_gesetzgebungsgeschichte/gesetz_angemessenheit_vorstandsverguetung/pdf/stellungnahme_3.pdf},
+ url = {http://www.uni-augsburg.de/de/jura/fakultaet/lehrende/moellers/materialien/materialdateien/040_deutsche_gesetzgebungsgeschichte/gesetz_angemessenheit_vorstandsverguetung/pdf/stellungnahme_3.pdf},
urldate = {2011-04-03}
}
@@ -164,7 +164,6 @@
\usepackage{libertinus-otf} % Damit LaTex Umlaute usw. erkennt
\setmonofont[Scale=MatchLowercase,FakeStretch=0.9]{AnonymousPro}
\usepackage[ngerman]{babel}
-\usepackage{xurl}
\usepackage{listings}
\lstset{basicstyle=\ttfamily}
\usepackage{dtk-logos}
@@ -189,9 +188,13 @@
date=short,% Datum als Ziffern, keine ausgeschriebenen Monatsnamen
]{biblatex}
+\usepackage{xurl}
+
\usepackage{xspace}
\addbibresource{\jobname.bib}
+\defbibheading{subbib}{\addsubsec{#1}}
+
%%% Kategorien für die einzelnen Literaturverzeichnisbeispiele
%%% zum Darstellen der LitVerz-Ausgabe beim jew. Beispiel
\DeclareBibliographyCategory{1}
@@ -239,7 +242,26 @@
\printbibliography[category=#1]
\end{mdframed}}
-\usepackage[colorlinks,linktocpage,draft]{hyperref}
+\usepackage[colorlinks,linktocpage]{hyperref}
+
+\makeatletter
+\newcommand\addsubsec{\SecDef\@addsubsec\@saddsubsec}
+\newcommand*{\@addsubsec}{}
+\def\@addsubsec[#1]#2{%
+ \edef\reserved@a{%
+ \unexpanded{%
+ \subsection[{#1}]{#2}%
+ \c@secnumdepth=
+ }\the\c@secnumdepth\relax
+ }%
+ \c@secnumdepth=\numexpr \sectionnumdepth-1\relax
+ \reserved@a
+}
+\newcommand*{\@saddsubsec}[1]{%
+ \subsection*{#1}\addsubsecmark{}%
+}
+\makeatother
+
\begin{document}
@@ -249,11 +271,16 @@
%%%%%
\title{biblatex-juradiss}
-\subtitle{Ver. 0.22}
+\subtitle{Ver. 0.23}
\author{Tobias Schwan \and Herbert Voß}
\maketitle
+\vfill
+Danke an Moritz Wemheuer;
+
+\newpage
+
\tableofcontents
\newpage
@@ -337,7 +364,7 @@ Leider wird das Paket seit einiger Zeit nicht mehr gepflegt, weshalb es inzwisch
Eine Alternative ist die Verwendung der Dokumentenklasse \texttt{book} und die individuelle
Anpassung des Inhaltsverzeichnisses. Gerade mit dem Paket \texttt{titletoc} ist das keine große
Kunst. Will man seine Doktorarbeit später in einem Verlag veröffentlichen empfielt sich das ohnehin.
-Denn dieser hat oftmals seine eigene LaTeX-Vorlage, die Fragen wie Fußnotenumbruch und
+Denn dieser hat oftmals seine eigene \LaTeX-Vorlage, die Fragen wie Fußnotenumbruch und
Formatierung der Kopfzeilen selbst regelt. Hier kann die Umstellung von \texttt{jurabook} auf die
verlagsspezifische Vorlage umständlicher sein, als wenn man das zuvor selbst angepasst hat (so war
es jedenfalls bei mir), denn dann kann man die eigenen Anpassungen durch die des Verlags ersetzen.
@@ -421,8 +448,6 @@ Für Tageszeitungen habe ich das über den Typ \texttt{newsletter} gemacht. In d
Tageszeitungen neben dem Autor und dem Namen der Zeitschrift das Datum der Ausgabe (Feld
\texttt{date}, Format: \texttt{JJJJ-MM-TT}), sowie deren Nummer (Feld \texttt{volume}) an.
-\clearpage
-
Beispielseintrag:
@@ -727,30 +752,35 @@ so muss man \bib zwingend mit \texttt{biber} benutzen und nicht mit \texttt{bibt
bringt zwar von
Hause aus den Eintragstyp \texttt{jurisdiction} mit, aber keine Felder die speziell für diesen
Eintragstyp
-benötigt werden, also Felder für das Aktenzeichen, die primäre und sekundäre Fundstelle usw. Um
-benutzerdefinierte Felder verwenden zu können bietet \bib nur die Möglichkeit die Felder user[a-f]
-zu verwenden. Da der Typ \texttt{jurisdiction} fast nur aus benutzerdefinierten Feldern besteht,
-würde das
-die Eingabe von Einträgen in die Literaturdatenbank schwierig machen. \texttt{biber} bietet dafür die
-Möglichkeit in der Literaturdatenbank eigene Feldnamen zu verwenden, die dann bei Erstellung des
-\LaTeX"=Dokuments in die internen Feldnamen von \bib umbenannt werden. Intern arbeitet mein Stil
-daher mit user[a-f], in der Literaturdatenbank können aber die aussagekräftigen Namen verwendet
-werden.
-
-Die Festlegung erfolgt durch:
-
-\begin{lstlisting}
- \maps[datatype=bibtex]{%
- \map{
- \step[fieldsource=decision, fieldtarget=usera]
- \step[fieldsource=sign, fieldtarget=userb]
- \step[fieldsource=officialvolume, fieldtarget=userc]
- \step[fieldsource=officialpages, fieldtarget=userd]
- \step[fieldsource=journalyear, fieldtarget=usere]
- \step[fieldsource=decisionname, fieldtarget=userf]
- }
- }
-\end{lstlisting}
+benötigt werden, also Felder für das Aktenzeichen, die primäre und sekundäre Fundstelle usw.
+Diese Felder werden alle durch \texttt{biblatex-juradiss} definiert.
+%Um
+%benutzerdefinierte Felder verwenden zu können bietet \bib nur die Möglichkeit die Felder user[a-f]
+%zu verwenden.
+
+%Da der Typ \texttt{jurisdiction} fast nur aus benutzerdefinierten Feldern besteht,
+%würde das
+%die Eingabe von Einträgen in die Literaturdatenbank schwierig machen.
+%\texttt{biber} bietet dafür die
+%Möglichkeit in der Literaturdatenbank eigene Feldnamen zu verwenden, die dann bei Erstellung des
+%\LaTeX"=Dokuments in die internen Feldnamen von \bib umbenannt werden. Intern arbeitet mein Stil
+%daher mit user[a-f], in der Literaturdatenbank können aber die aussagekräftigen Namen verwendet
+%werden.
+
+%Die Festlegung erfolgt durch:
+
+%\begin{lstlisting}
+% \maps[datatype=bibtex]{%
+% \map{
+% \step[fieldsource=decision, fieldtarget=usera]
+% \step[fieldsource=sign, fieldtarget=userb]
+% \step[fieldsource=officialvolume, fieldtarget=userc]
+% \step[fieldsource=officialpages, fieldtarget=userd]
+% \step[fieldsource=journalyear, fieldtarget=usere]
+% \step[fieldsource=decisionname, fieldtarget=userf]
+% }
+% }
+%\end{lstlisting}
Ausgabe als Fußnote\footcite[3]{bverfg:jubilaeum}, im laufenden Text als \cite[3]{bverfg:jubilaeum}
oder am Ende eines Satzes.~\parencite[3]{bverfg:jubilaeum}
@@ -901,5 +931,56 @@ die Seite ein, auf der sich die Markierung befindet.\footnote{Z.B. vgl. hierzu d
Querverweis, unter \qverweis{querverweis}.}
+\addsec{Quellen -- Beispielverzeichnisse}
+
+Die folgenden Quellenverzeichnisse sind Beispiele, die über die Definition
+
+\verb|\defbibheading{subbib}{\addsubsec{#1}}|
+
+als nichtnummerierte \verb|\subsection| ausgegeben, aber ins TOC eingefügt werden.
+Für die Dokumentenklasse \texttt{scrartcl} wurde dazu \verb|\addsubsec| definiert
+
+\begin{lstlisting}
+\makeatletter
+\newcommand\addsubsec{\SecDef\@addsubsec\@saddsubsec}
+\newcommand*{\@addsubsec}{}
+\def\@addsubsec[#1]#2{%
+ \edef\reserved@a{%
+ \unexpanded{%
+ \subsection[{#1}]{#2}%
+ \c@secnumdepth=
+ }\the\c@secnumdepth\relax
+ }%
+ \c@secnumdepth=\numexpr \sectionnumdepth-1\relax
+ \reserved@a
+}
+\newcommand*{\@saddsubsec}[1]{\subsection*{#1}\addsubsecmark{}}
+\makeatother
+\end{lstlisting}
+
+Die Ausgabe der Teilquellenverzeichnisse für die benutzte Literaturdatenbank erfolgte mit:
+
+\begin{lstlisting}
+\printbibliography[heading=subbib,category=1,title=Kategorie 1]
+
+\printbibliography[heading=subbib,type=article,title=Artikel]
+
+\printbibliography[heading=subbib,type=commentary,title=Kommentare]
+
+\printbibliography[heading=subbib,nottype=article,nottype=commentary,title=Allgemeine Quellen]
+\end{lstlisting}
+
+
+\nocite{*}
+\printbibliography[heading=subbib,category=1,title=Kategorie 1]
+
+\printbibliography[heading=subbib,type=article,title=Artikel]
+
+\printbibliography[heading=subbib,type=commentary,title=Kommentare]
+
+\printbibliography[heading=subbib,nottype=article,nottype=commentary,title=Allgemeine Quellen]
+
+
+
\end{document}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx
index e8efc47772..78e63ad983 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.bbx
@@ -1,6 +1,6 @@
% biblatex-juradiss.bbx, Tobias Schwan 2012
% Änderungen von Herbert Voß -- 2020
-\ProvidesFile{biblatex-juradiss.bbx}[2020/09/24 v0.22 biblatex bibliography style]
+\ProvidesFile{biblatex-juradiss.bbx}[2020/10/01 v0.23 biblatex bibliography style]
% Release Notes can be found in the README
\RequireBibliographyStyle{authortitle-dw}%
@@ -586,18 +586,5 @@
% Statt "besucht am" soll "abgerufen am" vor dem Datum des letzten Abrufs stehen
\DefineBibliographyStrings{german}{urlseen = {abgerufen am}}%
-\DeclareStyleSourcemap{%
- \maps[datatype=bibtex]{%
- \map{
- \step[fieldsource=decision, fieldtarget=usera]
- \step[fieldsource=sign, fieldtarget=userb]
- \step[fieldsource=officialvolume, fieldtarget=userc]
- \step[fieldsource=officialpages, fieldtarget=userd]
- \step[fieldsource=journalyear, fieldtarget=usere]
- \step[fieldsource=decisionname, fieldtarget=userf]
- }
- }
-}
-
\endinput
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx
index 9636b1af52..ebfc124efe 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.cbx
@@ -1,7 +1,7 @@
% biblatex-juradiss.cbx, Tobias Schwan 2012
% Änderungen von Herbert Voß -- 2020
-\ProvidesFile{biblatex-juradiss.cbx}[2020/09/24 v0.22 biblatex citation style]
+\ProvidesFile{biblatex-juradiss.cbx}[2020/10/01 v0.23 biblatex citation style]
% Release Notes can be found in the README.txt
\RequireCitationStyle{authortitle-dw}
@@ -277,61 +277,50 @@
{\printfield{shorttitle}}%
}%
-% usera = Entscheidungsart (z.B. Urteil/Beschluss/Vorlagebeschluss)
-% date = Entscheidungsdatum
-% userb = Aktenzeichen der Entscheidung ( z.B. I R 134/03)
-% userc = Name der Entscheidungssammlung oder der Zeitschrift der primären Fundstelle mit Band oder Jahrgang(z.B. BGHZ 134 oder NJW 2005)
-% userd = Erste Seite des Urteils der primären Fundstelle
-% postnote = Konkrete Fundstelle des Zitats
-% journaltitle = Zeitschriftenname der sekundären Fundstelle
-% usere = Zeitschriftenjahrgang der sekundären Fundstelle
-% pages = Erste Seite des Urteils der sekundären Fundstelle
-% userf = Entscheidungsname
-
% Aktenzeichen von Urteilen in runden Klammern
-\DeclareFieldFormat[jurisdiction]{userb}{\mkbibparens{#1}}
+\DeclareFieldFormat[jurisdiction]{sign}{\mkbibparens{#1}}
\DeclareBibliographyDriver{cite:jurisdiction}{%
- \printfield{usera}\space%Urteil oder Beschluss
+ \printfield{decision}\space%Urteil oder Beschluss
v\adddot\addspace
\printdate\addspace
- \printfield{userb}% Aktenzeichen
- \iffieldundef{userc}%Primaere Fundstelle (Name und Jahr) vorhanden?
+ \printfield{sign}% Aktenzeichen
+ \iffieldundef{officialvolume}%Primaere Fundstelle (Name und Jahr) vorhanden?
{\nopunct}%
{\space
- \printfield{userc}}%
+ \printfield{officialvolume}}%
\iffieldundef{postnote}{%Angabe einer konkreten Fundstelle?
- \iffieldundef{userc}{}{%
- \iffieldundef{userd}{}{%
+ \iffieldundef{officialvolume}{}{%
+ \iffieldundef{officialpages}{}{%
\addcomma\space
- \printfield{userd}}}% Erste Seite der primären Fundstelle
+ \printfield{officialpages}}}% Erste Seite der primären Fundstelle
\iffieldundef{journaltitle}{}{%Sekundäre Fundstelle vorhanden?
\addspace\mkbibparens{%
=\space
\printfield{journaltitle}\space%Zeitschriftentitel
- \printfield{usere}\addcomma\space%Zeitschriftenjahrgang
+ \printfield{journalyear}\addcomma\space%Zeitschriftenjahrgang
\printfield{pages}}%Erste Seite der Zeitschriftenfundstelle
}%
- \iffieldundef{userf}{}{%Entscheidungsname vorhanden?
- \addspace--\addnbspace\printfield{userf}\addnbspace--}}%
+ \iffieldundef{decisionname}{}{%Entscheidungsname vorhanden?
+ \addspace--\addnbspace\printfield{decisionname}\addnbspace--}}%
{}%
}
\DeclareFieldFormat[jurisdiction]{postnote}{%
- \iffieldundef{userd}%
+ \iffieldundef{officialpages}%
{#1}%Bei fehlender erster Seite, zB juris, keine Klammern um konkrete Fundstelle
- {\printfield{userd}\addspace% Erste Seite des Urteils in der Entscheidungssammlung
+ {\printfield{officialpages}\addspace% Erste Seite des Urteils in der Entscheidungssammlung
\mkbibparens{#1}}%Seitenzahl der konkreten Fundstelle in Klammern
\iffieldundef{journaltitle}{}{%
\addspace\mkbibparens{%
=\space
\printfield{journaltitle}\space
- \printfield{usere}\addcomma\space
+ \printfield{journalyear}\addcomma\space
\printfield{pages}%
}%
}%
- \iffieldundef{userf}{}{%
- \addspace--\addnbspace\printfield{userf}\addnbspace--}%
+ \iffieldundef{decisionname}{}{%
+ \addspace--\addnbspace\printfield{decisionname}\addnbspace--}%
}%
% Für Parlaments- und Verwaltungsdokumente
@@ -345,3 +334,18 @@
\endinput
+
+
+
+\DeclareStyleSourcemap{%
+ \maps[datatype=bibtex]{%
+ \map{
+ \step[fieldsource=decision, fieldtarget=usera]
+ \step[fieldsource=sign, fieldtarget=userb]
+ \step[fieldsource=officialvolume, fieldtarget=userc]
+ \step[fieldsource=officialpages, fieldtarget=userd]
+ \step[fieldsource=journalyear, fieldtarget=usere]
+ \step[fieldsource=decisionname, fieldtarget=userf]
+ }
+ }
+}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.dbx
new file mode 100644
index 0000000000..68db95fc26
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-juradiss/latex/biblatex-juradiss.dbx
@@ -0,0 +1,41 @@
+% biblatex-juradiss.dbx, Herbert Voß -- 2020
+\ProvidesFile{biblatex-juradiss.dbx}[2020/10/01 v0.01 biblatex bibliography style]
+% Release Notes can be found in the README
+%
+\DeclareDatamodelFields[type=field,datatype=literal]{decision}
+\DeclareDatamodelFields[type=field,datatype=literal]{decisionname}
+\DeclareDatamodelFields[type=field,datatype=literal]{sign}
+\DeclareDatamodelFields[type=field,datatype=integer]{officialvolume}
+\DeclareDatamodelFields[type=field,datatype=integer]{officialpages}
+\DeclareDatamodelFields[type=field,datatype=integer]{journalyear}
+\DeclareDatamodelEntryfields[jurisdiction]%
+ {decision, decisionname, officialvolume, officialpages, sign, journalyear}
+
+\endinput
+
+
+\DeclareStyleSourcemap{%
+ \maps[datatype=bibtex]{%
+ \map{
+ \step[fieldsource=decision, fieldtarget=usera]
+ \step[fieldsource=sign, fieldtarget=userb]
+ \step[fieldsource=officialvolume, fieldtarget=userc]
+ \step[fieldsource=officialpages, fieldtarget=userd]
+ \step[fieldsource=journalyear, fieldtarget=usere]
+ \step[fieldsource=decisionname, fieldtarget=userf]
+ }
+ }
+}
+
+
+% usera: decision = Entscheidungsart (z.B. Urteil/Beschluss/Vorlagebeschluss)
+% userf: decisionname = Entscheidungsname
+% date = Entscheidungsdatum
+% userb: sign (signum) = Aktenzeichen der Entscheidung ( z.B. I R 134/03)
+% userc: officialvolume = Name der Entscheidungssammlung oder der Zeitschrift der primären Fundstelle mit Band oder Jahrgang(z.B. BGHZ 134 oder NJW 2005)
+% userd: officialpages = Erste Seite des Urteils der primären Fundstelle
+% postnote = Konkrete Fundstelle des Zitats
+% journaltitle = Zeitschriftenname der sekundären Fundstelle
+% usere: journalyear = Zeitschriftenjahrgang der sekundären Fundstelle
+% pages = Erste Seite des Urteils der sekundären Fundstelle
+
diff --git a/macros/latex/contrib/hep-paper/bibliography.bib b/macros/latex/contrib/hep-paper/bibliography.bib
index 63e5ad9916..2ff83993b1 100644
--- a/macros/latex/contrib/hep-paper/bibliography.bib
+++ b/macros/latex/contrib/hep-paper/bibliography.bib
@@ -697,7 +697,7 @@ eprinttype = "ctan",
eprint = "bbm",
}
-@online{arxiv,
+@article{arxiv,
title = "arXiv",
subtitle = "free distribution service and an open archive for scholarly articles",
url = "https://arxiv.org",
@@ -705,7 +705,6 @@ author = "Paul Ginsparg",
collaboration = "arXiv Team",
year = "1991",
organization = "Cornell University",
-ReportNumber = "test",
}
@article{dsfont,
@@ -768,3 +767,58 @@ eprinttype = "github",
eprintclass = "josephwright",
eprint = "beamer",
}
+
+@article{exscale,
+title = "The |exscale| package",
+subtitle = "Implements scaling of the \enquote{cmex} fonts",
+author = "Frank Mittelbach and Rainer Schöpf",
+date = "1993",
+eprinttype = "ctan",
+eprint = "exscale",
+}
+
+@article{mathrsfs,
+title = "The |mathrsfs| package",
+subtitle = "Support for using RSFS fonts in maths",
+author = "Jörg Knappen",
+date = "1995",
+eprinttype = "ctan",
+eprint = "mathrsfs",
+}
+
+@article{esint,
+title = "The |esint| package",
+subtitle = "Extended set of integrals for Computer Modern",
+author = "Eddie Saudrais",
+date = "2005",
+eprinttype = "ctan",
+eprint = "esint",
+}
+
+@article{cmbright,
+title = "The |cmbright| package",
+subtitle = "Using the CM Bright typeface with \hologo{LaTeX}",
+author = "Walter A. Schmidt",
+date = "1996",
+eprinttype = "ctan",
+eprint = "cmbright",
+}
+
+@article{titling,
+title = "The |titling| package",
+subtitle = "Control over the typesetting of the |\textbackslash maketitle| command",
+author = "Peter R. Wilson",
+date = "2000",
+eprinttype = "ctan",
+eprint = "titling",
+}
+
+@article{MnSymbol,
+title = "The |MnSymbol| package",
+subtitle = "Mathematical symbol font for Adobe MinionPro",
+author = "Achim Blumensath",
+date = "2005",
+eprinttype = "ctan",
+eprint = "MnSymbol",
+}
+
diff --git a/macros/latex/contrib/hep-paper/hep-paper-documentation.pdf b/macros/latex/contrib/hep-paper/hep-paper-documentation.pdf
index 7e8d9dbdb5..7e6298b2b5 100644
--- a/macros/latex/contrib/hep-paper/hep-paper-documentation.pdf
+++ b/macros/latex/contrib/hep-paper/hep-paper-documentation.pdf
Binary files differ
diff --git a/macros/latex/contrib/hep-paper/hep-paper-implementation.dtx b/macros/latex/contrib/hep-paper/hep-paper-implementation.dtx
index f8bddd02e4..f74dfd72d9 100644
--- a/macros/latex/contrib/hep-paper/hep-paper-implementation.dtx
+++ b/macros/latex/contrib/hep-paper/hep-paper-implementation.dtx
@@ -16,18 +16,21 @@
% \fi
%
% \iffalse
-%
+
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-%<package>\ProvidesPackage{hep-paper}[2020/08/01 v1.4 Publications in High Energy Physics]
-%<datamodel>\ProvidesFile{hep-paper.dbx}[2020/08/01 v1.4 HEP-Paper biblatex data model]
+%<package>\ProvidesPackage{hep-paper}[2020/10/01 v1.5 Publications in High Energy Physics]
+%<datamodel>\ProvidesFile{hep-paper.dbx}[2020/10/01 v1.5 HEP-Paper biblatex data model]
+%<documentation>\ProvidesFile{hep-paper-documentation.tex}[2020/10/01 v1.5 HEP-Paper documentation]
%
%<*documentation>
+
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
+\def\MacroFont{\fontencoding\encodingdefault\fontfamily{lmtt}\fontseries\mddefault\fontshape\shapedefault\small}
\MacroIndent=1.5em
@@ -37,17 +40,20 @@
\acronym{PDF}{portable document format}
\acronym{URL}{uniform resource locator}
+\acronym{CM}{computer modern}
+\acronym{LM}{latin modern}
\usepackage{hologo}
\newenvironment{columns}[1][.5]{%
+ \par\vspace{-\bigskipamount}%
\begin{minipage}[t]{\linewidth}%
\begin{minipage}[t]{#1\linewidth}%
\newcommand{\column}{%
\end{minipage}%
\begin{minipage}[t]{\linewidth-#1\linewidth}%
}%
-}{\end{minipage}\end{minipage}}
+}{\end{minipage}\end{minipage}\par}
\setlength{\fboxsep}{1pt}
%</documentation>
@@ -62,7 +68,7 @@
%
% \fi
%
-% \CheckSum{1302}
+% \CheckSum{1551}
%
% \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
@@ -84,27 +90,31 @@
% \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 of incompatibility with recent subcaption package version. Move of biblatex datamodel into its own file}
-% \changes{v1.4}{2020/08/01}{If possible the compatibility options are selected automatically. Inclusion of PubMed IDs in bibliography.}
+% \changes{v1.4}{2020/09/01}{If possible the compatibility options are selected automatically. Inclusion of PubMed IDs in bibliography.}
+% \changes{v1.5}{2020/10/01}{Reduce the numer of math alphabets used in sans serif mode. Add more title options such as a subtitle. Use standard class options.}
%
% \ifshort
%<*documentation>
-%
-\begin{document}
% \fi
-
+%
\GetFileInfo{hep-paper.sty}
-\title{The |hep-paper| package\thanks{This document corresponds to \protecting{|hep-paper|}~\fileversion.}}
+\title{The \software{hep-paper} package\thanks{This document corresponds to \software{hep-paper}~\fileversion.}}
+\subtitle{Publications in high energy physics}
\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{\normalfont\filedate}
+\date{\filedate}
+
+% \ifshort
+\begin{document}
+% \fi
\maketitle
\begin{abstract}
-The |hep-paper| package aims to provide a single style file containing most configurations and macros necessary to write appealing publications in High Energy Physics.
-Instead of reinventing the wheel by introducing newly created macros |hep-paper| preferably loads third party packages as long as they are lightweight enough.
+The \software{hep-paper} package aims to provide a single style file containing most configurations and macros necessary to write appealing publications in High Energy Physics.
+Instead of reinventing the wheel by introducing newly created macros \software{hep-paper} preferably loads third party packages as long as they are lightweight enough.
\end{abstract}
\tableofcontents\clearpage
@@ -113,16 +123,16 @@ Instead of reinventing the wheel by introducing newly created macros |hep-paper|
\section{Introduction}
-For usual publications it is enough to load additionally to the |article| class without optional arguments only the |hep-paper| package \cite{hep-paper}.
-
-| \documentclass{article}|\\
-| \usepackage{hep-paper}|
-
-The most notable changes after loading the |hep-paper| package is the change of some \hologo{LaTeX} defaults.
+For usual publications it is enough to load additionally to the |article| class without optional arguments only the \software{hep-paper} package \cite{hep-paper}.
+\begin{verbatim}
+\documentclass{article}
+\usepackage{hep-paper}
+\end{verbatim}
+The most notable changes after loading the \software{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}.
-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}.
+Additionally, the paper geometry is adjusted using the \software{geometry} package \cite{geometry}.
+Furthermore, the font is changed to \LM using the \software{lmodern} package \cite{lmodern} with \software{microtype} \cite{microtype} optimizations.
+Finally, \PDF hyperlinks are implemented with the \software{hyperref} package \cite{hyperref}.
\subsection{Options}
@@ -143,18 +153,24 @@ The possible \meta{sizes} are:
The default is \unit[11]{pt}.
\DescribeMacro{lang}
-The |lang|=\meta{name} option switches the document language to the chosen value.
-The possible values are given by the |babel| package \cite{babel}.
+The |lang|=\meta{name} option switches the document language to one of the values values provided by the \software{babel} package \cite{babel}.
The default is |british|.
\DescribeMacro{sansserif}
-The |sansserif| option switches the document including math to the sans serif font shape.
+The |sansserif| option switches the document including math to sans serif font shape.
\DescribeMacro{parskip}
-The |parskip| option makes use of the |parskip| package \cite{parskip} and changes how two paragraphs are separated from each other.
+The |parskip| option changes how paragraphs are separated from each other using the \software{parskip} package \cite{parskip}.
The \hologo{LaTeX} default is separation via indentation the |parskip| option switches to separation via vertical space.
\footnote{Although the |parskip| option is used for this document, it is recommended only for very few document types such as technical manuals or answers to referees.}
+\DescribeMacro{symbols}
+The |symbols|=\meta{family} set the family of the symbol fonts.
+|symbols=ams| loads two \hologo{AmS} fonts \cite{amsfonts} and the \software{bm} bold fonts.
+The default setting replaces additionally the blackboard font with the \software{dsfont} \cite{dsfont}.
+|symbols=minion| switches the symbol fonts to the Adobe MinionPro companion font from the \software{MnSymbol} package \cite{MnSymbol}.
+|symbols=false| deactivates additional symbol fonts.
+
\subsubsection{Deactivation}
The \software{hep-paper} package loads few bigger packages which have a large impact on the document.
@@ -167,14 +183,14 @@ The |defaults| option prevents the adjustment of the page geometry and the font
The |title=false| option deactivates the title page adjustments.
\DescribeMacro{bibliography}
-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.
+The |bibliography|=\meta{key} option prevents the automatic loading of the \software{biblatex} package \cite{biblatex} if \meta{key}=|false|.
+Otherwise the \meta{key} is passed as |style| string to the \software{biblatex} package.
\DescribeMacro{glossaries}
-The |glossaries=false| option deactives acronyms and the use of the |glossaries| package \cite{glossaries}.
+The |glossaries=false| option deactives acronyms and the use of the \software{glossaries} package \cite{glossaries}.
\DescribeMacro{references}
-The |references=false| option prevents the |cleveref| pacakge \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros.
+The |references=false| option prevents the \software{cleveref} package \cite{cleveref} from being loaded and deactivates further redefinitions of reference macros.
\subsubsection{Compatibility}
@@ -211,19 +227,23 @@ The |eqnarray| option reactivates the depreciated |eqnarray| environment.
\subsection{Title page}
+\DescribeMacro{\title}
+The \PDF meta information is set according to the |\title|\marg{text} and |\author| \marg{text} information.
+
+\DescribeMacro{\subtitle}
+The |\subtitle|\marg{subtitle} macro is defined using the \software{titling} package \cite{titling}.
+
\DescribeMacro{\author}
\DescribeMacro{\affiliation}
\DescribeMacro{\email}
-In order to facilitate multiple authors with different affiliations the |authblk| package \cite{authblk} is loaded.
+In order to facilitate multiple authors with different affiliations the \software{authblk} package \cite{authblk} is loaded.
The following lines add \eg two authors with different affiliations
-
-| \author[1]{Author one \email{Email one}}|\\
-| \affiliation[1]{Affiliation one}|\\
-| \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.
+\begin{verbatim}
+\author[1]{Author one \email{email one}}
+\affiliation[1]{Affiliation one}
+\author[2]{Author two \email{email two}}
+\affiliation[1,2]{Affiliation two}
+\end{verbatim}
\DescribeMacro{\preprint}
The |\preprint|\marg{numer} macro places a pre-print number in the upper right corner of the title page.
@@ -231,16 +251,23 @@ The |\preprint|\marg{numer} macro places a pre-print number in the upper right c
\DescribeEnv{abstract}
The |abstract| environment is adjusted to not start with an indentation.
+\DescribeMacro{\titlefont}
+\DescribeMacro{\subtitlefont}
+\DescribeMacro{\authorfont}
+\DescribeMacro{\affiliationfont}
+\DescribeMacro{\preprintfont}
+Various title font macros are defined, allowing to change the appearance of the |\maketitle| output.
+
\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.
+Hyphenation is provided by the \software{babel} package \cite{babel} and quotation commands are provided by the \software{csquotes} package \cite{csquotes} recommended by the \software{babel} package.
\DescribeMacro{\enquote}
\DescribeMacro{\MakeOuterQuote}
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}
-The |foreign| package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs.
+The \software{foreign} package \cite{foreign} defines macros such as |\eg|, |\ie|, |\cf|, and |\vs| which are typeset as \eg, \ie, \cf, and \vs.
\DescribeMacro{\no}
The |\no|\marg{number} macro is typeset as \no{123}.
@@ -251,20 +278,19 @@ The |\software|\oarg{version}\marg{name} macro is typeset as \software[\filevers
\DescribeMacro{\online}
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}
+\DescribeMacro{enumdescript}
+The |inlinelist| and |enumdescript| environments are defined using the \software{enumitem} package \cite{enumitem}.
\begin{columns}
-|The three main points are|
-|\begin{inlinelist}|
-
-| \item one|
-
-| \item two|
-
-| \item three|
-
-|\end{inlinelist}|
+\begin{verbatim}
+The three main points are
+\begin{inlinelist}
+ \item one
+ \item two
+ \item three
+\end{inlinelist}
+\end{verbatim}
\column
The three main points are
\begin{inlinelist}
@@ -273,18 +299,15 @@ The three main points are
\item three
\end{inlinelist}
\end{columns}
-
-\DescribeMacro{enumdescript}
+\vspace{4ex}
\begin{columns}[.6]
-|\begin{enumdescript}[label=\Roman*)]|
-
-| \item{First} one|
-
-| \item{Second} two|
-
-| \item{Third} three|
-
-|\end{enumdescript}|
+\begin{verbatim}
+\begin{enumdescript}[label=\Roman*)]
+ \item{First} one
+ \item{Second} two
+ \item{Third} three
+\end{enumdescript}
+\end{verbatim}
\column
\begin{enumdescript}[label=\Roman*)]
\item{First} one
@@ -294,11 +317,11 @@ The three main points are
\end{columns}
\DescribeMacro{\textsc}
-A bold versions \textbf{\textsc{Small Caps}} and a sans serif version of \textsf{\textsc{Small Caps}} is provided, using the |sansmathfonts| package \cite{sansmathfonts}.
+A bold versions \textbf{\textsc{Small Caps}} and a sans serif version of \textsf{\textsc{Small Caps}} based on the \CM font is provided, the latter using the \software{sansmathfonts} package \cite{sansmathfonts}.
\DescribeMacro{\underline}
\DescribeMacro{\overline}
-The |\underline| macro is redefined to allow line-breaks using the |ulem| package \cite{ulem}.
+The |\underline| macro is redefined to allow line-breaks using the \software{ulem} package \cite{ulem}.
The |\overline| macro is extended to also \overline{overline} text outside of math environments.
\DescribeMacro{\useparskip}
@@ -308,8 +331,8 @@ If the |parskip| option is activated the |\useparindent| macro switches back the
\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 \enquote{figure 1}.
-Furthermore, the |cleveref| package allows to reference multiple objects within one |\cref|\marg{key1,key2}.
+References are extended with the \software{cleveref} package \cite{cleveref}, which allows to \eg just type |\cref|\marg{key} in order to write \enquote{figure 1}.
+Furthermore, the \software{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}.
@@ -317,7 +340,7 @@ Citations are adjusted to not start on a new line in order to avoid the repeated
\DescribeMacro{\ref}
\DescribeMacro{\eqref}
\DescribeMacro{\subref}
-References are also adjusted to not start on a new line and are redefined in order to handle multiple references at once.
+References are also adjusted to not start on a new line.
\DescribeMacro{\footnote}
Footnotes are adjusted to swallow white space before the footnote mark and at the beginning of the footnote text.
@@ -341,22 +364,21 @@ Placing a |\dummyacronym|\marg{key} at the end of the document ensures that the
\subsection{Math}
-The |mathtools| \cite{mathtools} and |amssymb| \cite{amsfonts} packages are loaded.
-They in turn load the \hologo{AmSLaTeX} |amsmath| \cite{amsmath} and |amsfonts| \cite{amsfonts} packages.
+The \software{mathtools} \cite{mathtools} and \software{amssymb} \cite{amsfonts} packages are loaded.
+They in turn load the \hologo{AmSLaTeX} \software{amsmath} \cite{amsmath} and \software{amsfonts} \cite{amsfonts} packages.
\DescribeMacro{\mathbf}
-Bold math, via |\mathbf| is improved by the |bm| package \cite{bm}, \ie ($ A b \Gamma \delta \mathbf A \mathbf b \mathbf \Gamma \mathbf \delta$).
+Bold math, via |\mathbf| is improved by the \software{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.
This may cause trouble if bold symbols carry an additional non-implicit meaning.
\DescribeMacro{\text}
The |\text|\marg{text} macro makes it possible to write text within math mode, \ie ($ \text A \text b \text \Gamma \text \delta \text{\textbf A} \text{\textbf b} \text{\textbf \Gamma} \text{\textbf \delta}$).
-The often used |\mathrm|\marg{text} and |{\rm|\meta{text}|}| macros are \emph{not} the correct tool for this purpose, as they switch to roman font shape.
-This behaviour conflicts \eg with the |sansserif| package option.
+This behaviour conflicts \eg with the \software{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}$).
\DescribeMacro{\mathscr}
The |\mathcal| font \ie ($\mathcal{ABCD}$) is accompanied by the |\mathscr| font \ie ($\mathscr{ABCD}$).
\DescribeMacro{\mathbb}
-The |\mathbb| font is improved by the |doublestroke| package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$).
+The |\mathbb| font is improved by the \software{doublestroke} package \cite{dsfont} and adjusted depending on the |sansserif| option \ie ($\mathbb{Ah1}$).
\DescribeMacro{\mathfrak}
Finally, the |\mathfrak| font is also available \ie ($\mathfrak{AaBb12}$).
Details about the font handling in \hologo{TeX} can be found in \ccite{fntguide}.
@@ -369,7 +391,7 @@ The |\frac|\marg{number}\marg{number} macro is accompanied by |\nicefrac|\linebr
Diagonal matrix |\diag| and signum |\sgn| operators are defined.
\DescribeMacro{\mathdef}
-The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro (re-)defines macros only within math mode without changing the text mode definition.
+The |\mathdef|\marg{name}\oarg{arguments}\marg{code} macro \prefix{re}{defines} macros only within math mode without changing the text mode definition.
\DescribeMacro{\i}
\DescribeMacro{\d}
@@ -379,21 +401,20 @@ The imaginary unit $\i$ and the differential $\d$ are defined using this functio
For longer paper it can be useful to re-number the equation in accordance with the section numbering |\numberwithin{equation}{section}|.
\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 |amsmath| package.
+Both macros are provided by the \software{amsmath} package.
\DescribeMacro{eqnarray}
The depreciated |eqnarray| environment is undefined as long this behaviour is not prevented by the |eqnarray| package option.
-The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the |amsmath| and |mathtools| packages should be used instead.
+The |split|, |multline|, |align|, |multlined|, |aligned|, |alignedat|, and |cases| environments of the \software{amsmath} and \software{mathtools} packages should be used instead.
\DescribeMacro{equation}
Use the |equation| environment for short equations.
-
\begin{columns}
-|\begin{equation}|
-
-| left = right \ .|
-
-|\end{equation}|
+\begin{verbatim}
+\begin{equation}
+ left = right \ .
+\end{equation}
+\end{verbatim}
\column
\begin{equation}
\framebox[2em]{left\strut} = \framebox[7em]{right\strut} \ .
@@ -402,33 +423,29 @@ Use the |equation| environment for short equations.
\DescribeMacro{multline}
Use the |multline| environment for longer equations.
-
\begin{columns}
-|\begin{multline}|
-
-| left = right 1 \\|
-
-| + right 2 \ .|
-
-|\end{multline}|
+\begin{verbatim}
+\begin{multline}
+ left = right 1 \\
+ + right 2 \ .
+\end{multline}
+\end{verbatim}
\column
\begin{multline}
\framebox[2em]{left\strut} = \framebox[7em]{right 1\strut} \\
\framebox[7em]{+ right 2\strut} \ .
- \end{multline}
+\end{multline}
\end{columns}
\DescribeMacro{split}
Use the |split| sub environment for equations in which multiple equal signs should be aligned.
-
\begin{columns}
-|\begin{equation} \begin{split}|
-
-| left &= right 1 \\|
-
-| &= right 2 \ .|
-
-|\end{split} \end{equation}|
+\begin{verbatim}
+\begin{equation} \begin{split}
+ left &= right 1 \\
+ &= right 2 \ .
+\end{split} \end{equation}
+\end{verbatim}
\column
\begin{equation}
\begin{split}
@@ -440,18 +457,15 @@ Use the |split| sub environment for equations in which multiple equal signs shou
\DescribeMacro{align}
Use the |align| environment for the vertical alignment and horizontal distribution of multiple equations.
-
\begin{columns}
-|\begin{subequations}|
-|\begin{align}|
-
-| left &= right \ , &|
-| left &= right \ , \\|
-| left &= right \ , &|
-| left &= right \ .|
-
-|\end{align}|
-|\end{subequations}|
+\begin{verbatim}
+\begin{subequations} \begin{align}
+ left &= right \ , &
+ left &= right \ , \\
+ left &= right \ , &
+ left &= right \ .
+\end{align} \end{subequations}
+\end{verbatim}
\column
\begin{subequations}
\begin{align}
@@ -468,15 +482,15 @@ Use the |aligned| environment within a |equation| environment if the aligned equ
\DescribeMacro{multlined}
Use the |multlined| environment if either |split| or |align| contain very long lines.
-
\begin{columns}
-|\begin{equation} \begin{split}|
-
-| left &= right 1 \\ &=|
-| \begin{multlined}[t]|
-| right 2 \\ + right 3 \ .|
-| \end{multlined}|
-|\end{split} \end{equation}|
+\begin{verbatim}
+\begin{equation} \begin{split}
+ left &= right 1 \\ &=
+ \begin{multlined}[t]
+ right 2 \\ + right 3 \ .
+ \end{multlined}
+\end{split} \end{equation}
+\end{verbatim}
\column
\begin{equation}
\begin{split}
@@ -491,18 +505,16 @@ Use the |multlined| environment if either |split| or |align| contain very long l
\DescribeMacro{alignat}
Use the |alignat| environment together with the |\mathllap| macro for the alignment of multiple equations with vastly different lengths.
-
\begin{columns}
-|\begin{subequations}|
-|\begin{alignat}{2}|
-
-| left &= long right && \ , \\|
-
-| le. 2 &= ri. 2 \ , &|
-
-| \mathllap{le. 3 = ri. 3} & \ .|
-|\end{alignat}|
-|\end{subequations}|
+\begin{verbatim}
+\begin{subequations}
+\begin{alignat}{2}
+ left &= long right && \ , \\
+ le. 2 &= ri. 2 \ , &
+ \mathllap{le. 3 = ri. 3} & \ .
+\end{alignat}
+\end{subequations}
+\end{verbatim}
\column
\begin{subequations}
\begin{alignat}{2}
@@ -520,7 +532,7 @@ As a rule of thumb if you have to use |\notag|, |\nonumber|, or perform manual s
\subsubsection{Physics}
-Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the |fixmath| \cite{fixmath} and |alphabeta| \cite{alphabeta} packages.
+Greek letters are adjusted to always be italic and upright in math and text mode, respectively, using the \software{fixmath} \cite{fixmath} and \software{alphabeta} \cite{alphabeta} packages.
This allows differentiations like
\begin{align}
\sigma &= \unit[5]{fb} \ , & &\text{at \unit[5]{\sigma} C.L.} \ , & \mu &= \unit[5]{cm} \ , & l &= \text{\unit[5]{\mu m}} \ ,
@@ -533,7 +545,7 @@ Additionally, Greek letters can also be directly typed using Unicode.
\DescribeMacro{\pdv}
\DescribeMacro{\comm}
\DescribeMacro{\order}
-The |physics| package \cite{physics} provides additional macros such as
+The \software{physics} package \cite{physics} provides additional macros such as
\begin{align}
&\ev{\phi} \ ,
&&\pdv[n]{f}{x} \ ,
@@ -545,14 +557,14 @@ The |physics| package \cite{physics} provides additional macros such as
\DescribeMacro{\cancel}
\DescribeMacro{\slashed}
-The |\cancel|\marg{characters} macro from the |cancel| \cite{cancel} package and the |\slashed| \marg{character} macro from the |slashed| \cite{slashed} package allow to $\cancel{\text{cancel}}$ math and use the Dirac slash notation \ie $\slashed \partial$, respectively.
+The |\cancel|\marg{characters} macro from the \software{cancel} package \cite{cancel} and the |\slashed| \marg{character} macro from the \software{slashed} package \cite{slashed} allow to $\cancel{\text{cancel}}$ math and use the Dirac slash notation \ie $\slashed \partial$, respectively.
\DescribeMacro{\overleftright}
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 \software{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}
@@ -578,12 +590,13 @@ The usual behaviour can be reactivated using |\raggedright|.
\begin{table}
\begin{panels}{.6}
-\raggedright
-|\begin{panels}{.6}|\\
-|code|\\
-|\panel{.4}|\\
-|\begin{tabular}...\end{tabular}|\\
-|\end{panels}|\\
+\begin{verbatim}
+\begin{panels}{.6}
+ code
+\panel{.4}
+ \begin{tabular}...\end{tabular}
+\end{panels}
+\end{verbatim}
\caption{Code for this panel environment.}
\label{tab:panels}
\panel{.4}
@@ -597,55 +610,56 @@ The usual behaviour can be reactivated using |\raggedright|.
\caption{The \protecting{|booktabs|} and \protecting{|multirow|} features.}
\label{tab:booktabs}
\end{panels}
-\caption{Example use of the \protecting{|panels|} environment in Panel \subref{tab:panels} and the features from the \protecting{|booktabs|} and \protecting{|multirow|} packages in Panel \subref{tab:booktabs}.
+\caption{Example use of the \protecting{|panels|} environment in Panel \subref{tab:panels} and the features from the \software{booktabs} and \software{multirow} packages in Panel \subref{tab:booktabs}.
} \label{tab:table}
\end{table}
\DescribeEnv{panels}
\DescribeMacro{\panel}
-The |panels| environment makes use of the |subcaption| package \cite{subcaption}.
+The |panels| environment makes use of the \software{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{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}.
\DescribeEnv{tabular}
-The |booktabs| \cite{booktabs} and |multirow| \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}.
+The \software{booktabs} \cite{booktabs} and \software{multirow} \cite{multirow} packages are loaded enabling publication quality tabulars such as in \cref{tab:booktabs}.
\DescribeMacro{\graphic}
\DescribeMacro{\graphics}
-The |graphicx| package \cite{graphicx} is loaded and the |\graphic|\oarg{width}\marg{figure} macro is defined, which is a wrapper for the |\includegraphics|\marg{figure} macro and takes the figure width as fraction of the |\linewidth| as optional argument (default~1).
+The \software{graphicx} package \cite{graphicx} is loaded and the |\graphic|\oarg{width}\marg{figure} macro is defined, which is a wrapper for the |\includegraphics|\marg{figure} macro and takes the figure width as fraction of the |\linewidth| as optional argument (default~1).
If the graphics are located in a sub-folder its path can be indicated by |\graphics|\marg{subfolder}.
\subsection{Bibliography}
\DescribeMacro{\bibliography}
\DescribeMacro{\printbibliography}
-The |biblatex| package \cite{biblatex} is loaded for bibliography management.
+The \software{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 \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, the PubMed IDs are recognized and \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 valid |eprinttype|s.
\DescribeMacro{erratum}
Errata can be included using the |related| feature.
-
-| \article{|\meta{key1}|,|\\
-| |\dots|,|\\
-| relatedtype="erratum",|\\
-| related="|\meta{key2}|",|\\
-| }|\\
-| \article{|\meta{key2}|,|\\
-| |\dots|,|\\
-| }|
+\begin{verbatim}
+\article{key1,
+ ...,
+ relatedtype="erratum",
+ related="key2",
+}
+\article{key2,
+ ...,
+}
+\end{verbatim}
\section{Conclusion}
-The |hep-paper| package provides a matching selection of preloaded packages and additional macros enabling the user to focus on the content instead of the layout by reducing the amount of manual tasks.
+The \software{hep-paper} package provides a matching selection of preloaded packages and additional macros enabling the user to focus on the content instead of the layout by reducing the amount of manual tasks.
The majority of the loaded packages are fairly lightweight, the others can be deactivated with package options.
\DescribeMacro{arxiv-collector}
\nolinkurl{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).
+The \software{arxiv-collector} python script \cite{arxiv-collector} alleviates this problem by collecting all files necessary for publication on arXiv (including figures).
% \ifshort
\printbibliography
@@ -668,9 +682,51 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
%<*package>
% \fi
%
+% \section{Allocation of math alphabets}
+%
+% Of the 16 available math alphabets, \hologo{TeX} loads four alphabets by default
+% \begin{enumdescript}[start=0]
+% \item{OT1} \label{it:math text} Text (latin, greek, numerals, text symbols)
+% \item{OML} \label{it:math italic} Math Italic (latin, greek, numerals, text symbols)
+% \item{OMS} \label{it:math symbol} Symbol (|\mathcal|, operators)
+% \item{OMX} \label{it:math extension} Math Extension (big operators, delimiters)
+% \end{enumdescript}
+% The text font \ref{it:math text}\strut\ of \CM is \textbf{cmr10} |\OT1/cmr/m/n/10|, which is relaced by \LM to be \textbf{rm-lmr10} |\OT1/lmr/m/n/10|, the |sansserif| option uses \textbf{rm-lmss10} |\OT1/lmss/m/n/10|.
+% The italic math font \ref{it:math italic} of \CM is \textbf{cmmi10} |\OML/cmm/m/it/|\allowbreak|10|, and is repalced by \LM to be \textbf{lmmi10} |\OML/lmm/m/it/10|, the |sansserif| options uses \textbf{cmbrmi10} |\OML/cmbrm/m/it/10| from the \software{cmbright} package \cite{cmbright}.
+% The symbol font \ref{it:math symbol}\strut\ of \CM is \textbf{cmsy10} |\OMS/cmsy/m/n/10|, and is repalced by \LM to be \textbf{lmsy10} |\OMS/lmsy/m/n/10|, the |sansserif| options uses \textbf{cmsssy10} |\OMS/cmsssy/m/n/10| from the \software{sansmathfonts} package \cite{sansmathfonts}.
+% The extension font \ref{it:math extension}\strut\ of \CM is \textbf{cmex10} |\OMX/cmex/m/n/5|, and is replaced by the \software{exscale} package \cite{exscale} to be \textbf{cmex10} |\OMX/cmex/m/n/10|, the |sansserif| option loads \textbf{cmssex10} |\OMX/cmssex/m/n/10|.
+% The \software{amssymb} (\software{amsfonts}) packages \cite{amssymb} load two more symbol fonts
+% \begin{enumdescript}[start=4]
+% \item{msam10} \label{it:math ams a} |\U/msa/m/n/10| AMS symbol font A (special math operators)
+% \item{msbm10} \label{it:math ams b} |\U/msb/m/n/10| AMS symbol font B (|\mathbb|, negated operators)
+% \end{enumdescript}
+% The |sansserif| option replaces them with \textbf{ssmsam10} |\U/ssmsa/m/n/10| and \textbf{ssmsbm10} |\U/ssmsb/m/n/10| from the \software{sansmathfonts} package \cite{sansmathfonts}, respectively.
+% The \software{bm} package \cite{bm} loads the bold version for the fonts \labelcref{it:math text,it:math italic,it:math symbol}.
+%
+% Other math alphabets are only loaded on demand, \eg |\mathsf| uses a sans serif font and |\mathbf| without \software{bm} uses a bold font.
+% The |\mathscr| macro uses the script font from the \software{mathrsfs} package \cite{mathrsfs}
+% \begin{enumdescript}[start=9]
+% \item{rsfs10} |\U/rsfs/m/n/10| Math script font (capital letters)
+% \end{enumdescript}
+% The |\mathbb| macro loads the double stroke font from the \software{dsfont} package \cite{dsfont}, this can be prevented with the |symbols=ams| option.
+% \begin{enumdescript}[start=10]
+% \item{dsrom10} |\U/dsrom/m/n/10| Double stroke font
+% \end{enumdescript}
+% The |\mathfrak| macro loads the fractur font from the \software{amssymb} package \cite{amssymb}
+% \begin{enumdescript}[start=11]
+% \item{eufm10} |\U/euf/m/n/10| Math fraktur (Basic Latin)
+% \end{enumdescript}
+%
+% The \software{hep-paper} package uses nine of the available 16 math alphabets.
+% This number can be reduced by three using |\newcommand{\bmmax}{0}| from the \software{bm} package \cite{bm}.
+%
+% The |symbols=minion| options replaces the fonts \labelcref{it:math symbol,it:math extension,it:math ams a,it:math ams b} with corresponding fonts from the \software{MnSymbol} package \cite{MnSymbol}.
+% Additionally, two more symbol alphabets are allocated, the \software{bm} package \cite{bm} loads one more font and now |\mathcal| triggers the use of one additional alphabet.
+% Hence, the minion option uses three to four more math alphabets than a usual setup.
+%
% \section{Options}
%
-% Load the |pdftexcmds| \cite{pdftexcmds} and |kvoptions| \cite{kvoptions} packages and define a |hep| namespace.
+% Load the \software{pdftexcmds} \cite{pdftexcmds} and \software{kvoptions} \cite{kvoptions} packages and define a |hep| namespace.
% \begin{macrocode}
\RequirePackage{pdftexcmds}
\RequirePackage{kvoptions}
@@ -697,7 +753,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macro}
%
% \begin{macro}{lang}
-% Define the |lang| option, which takes the values provided by the |babel| package \cite{babel}.
+% Define the |lang| option, which takes the values provided by the \software{babel} package \cite{babel}.
% Make |british| the default language.
% \begin{macrocode}
\DeclareStringOption[british]{lang}
@@ -720,6 +776,13 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{symbols}
+% Provide the option |symbols| allowing to switch the symbol font.
+% \begin{macrocode}
+\DeclareStringOption[true]{symbols}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Deactivation}
%
% \begin{macro}{defaults}
@@ -737,21 +800,21 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macro}
%
% \begin{macro}{bibliography}
-% Provide the option |bibliography| for passing a |style| string to the |biblatex| package \cite{biblatex} or disabling the automatic loading of |biblatex|.
+% Provide the option |bibliography| for passing a |style| string to the \software{biblatex} package \cite{biblatex} or disabling the automatic loading of |biblatex|.
% \begin{macrocode}
\DeclareStringOption[numeric-comp]{bibliography}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{glossaries}
-% Provide the option |glossaries| able to turn of the use of the |glossaries| package \cite{glossaries}.
+% Provide the option |glossaries| able to turn of the use of the \software{glossaries} package \cite{glossaries}.
% \begin{macrocode}
\DeclareBoolOption[true]{glossaries}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{references}
-% Provide the option |references| for preventing the |cleveref| package from being loaded redefinitions of reference macros.
+% Provide the option |references| for preventing the \software{cleveref} package from being loaded redefinitions of reference macros.
% \begin{macrocode}
\DeclareBoolOption[true]{references}
% \end{macrocode}
@@ -774,21 +837,21 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macro}
%
% \begin{macro}{jhep}
-% Provide the option |jhep| for |JHEP| \cite{jhep} compatibility mode.
+% 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.
+% 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.
+% Provide the option |pos| for PoS compatibility mode.
% \begin{macrocode}
\DeclareBoolOption[false]{pos}
% \end{macrocode}
@@ -816,6 +879,22 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\ProcessKeyvalOptions*
% \end{macrocode}
%
+% Read the class options regarding font and paper size.
+% \begin{macrocode}
+\def\hep@get@class#1.cls#2\relax{\def\hep@class{#1}}
+\def\hep@getclass{\expandafter\hep@get@class\@filelist\relax}
+\hep@getclass
+\@ifclasswith{\hep@class}{10pt}{\setkeys{hep}{font=10pt}}{}
+\@ifclasswith{\hep@class}{12pt}{\setkeys{hep}{font=12pt}}{}
+\@ifclasswith{\hep@class}{a5paper}{\setkeys{hep}{paper=a5}}{}
+\@ifclasswith{\hep@class}{b5paper}{\setkeys{hep}{paper=b5}}{}
+\@ifclasswith{\hep@class}{letterpaper}{\setkeys{hep}{paper=letter}}{}
+\@ifclasswith{\hep@class}{legalpaper}{\setkeys{hep}{paper=legal}}{}
+\@ifclasswith{\hep@class}{executivepaper}{%
+ \setkeys{hep}{paper=executive}%
+}{}
+% \end{macrocode}
+%
% \subsection{Set compatibility}
%
% Set the |pos| compatibility options.
@@ -832,6 +911,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\@ifclassloaded{beamer}{\setkeys{hep}{beamer}}{}
\ifhep@beamer
\setkeys{hep}{defaults, title=false, references=false, sansserif}
+ \@ifpackageloaded{beamerbasefont}{\usefonttheme{professionalfonts}}{}
\fi
% \end{macrocode}
%
@@ -880,24 +960,15 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \section{Text}
%
-% 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.
% \begin{macrocode}
\ifhep@serif\else
- \RequirePackage{sansmathfonts}
- \renewcommand\familydefault{\sfdefault}
+ \renewcommand{\familydefault}{\sfdefault}
\fi
% \end{macrocode}
%
% \begin{macro}{\ifxetexorluatex}
-% Load the |ifluatex| \cite{ifluatex} and |ifxetex| \cite{ifxetex} packages.
+% Load the \software{ifluatex} \cite{ifluatex} and \software{ifxetex} \cite{ifxetex} packages.
% Define the |\ifxetexorluatex| conditional checking if the package is executed by \hologo{LuaLaTeX} or \hologo{XeLaTeX}.
% \begin{macrocode}
\RequirePackage{ifluatex}
@@ -912,7 +983,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
% \end{macro}
%
-% Pick the correct font encoding depending on the engine used and load the |fontenc| package \cite{fontenc} with this encoding.
+% Pick the correct font encoding depending on the engine used and load the \software{fontenc} package \cite{fontenc} with this encoding.
% For details of the font encoding see \cite{encguide}.
% \begin{macrocode}
\ifxetexorluatex
@@ -922,21 +993,22 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\fi
\RequirePackage[\hep@encoding]{fontenc}
% \end{macrocode}
-% Fix the remaining coputer modern fonts \cite{fix-cm}, load the |lmodern| font \cite{lmodern}, the |textcomp| extension \cite{textcomp}, and the |microtype| font optimization \cite{microtype}.
+% Fix the remaining \CM fonts \cite{fix-cm}, load the \software{lmodern} font \cite{lmodern}, the |textcomp| extension \cite{textcomp}, and the \software{microtype} font optimization \cite{microtype}.
% \begin{macrocode}
\RequirePackage{fix-cm}
\RequirePackage{lmodern}
+\renewcommand{\ttdefault}{lmvtt}
\RequirePackage{textcomp}
\RequirePackage{microtype}
% \end{macrocode}
%
-% Define bold and sans serif small caps font shapes using the fontspec package \cite{fontspec}.
+% Define bold and sans serif small caps font shapes using the \software{fontspec} package \cite{fontspec}.
% The font abbreviations are
% \begin{description}[nosep]
-% \item[lmr] Latin modern roman font
-% \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[lmr] \LM regular font
+% \item[lmss] \LM sans serif font
+% \item[cmss] \CM sans serif font
+% \item[xcmss] Extended \CM sans serif font (from the \software{sansmathfonts} package \cite{sansmathfonts})
% \item[bx] Bold extended series
% \item[b] Bold series
% \item[m] Medium weight and width series
@@ -968,22 +1040,22 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\DeclareFontShape{\hep@encoding}{lmss}{m}{sc}{<->ssub*xcmss/m/sc}{}
\fi
% \end{macrocode}
-
-% Load the |inputenc| \cite{inputenc} package.
+%
+% Load the \software{inputenc} package \cite{inputenc}.
% \begin{macrocode}
\ifxetexorluatex\else
\RequirePackage[utf8]{inputenc}
\fi
% \end{macrocode}
%
-% Load the |babel| \cite{babel} package for hyphenation and the recommended |csquotes| package \cite{csquotes}.
+% Load the \software{babel} package \cite{babel} for hyphenation and the recommended \software{csquotes} package \cite{csquotes}.
% \begin{macrocode}
\RequirePackage[\hep@lang]{babel}
\RequirePackage{csquotes}
% \end{macrocode}
%
% \begin{macro}{\underline}
-% Load the |ulem| package \cite{ulem} for hyphenable underlined text.
+% Load the \software{ulem} package \cite{ulem} for hyphenable underlined text.
% \begin{macrocode}
\RequirePackage[normalem]{ulem}
\let\underline\uline
@@ -1013,7 +1085,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \subsection{Text macros}
%
%\begin{macro}{\vs}
-% Load the |foreign| package \cite{foreign} in order to highlight abbreviations and vocabularies from foreign languages.
+% Load the \software{foreign} package \cite{foreign} in order to highlight abbreviations and vocabularies from foreign languages.
% Add the missing |\vs| command.
% \begin{macrocode}
\ifnum\pdf@strcmp{\hep@lang}{american}=0
@@ -1030,12 +1102,12 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \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.
+% The \software{foreign} package relies on the \software{xspace} package \cite{xspace}.
+% Ensure that |\xspace| is compatible with the |\enquote| macro from the \software{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.
% \begin{macrocode}
@@ -1044,7 +1116,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \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}.
+% Define a macro for software with optional version information |\software|\linebreak[1]\oarg{version}\linebreak[1]\marg{name}, using the \software{relsize} package \cite{relsize}.
% \begin{macrocode}
\RequirePackage{relsize}
\newcommand{\software}[2][\hspace{-\fontdimen2\font}]{%
@@ -1054,15 +1126,26 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macro}
%
% \begin{macro}{\online}
+% \begin{macro}{\email}
% Define the |\online|\marg{text}\marg{url} macro combining the features of the |\href| and the |\url| macros.
+% Define a macro for typesetting emails.
% \begin{macrocode}
\newcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}
+\newcommand{\email}[1]{\online{mailto:#1}{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\prefix}
+% Define the |\prefix|\marg{prefix}\marg{word} macro ensuring the correct linebreak in \prefix{prefix}{word}.
+% \begin{macrocode}
+\newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2}
% \end{macrocode}
% \end{macro}
% \subsection{Lists}
%
-% Load the |enumitem| package \cite{enumitem}.
+% Load the \software{enumitem} package \cite{enumitem}.
% \begin{macrocode}
\RequirePackage[inline]{enumitem}
% \end{macrocode}
@@ -1095,7 +1178,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \section{Geometry}
%
-% Load the |geometry| package \cite{geometry} and adjust the text width and height to the values of the |a4wide| package \cite{a4wide}.
+% Load the \software{geometry} package \cite{geometry} and adjust the text width and height.
% This step must happen after readjusting the font size in \cref{sec:font size}.
% \begin{macrocode}
\ifhep@defaults\else
@@ -1109,10 +1192,10 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
}
\fi
% \end{macrocode}
-
+%
%\begin{macro}{\useparskip}
%\begin{macro}{\useparindent}
-% Load the |parskip| package \cite{parskip} if requested and provide two commands switching between the two paragraph modes.
+% Load the \software{parskip} package \cite{parskip} if requested and provide two commands switching between the two paragraph modes.
% \begin{macrocode}
\ifhep@parindent\else
\RequirePackage{parskip}
@@ -1134,15 +1217,13 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \section{Math}
%
-% Load the |mathtools| package \cite{mathtools} which loads the |amsmath| package \cite{amsmath}.
-% Additionally, load the |amssymb| package \cite{amsfonts} which provides further math symbols and also loads the |amsfont| package \cite{amsfonts}.
+% Load the \software{mathtools} package \cite{mathtools} which loads the \software{amsmath} package \cite{amsmath}.
% Allow page breaks within equations if necessary.
% \begin{macrocode}
\RequirePackage{mathtools}
-\RequirePackage{amssymb}
\allowdisplaybreaks[1]
% \end{macrocode}
-
+%
% \begin{macro}{\diag}
% \begin{macro}{\sgn}
% Provide the |\diag| and |\sgn| operators
@@ -1152,10 +1233,10 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
% \end{macro}
% \end{macro}
-
+%
% \begin{macro}{\mathdef}
-% Define the |\mathdef|\marg{name}\oarg{arguments}\marg{macro} macro which (re-)defines macros in math mode only.
-% This macro is implemented using the |xparse| package \cite{xparse}.
+% Define the |\mathdef|\marg{name}\oarg{arguments}\marg{macro} macro which \prefix{re}{defines} macros in math mode only.
+% This macro is implemented using the \software{xparse} package \cite{xparse}.
% \begin{macrocode}
\RequirePackage{xparse}
\DeclareDocumentCommand{\mathdef}{mO{0}m}{%
@@ -1172,35 +1253,34 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\i}
% Provide an upright imaginary unit in math mode.
% \begin{macrocode}
\AtBeginDocument{\mathdef{\i}{\operatorname{i}}}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\overline}
-% Redefine |\overline| to be a text macro using the |ulem| package \cite{ulem}.
-% Extend it as a math macro with the original definition from |amsmath| \cite{amsmath}.
+% Redefine |\overline| to be a text macro using the \software{ulem} package \cite{ulem}.
+% Extend it as a math macro with the original definition from the \software{amsmath} package \cite{amsmath}.
% \begin{macrocode}
\def\overline#1{{\renewcommand{\ULdepth}{-1.9ex}{}\uline{#1}}}
\DeclareRobustCommand{\over@line}[1]{\@@overline{#1}}
\mathdef{\overline}{\over@line}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\left}
% \begin{macro}{\right}
-% Load the |mleftright| package \cite{mleftright} and adjust the spacing around |\left| and |\right|.
+% Load the \software{mleftright} package \cite{mleftright} and adjust the spacing around |\left| and |\right|.
% \begin{macrocode}
\RequirePackage{mleftright}
\mleftright
% \end{macrocode}
% \end{macro}
% \end{macro}
-
-
+%
% \begin{macro}{eqnarray}
% Undefine the |eqnarray| environment if not prevented by package option.
% \begin{macrocode}
@@ -1210,61 +1290,154 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\fi
% \end{macrocode}
% \end{macro}
-
+%
% \subsection{Math fonts}
%
-% \begin{macro}{\mathbf}
-% 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}.
+% Define conditionals based on the |symbols| package option.
% \begin{macrocode}
-\ifhep@serif\providecommand{\bmmax}{2}\else\providecommand{\bmmax}{1}\fi
-\RequirePackage{bm}
-\let\mathbf\bm
-\g@addto@macro\bfseries{\boldmath}
+\newif\ifhep@symbols
+\ifnum\pdf@strcmp{\hep@symbols}{false}=0\else\hep@symbolstrue\fi
+\newif\ifhep@ams
+\ifnum\pdf@strcmp{\hep@symbols}{ams}=0 \hep@amstrue\fi
+\newif\ifhep@minion
+\ifnum\pdf@strcmp{\hep@symbols}{minion}=0 \hep@miniontrue\fi
+% \end{macrocode}
+%
+% Load the \software{fixmath} \cite{fixmath} and \software{alphabeta} \cite{alphabeta} packages ensuring that upper Greek letters in math mode are italic and providing upright Greek letters in text mode, respectively.
+% \begin{macrocode}
+\ifhep@symbols
+ \RequirePackage{alphabeta}
+ \RequirePackage{fixmath}
+% \end{macrocode}
+%
+% Either load the \software{MnSymbol} package \cite{MnSymbol} or the the \software{exscale} package in order to fix Latin Modern |lmex| fonts.
+% Additionally, load the \software{amssymb} package \cite{amsfonts} which provides further math symbols and also loads the \software{amsfonts} package \cite{amsfonts}.
+% \begin{macrocode}
+ \ifhep@minion
+ \RequirePackage{MnSymbol}
+ \else
+ \RequirePackage{exscale}
+ \RequirePackage{amssymb}
+ \fi
+\fi
% \end{macrocode}
-% \end{macro}
%
% \begin{macro}{\mathsf}
-% 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 sans serif option is used.
+% If the |sansserif| package option is active use the \software{cmbright} font \cite{cmbright} and code adjusted from the \software{sansmathfonts} package \cite{sansmathfonts}.
% 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}
- \newcommand\hep@sf@font{cmbr}
+ \newcommand\hep@font@sf{cmbrm}
+ \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it}
+ \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{b}{it}
\else
- \RequirePackage[slantedGreek]{sfmath}
- \RequirePackage{sansmathfonts}
- \newcommand\hep@sf@font{cmm}
+ \newcommand\hep@font@sf{lmr}
+ \newcommand\hep@font@text{lmss}
+ \newcommand\hep@font@math{cmbrm}
+ \newcommand\hep@font@symbol{cmsssy}
+ \newcommand\hep@font@extra{cmssex}
+ \newcommand\hep@font@amsa{ssmsa}
+ \newcommand\hep@font@amsb{ssmsb}
+% \end{macrocode}
+% Declare font substitutions.
+% \begin{macrocode}
+ \DeclareFontSubstitution{OML}{\hep@font@math}{m}{it}
+ \ifhep@symbols\ifhep@minion\else
+ \DeclareFontSubstitution{OMS}{\hep@font@symbol}{m}{n}
+ \DeclareFontSubstitution{OMX}{\hep@font@extra}{m}{n}
+ \fi\fi
+% \end{macrocode}
+% Declare the symbol fonts.
+% \begin{macrocode}
+ \DeclareSymbolFont{operators}{OT1}{\hep@font@text}{m}{n}
+ \DeclareSymbolFont{letters}{OML}{\hep@font@math}{m}{it}
+ \ifhep@symbols\ifhep@minion\else
+ \DeclareSymbolFont{symbols}{OMS}{\hep@font@symbol}{m}{n}
+ \DeclareSymbolFont{largesymbols}{OMX}{\hep@font@extra}{m}{n}
+ \fi\fi
+% \end{macrocode}
+% Set bold symbol fonts.
+% \begin{macrocode}
+ \SetSymbolFont{operators}{bold}{OT1}{\hep@font@text}{b}{n}
+ \SetSymbolFont{letters}{bold}{OML}{\hep@font@math}{b}{it}
+ \ifhep@symbols\ifhep@minion\else
+ \SetSymbolFont{symbols}{bold}{OMS}{\hep@font@symbol}{b}{n}
+ \fi\fi
+% \end{macrocode}
+% Adjust the fonts loaded by the \software{amsfonts} \cite{amsfonts} and \software{esint} \cite{esint} packages.
+% \begin{macrocode}
+ \ifhep@symbols\ifhep@minion\else
+ \DeclareSymbolFont{AMSa}{U}{\hep@font@amsa}{m}{n}
+ \DeclareSymbolFont{AMSb}{U}{\hep@font@amsb}{m}{n}
+ \fi\fi
+ \AtBeginDocument{%
+ \@ifpackageloaded{esint}{%
+ \DeclareSymbolFont{largesymbolsA}{U}{ssesint}{m}{n}
+ }{}
+ }
+% \end{macrocode}
+% Declare the symbol font alphabets.
+% \begin{macrocode}
+ \DeclareSymbolFontAlphabet{\mathrm}{operators}
+ \DeclareSymbolFontAlphabet{\mathnormal}{letters}
+ \ifhep@minion\else
+ \DeclareSymbolFontAlphabet{\mathcal}{symbols}
+ \fi
+% \end{macrocode}
+% Declare |\mathit|.
+% \begin{macrocode}
+ \DeclareMathAlphabet{\mathit}{OML}{\hep@font@text}{m}{it}
+ \SetMathAlphabet\mathit{bold}{OML}{\hep@font@text}{bx}{it}
+% \end{macrocode}
+% Declare |\mathtt|.
+% \begin{macrocode}
+ \DeclareMathAlphabet{\mathtt}{OT1}{cmtl}{m}{n}
+% \end{macrocode}
+% \begin{macrocode}
+% \end{macrocode}
+% Declare |\mathsf|.
+% \begin{macrocode}
+ \DeclareMathAlphabet{\mathsf}{OML}{\hep@font@sf}{m}{it}
+ \SetMathAlphabet{\mathsf}{bold}{OML}{\hep@font@sf}{bx}{it}
+% \end{macrocode}
+% \end{macro}
+% End of |sansserif|.
+% \begin{macrocode}
\fi
-\SetMathAlphabet{\mathsf}{normal}{OML}{\hep@sf@font}{m}{it}
-\SetMathAlphabet{\mathsf}{bold}{OML}{\hep@sf@font}{bx}{it}
+% \end{macrocode}
+%
+% \begin{macro}{\mathbf}
+% Load the \software{bm} package \cite{bm} for superior boldmath.
+% Make math symbols bold whenever they appear in bold macros such as |\section|\marg{text}.
+% \begin{macrocode}
+\ifhep@symbols
+ \RequirePackage{bm}
+ \AtBeginDocument{\let\mathbf\bm}
+ \g@addto@macro\bfseries{\boldmath}
% \end{macrocode}
% \end{macro}
+%
% \begin{macro}{\mathscr}
-% Load the |mathrsfs| package for the |\mathscr| math script font.
+% Provid the |\mathscr| math script font from the \software{mathrsfs} package \cite{mathrsfs}.
% \begin{macrocode}
-\DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n}
+ \DeclareMathAlphabet{\mathscr}{U}{rsfs}{m}{n}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\mathbb}
-% Load the |dsfont| package \cite{dsfont} and adjust the |\mathbb| math blackboard style font according to the (sans-) serif option.
+% Redefine the the |\mathbb| math blackboard style font according to the \prefix{sans}{serif} option with the font from the \software{dsfont} package \cite{dsfont}.
% \begin{macrocode}
-\ifhep@serif
- \newcommand\hep@bb@font{dsrom}
-\else
- \newcommand\hep@bb@font{dsss}
+ \ifhep@minion
+ \DeclareMathAlphabet{\mathbb}{U}{%
+ \ifhep@serif dsrom\else dsss\fi%
+ }{m}{n}
+ \else
+ \ifhep@ams\else
+ \SetMathAlphabet{\mathbb}{normal}{U}{%
+ \ifhep@serif dsrom\else dsss\fi%
+ }{m}{n}
+ \fi
+ \fi
\fi
-\SetMathAlphabet{\mathbb}{normal}{U}{\hep@bb@font}{m}{n}
% \end{macrocode}
% \end{macro}
@@ -1273,9 +1446,9 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \begin{macro}{\cancel}
% \begin{macro}{\slashed}
% \begin{macro}{\unit}
-% Load the |physics| package \cite{physics} which provides macros useful for publications in physics.
-% Additionally, load the |cancel| \cite{cancel} and |slashed| \cite{slashed} packages which provide the |\cancel| and |\slashed| macros.
-% Finally, load the |units| package \cite{units} which provides the |\units| and |\nicefrac| macros.
+% Load the \software{physics} package \cite{physics} which provides macros useful for publications in physics.
+% Additionally, load the \software{cancel} \cite{cancel} and \software{slashed} \cite{slashed} packages which provide the |\cancel| and |\slashed| macros.
+% Finally, load the \software{units} package \cite{units} which provides the |\units| and |\nicefrac| macros.
% \begin{macrocode}
\RequirePackage{physics}
\RequirePackage{cancel}
@@ -1285,21 +1458,21 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macro}
% \end{macro}
% \end{macro}
-
+%
% \begin{macro}{\inv}
% Provide a macro for the inverse, useful in combination with the unit macro in text mode.
% \begin{macrocode}
\newcommand{\inv}[2][1]{#2\ensuremath{^{-#1}}}
% \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}
@@ -1329,7 +1502,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\renewcommand{\textfraction}{.1} % .2
\renewcommand{\floatpagefraction}{.8} % .5
% \end{macrocode}
-
+%
% \begin{environment}{figure}
% \begin{environment}{table}
% Center the content of |figure| and |table| environments.
@@ -1376,7 +1549,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
% \end{macro}
%
-% Prevent the |caption| package \cite{caption} from complaining about the journal classes and packages.
+% Prevent the \software{caption} package \cite{caption} from complaining about the journal classes and packages.
% \begin{macrocode}
\ifhep@journal
\setlength\abovecaptionskip{\f@size\p@}
@@ -1395,7 +1568,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\fi
% \end{macrocode}
%
-% Load the |subcaption| package \cite{subcaption}.
+% Load the \software{subcaption} package \cite{subcaption}.
% Provide the old |\subcaption@minipage| macro.
% \begin{macrocode}
\RequirePackage[subrefformat=parens]{subcaption}
@@ -1438,8 +1611,8 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
% \end{macro}
% \end{environment}
-
-% Reajust the captions to the revtex class using the |ragged2e| package \cite{ragged2e}.
+%
+% Reajust the captions to the revtex class using the \software{ragged2e} package \cite{ragged2e}.
% \begin{macrocode}
\ifhep@revtex
\RequirePackage{ragged2e}
@@ -1454,7 +1627,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \subsection{Tables}
%
% \begin{environment}{tabular}
-% Enhance tabulars with the |booktabs| and |multirow| packages \cite{booktabs, multirow}.
+% Enhance tabulars with the \software{booktabs} and \software{multirow} packages \cite{booktabs, multirow}.
% \begin{macrocode}
\RequirePackage{booktabs}
\RequirePackage{multirow}
@@ -1464,7 +1637,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \subsection{Figures}
%
% \begin{macro}{\graphic}
-% Provide the |\graphic| macro for the inclusion of figures using the |graphicx| package \cite{graphicx}.
+% Provide the |\graphic| macro for the inclusion of figures using the \software{graphicx} package \cite{graphicx}.
% \begin{macrocode}
\RequirePackage{graphicx}
\providecommand{\tikzsetnextfilename}[1]{}
@@ -1495,26 +1668,85 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
% \end{macro}
%
-% \subsection{Authors}
+% \subsection{Titles}
%
-% \begin{macro}{\author}
-% Allow absent author field.
+% Extend the title using the \software{titling} package \cite{titling}.
% \begin{macrocode}
-\author{}
+\RequirePackage{titling}
+% \end{macrocode}
+%
+% \begin{macro}{\preprintfont}
+% \begin{macro}{\titlefont}
+% \begin{macro}{\subtitlefont}
+% \begin{macro}{\authorfont}
+% \begin{macro}{\affiliationfont}
+% \begin{macro}{\datefont}
+% Allow to change the fontface of the individual parts of the title.
+% \begin{macrocode}
+\let\hep@preprint@font\relax
+\newcommand{\preprintfont}[1]{\def\hep@preprint@font{#1}}
+\let\hep@title@font\relax
+\newcommand{\titlefont}[1]{\def\hep@title@font{#1}}
+\let\hep@subtitle@font\relax
+\newcommand{\subtitlefont}[1]{\def\hep@subtitle@font{#1}}
+\let\hep@author@font\relax
+\newcommand{\authorfont}[1]{\def\hep@author@font{#1}}
+\let\hep@affiliation@font\relax
+\newcommand{\affiliationfont}[1]{\def\hep@affiliation@font{#1}}
+\let\hep@date@font\relax
+\newcommand{\datefont}[1]{\def\hep@date@font{#1}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\subtitle}
+% Define a subtitle.
+% \begin{macrocode}
+\newcommand{\presubtitle}[1]{\def\hep@pre@sub@title{#1}}
+\newcommand{\subtitle}[1]{\def\sub@title{#1}}
+\newcommand{\postsubtitle}[1]{\def\hep@post@sub@title{#1}}
+\renewcommand{\maketitlehookb}{%
+ \@ifundefined{sub@title}{}{%
+ \hep@pre@sub@title\sub@title\hep@post@sub@title%
+ }%
+}
% \end{macrocode}
% \end{macro}
%
-% Enable the handling of multiple authors with different affiliations using the |authblk| package \cite{authblk}.
+% Set standard values mostly taken from the \software{titling} package, add the font hook, and reduce the |date| font size.
+% \begin{macrocode}
+\pretitle{\begin{center}\LARGE\hep@title@font}
+\posttitle{\par\end{center}}
+\presubtitle{\begin{center}\large\hep@subtitle@font}
+\postsubtitle{\par\end{center}}
+\preauthor{%
+ \begin{center}\large\hep@author@font\lineskip.5em\begin{tabular}[t]{c}%
+}
+\postauthor{\end{tabular}\par\end{center}}
+\predate{\begin{center}\hep@date@font}
+\postdate{\par\end{center}}
+% \end{macrocode}
+%
+% \subsection{Authors}
+%
+% \begin{macro}{\author}
+% Allow absent author field.
+% Enable the handling of multiple authors with different affiliations using the \software{authblk} package \cite{authblk}.
% \begin{macrocode}
+\author{}
\RequirePackage{authblk}
-\renewcommand\Affilfont{\footnotesize}
+\renewcommand{\Affilfont}{\small\hep@affiliation@font}
+\renewcommand\Authfont{\hep@author@font}
% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\email}
-% Define a macro for typesetting emails.
-% Redefine this macro to place the email address in a footnote if called from within the |\author| macro |\author{|$\langle name\rangle$ |\email{|$\langle email\rangle$|}}|.
+% Redefine the email macro to place the email address in a footnote if called from within the |\author| macro |\author{|$\langle name\rangle$ |\email{|$\langle email\rangle$|}}|.
% \begin{macrocode}
-\newcommand{\email}[1]{\online{mailto:#1}{#1}}
\let\hep@author\author
\def\author{%
\renewcommand{\email}[1]{\unskip\thanks{\online{mailto:##1}{##1}}}%
@@ -1526,51 +1758,55 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \begin{macro}{\affiliation}
% Define the |\affiliation| macro, ensure that linebreaks happen after a comma.
% \begin{macrocode}
-\newcommand\active@comma{,\penalty-5\relax}
-\newcommand\cat@comma@active{\catcode`\,\active}
-{\cat@comma@active\gdef,{\active@comma}}
-\newcommand\@affil[1]{%
+\newcommand\hep@active@comma{,\penalty-5\relax}
+\newcommand\hep@cat@comma@active{\catcode`\,\active}
+{\hep@cat@comma@active\gdef,{\hep@active@comma}}
+\newcommand\hep@affil[1]{%
\endgroup\@flushglue=0pt plus .5\linewidth\affil{#1}%
}
-\def\@affil@opt[#1]#2{%
+\def\hep@affil@opt[#1]#2{%
\endgroup\@flushglue=0pt plus .5\linewidth\affil[#1]{#2}%
}
-\DeclareRobustCommand\@affiliation{\@ifnextchar[{\@affil@opt}{\@affil}}
-\newcommand{\affiliation}{\begingroup\cat@comma@active\@affiliation}
+\DeclareRobustCommand\hep@affiliation{%
+ \@ifnextchar[{\hep@affil@opt}{\hep@affil}%
+}
+\newcommand{\affiliation}{%
+ \begingroup\hep@cat@comma@active\hep@affiliation%
+}
% \end{macrocode}
% \end{macro}
% \subsection{Preprint}
%
% \begin{macro}{\preprint}
-% Define the |\preprint| macro using the |varwidth| package \cite{varwidth}.
+% Define the |\preprint| macro using the \software{varwidth} package \cite{varwidth}.
% \begin{macrocode}
-\let\@preprint\relax
-\newcommand\preprint[1]{\long\gdef\@preprint{#1}}
+\let\hep@preprint\relax
+\newcommand\preprint[1]{\def\hep@preprint{#1}}
\RequirePackage{varwidth}
-\newcommand{\@preprint@box}{%
+\newcommand{\hep@preprint@box}{%
\begin{varwidth}{\textwidth}%
- \textsc{\small\@preprint}%
+ \small\hep@preprint@font\hep@preprint%
\end{varwidth}%
}
+\preprintfont{\sc}
% \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{macro}{\placepreprint}
+% Places a preprint number in the top right corner of the title page using the \software{atbegshi} \cite{atbegshi} and \software{picture} \cite{picture} packages.
% \begin{macrocode}
\RequirePackage{atbegshi}
\RequirePackage{picture}
-\let\hep@maketitle\maketitle
-\renewcommand{\maketitle}{%
- \hep@maketitle%
+\newcommand{\placepreprint}{%
\AtBeginShipoutFirst{%
\put(
- \textwidth+\oddsidemargin-\widthof{\@preprint@box},
- -2pt-\topmargin-\heightof{\@preprint@box}
- ){\normalfont\@preprint@box}
+ \textwidth+\oddsidemargin-\widthof{\hep@preprint@box},
+ -2pt-\topmargin-\heightof{\hep@preprint@box}
+ ){\normalfont\hep@preprint@box}
}
}
+\renewcommand{\maketitlehooka}{\placepreprint\vspace{-\bigskipamount}}
% \end{macrocode}
% \end{macro}
@@ -1598,7 +1834,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
%
% \begin{macro}{\bibliography}
-% Load the |biblatex| package \cite{biblatex} with the datamodel defined in \cref{sec:data model}.
+% Load the \software{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}
@@ -1897,7 +2133,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \section{Hyperlinks, Footnotes and References} \label{sec:hyperlinks}
%
-% Load the |hyperref| package \cite{hyperref} enable Unicode encoding and hide links.
+% Load the \software{hyperref} package \cite{hyperref} enable Unicode encoding and hide links.
%
% \begin{macrocode}
\RequirePackage{hyperref}
@@ -1937,7 +2173,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \subsection{Footnotes}
%
-% Place a hyperlink from the footnote back to its referencing label using the |footnotebackref| package \cite{footnotebackref}.
+% Place a hyperlink from the footnote back to its referencing label using the \software{footnotebackref} package \cite{footnotebackref}.
% \begin{macrocode}
\def\BackrefFootnoteTag{}
\RequirePackage{footnotebackref}
@@ -1959,7 +2195,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macrocode}
%
% \begin{macro}{\cref}
-% Improve reference using the |cleveref| package \cite{cleveref}.
+% Improve reference using the \software{cleveref} package \cite{cleveref}.
%
% \begin{macrocode}
\RequirePackage[noabbrev, nameinlink]{cleveref}
@@ -1985,21 +2221,20 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \end{macro}
%
% \begin{macro}{\ref}
-% Adjust |\ref|\marg{key} in order to prevent preceding line breaks and to enable the possibility to reference multiple references at once.
+% Adjust |\ref|\marg{key} in order to prevent preceding line breaks.
% \begin{macrocode}
\let\hep@ref\ref
-\AtBeginDocument{\renewcommand\ref{\no@break@before\labelcref}}
+\AtBeginDocument{\renewcommand\ref{\no@break@before\hep@ref}}
% \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.
+% Adjust |\eqref|\marg{key} in order to prevent preceding line breaks.
% \begin{macrocode}
\renewcommand\eqref{\no@break@before\labelcref}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\subref}
% Adjust |\subref|\marg{key} in order to prevent preceding line breaks.
% \begin{macrocode}
@@ -2011,14 +2246,14 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\endgroup}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\subcref}
% Provide the |\subcref| macro.
% \begin{macrocode}
\newcommand{\subcref}[1]{\cref{sub@#1}}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\eqcrefname}
% Define the |\eqcrefname| macro for named equation types.
% \begin{macrocode}
@@ -2028,7 +2263,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\labelcrefrange}
% Define the missing |\labelcrefrange|\marg{key1}\marg{key2} macro.
% \begin{macrocode}
@@ -2052,7 +2287,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
\renewcommand\cite{\no@break@before\hep@cite}
% \end{macrocode}
% \end{macro}
-
+%
% Begin of bibliography if.
% \begin{macrocode}
\ifnum\pdf@strcmp{\hep@bibliography}{false}=0\else
@@ -2094,7 +2329,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
% \section{Acronyms}
%
-% Acronyms are implemented with the |glossaries-extra| package \cite{glossaries-extra} which is an extension of the |glossaries| package \cite{glossaries} and must be loaded after the |hyperref| pacakge in \cref{sec:hyperlinks}.
+% Acronyms are implemented with the \software{glossaries-extra} package \cite{glossaries-extra} which is an extension of the \software{glossaries} package \cite{glossaries} and must be loaded after the \software{hyperref} pacakge in \cref{sec:hyperlinks}.
% \begin{macrocode}
\ifhep@glossaries
\RequirePackage[nostyles]{glossaries-extra}
@@ -2127,16 +2362,16 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
}%
}}
% \end{macrocode}
-
+%
% \begin{macro}{\begin@sentence}
-% Mark the beginning of a paragraph as if it would follow a full stop using the |everyhook| package \cite{everyhook}.
+% Mark the beginning of a paragraph as if it would follow a full stop using the \software{everyhook} package \cite{everyhook}.
% \begin{macrocode}
\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}
@@ -2147,7 +2382,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
}
% \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}
@@ -2159,7 +2394,7 @@ The |arxiv-collector| python script \cite{arxiv-collector} alleviates this probl
}}
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\acronym}
% The |\acronym|\meta{*}\oarg{typeset abbreviation}\marg{abbreviation}\meta{*}\marg{definition}\oarg{plural\linebreak[4] definition} macro is defined.
% \begin{enumerate}[nosep, label=\#\arabic*]
diff --git a/macros/latex/contrib/hep-paper/hep-paper-implementation.pdf b/macros/latex/contrib/hep-paper/hep-paper-implementation.pdf
index b087bd542e..56e949b730 100644
--- a/macros/latex/contrib/hep-paper/hep-paper-implementation.pdf
+++ b/macros/latex/contrib/hep-paper/hep-paper-implementation.pdf
Binary files differ
diff --git a/macros/latex/contrib/hep-paper/hep-paper.ins b/macros/latex/contrib/hep-paper/hep-paper.ins
index 8de85de7c6..ab97a338cf 100644
--- a/macros/latex/contrib/hep-paper/hep-paper.ins
+++ b/macros/latex/contrib/hep-paper/hep-paper.ins
@@ -1,4 +1,3 @@
-%%
%% Copyright (C) 2019-2020 by Jan Hajer
%%
%% This file may be distributed and/or modified under the
@@ -10,7 +9,7 @@
%%
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
-%%
+
\input docstrip.tex
\keepsilent
\usedir{tex/latex/hep-paper}
diff --git a/macros/latex/contrib/pict2e/p2e-drivers.pdf b/macros/latex/contrib/pict2e/p2e-drivers.pdf
index 1b8add2b0e..f401942b18 100644
--- a/macros/latex/contrib/pict2e/p2e-drivers.pdf
+++ b/macros/latex/contrib/pict2e/p2e-drivers.pdf
Binary files differ
diff --git a/macros/latex/contrib/pict2e/pict2e.dtx b/macros/latex/contrib/pict2e/pict2e.dtx
index 8bb7a289fc..5354514bc4 100644
--- a/macros/latex/contrib/pict2e/pict2e.dtx
+++ b/macros/latex/contrib/pict2e/pict2e.dtx
@@ -1,7 +1,5 @@
% \iffalse meta-comment
%
-%
-%
% Copyright (C) 2003-2020
% Rolf Niepraschk, Rolf.Niepraschk@gmx.de
% Hubert Gaesslein, hubertjg@gmx.de
@@ -23,7 +21,7 @@
%
%<*package>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{pict2e}[2020/08/16 v0.4a Improved picture commands (HjG,RN,JT)]
+\ProvidesPackage{pict2e}[2020/09/30 v0.4b Improved picture commands (HjG,RN,JT)]
%</package>
%
%<*driver>
@@ -63,8 +61,9 @@
% \fi
%
% \GetFileInfo{pict2e.sty}
-% \def\docdate{2020/08/16}
+% \def\docdate{2020/09/30}
%
+% \CheckSum{2350}
%
% ^^A ========
%
@@ -694,7 +693,7 @@
%
% \subsubsection{Driver options}
%
-% \begin{minipage}{.5\textwidth}
+% \begin{minipage}{.55\textwidth}
% \begin{tabular}{@{}lc@{\qquad\qquad}lc@{}}
% driver & notes & driver & notes\\ \hline
% dvips & x & oztex & (x) \\
@@ -2892,10 +2891,10 @@
% argument (RN,HjG)}
% \changes{v0.2n}{2004/04/22}{Allow zero diameter (RN/HjG)}
% \begin{macrocode}
- \@defaultunitsset\@tempdima{#1}\unitlength
- \ifdim\@tempdima<\z@ \pIIe@badcircarg \fi
- \divide\@tempdima\tw@
- \pIIe@circle\@tempdima
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \ifdim\pIIe@tempdima<\z@ \pIIe@badcircarg \fi
+ \divide\pIIe@tempdima\tw@
+ \pIIe@circle\pIIe@tempdima
% \end{macrocode}
% With the current state of affairs, we could use
% \cmd{\pIIe@drawGraph} directly; but that would possibly be a case of
@@ -3062,8 +3061,8 @@
% This is now re-implemented in terms of \cmd{@defaultunitsset}.
% \begin{macrocode}
\newcommand*\pIIe@defaultUL[2]{%
- \@defaultunitsset\dimen@{#2}\unitlength
- \edef#1{\the\dimen@}}
+ \@defaultunitsset\pIIe@tempdima{#2}\unitlength
+ \edef#1{\the\pIIe@tempdima}}
% \end{macrocode}
% Hence, we could\slash should omit the unnecessary argument!?)
% \changes{v0.2h}{2004/01/07}{Check for negative or zero radius
@@ -3120,16 +3119,16 @@
% \end{macrocode}
% In analogy to circles, we need only half of the size value.
% \begin{macrocode}
- \@defaultunitsset\@ovxx{#1}\unitlength \divide\@ovxx\tw@
- \@defaultunitsset\@ovyy{#2}\unitlength \divide\@ovyy\tw@
- \@tempdimc \ifdim\@ovyy>\@ovxx \@ovxx \else \@ovyy \fi
- \ifdim\pIIe@maxovalrad<\@tempdimc \@tempdimc\pIIe@maxovalrad\relax \fi
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength \divide\pIIe@tempdima\tw@
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength \divide\pIIe@tempdimb\tw@
+ \pIIe@tempdimc \ifdim\pIIe@tempdimb>\pIIe@tempdima \pIIe@tempdima \else \pIIe@tempdimb \fi
+ \ifdim\pIIe@maxovalrad<\pIIe@tempdimc \pIIe@tempdimc\pIIe@maxovalrad\relax \fi
% \end{macrocode}
% Subtract the radius of the corners to get coordinates for the
% straight line segments.
% \begin{macrocode}
- \@xdim\@ovxx \advance\@xdim-\@tempdimc
- \@ydim\@ovyy \advance\@ydim-\@tempdimc
+ \pIIe@tempdimd\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimc
+ \pIIe@tempdime\pIIe@tempdimb \advance\pIIe@tempdime-\pIIe@tempdimc
% \end{macrocode}
% Determine which parts of the oval we have to draw.
% \begin{macrocode}
@@ -3152,7 +3151,8 @@
% Bits 3 and 0 set? (SE/NE)
% \begin{macrocode}
\ifnum9=\@tempcnta
- \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
+ \pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}%
+ \thr@@\pIIe@tempdimc\pIIe@tempdima\z@
% \end{macrocode}
% Bit 0 set! (NE)
% \begin{macrocode}
@@ -3161,19 +3161,23 @@
% \end{macrocode}
% Bit 0 set? (NE)
% \begin{macrocode}
- \pIIe@qoval\@ovxx\z@\@ovxx\@ydim\z@\@tempdimc\z@\@ovyy
+ \pIIe@qoval\pIIe@tempdima\z@\pIIe@tempdima\pIIe@tempdime%
+ \z@\pIIe@tempdimc\z@\pIIe@tempdimb
% \end{macrocode}
% Bit 1 set? (NW)
% \begin{macrocode}
- \pIIe@qoval\z@\@ovyy{-\@xdim}\@ovyy\@ne\@tempdimc{-\@ovxx}\z@
+ \pIIe@qoval\z@\pIIe@tempdimb{-\pIIe@tempdimd}\pIIe@tempdimb%
+ \@ne\pIIe@tempdimc{-\pIIe@tempdima}\z@
% \end{macrocode}
% Bit 2 set? (SW)
% \begin{macrocode}
- \pIIe@qoval{-\@ovxx}\z@{-\@ovxx}{-\@ydim}\tw@\@tempdimc\z@{-\@ovyy}%
+ \pIIe@qoval{-\pIIe@tempdima}\z@{-\pIIe@tempdima}{-\pIIe@tempdime}%
+ \tw@\pIIe@tempdimc\z@{-\pIIe@tempdimb}%
% \end{macrocode}
% Bit 3 set? (SE)
% \begin{macrocode}
- \pIIe@qoval\z@{-\@ovyy}{\@xdim}{-\@ovyy}\thr@@\@tempdimc\@ovxx\z@
+ \pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}%
+ \thr@@\pIIe@tempdimc\pIIe@tempdima\z@
% \end{macrocode}
% Now we've finished, draw the oval and finally close the group opened
% by \cmd{\oval} above.
@@ -3255,31 +3259,31 @@
% \begin{macrocode}
\@killglue
\begingroup
- \@defaultunitsset\@ovxx{#2}\unitlength
- \@defaultunitsset\@ovyy{#3}\unitlength
- \@defaultunitsset\@ovdx{#4}\unitlength
- \@defaultunitsset\@ovdy{#5}\unitlength
- \@defaultunitsset\@xdim{#6}\unitlength
- \@defaultunitsset\@ydim{#7}\unitlength
+ \@defaultunitsset\pIIe@tempdima{#2}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#3}\unitlength
+ \@defaultunitsset\pIIe@tempdimc{#4}\unitlength
+ \@defaultunitsset\pIIe@tempdimd{#5}\unitlength
+ \@defaultunitsset\pIIe@tempdime{#6}\unitlength
+ \@defaultunitsset\pIIe@tempdimf{#7}\unitlength
% \end{macrocode}
% \noindent
% \BigIndent $P_1 = P_m + 1/3 (P_0 - P_m)$
% \begin{macrocode}
- \pIIe@bezier@QtoC\@ovxx\@ovdx\@ovro
- \pIIe@bezier@QtoC\@ovyy\@ovdy\@ovri
+ \pIIe@bezier@QtoC\pIIe@tempdima\pIIe@tempdimc\@ovro
+ \pIIe@bezier@QtoC\pIIe@tempdimb\pIIe@tempdimd\@ovri
% \end{macrocode}
% \BigIndent $P_2 = P_m + 1/3 (P_3 - P_m)$
% \begin{macrocode}
- \pIIe@bezier@QtoC\@xdim\@ovdx\@clnwd
- \pIIe@bezier@QtoC\@ydim\@ovdy\@clnht
+ \pIIe@bezier@QtoC\pIIe@tempdime\pIIe@tempdimc\@clnwd
+ \pIIe@bezier@QtoC\pIIe@tempdimf\pIIe@tempdimd\@clnht
% \end{macrocode}
% \BigIndent $(P_{0x},P_{0y})$
% \begin{macrocode}
- \pIIe@moveto\@ovxx\@ovyy
+ \pIIe@moveto\pIIe@tempdima\pIIe@tempdimb
% \end{macrocode}
% \BigIndent $(P_{1x},P_{1y})$\quad$(P_{2x},P_{2y})$\quad$(P_{3x},P_{3y})$
% \begin{macrocode}
- \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\@xdim\@ydim
+ \pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\pIIe@tempdime\pIIe@tempdimf
\pIIe@strokeGraph
\endgroup
\ignorespaces
@@ -3310,10 +3314,17 @@
% \label{sec:implementation:circle-arcs}
%
% We need some auxiliary dimensions.
+% \changes{v0.4b}{2020/09/30}{More auxiliary dimensions}
+% \changes{v0.4b}{2020/09/30}{Use of fewer system dimension registers}
% \begin{macrocode}
\ifx\undefined\@arclen \newdimen\@arclen \fi
\ifx\undefined\@arcrad \newdimen\@arcrad \fi
- \ifx\undefined\@tempdimd \newdimen\@tempdimd \fi
+ \ifx\undefined\pIIe@tempdima \newdimen\pIIe@tempdima \fi
+ \ifx\undefined\pIIe@tempdimb \newdimen\pIIe@tempdimb \fi
+ \ifx\undefined\pIIe@tempdimc \newdimen\pIIe@tempdimc \fi
+ \ifx\undefined\pIIe@tempdimd \newdimen\pIIe@tempdimd \fi
+ \ifx\undefined\pIIe@tempdime \newdimen\pIIe@tempdime \fi
+ \ifx\undefined\pIIe@tempdimf \newdimen\pIIe@tempdimf \fi
% \end{macrocode}
% \begin{macro}{\pIIe@arc}
% \#1: 0 (implicit) if we connect arc with a current point, 1 if we start
@@ -3394,11 +3405,11 @@
% Coordinates of the second control point:
% \begin{macrocode}
\@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima
- \@tempdimd-\UseCos{#6}\@linelen \advance\@tempdimd \@tempdimb
+ \pIIe@tempdimd-\UseCos{#6}\@linelen \advance\pIIe@tempdimd \@tempdimb
% \end{macrocode}
% Adding the second control point and the endpoint to the path
% \begin{macrocode}
- \pIIe@add@nums\@tempdimc\@tempdimd
+ \pIIe@add@nums\@tempdimc\pIIe@tempdimd
\pIIe@add@CP\@tempdima\@tempdimb
\pIIe@addtoGraph\pIIe@curveto@op
\fi
@@ -3416,14 +3427,13 @@
{\@ifstar{\@tempswatrue\pIIe@arc@}{\@tempswafalse\pIIe@arc@}}
\newcommand*\pIIe@arc@[2][0,360]{\pIIe@arc@@(#1){#2}}
\def\pIIe@arc@@(#1,#2)#3{%
+ \@defaultunitsset\pIIe@tempdima{#3}\unitlength
\if@tempswa
\pIIe@moveto\z@\z@
- \@defaultunitsset\@tempdimc{#3}\unitlength
- \pIIe@arc{\z@}{\z@}{\@tempdimc}{#1}{#2}%
+ \pIIe@arc{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}%
\pIIe@closepath\pIIe@fillGraph
\else
- \@defaultunitsset\@tempdimc{#3}\unitlength
- \pIIe@arc[1]{\z@}{\z@}{\@tempdimc}{#1}{#2}%
+ \pIIe@arc[1]{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}%
\pIIe@strokeGraph
\fi}
\ifx\undefined\arc
@@ -3450,16 +3460,16 @@
\def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)}
\def\polyline(#1,#2){%
\@killglue
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \pIIe@moveto{\@tempdimc}{\@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@polyline}{\PackageWarning{pict2e}%
{Polygonal lines require at least two vertices!}%
\ignorespaces}}
\def\@polyline(#1,#2){%
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \pIIe@lineto{\@tempdimc}{\@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}}
\def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
\def\polyvector(#1,#2){%
@@ -3471,23 +3481,23 @@
% \end{macrocode}
% See the similar definition for \cmd{\vector} (\ref{sec:implementation:vector})
% \begin{macrocode}
- \@defaultunitsset\@xdim{#1}\unitlength
- \@defaultunitsset\@tempdima{#3}\unitlength
- \@defaultunitsset\@ydim{#2}\unitlength
- \@defaultunitsset\@tempdimb{#4}\unitlength
- \advance\@tempdima-\@xdim \advance\@tempdimb-\@ydim
- \ifdim\@tempdima=\z@ \@linelen\@tempdimb \else
- \ifdim\@tempdimb=\z@ \@linelen\@tempdima \else
- \pIIe@pyth\@tempdima\@tempdimb\@linelen
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \@defaultunitsset\pIIe@tempdimc{#3}\unitlength
+ \@defaultunitsset\pIIe@tempdimd{#4}\unitlength
+ \advance\pIIe@tempdimc-\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimb
+ \ifdim\pIIe@tempdimc=\z@ \@linelen\pIIe@tempdimd \else
+ \ifdim\pIIe@tempdimd=\z@ \@linelen\pIIe@tempdimc \else
+ \pIIe@pyth\pIIe@tempdimc\pIIe@tempdimd\@linelen
\fi
\fi
\ifdim\@linelen<\z@ \@linelen-\@linelen\fi
- \pIIe@divide{\@tempdima}\@linelen\@ovxx
- \pIIe@divide{\@tempdimb}\@linelen\@ovyy
+ \pIIe@divide{\pIIe@tempdimc}\@linelen\pIIe@tempdime
+ \pIIe@divide{\pIIe@tempdimd}\@linelen\pIIe@tempdimf
% \end{macrocode}
% Note the shift to the previous point in addition to the rotation.
% \begin{macrocode}
- \pIIe@concat\@ovxx\@ovyy{-\@ovyy}\@ovxx\@xdim\@ydim
+ \pIIe@concat\pIIe@tempdime\pIIe@tempdimf{-\pIIe@tempdimf}\pIIe@tempdime\pIIe@tempdima\pIIe@tempdimb
\pIIe@vector \pIIe@fillGraph
\@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
\def\polygon{%
@@ -3495,16 +3505,16 @@
\@ifstar{\begingroup\@tempswatrue\@polygon}%
{\begingroup\@tempswafalse\@polygon}}
\def\@polygon(#1,#2){%
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \pIIe@moveto{\@tempdimc}{\@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@@polygon}{\PackageWarning{pict2e}%
{Polygons require at least two vertices!}%
\ignorespaces}}
\def\@@polygon(#1,#2){%
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \pIIe@lineto{\@tempdimc}{\@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
\if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
\endgroup
@@ -3530,33 +3540,33 @@
% \begin{macrocode}
\def\moveto(#1,#2){%
\@killglue
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \pIIe@moveto{\@tempdimc}{\@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\ignorespaces}
\def\lineto(#1,#2){%
\@killglue
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \pIIe@lineto{\@tempdimc}{\@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
\ignorespaces}
\def\curveto(#1,#2)(#3,#4)(#5,#6){%
\@killglue
- \@defaultunitsset\@tempdimc{#1}\unitlength
- \@defaultunitsset\@tempdimb{#2}\unitlength
- \@defaultunitsset\@tempdima{#3}\unitlength
- \@defaultunitsset\dimen@{#4}\unitlength
- \@defaultunitsset\@ovxx{#5}\unitlength
- \@defaultunitsset\@ovyy{#6}\unitlength
- \pIIe@curveto{\@tempdimc}{\@tempdimb}{\@tempdima}{\dimen@}%
- {\@ovxx}{\@ovyy}%
+ \@defaultunitsset\pIIe@tempdima{#1}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#2}\unitlength
+ \@defaultunitsset\pIIe@tempdimc{#3}\unitlength
+ \@defaultunitsset\pIIe@tempdimd{#4}\unitlength
+ \@defaultunitsset\pIIe@tempdime{#5}\unitlength
+ \@defaultunitsset\pIIe@tempdimf{#6}\unitlength
+ \pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}%
+ {\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}%
\ignorespaces}
\newcommand*\circlearc[6][0]{%
\@killglue
- \@defaultunitsset\@tempdimc{#2}\unitlength
- \@defaultunitsset\@tempdimb{#3}\unitlength
- \@defaultunitsset\@tempdima{#4}\unitlength
- \pIIe@arc[#1]{\@tempdimc}{\@tempdimb}{\@tempdima}{#5}{#6}%
+ \@defaultunitsset\pIIe@tempdima{#2}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#3}\unitlength
+ \@defaultunitsset\pIIe@tempdimc{#4}\unitlength
+ \pIIe@arc[#1]{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}{#5}{#6}%
\ignorespaces}
\def\closepath{\pIIe@closepath}
\def\strokepath{\pIIe@strokeGraph}
@@ -3642,17 +3652,17 @@
\def\pIIe@@cbezier#1)#2(#3)#4(#5)#6({\@cbezier#1)(#3)(#5)(}%
\def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
\@killglue
- \@defaultunitsset\@tempdimc{#2}\unitlength
- \@defaultunitsset\@tempdimb{#3}\unitlength
- \pIIe@moveto{\@tempdimc}{\@tempdimb}%
- \@defaultunitsset\@tempdimc{#4}\unitlength
- \@defaultunitsset\@tempdimb{#5}\unitlength
- \@defaultunitsset\@tempdima{#6}\unitlength
- \@defaultunitsset\dimen@{#7}\unitlength
- \@defaultunitsset\@ovxx{#8}\unitlength
- \@defaultunitsset\@ovyy{#9}\unitlength
- \pIIe@curveto{\@tempdimc}{\@tempdimb}%
- {\@tempdima}{\dimen@}{\@ovxx}{\@ovyy}%
+ \@defaultunitsset\pIIe@tempdima{#2}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#3}\unitlength
+ \pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
+ \@defaultunitsset\pIIe@tempdima{#4}\unitlength
+ \@defaultunitsset\pIIe@tempdimb{#5}\unitlength
+ \@defaultunitsset\pIIe@tempdimc{#6}\unitlength
+ \@defaultunitsset\pIIe@tempdimd{#7}\unitlength
+ \@defaultunitsset\pIIe@tempdime{#8}\unitlength
+ \@defaultunitsset\pIIe@tempdimf{#9}\unitlength
+ \pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}%
+ {\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}%
\pIIe@strokeGraph
\ignorespaces}%
}
diff --git a/macros/latex/contrib/pict2e/pict2e.pdf b/macros/latex/contrib/pict2e/pict2e.pdf
index 03dcb9f143..a74116187a 100644
--- a/macros/latex/contrib/pict2e/pict2e.pdf
+++ b/macros/latex/contrib/pict2e/pict2e.pdf
Binary files differ
diff --git a/macros/latex/required/firstaid/README.md b/macros/latex/required/firstaid/README.md
new file mode 100644
index 0000000000..a9a762e4a2
--- /dev/null
+++ b/macros/latex/required/firstaid/README.md
@@ -0,0 +1,9 @@
+# LaTeX2e temporary first aid for external packages and classes during transition periods
+
+LaTeX2e kernel code that temporarily adjusts packages that are not yet
+updated and therefore fail if a new LaTeX release updates internal
+commands (which have been used in the external packages)
+
+This is stored in a separate file external to the base bundle, so that
+it can be easily updated when fixes become available without the need
+to upload a full new LaTeX2e release to CTAN.
diff --git a/macros/latex/required/firstaid/changes.txt b/macros/latex/required/firstaid/changes.txt
new file mode 100644
index 0000000000..0b34d6d0c8
--- /dev/null
+++ b/macros/latex/required/firstaid/changes.txt
@@ -0,0 +1,12 @@
+2020-09-29 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ filehook doesn't need first aid any longer.
+
+2020-09-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ Initial version for 2020-10-01 release containing first aid
+ for packages bidi, filehook and class dinbrief.
+
+
diff --git a/macros/latex/required/firstaid/firstaid.ins b/macros/latex/required/firstaid/firstaid.ins
new file mode 100644
index 0000000000..5d888cf65b
--- /dev/null
+++ b/macros/latex/required/firstaid/firstaid.ins
@@ -0,0 +1,75 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the doc files in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file is part of the Standard LaTeX `First Aid Bundle'.
+%% -------------------------------------------------------
+%%
+%% It 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
+%% https://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.
+%%
+%% As this file contains legal notices, it is NOT PERMITTED to modify
+%% this file in any way that the legal information placed into
+%% generated files is changed (i.e., the files generated when the
+%% original file is executed). This restriction does not apply if
+%% (parts of) the content is reused in a different WORK producing its
+%% own generated files.
+%%
+%% The list of all files belonging to the `First Aid Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\input docstrip
+
+\keepsilent
+
+\usedir{tex/latex/firstaid}
+
+\preamble
+
+The source is maintained by the LaTeX Project team and bug
+reports for it can be opened at https://latex-project.org/bugs/
+(but please observe conditions on bug reports sent to that address!)
+
+
+Copyright (C) 1993-2020
+The LaTeX3 Project and any individual authors listed elsewhere
+in this file.
+
+This file was generated from file(s) of the Standard LaTeX `First Aid Bundle'.
+--------------------------------------------------------------------------
+
+It 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
+ https://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.
+
+This file may only be distributed together with a copy of the LaTeX
+`First Aid Bundle'. You may however distribute the LaTeX `First Aid Bundle'
+without such generated files.
+
+\endpreamble
+
+
+\generate{\file{latex2e-first-aid-for-external-files.ltx}
+ {\from{latex2e-first-aid-for-external-files.dtx}{kernel}}}
+
+\generate{\file{filehook-ltx.sty}
+ {\from{latex2e-first-aid-for-external-files.dtx}{filehook}}}
+
+\endbatchfile
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
new file mode 100644
index 0000000000..e722438fb1
--- /dev/null
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -0,0 +1,351 @@
+% \iffalse meta-comment
+%
+%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020
+%% The LaTeX Project and any individual authors listed elsewhere
+%% in this file.
+%
+% It 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
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+%
+%
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex2e-first-aid-for-external-files.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \providecommand\pkg[1]{\texttt{#1}}
+%
+% \title{First aid for external files and packages that need updating\thanks{}}
+% \author{Frank Mittelbach, \LaTeX{} Project}
+%
+% \maketitle
+%
+%
+% \begin{abstract}
+% This file contains some first aid for packages or classes that
+% require updates because of internal changes to \LaTeX{} but that
+% aren't yet reflected in the package/class code.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Introduction}
+%
+% Over the years package writers have hooked into
+% various parts of internal \LaTeX{} commands (largely because
+% proper interfaces were missing in important places) and if
+% we are now gradually adding such interfaces these internal
+% commands do change and as a result patching into them stops
+% working.
+%
+% As part of making such internal changes the \LaTeX{} Project team
+% attempts to check for such usage in packages, alert the package
+% maintainers and ensures that the packages get updated alongside
+% the core \LaTeX{} system. However it is not always possible to
+% get packages that will fail with a new kernel updated in time and
+% if that is the case we try to provide a temporary fix in this
+% file for them.
+% Once the package gets updated the fix will then be removed again.
+%
+% For that reason, it is put into a separate bundle so that we can
+% update it easily without requiring the CTAN maintainers to
+% install a new full LaTeX system just because we take out (or add)
+% a fix for a package here.
+%
+% In the best case scenario the file documented here should be
+% empty. In practice it will probably always contain one or the
+% other fix while we are waiting for the package to get updated.
+%
+% \begin{quote} \textbf{Important notice:} The fixes provided here
+% are not meant to be a permanent solution, but are only provided
+% to support the transition period. They are (usually) neither
+% complete nor necessarily the best solution! Furthermore, as they
+% are done from the ``outside'', they usually add some burden and
+% slow down \LaTeX{} processing, even if the package/class is not
+% used in the document.
+%
+% We will therefore remove such code as soon as possible
+% again. In practice this means that if some package never gets
+% updated/corrected, then it will eventually fail to work, because
+% after one or at most two \LaTeX{} releases we will take out the
+% transition code to ensure that this ``first aid patching''
+% doesn't get out of bounds.
+% \end{quote}
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+% This file is meant to be loaded during format generation which is
+% why we give it the extension \texttt{.ltx}.
+% \begin{macrocode}
+%<*kernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\LaTeXFirstAidDate{2020/09/29}
+\def\LaTeXFirstAidVersion{v1.0c}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProvidesFile{latex2e-first-aid-for-external-files.ltx}
+ [\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
+ LaTeX kernel fixes to external files and packages]
+% \end{macrocode}
+ %
+
+% \begin{macro}{\FirstAidNeededT}
+% This is a very simple help to ensure that we only apply first aid
+% to an unmodified package or class. It only works in the case the
+% file has already been loaded and the csname \cs{ver@\#1.\#2} got
+% defined (holding the current date, version, and short description
+% info). We then compare its content to a frozen string and make
+% the modification \verb=#3= only if both agree. If they differ we
+% assume that the package/class in question got updated by its
+% maintainer.
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_new:Npn\FirstAidNeededT#1#2#3{
+ \exp_args:Nc\str_if_eq:onT{ver@#1.#2}{#3}
+}
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</kernel>
+% \end{macrocode}
+%
+%
+% \subsection{The \pkg{filehook} package first aid}
+%
+% The \pkg{filehook} package implements hooks into file loading
+% commands. These days this is already provided by the kernel
+% albeit not with the same user interface. Until that package gets
+% updated (to use the kernel interfaces) we provide a
+% substitution. This does not offer all hooks from \pkg{filehook}
+% but all that have been used in packages available in \TeX{} Live.
+%
+% Note that this doesn't fix \pkg{currfile} because that package
+% uses \pkg{filehook} but relies on the internals of the old
+% implementation.
+%
+% The package has now got an update so we aren't activating the
+% first aid. However, it basically bypasses the new hook mechanism
+% and puts the old hooks in thereby disabling, for example, the
+% possibility to reorder code through rules.
+%
+% We therefore keep \texttt{filehook-ltx.sty} around as a guideline
+% for further updates.
+%
+% \begin{macrocode}
+%<*kernel>
+%\declare@file@substitution{filehook.sty}{filehook-ltx.sty}
+%</kernel>
+% \End{macrocode}
+%
+% If a new filehook package becomes available it can be tested
+% simply by undoing the above substitution via
+% \begin{verbatim}
+% \undeclare@file@substitution{filehook.sty}
+% \end{verbatim}
+% Once ready this will then taken out of the first aid file.
+%
+% What follows is a partial implementation of the \pkg{filehook}
+% interfaces.
+%
+% Not implemented are:
+%\begin{verbatim}
+% \AtBeginOfFiles
+% \AtEndOfFiles
+% \AtBeginOfInputs
+% \AtEndOfInputs
+% \AtBeginOfInputFile
+% \AtEndOfInputFile
+%\end{verbatim}
+%
+% \begin{macrocode}
+%<*filehook>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtBeginOfEveryFile [1]
+ {\AddToHook{file/before}{#1}}
+\newcommand\AtEndOfEveryFile [1]
+ {\AddToHook{file/after}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtBeginOfIncludes [1]
+ {\AddToHook{include/before}{#1}}
+\newcommand\AtEndOfIncludes [1]
+ {\AddToHook{include/end}{#1}}
+\newcommand\AfterIncludes [1]
+ {\AddToHook{include/after}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtBeginOfPackages [1]
+ {\AddToHook{package/before}{#1}}
+\newcommand\AtEndOfPackages [1]
+ {\AddToHook{package/after}{#1}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtBeginOfClasses [1]
+ {\AddToHook{class/before}{#1}}
+\newcommand\AtEndOfClasses [1]
+ {\AddToHook{class/after}{#1}}
+% \end{macrocode}
+%
+% For normal files we drop the \texttt{.tex} extension for now:
+% \begin{macrocode}
+\newcommand\AtBeginOfFile [2]
+ {\AddToHook{file/before/#1}{#2}}
+\newcommand\AtEndOfFile [2]
+ {\AddToHook{file/after/#1}{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareDocumentCommand \AtBeginOfPackageFile {smm}
+ {\IfBooleanTF{#1}%
+ {\@ifpackageloaded{#2}%
+ {#3}%
+ {\AddToHook{package/before/#2}{#3}}}%
+ {\AddToHook{package/before/#2}{#3}}%
+ }
+\DeclareDocumentCommand \AtEndOfPackageFile {smm}
+ {\IfBooleanTF{#1}%
+ {\@ifpackageloaded{#2}%
+ {#3}%
+ {\AddToHook{package/after/#2}{#3}}}%
+ {\AddToHook{package/after/#2}{#3}}%
+ }
+% \end{macrocode}
+%
+% Are the * forms here of any use? I know they are use 3--4 times
+% on CTAN but I wonder if those are real or mistaken usages.
+% \begin{macrocode}
+\DeclareDocumentCommand \AtBeginOfClassFile {smm}
+ {\IfBooleanTF{#1}%
+ {\@ifclassloaded{#2}%
+ {#3}%
+ {\AddToHook{class/before/#2}{#3}}}%
+ {\AddToHook{class/before/#2}{#3}}%
+ }
+\DeclareDocumentCommand \AtEndOfClassFile {smm}
+ {\IfBooleanTF{#1}%
+ {\@ifclassloaded{#2}%
+ {#3}%
+ {\AddToHook{class/after/#2}{#3}}}%
+ {\AddToHook{class/after/#2}{#3}}%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand\AtBeginOfIncludeFile [2]
+ {\AddToHook{include/before/#1}{#2}}
+\newcommand\AtEndOfIncludeFile [2]
+ {\AddToHook{include/end/#1}{#2}}
+\newcommand\AfterIncludeFile [2]
+ {\AddToHook{include/after/#1}{#2}}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</filehook>
+% \end{macrocode}
+%
+%
+%
+%
+% \subsection{The \pkg{bidi} package first aid}
+%
+% The \pkg{bidi} package adds a lot of hooks in various places and
+% those added to \cs{document} and \cs{enddocument} are now no
+% longer necessary as the kernel already provides the right hooks
+% there.
+%
+% However, we aren't trying to change that but instead only make
+% sure that the existing patches still work by adding some first
+% aid after \pkg{biditools} has been loaded.
+%
+% If the package gets updated one can easily take that out simply
+% through
+%\begin{verbatim}
+% \RemoveFromHook{file/after/biditools.sty}[firstaid]
+%\end{verbatim}
+% This makes it easy to test new bidi code while the first aid code
+% is still in the kernel.
+%
+% \begin{macrocode}
+\AddToHook{file/after/biditools.sty}[firstaid]{%
+ \FirstAidNeededT{biditools}{sty}%
+ {2020/05/13 v2 Programming tools for bidi package}%
+ {
+% \end{macrocode}
+% \pkg{bidi} adds some code to the beginning of \cs{document} which
+% contains \cs{endgroup} and \cs{begingroup} which is no longer
+% correct.
+%
+% Patching \cs{document} using \cs{bidi@patchcmd} doesn't work so
+% we take the extra groups out by hand:
+% \begin{macrocode}
+ \def\firstaid@bidi@document@patch
+ \endgroup#1\begingroup#2\firstaid@bidi@document@patch
+ {\unexpanded{#1#2}}%
+ \edef\document{\expandafter\firstaid@bidi@document@patch\document
+ \firstaid@bidi@document@patch}%
+% \end{macrocode}
+% There are also some patches into \cs{enddocument}, some continue
+% to go in but one fails, so we add that now into the right place.
+% \begin{macrocode}
+ \AddToHook{enddocument/info}%
+ {\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
+ \bidi@afterenddocumentchecklabelsrerunhook}%
+ }
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*kernel>
+% \end{macrocode}
+%
+%
+%
+% \subsection{The \pkg{dinbrief} class first aid}
+%
+% Again a case of a no longer correct \cs{endgroup} in document.
+% Here the fix is simply though.
+% \begin{macrocode}
+\AddToHook{file/after/dinbrief.cls}[firstaid]{%
+ \FirstAidNeededT{dinbrief}{cls}{2000/03/02 LaTeX2e class}%
+ {\AddToHook{env/document/begin}{\begingroup}}%
+}
+% \end{macrocode}
+%
+%
+%
+%
+%
+% \begin{macrocode}
+%</kernel>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
new file mode 100644
index 0000000000..1be1347b95
--- /dev/null
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ