\documentclass[12pt]{article}
\usepackage{hepparticles}
%\usepackage[italic]{hepparticles}
\usepackage{booktabs,xspace}

\newcommand{\hepparticles}{\texttt{hepparticles}\xspace}

\title{Testing \hepparticles}
\author{Generated by \texttt{buckley}}

\newcommand{\pd}{\HepParticle{d}{}{}}
\newcommand{\pB}{\HepParticle{B}{}{}}
\newcommand{\pBd}{\HepParticle{\pB}{d}{0}}
\setlength{\parindent}{0cm}


\begin{document}
\maketitle

\section{Sub- and super-script alignment}
\subsection{Concrete names}

\subsubsection{Normal}
\textrm{
\begin{tabular}{llll}
\toprule
\HepParticle{B}{}{}   & \HepAntiParticle{B}{}{}   & \HepSusyParticle{B}{}{}   & \HepSusyAntiParticle{B}{}{} \\
\HepParticle{B}{\pd}{}  & \HepAntiParticle{B}{\pd}{}  & \HepSusyParticle{B}{\pd}{}  & \HepSusyAntiParticle{B}{\pd}{} \\
\HepParticle{B}{}{0}  & \HepAntiParticle{B}{}{0}  & \HepSusyParticle{B}{}{0}  & \HepSusyAntiParticle{B}{}{0} \\
\HepParticle{B}{\pd}{0} & \HepAntiParticle{B}{\pd}{0} & \HepSusyParticle{B}{\pd}{0} & \HepSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}

\subsubsection{Italic}
\textit{
\begin{tabular}{llll}
\toprule
\HepParticle{B}{}{}   & \HepAntiParticle{B}{}{}   & \HepSusyParticle{B}{}{}   & \HepSusyAntiParticle{B}{}{} \\
\HepParticle{B}{\pd}{}  & \HepAntiParticle{B}{\pd}{}  & \HepSusyParticle{B}{\pd}{}  & \HepSusyAntiParticle{B}{\pd}{} \\
\HepParticle{B}{}{0}  & \HepAntiParticle{B}{}{0}  & \HepSusyParticle{B}{}{0}  & \HepSusyAntiParticle{B}{}{0} \\
\HepParticle{B}{\pd}{0} & \HepAntiParticle{B}{\pd}{0} & \HepSusyParticle{B}{\pd}{0} & \HepSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}

\subsubsection{Bold}
\textbf{
\begin{tabular}{llll}
\toprule
\HepParticle{B}{}{}   & \HepAntiParticle{B}{}{}   & \HepSusyParticle{B}{}{}   & \HepSusyAntiParticle{B}{}{} \\
\HepParticle{B}{\pd}{}  & \HepAntiParticle{B}{\pd}{}  & \HepSusyParticle{B}{\pd}{}  & \HepSusyAntiParticle{B}{\pd}{} \\
\HepParticle{B}{}{0}  & \HepAntiParticle{B}{}{0}  & \HepSusyParticle{B}{}{0}  & \HepSusyAntiParticle{B}{}{0} \\
\HepParticle{B}{\pd}{0} & \HepAntiParticle{B}{\pd}{0} & \HepSusyParticle{B}{\pd}{0} & \HepSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}

\subsubsection{Bold italic}
\textit{\textbf{
\begin{tabular}{llll}
\toprule
\HepParticle{B}{}{}   & \HepAntiParticle{B}{}{}   & \HepSusyParticle{B}{}{}   & \HepSusyAntiParticle{B}{}{} \\
\HepParticle{B}{\pd}{}  & \HepAntiParticle{B}{\pd}{}  & \HepSusyParticle{B}{\pd}{}  & \HepSusyAntiParticle{B}{\pd}{} \\
\HepParticle{B}{}{0}  & \HepAntiParticle{B}{}{0}  & \HepSusyParticle{B}{}{0}  & \HepSusyAntiParticle{B}{}{0} \\
\HepParticle{B}{\pd}{0} & \HepAntiParticle{B}{\pd}{0} & \HepSusyParticle{B}{\pd}{0} & \HepSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}}


\subsection{Generic names}
\subsubsection{Normal}
\textrm{
\begin{tabular}{llll}
\toprule
\HepGenParticle{B}{}{}   & \HepGenAntiParticle{B}{}{}   & \HepGenSusyParticle{B}{}{}   & \HepGenSusyAntiParticle{B}{}{} \\
\HepGenParticle{B}{\pd}{}  & \HepGenAntiParticle{B}{\pd}{}  & \HepGenSusyParticle{B}{\pd}{}  & \HepGenSusyAntiParticle{B}{\pd}{} \\
\HepGenParticle{B}{}{0}  & \HepGenAntiParticle{B}{}{0}  & \HepGenSusyParticle{B}{}{0}  & \HepGenSusyAntiParticle{B}{}{0} \\
\HepGenParticle{B}{\pd}{0} & \HepGenAntiParticle{B}{\pd}{0} & \HepGenSusyParticle{B}{\pd}{0} & \HepGenSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}

