%%
%% This is file `hep-title-documentation.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hep-title-implementation.dtx  (with options: `documentation')
%% This is a generated file.
%% Copyright (C) 2019-2025 by Jan Hajer
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in:
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.

\ProvidesFile{hep-title-documentation.tex}[2026/08/01 v1.5 hep-title documentation]

\RequirePackage[l2tabu, orthodox]{nag}

\documentclass{ltxdoc}

\renewcommand*\theCodelineNo{\rmfamily\tstyle\footnotesize\arabic{CodelineNo}}
\AtBeginEnvironment{macrocode}{\renewcommand*{\ttdefault}{clmt}}
\renewcommand*{\MacroFont}{\codestyle}
\AtBeginDocument{\DeleteShortVerb{\|}}
\AtBeginDocument{\MakeShortVerb{\"}}
\EnableCrossrefs
\CodelineIndex
\RecordChanges

\usepackage{hologo}

\usepackage[parskip,oldstyle,font=10pt]{hep-paper}
\bibliography{bibliography}

\acronym{PDF}{portable document format}


\GetFileInfo{hep-title.sty}

\title{The \software{hep-title} package\thanks{This document corresponds to \software{hep-title}~\fileversion.}}
\subtitle{Extensions for the title page}
\author{Jan Hajer \email{jan.hajer@tecnico.ulisboa.pt}}
\date{\filedate}

\begin{document}

\newgeometry{vscale=.8, vmarginratio=3:4, includeheadfoot, left=11em, marginparwidth=4.6cm, marginparsep=3mm, right=7em}

\maketitle

\begin{abstract}
The \software{hep-title} package extends the title macros of the standard classes.
It adds series and subtitle metadata, preprint and reprint blocks, DOI and arXiv helpers, author, editor, endorser, affiliation, email and ORCID helpers, date and abstract formatting, keywords, and two-column title-aware abstracts.
\end{abstract}

To use the \software{hep-title} package include it with "\usepackage{hep-title}".

Most macros are intended for the use in the preamble.
They are implemented using the \software{titling} \cite{titling} and \software{authblk} \cite{authblk} packages.

\section{Macros}

If the \software{hyperref} package is loaded the \PDF meta information is set according to the "\title"\marg{text} and "\author"\marg{text} information.

\subsection{Title}

\DescribeMacro{\preseries}
\DescribeMacro{\series}
\DescribeMacro{\postseries}
\DescribeMacro{\title}
\DescribeMacro{\presubtitle}
\DescribeMacro{\subtitle}
\DescribeMacro{\postsubtitle}
\DescribeMacro{\seriesfont}
\DescribeMacro{\titlefont}
\DescribeMacro{\subtitlefont}
The "\series"\marg{series} places a series title above the usual title generated via "\title"\marg{title}.
The "\subtitle"\marg{subtitle} macro places a subtitle below the usual title.
The "\preseries", "\postseries", "\presubtitle", and "\postsubtitle" hooks adjust the surrounding material.
The fonts and their size can be adjusted using the "\seriesfont"\marg{font}, "\titlefont"\marg{font}, and "\subtitlefont"\marg{font} macros.

\subsection{Authors}

\DescribeMacro{\author}
\DescribeMacro{\authorfont}
\DescribeMacro{\authortitle}
\DescribeMacro{\authortitlefont}
\DescribeMacro{\preauthortitle}
\DescribeMacro{\postauthortitle}
\DescribeMacro{\email}
\DescribeMacro{\orcmail}
\DescribeMacro{\affiliation}
\DescribeMacro{\affiliationfont}
In order to facilitate multiple authors with different affiliations the \software{authblk} package \cite{authblk} is extended.
The author macro is extended to take an affiliation label "\author"\oarg{label}\marg{name}.
The affiliation macro takes the corresponding label "\affiliation"\oarg{label}\marg{institution}.
Additionally, the "\email"\marg{email} macro places a link containing the email address in typewriter font into a footnote.
The "\orcmail"\marg{orcid}\marg{email} macro combines an email address with an ORCID link in the same footnote.
If editors are present, the author line receives a title that can be adjusted using "\authortitle", "\authortitlefont", "\preauthortitle", and "\postauthortitle".
The fonts can be adjusted using the "\authorfont"\marg{font} and "\affiliationfont"\marg{font} macros.
The following lines add \eg two authors with different affiliations
\begin{verbatim}
\author[affil1]{Author one \email{email one}}
\affiliation[affil1]{Affiliation one}
\author[affil2]{Author two \email{email two}}
\affiliation[affil1,affil2]{Affiliation two}
\end{verbatim}

\DescribeMacro{\editor}
\DescribeMacro{\endorser}
\DescribeMacro{\editorfont}
\DescribeMacro{\endorserfont}
\DescribeMacro{\preeditor}
\DescribeMacro{\posteditor}
\DescribeMacro{\preendorser}
\DescribeMacro{\postendorser}
Additionally the "\editor"\oarg{label}\marg{name} and "\endorser"\oarg{label}\marg{name} macros are provided that act similar to the "\author"\oarg{label}\marg{name} macros but place their content in a dedicated line.
Their font and surrounding material can be adjusted by "\editorfont"\marg{font}, "\endorserfont"\marg{font}, "\preeditor"\marg{code}, "\posteditor"\marg{code}, "\preendorser"\marg{code}, and "\postendorser"\marg{code}.
\DescribeMacro{\editortitle}
\DescribeMacro{\endorsertitle}
\DescribeMacro{\editortitlefont}
\DescribeMacro{\endorsertitlefont}
\DescribeMacro{\preeditortitle}
\DescribeMacro{\posteditortitle}
\DescribeMacro{\preendorsertitle}
\DescribeMacro{\postendorsertitle}
The titles of these lines can be adjusted using the "\editortitle"\marg{singular}\marg{plural} and "\endorsertitle"\marg{singular}\marg{plural} macros.
Their font and surrounding material can be adjusted with "\editortitlefont"\marg{font}, "\endorsertitlefont"\allowbreak\marg{font}, "\preeditortitle"\marg{code}, "\posteditortitle"\marg{code}, "\preendorsertitle"\marg{code}, and "\postendorsertitle"\marg{code}.

\subsection{Abstract}

\DescribeEnv{abstract}
\DescribeEnv{abstract*}
\DescribeMacro{\keywords}
The "abstract" environment is adjusted to not start with an indentation.
The "abstract*" environment takes care of placing the title as well.
This is used in "twocolumn" documents if the abstract should span both columns.
The "\keywords"\marg{keywords} macro appends an italic keyword line to the abstract.

\DescribeMacro{\datefont}
The date is empty by default and can be formatted with "\datefont"\marg{font}.

\subsection{Preprint}

\DescribeMacro{\preprint}
\DescribeMacro{\arxiv}
\DescribeMacro{\placepreprint}
\DescribeMacro{\preprintfont}
The "\preprint"\marg{number} macro places a preprint number in the upper right corner of the title page.
The "\arxiv"\marg{id} macro adds an arXiv preprint link.
The "\placepreprint" hook places the preprint block on the first page, and "\preprintfont" changes its font.

\DescribeMacro{\reprint}
\DescribeMacro{\doi}
\DescribeMacro{\placereprint}
\DescribeMacro{\reprintfont}
The "\reprint"\marg{text} macro collects reprint or publication information for the upper left corner of the title page.
The "\doi"\marg{id} helper adds a DOI link.
The "\placereprint" hook places the reprint block on the first page, and "\reprintfont" changes its font.

\printbibliography

\end{document}

\endinput
%%
%% End of file `hep-title-documentation.tex'.
