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

\GetFileInfo{hep-graphic.sty}

\title{The \software{hep-graphic} package\thanks{This document corresponds to \software{hep-graphic}~\fileversion.}}
\subtitle{Graphics, plots, and Feynman diagrams}
\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-graphic} package collects graphics helpers for HEP documents.
It loads \software{TikZ}, optional TikZ externalisation, and \software{tikzscale}, provides path-aware inclusion commands for PGF plots and Feynman diagrams, and can load companion \software{hep-plot} and \software{hep-feynman} modules for \software{pgfplots} defaults, colour cycles, line styles, legends, and \software{tikz-feynman} settings.
\end{abstract}

\section{Graphic}

After loading the "hep-graphic" package the \software{TikZ} \cite{pgf} package is loaded.

\DescribeMacro{extern}
The "extern="\meta{folder} option activates the TikZ "external" library and stores externalised graphics in \meta{folder}.

\DescribeMacro{plot}
\DescribeMacro{feynman}
The "plot" and "feynman" options load the \software{hep-plot} and \software{hep-feynman} companion modules.

\DescribeMacro{\graphicpath}
\DescribeMacro{\includepgf}
\DescribeMacro{\includefeynman}
The "\graphicpath"\marg{folder} macro stores the folder from which generated graphics are included.
The "\includepgf"\meta{*}\oarg{options}\marg{name} macro includes a PGF or PGFPlots graphic from that folder and passes \meta{options} to both "\pgfplotsset" and "\includegraphics"; the starred form includes the graphic without applying plotting options.
The "\includefeynman"\marg{name} macro includes a generated Feynman diagram centred for use in math displays.

\subsection{Plot}

The \software{hep-plot} package loads the \software{pgfplots} package \cite{pgfplots}, sets global plot dimensions and fonts, adjusts numeric formatting, and provides a "three panels" style for compact multi-panel figures.
It defines "rainbow" and "rainbow reversed" colormaps, spaced colour and line-style cycle-list generators, matching cycle lists for up to many curves, and the "\addlegendtitle"\marg{text} helper for legend headers.

\subsection{Feynman}

The \software{hep-feynman} package loads the \software{tikz-feynman} package \cite{tikz-feynman} and adjusts default line, momentum-arrow, and diagram styles.

\printbibliography

\end{document}

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