\subsubsection{Italic}
\textit{
\begin{tabular}{llll}
\toprule
\HepGenParticle{B}{}{}   & \HepGenAntiParticle{B}{}{}   & \HepGenSusyParticle{B}{}{}   & \HepGenSusyAntiParticle{B}{}{} \\
\HepGenParticle{B}{\pd}{}  & \HepGenAntiParticle{B}{\pd}{}  & \HepGenSusyParticle{B}{\pd}{}  & \HepGenSusyAntiParticle{B}{\pd}{} \\
\HepGenParticle{B}{}{0}  & \HepGenAntiParticle{B}{}{0}  & \HepGenSusyParticle{B}{}{0}  & \HepGenSusyAntiParticle{B}{}{0} \\
\HepGenParticle{B}{\pd}{0} & \HepGenAntiParticle{B}{\pd}{0} & \HepGenSusyParticle{B}{\pd}{0} & \HepGenSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}

\subsubsection{Bold}
%\textbf{
\begin{tabular}{llll}
\toprule
\HepGenParticle{B}{}{}   & \HepGenAntiParticle{B}{}{}   & \HepGenSusyParticle{B}{}{}   & \HepGenSusyAntiParticle{B}{}{} \\
\HepGenParticle{B}{\pd}{}  & \HepGenAntiParticle{B}{\pd}{}  & \HepGenSusyParticle{B}{\pd}{}  & \HepGenSusyAntiParticle{B}{\pd}{} \\
\HepGenParticle{B}{}{0}  & \HepGenAntiParticle{B}{}{0}  & \HepGenSusyParticle{B}{}{0}  & \HepGenSusyAntiParticle{B}{}{0} \\
\HepGenParticle{B}{\pd}{0} & \HepGenAntiParticle{B}{\pd}{0} & \HepGenSusyParticle{B}{\pd}{0} & \HepGenSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
%}

\subsubsection{Bold italic}
\textit{%\textbf{
\begin{tabular}{llll}
\toprule
\HepGenParticle{B}{}{}   & \HepGenAntiParticle{B}{}{}   & \HepGenSusyParticle{B}{}{}   & \HepGenSusyAntiParticle{B}{}{} \\
\HepGenParticle{B}{\pd}{}  & \HepGenAntiParticle{B}{\pd}{}  & \HepGenSusyParticle{B}{\pd}{}  & \HepGenSusyAntiParticle{B}{\pd}{} \\
\HepGenParticle{B}{}{0}  & \HepGenAntiParticle{B}{}{0}  & \HepGenSusyParticle{B}{}{0}  & \HepGenSusyAntiParticle{B}{}{0} \\
\HepGenParticle{B}{\pd}{0} & \HepGenAntiParticle{B}{\pd}{0} & \HepGenSusyParticle{B}{\pd}{0} & \HepGenSusyAntiParticle{B}{\pd}{0} \\
\bottomrule
\end{tabular}
}%}

\section{Processes}
%\texdemo{ \HepProcess{\HepParticle{B}{\pd}{0} \HepTo \HepParticle{K}{S}{0} \HepParticle{\pi}{}{0}} }
\HepProcess{\HepParticle{B}{\pd}{0} \HepTo \HepParticle{K}{S}{0} \, \HepParticle{\pi}{}{0}}\\
\HepProcess{\HepParticle{B}{\pd}{0} \to \HepParticle{K}{S}{0} \, \HepParticle{\pi}{}{0}}\\


\section{Resonances}
\HepParticleResonance{\pBd}{1234}{1}{\ast}\\
\HepParticleResonanceFormal{\pBd}{1234}{1}{\ast}{P}{11}{\pm}\\
\HepParticleResonanceFull{B}{\pd}{0}{1234}{1}{\ast}\\
\HepParticleResonanceFormalFull{B}{\pd}{0}{1234}{1}{\ast}{P}{11}{\pm}

\section{Mixed concrete and generic}
Using math sub/super-scripts:

\begin{tabular}{lll}
\toprule
$\HepParticle{B}{}{}_i$   & $\HepParticle{B}{}{}^j$   & $\HepParticle{B}{}{}_i^j$ \\
$\HepParticle{B}{\pd}{}_i$  & $\HepParticle{B}{\pd}{}^j$  & $\HepParticle{B}{\pd}{}^j_i$ \\
$\HepParticle{B}{}{0}_i$  & $\HepParticle{B}{}{0}^j$  & $\HepParticle{B}{}{0}_i^j$ \\
$\HepParticle{B}{\pd}{0}_i$ & $\HepParticle{B}{\pd}{0}^j$ & $\HepParticle{B}{\pd}{0}_i^j$ \\
\bottomrule
\end{tabular}

