\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[margin=2cm]{geometry}
\setlength{\parindent}{0cm}

\usepackage{lmodern}
% \usepackage{mathpazo}
% \usepackage{euler}

\usepackage{hepparticles}
%\usepackage[italic]{hepparticles}

\newcommand{\pd}{\HepParticle{d}{}{}}
\newcommand{\pB}{\HepParticle{B}{}{}}
\newcommand{\pBd}{\HepParticle{\pB}{d}{0}}

\usepackage{booktabs}
\newcommand{\testconc}{\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}}
\newcommand{\testgen}{\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}}


\title{Testing \textsf{hepparticles}}
\author{}

\begin{document}
% \vspace*{-2cm}
\maketitle


\section{Concrete names}

\vspace{1em}
\begin{tabular}{llll}
  & Normal & Italic & Slant\\
  \addlinespace \\
  Normal & \testconc & \textit{\testconc} & \textsl{\testconc}\\
  \addlinespace \\
  Bold & \bfseries \testconc & \bfseries \textit{\testconc} & \bfseries \textsl{\testconc}\\
  \addlinespace \\
  Sans & \sffamily \testconc & \sffamily \textit{\testconc} & \sffamily \textsl{\testconc}\\
  \addlinespace \\
  Bold sans & \bfseries\sffamily \testconc & \bfseries\sffamily \textit{\testconc} & \bfseries\sffamily \textsl{\testconc}
\end{tabular}


\clearpage


\section{Generic names}

\vspace{1em}
\begin{tabular}{llll}
  & Normal & Italic & Slant\\
  \addlinespace \\
  Normal & \testgen & \textit{\testgen} & \textsl{\testgen}\\
  \addlinespace \\
  Bold & \bfseries \testgen & \bfseries \textit{\testgen} & \bfseries \textsl{\testgen}\\
  \addlinespace \\
  Sans & \sffamily \testgen & \sffamily \textit{\testgen} & \sffamily \textsl{\testgen}\\
  \addlinespace \\
  Bold sans & \bfseries\sffamily \testgen & \bfseries\sffamily \textit{\testgen} & \bfseries\sffamily \textsl{\testgen}
\end{tabular}


\clearpage


\section{Processes}
$\HepParticle{B}{\pd}{0} \to \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.
}


\section{Misc}

\HepParticle{\pi}{}{}
\HepParticle{\lambda}{}{}
\HepGenParticle{\pi}{}{}
\HepGenParticle{\lambda}{}{}

% $\upright{\pi}, \pi$


\end{document}
