%%
%% This is file `hep-bibliography-documentation.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hep-bibliography-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-bibliography-documentation.tex}[2026/08/01 v1.5 HEP-Bibliography 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{URL}{uniform resource locator}

\GetFileInfo{hep-bibliography.sty}

\title{The \software{hep-bibliography} package\thanks{This document corresponds to \software{hep-bibliography}~\fileversion.}}
\subtitle{Bibliographies for high energy physics}
\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-bibliography} package configures \software{biblatex} for high-energy physics publications.
It adds the \software{InspireHEP} data fields used in HEP bibliographies, citation back-links from bibliography labels, source maps for common BibTeX variants, erratum handling, and eprint formats for arXiv, PubMed, code-hosting, and package repositories.
\end{abstract}

The package can be loaded via "\usepackage{hep-bibliography}".

\DescribeMacro{style}
The "style="\meta{name} option selects the \software{biblatex} style passed to "\RequirePackage{biblatex}".
The default is "numeric-comp".

\DescribeMacro{\bibliography}
\DescribeMacro{\printbibliography}
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 read the "collaboration" and "reportNumber" fields provided by \online{https://inspirehep.net}{inspirehep.net}, to normalise selected volume, issue, URL, and PubMed data, and to link bibliography labels back to the first citation.
Additionally, arXiv, PubMed, PubMed Central, \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{\online}
\DescribeMacro{\email}
The "\online"\marg{url}\marg{text} macro prints link text that becomes a hyperlink if \software{hyperref} is loaded.
The "\email"\marg{address} macro is a mail link wrapper using the same fallback.

\DescribeEnv{commalist}
The "commalist" environment typesets "\item"-separated entries as a comma-separated list with a final \enquote{and}.

\DescribeMacro{erratum}
Errata can be included using the "related" feature.
\begin{verbatim}
\article{key1,
  ...,
  relatedtype="erratum",
  related="key2",
}
\article{key2,
  ...,
}
\end{verbatim}

\printbibliography

\end{document}

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