\begin{tabular}{lll}
\toprule
$\HepGenParticle{B}{}{}_i$   & $\HepGenParticle{B}{}{}^j$   & $\HepGenParticle{B}{}{}_i^j$ \\
$\HepGenParticle{B}{\pd}{}_i$  & $\HepGenParticle{B}{\pd}{}^j$  & $\HepGenParticle{B}{\pd}{}^j_i$ \\
$\HepGenParticle{B}{}{0}_i$  & $\HepGenParticle{B}{}{0}^j$  & $\HepGenParticle{B}{}{0}_i^j$ \\
$\HepGenParticle{B}{\pd}{0}_i$ & $\HepGenParticle{B}{\pd}{0}^j$ & $\HepGenParticle{B}{\pd}{0}_i^j$ \\
\bottomrule
\end{tabular}\\

Using generic particle with concrete particle in first argument:

\begin{tabular}{lll}
\toprule
\HepParticleStruct{\pB}{i}{}                 & \HepParticleStruct{\pB}{}{j}                & \HepParticleStruct{\pB}{i}{j} \\
\HepParticleStruct{\pB}{i}{\HepConStyle{0}}  & \HepParticleStruct{\pB}{\HepConStyle{\pd}}{j} & \\
\bottomrule
\end{tabular}

\section{Integration with text}
\textbf{This is a B.}\\
\textbf{This is a \HepParticle{B}{}{}.}\\

\textbf{This is a B particle}\\
\textbf{This is a \HepParticle{B}{}{} particle}\\
\textbf{This is a \HepParticle{B}{u}{+} particle}\\
\textbf{This is a \HepParticle{B}{}{0} particle}\\

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin fringilla, wisi
eget aliquet tempor, risus tellus luctus est, ac accumsan pede enim vehicula
tortor. Nulla \HepParticle{B}{}{0} scelerisque placerat enim. Nullam aliquet
lorem eget augue. Nullam semper feugiat neque. Nam aliquet iaculis ante. Fusce
ac mi. \HepAntiParticle{B}{}{0} pellentesque sed ante. Maecenas consectetuer
porta dolor. Pellentesque enim. Mauris augue orci, suscipit a, vestibulum nec,
\HepSusyParticle{B}{}{0} congue ac, elit. Donec lectus dui, molestie sed,
molestie sed, sollicitudin nec, justo. Morbi porttitor odio at urna. Nam
bibendum dui tempor lectus. Phasellus \HepSusyAntiParticle{B}{}{0} porttitor
vehicula sem. Sed a elit.

In volutpat. Sed quis arcu. Class aptent taciti sociosqu ad litora torquent per
conubia nostra, per inceptos \HepGenParticle{q}{}{\hat{d}} hymenaeos. Aenean vitae
wisi. Praesent condimentum iaculis est. Praesent consectetuer est non erat.
Fusce eget erat at arcu pretium condimentum. Aliquam \HepGenAntiParticle{\ell}{}{+}
mauris dui, tincidunt eget, iaculis id, hendrerit non, lacus. Integer et odio ut
arcu sollicitudin nonummy. Vestibulum vel orci cursus sapien luctus
\HepGenSusyParticle{q}{}{} sagittis. Curabitur mollis eros id nunc. Fusce risus
quam, molestie at, bibendum sed, sodales at, urna. In hac habitasse platea
\HepGenSusyAntiParticle{\chi}{}{0} dictumst.

\section{Testing sans-serif}
\textsf{
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin fringilla, wisi
eget aliquet tempor, risus tellus luctus est, ac accumsan pede enim vehicula
tortor. Nulla \HepParticle{B}{}{0} scelerisque placerat enim. Nullam aliquet
lorem eget augue. Nullam semper feugiat neque. Nam aliquet iaculis ante. Fusce
ac mi. \HepAntiParticle{B}{}{0} pellentesque sed ante. Maecenas consectetuer
porta dolor. Pellentesque enim. Mauris augue orci, suscipit a, vestibulum nec,
\HepSusyParticle{B}{}{0} congue ac, elit. Donec lectus dui, molestie sed,
molestie sed, sollicitudin nec, justo. Morbi porttitor odio at urna. Nam
bibendum dui tempor lectus. Phasellus \HepSusyAntiParticle{B}{}{0} porttitor
vehicula sem. Sed a elit.
}
\textsf{
In volutpat. Sed quis arcu. Class aptent taciti sociosqu ad litora torquent per
conubia nostra, per inceptos \HepGenParticle{B}{}{0} hymenaeos. Aenean vitae
wisi. Praesent condimentum iaculis est. Praesent consectetuer est non erat.
Fusce eget erat at arcu pretium condimentum. Aliquam \HepGenAntiParticle{B}{}{0}
mauris dui, tincidunt eget, iaculis id, hendrerit non, lacus. Integer et odio ut
arcu sollicitudin nonummy. Vestibulum vel orci cursus sapien luctus
\HepGenSusyParticle{B}{}{0} sagittis. Curabitur mollis eros id nunc. Fusce risus
quam, molestie at, bibendum sed, sodales at, urna. In hac habitasse platea
\HepGenSusyAntiParticle{B}{}{0} dictumst.
}

\end{document}
