summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hepparticles
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/hepparticles
Initial commit
Diffstat (limited to 'macros/latex/contrib/hepparticles')
-rw-r--r--macros/latex/contrib/hepparticles/ChangeLog58
-rw-r--r--macros/latex/contrib/hepparticles/README37
-rw-r--r--macros/latex/contrib/hepparticles/hepparticles.pdfbin0 -> 39760 bytes
-rw-r--r--macros/latex/contrib/hepparticles/hepparticles.sty504
-rw-r--r--macros/latex/contrib/hepparticles/hepparticles.tex225
-rw-r--r--macros/latex/contrib/hepparticles/testhepparticles.pdfbin0 -> 40741 bytes
-rw-r--r--macros/latex/contrib/hepparticles/testhepparticles.tex190
7 files changed, 1014 insertions, 0 deletions
diff --git a/macros/latex/contrib/hepparticles/ChangeLog b/macros/latex/contrib/hepparticles/ChangeLog
new file mode 100644
index 0000000000..ee01e17cc1
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/ChangeLog
@@ -0,0 +1,58 @@
+2014-12-01 Andy Buckley <andy.buckley@cern.ch>
+
+ * Version 2.0 released.
+
+ * hepparticles.pdf/.tex documentation updated to v2.
+
+ * Remove pdflatex exclusion from \to spacing modification.
+
+2014-07-15 Andy Buckley <andy.buckley@cern.ch>
+
+ * Adding \@shiftlen@norm@con@rmsub and other macros to allow
+ customization of particle bar, tilde and sub/super-script
+ horizontal corrections without hacking the style file. In general
+ these corrections will be font-specific.
+
+2014-07-13 Andy Buckley <andy.buckley@cern.ch>
+
+ * Remove \HepTo macro -- surely no-one was using it? Just use \to
+
+2014-07-08 Andy Buckley <andy.buckley@cern.ch>
+
+ * Italic kerning corrections now applied (in a sf/rm-dependent
+ way) to overlines and tildes, making them more appropriately
+ aligned with the underlying symbol.
+
+ * Remove the sans and force-italic package options -- sans context
+ will now always be used (why would it not?) and mathit style is
+ applied in all italic or slanted shape contexts.
+
+ * Rewrite to use subdepth to get uniform subscript and superscript
+ heights and to use the font specification much more intelligently
+ -- this is now done without using the maybemath package.
+
+2013-07-17 Andy Buckley <andy.buckley@cern.ch>
+
+ * Replacing use of \maybebm with Donald Arseneau's trick to append
+ \boldmath to the \bfseries definition.
+
+2005-07-28 Andy Buckley <andy.buckley@durham.ac.uk>
+
+ * Remove \mspace from hyperref labels in PDFTeX and provide
+ alternative form ("to ") for \HepTo and \to. Thanks to
+ Heiko Oberdiek and Donald Arseneau for providing the solution
+ via comp.text.tex.
+
+ * Tidying/removal of the redundant documentation in the
+ hepparticles.sty file.
+
+2005-02-22 Andy Buckley <andy.buckley@durham.ac.uk>
+
+ * Version 1.4 released: much more flexible symbol construction
+ model. Note syntax changes have been required and the package
+ will not be backwards compatible. The current syntax should be
+ stable.
+
+2004-12-02 Andy Buckley <andy.buckley@durham.ac.uk>
+
+ * First public version released.
diff --git a/macros/latex/contrib/hepparticles/README b/macros/latex/contrib/hepparticles/README
new file mode 100644
index 0000000000..f67cfcbd6a
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/README
@@ -0,0 +1,37 @@
+hepparticles --- for typesetting high energy particle names
+by Andy Buckley <andy@insectnation.org>
+-----------------------------------------------------------
+
+hepparticles is a set of macros for typesetting high energy particle names. It
+provides a robust and consistent structure within which to typeset the names and
+along the way solves many problems with alignment and text styles which
+otherwise make themselves known.
+
+Chief amongst the problems solved by hepparticles is that the boldness of
+particle names typeset in math mode when used in section titles, headers and
+tables of contents disappears. hepparticles ensures that particle names remain
+bold, italic, or in sans-serif font to match the surrounding font context. The
+typesetting convention by default uses upright names for "concrete" particles
+and italic type for generic particle labels but the convention can be specified
+at package-include time, making this package suitable for use with journals
+which require alternative styles.
+
+hepparticles also applies small but significant horizontal shifts to sub- and
+super-scripts and overlines and tildes for antiparticles and supersymmetric
+particles respectively (as well as the extremely rarely used SUSY
+antiparticles!) and makes use of the subdepth package to ensure that all particle
+name sub- and super-scripts are typeset at the same heights.
+
+Fuller documentation for this package can be found in the files
+hepparticles.{ps,pdf}, distributed with the package and some examples (used for
+debugging) are in testhepparticles.{ps,pdf}, with source code in
+testhepparticles.tex.
+
+You may also be interested in the hepnames package, which uses this one to
+define a large set of standard particle names.
+
+This material is subject to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the
+details of that license.
+
+Author: Andy Buckley <andy@insectnation.org>
diff --git a/macros/latex/contrib/hepparticles/hepparticles.pdf b/macros/latex/contrib/hepparticles/hepparticles.pdf
new file mode 100644
index 0000000000..3a39cfc6b4
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/hepparticles.pdf
Binary files differ
diff --git a/macros/latex/contrib/hepparticles/hepparticles.sty b/macros/latex/contrib/hepparticles/hepparticles.sty
new file mode 100644
index 0000000000..67a8f7b3c6
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/hepparticles.sty
@@ -0,0 +1,504 @@
+%% hepparticles --- flexible elementary particle symbols
+%% Author: Andy Buckley <andy@insectnation.org>
+%%
+%% This material is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%%
+%% The macros provided are:
+%%
+%% For generic particle names e.g. all positively charged leptons:
+%% \HepGenParticle{main}{subscript}{superscript}
+%% \HepGenAntiParticle{main}{subscript}{superscript}
+%%
+%% For concrete particle names:
+%% \HepParticle{main}{subscript}{superscript}
+%% \HepAntiParticle{main}{subscript}{superscript}
+%%
+%% For supersymmetric "sparticles":
+%% \HepSusyParticle{main}{subscript}{superscript}
+%% \HepGenSusyParticle{main}{subscript}{superscript}
+%% \HepSusyAntiParticle{main}{subscript}{superscript}
+%% \HepGenSusyAntiParticle{main}{subscript}{superscript}
+%%
+%% For resonance specifiers (just the extra terms):
+%% \HepResonanceMassTerm{mainTermInParenths}{subscript}{superscript}
+%% \HepResonanceSpecTerm{mainSpecTerm}{subscript}{superscript}
+%%
+%% For the total particle name and resonance specifications: the
+%% ``formal'' definitions include the spectroscopic term and the
+%% ``full'' versions pf each require the main particle name to be
+%% explicitly specified rather than just pass a \HepParticle as the first arg:
+%% \HepParticleResonance{name}{mass}{massSub}{massSup}
+%% \HepParticleResonanceFormal{name}{mass}{massSub}\
+%% {massSup}{spec}{specSub}{specSup}
+%% \HepParticleResonanceFull{name}{sub}{sup}{mass}{massSub}{massSup}
+%% \HepParticleResonanceFormalFull{name}{sub}{sup}\
+%% {mass}{massSub}{massSup}\
+%% {spec}{specSub}{specSup}
+%%
+%% And finally, for containing processes describing the evolution
+%% of these particles:
+%% \HepProcess{iParticles \to fParticles}
+%% where \to is re-defined to have a bit of extra space.
+%%
+%% There are probably some missing cases but they can be handled
+%% as explicit exceptions. You might also be interested in the
+%% ``hepnames'' package, which updates the "pennames" set of
+%% typeset concrete particle names to use this more flexible scheme.
+
+%% TODO:
+%%
+%% * Make the bold math only occur within particle macros
+%%
+%% * Distinction between italic main symbol and italic main+scripts
+%%
+%% * Optionally include Greek letters (lower and upper) in upright/italic
+%% forcing (and sans/bold context sensitivity)
+%%
+%% * Use maybemath again? (A new version, using NFSS properly)
+
+%% Admin
+\def\fileversion{2.0}
+\def\filedate{2014/12/01}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hepparticles}[\filedate\space HEP particle typesetting (v\fileversion)]
+
+% \RequirePackage{xspace}
+% \RequirePackage{etoolbox}
+
+%% Package options
+\def\@italicNames{}%
+
+%% Use italic particle symbols
+\DeclareOption{italic}{%
+ \def\@italicNames{yes}%
+}
+% %% Force particle symbols to behave as for italic math mode
+% % TODO: clarify... means that text super/sub scripts are italic not rm?
+% \DeclareOption{itforce}{%
+% \def\@italicNames{yes}%
+% \def\@forceItalic{yes}%
+% }
+% %% Force upright particle names (default)
+% \DeclareOption{notitalic}{%
+% \def\@italicNames{}%
+% \def\@forceItalic{}%
+% }
+% %% Allow particle names to be sans-serif in context (no italics, even for generic particles)
+% \DeclareOption{maybess}{%
+% \def\@maybeSansSerif{yes}%
+% }
+% \DeclareOption{noss}{%
+% \def\@maybeSansSerif{}%
+% }
+
+% TODO: Add options to force upright Greek lower-case / italic Greek upper-case?
+
+\ProcessOptions
+
+%% Force all sub/superscripts to the same height
+\RequirePackage{subdepth}
+\RequirePackage{amsmath}
+
+%% Automatically bolden math mode symbols in a bold text context
+% TODO: only apply to particles? Redefine \bfseries inside hepparticles macros and restore at end? Or is there a simpler scoping?
+\g@addto@macro\bfseries{\boldmath}
+
+\DeclareMathAlphabet{\mathup}{OT1}{\familydefault}{m}{n}
+\SetMathAlphabet{\mathup}{bold}{\encodingdefault}{\familydefault}{bx}{n}
+
+\DeclareMathAlphabet{\mathsfup}{OT1}{\sfdefault}{m}{n}
+\SetMathAlphabet{\mathsfup}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
+
+\DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl}
+\SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{sl}
+
+% \DeclareMathAlphabet{\mathbfsfit}{\encodingdefault}{\sfdefault}{bx}{sl} % why doesn't this work (no italic)?
+% \DeclareMathAlphabet{\mathbfsf} {\encodingdefault}{\sfdefault}{bx}{sl}
+
+% TODO: Use fixmath to force italic/upright upper/lower Greek characters -- only in particles
+
+
+%% -----------------------------------------------------------------------
+%% Styling commands
+%% -----------------------------------------------------------------------
+
+%% Generic particle style (normal style with optional forced italics)
+\DeclareRobustCommand{\@HepGenStyle}[1]{%
+ \ensuremath{%
+ \edef\@itcode{\itdefault}%
+ \edef\@slcode{\sldefault}%
+ \edef\@sfcode{\sfdefault}%
+ \edef\@upcode{\updefault}%
+ \edef\@bfcode{\bfdefault}%
+ %
+ \ifx\f@family\@sfcode%
+ % \ifx\f@shape\@itcode%
+ % \ifx\f@series\@bfcode\bm{\mathsfit{#1}}\else\mathsfit{#1}\fi%
+ % \fi%
+ % \ifx\f@shape\@slcode%
+ % \mathsfit{#1}%
+ % \fi%
+ % \ifx\f@shape\@upcode%
+ % \mathsfup{#1}%
+ % \fi%
+%
+ % \ifx\f@series\@bfcode\mathbfsf{#1}\else\mathsfit{#1}\fi%
+%
+ \mathsfit{#1}%
+ \else%
+ % \ifx\f@shape\@itcode%
+ % \mathit{#1}%
+ % \fi%
+ % \ifx\f@shape\@slcode%
+ % \mathit{#1}%
+ % \fi%
+ % \ifx\f@shape\@upcode%
+ % {#1}%
+ % \fi%
+%
+ % \ifx\f@series\@bfcode\bm{\mathit{#1}}\else\mathit{#1}\fi%
+%
+ \mathit{#1}%
+ \fi%
+ }%
+}
+
+
+%% Concrete particle style (normal style with upright and forced italic handling)
+\DeclareRobustCommand{\@HepConStyle}[1]{%
+ \ensuremath{%
+ \edef\@itcode{\itdefault}%
+ \edef\@slcode{\sldefault}%
+ \edef\@sfcode{\sfdefault}%
+ \edef\@upcode{\updefault}%
+ %
+ \ifx\f@family\@sfcode%
+ \ifx\f@shape\@itcode%
+ \mathsfit{#1}%
+ \fi%
+ \ifx\f@shape\@slcode%
+ \mathsfit{#1}%
+ \fi%
+ \ifx\f@shape\@upcode%
+ \mathsfup{#1}% <--- difference from gen style
+ \fi%
+ \else%
+ \ifx\f@shape\@itcode%
+ \mathit{#1}%
+ \fi%
+ \ifx\f@shape\@slcode%
+ \mathit{#1}%
+ \fi%
+ \ifx\f@shape\@upcode%
+ \mathup{#1}% <--- difference from gen style
+ \fi%
+ \fi%
+ }%
+}
+
+
+%% -----------------------------------------------------------------------
+%% Conditional horizontal shifting and kerning for sub/superscripts
+%% -----------------------------------------------------------------------
+
+\DeclareRobustCommand{\@itmkern}[1]{%
+ \ensuremath{%
+ \edef\@itcode{\itdefault}%
+ \edef\@slcode{\sldefault}%
+ %
+ \ifx\f@shape\@itcode%
+ \mkern#1%
+ \fi%
+ \ifx\f@shape\@slcode%
+ \mkern#1%
+ \fi%
+ }%
+}
+
+\DeclareRobustCommand{\@itsfshift}[2]{%
+ \ensuremath{%
+ \edef\@itcode{\itdefault}%
+ \edef\@slcode{\sldefault}%
+ \edef\@sfcode{\sfdefault}%
+ \edef\@upcode{\updefault}%
+ \edef\@bfcode{\bfdefault}%
+ %
+ \ifx\f@family\@sfcode%
+ \ifx\f@shape\@itcode%
+ \mspace{#2}
+ \fi%
+ \ifx\f@shape\@slcode%
+ \mspace{#2}%
+ \fi%
+ \ifx\f@shape\@upcode%
+ \relax%
+ \fi%
+ \else%
+ \ifx\f@shape\@itcode%
+ \mspace{#1}
+ \fi%
+ \ifx\f@shape\@slcode%
+ \mspace{#1}
+ \fi%
+ \ifx\f@shape\@upcode%
+ \relax%
+ \fi%
+ \fi%
+ }%
+}
+
+\DeclareRobustCommand{\@sfshift}[2]{%
+ \ensuremath{%
+ \edef\@sfcode{\sfdefault}%
+ %
+ \ifx\f@family\@sfcode%
+ \mspace{#2}
+ \else%
+ \mspace{#1}
+ \fi%
+ }%
+}
+
+
+%% -----------------------------------------------------------------------
+%% Public commands for particle typesetting
+%% -----------------------------------------------------------------------
+
+%% For generic particles like "lepton", "quark" etc (no upright font)
+\def\@shiftlen@norm@gen@rmsub{-3mu}
+\def\@shiftlen@norm@gen@sfsub{-2mu}
+\def\@shiftlen@norm@gen@rmsup{-1mu}
+\def\@shiftlen@norm@gen@sfsup{0mu}
+%
+\DeclareRobustCommand{\HepGenParticle}[3]{%
+ \@HepGenStyle{{#1}{}%
+ _{\@sfshift{\@shiftlen@norm@gen@rmsub}{\@shiftlen@norm@gen@sfsub}\scriptstyle{#2}}%
+ ^{\@sfshift{\@shiftlen@norm@gen@rmsup}{\@shiftlen@norm@gen@sfsup}\scriptstyle{#3}}}%
+}
+
+%% For generic antiparticles
+\def\@shiftlen@anti@gen@bar{4mu}
+\def\@shiftlen@anti@gen@rmsub{-2mu}
+\def\@shiftlen@anti@gen@sfsub{-1mu}
+\def\@shiftlen@anti@gen@rmsup{0mu}
+\def\@shiftlen@anti@gen@sfsup{1mu}
+%
+\DeclareRobustCommand{\HepGenAntiParticle}[3]{%
+ \@HepGenStyle{{\mkern\@shiftlen@anti@gen@bar\overline{\mkern-\@shiftlen@anti@gen@bar{#1}}}{}%
+ _{\@sfshift{\@shiftlen@anti@gen@rmsub}{\@shiftlen@anti@gen@sfsub}\scriptstyle{#2}}%
+ ^{\@sfshift{\@shiftlen@anti@gen@rmsup}{\@shiftlen@anti@gen@sfsup}\scriptstyle{#3}}}%
+}
+
+%% For generic SUSY particles e.g. slepton, squark
+% cm/lmodern
+\def\@shiftlen@susy@gen@til{2mu}
+\def\@shiftlen@susy@gen@rmsub{-2.5mu}
+\def\@shiftlen@susy@gen@sfsub{-2mu}
+\def\@shiftlen@susy@gen@rmsup{-0.5mu}
+\def\@shiftlen@susy@gen@sfsup{0mu}
+% mathpazo
+% \def\@shiftlen@susy@gen@til{2mu}
+% \def\@shiftlen@susy@gen@rmsub{-1.5mu}
+% \def\@shiftlen@susy@gen@sfsub{-2mu}
+% \def\@shiftlen@susy@gen@rmsup{0.5mu}
+% \def\@shiftlen@susy@gen@sfsup{0mu}
+%
+\DeclareRobustCommand{\HepGenSusyParticle}[3]{%
+ \@HepGenStyle{{\mkern\@shiftlen@susy@gen@til\widetilde{\mkern-\@shiftlen@susy@gen@til{#1}}}{}%
+ _{\@sfshift{\@shiftlen@susy@gen@rmsub}{\@shiftlen@susy@gen@sfsub}\scriptstyle{#2}}%
+ ^{\@sfshift{\@shiftlen@susy@gen@rmsup}{\@shiftlen@susy@gen@sfsup}\scriptstyle{#3}}}%
+}
+
+%% For generic SUSY anti-particles e.g. slepton, squark
+% cm/lmodern
+\def\@shiftlen@antisusy@gen@bar{3.5mu}
+\def\@shiftlen@antisusy@gen@til{2mu}
+\def\@shiftlen@antisusy@gen@rmsub{-4mu}
+\def\@shiftlen@antisusy@gen@sfsub{-3mu}
+\def\@shiftlen@antisusy@gen@rmsup{-2mu}
+\def\@shiftlen@antisusy@gen@sfsup{0mu}
+% mathpazo
+% \def\@shiftlen@antisusy@gen@bar{3.5mu}
+% \def\@shiftlen@antisusy@gen@til{2mu}
+% \def\@shiftlen@antisusy@gen@rmsub{-2mu}
+% \def\@shiftlen@antisusy@gen@sfsub{-3mu}
+% \def\@shiftlen@antisusy@gen@rmsup{0.7mu}
+% \def\@shiftlen@antisusy@gen@sfsup{0mu}
+%
+\DeclareRobustCommand{\HepGenSusyAntiParticle}[3]{%
+ %\@HepGenStyle{{\mkern3.5mu\overline{\mkern-1.5mu\widetilde{\mkern-2mu{#1}}}}{}%
+ \@HepGenStyle{{\mkern\@shiftlen@antisusy@gen@bar\overline{\mkern-\@shiftlen@antisusy@gen@bar\mkern\@shiftlen@antisusy@gen@til\widetilde{\mkern-\@shiftlen@antisusy@gen@til{#1}}}}{}%
+ _{\@sfshift{\@shiftlen@antisusy@gen@rmsub}{\@shiftlen@antisusy@gen@sfsub}\scriptstyle{#2}}%
+ ^{\@sfshift{\@shiftlen@antisusy@gen@rmsup}{\@shiftlen@antisusy@gen@sfsup}\scriptstyle{#3}}}%
+}
+
+
+
+%% For concrete HEP particle names like "B", "J/psi" etc
+% cm/lmodern
+\def\@shiftlen@norm@con@rmsub{-2mu}
+\def\@shiftlen@norm@con@sfsub{-1.5mu}
+\def\@shiftlen@norm@con@rmsup{0mu}
+\def\@shiftlen@norm@con@sfsup{0mu}
+% mathpazo
+% \def\@shiftlen@norm@con@rmsub{-3mu}
+% \def\@shiftlen@norm@con@sfsub{-2mu}
+% \def\@shiftlen@norm@con@rmsup{-1mu}
+% \def\@shiftlen@norm@con@sfsup{0mu}
+%
+\DeclareRobustCommand{\HepParticle}[3]{%
+ \ifx\@italicNames\@empty%
+ \@HepConStyle{{{#1}}{}%
+ _{\@itsfshift{\@shiftlen@norm@con@rmsub}{\@shiftlen@norm@con@sfsub}\scriptstyle{#2}}%
+ ^{\@itsfshift{\@shiftlen@norm@con@rmsup}{\@shiftlen@norm@con@sfsup}\scriptstyle{#3}}}%
+ \else%
+ \HepGenParticle{#1}{#2}{#3}%
+ \fi%
+}
+
+%% For concrete antiparticles
+\def\@shiftlen@anti@con@bar{3.5mu}
+\def\@shiftlen@anti@con@rmsub{-3mu}
+\def\@shiftlen@anti@con@sfsub{-3mu}
+\def\@shiftlen@anti@con@rmsup{1mu}
+\def\@shiftlen@anti@con@sfsup{1mu}
+%
+\DeclareRobustCommand{\HepAntiParticle}[3]{%
+ \ifx\@italicNames\@empty%
+ \@HepConStyle{{\@itmkern{\@shiftlen@anti@con@bar}\overline{\@itmkern{-\@shiftlen@anti@con@bar}{#1}}}{}%
+ _{\@itsfshift{\@shiftlen@anti@con@rmsub}{\@shiftlen@anti@con@sfsub}\scriptstyle{#2}}%
+ ^{\@itsfshift{\@shiftlen@anti@con@rmsup}{\@shiftlen@anti@con@sfsup}\scriptstyle{#3}}}%
+ \else%
+ \HepGenAntiParticle{#1}{#2}{#3}%
+ \fi%
+}
+
+%% For SUSY particles
+% cm/lmodern
+\def\@shiftlen@susy@con@til{2mu}
+\def\@shiftlen@susy@con@rmsub{-3mu}
+\def\@shiftlen@susy@con@sfsub{-3mu}
+\def\@shiftlen@susy@con@rmsup{0mu}
+\def\@shiftlen@susy@con@sfsup{0mu}
+% mathpazo
+% \def\@shiftlen@susy@con@til{2mu}
+% \def\@shiftlen@susy@con@rmsub{-1mu}
+% \def\@shiftlen@susy@con@sfsub{-2mu}
+% \def\@shiftlen@susy@con@rmsup{1mu}
+% \def\@shiftlen@susy@con@sfsup{0.5mu}
+%
+\DeclareRobustCommand{\HepSusyParticle}[3]{%
+ \ifx\@italicNames\@empty%
+ \@HepConStyle{{\@itmkern{\@shiftlen@susy@con@til}\widetilde{\@itmkern{-\@shiftlen@susy@con@til}{#1}}}{}%
+ _{\@itsfshift{\@shiftlen@susy@con@rmsub}{\@shiftlen@susy@con@sfsub}\scriptstyle{#2}}%
+ ^{\@itsfshift{\@shiftlen@susy@con@rmsup}{\@shiftlen@susy@con@sfsup}\scriptstyle{#3}}}%
+ \else%
+ \HepGenSusyParticle{#1}{#2}{#3}%
+ \fi%
+}
+
+%% For SUSY anti-particles
+% cm/lmodern
+\def\@shiftlen@antisusy@con@bar{3.5mu}
+\def\@shiftlen@antisusy@con@til{2mu}
+\def\@shiftlen@antisusy@con@rmsub{-2.5mu}
+\def\@shiftlen@antisusy@con@sfsub{-2mu}
+\def\@shiftlen@antisusy@con@rmsup{0mu}
+\def\@shiftlen@antisusy@con@sfsup{0mu}
+% mathpazo
+% \def\@shiftlen@antisusy@con@bar{3.5mu}
+% \def\@shiftlen@antisusy@con@til{2mu}
+% \def\@shiftlen@antisusy@con@rmsub{-2.5mu}
+% \def\@shiftlen@antisusy@con@sfsub{-3mu}
+% \def\@shiftlen@antisusy@con@rmsup{0mu}
+% \def\@shiftlen@antisusy@con@sfsup{0mu}
+%
+\DeclareRobustCommand{\HepSusyAntiParticle}[3]{%
+ \ifx\@italicNames\@empty%
+ \@HepConStyle{{\@itmkern{\@shiftlen@antisusy@con@bar}\overline{\@itmkern{-\@shiftlen@antisusy@con@bar}%
+ \@itmkern{\@shiftlen@antisusy@con@til}\widetilde{\@itmkern{-\@shiftlen@antisusy@con@til}{#1}}}}{}%
+ _{\@itsfshift{\@shiftlen@antisusy@con@rmsub}{\@shiftlen@antisusy@con@sfsub}\scriptstyle{#2}}%
+ ^{\@itsfshift{\@shiftlen@antisusy@con@rmsup}{\@shiftlen@antisusy@con@sfsup}\scriptstyle{#3}}}%
+ \else%
+ \HepGenSusyAntiParticle{#1}{#2}{#3}%
+ \fi%
+}
+
+
+%% Resonances and other such structures. These are actually pretty
+%% complicated since the most general structure has a main particle
+%% term, a mass term and a spectroscopic term: in total 9 possible arguments
+%% if we let each main term have optional following sub- and super-scripts!
+%% The mass and spectroscopic terms seem to be mixed up quite often... *sigh*
+%%
+%% Apologies for the interface changing yet again as I learn how general
+%% these terms can be! Hopefully stable now (touch wood)...
+
+%% For resonance mass specifications like the bracket in "J/psi(1S)"
+\DeclareRobustCommand{\HepResonanceMassTerm}[3]{%
+ \ifx\@italicNames\@empty%
+ \@HepConStyle{{\left({#1}\right)}{}_{#2}^{\scriptstyle{#3}}}%
+ \else%
+ \@HepGenStyle{{\left({#1}\right)}{}_{#2}^{\scriptstyle{#3}}}%
+ \fi%
+}
+
+%% For resonance spectroscopic specifications like the P_11 in "N(1440)P_11"
+\DeclareRobustCommand{\HepResonanceSpecTerm}[3]{%
+ \ifx\@italicNames\@empty%
+ \@HepConStyle{{#1}{}_{#2}^{#3}}%
+ \else%
+ \@HepGenStyle{{#1}{}_{#2}^{#3}}%
+ \fi%
+}
+
+%% For resonances like "J/psi(1S)" (first arg is a whole \HepParticle)
+\DeclareRobustCommand{\HepParticleResonance}[4]{%
+ \ensuremath{%
+ {#1}{\HepResonanceMassTerm{#2}{#3}{#4}}%
+ }%
+}
+
+%% For resonances like "N(1440)P_11" (first arg is a whole \HepParticle)
+\DeclareRobustCommand{\HepParticleResonanceFormal}[7]{%
+ \ensuremath{%
+ {\HepParticleResonance{#1}{#2}{#3}{#4}}\,{\HepResonanceSpecTerm{#5}{#6}{#7}}%
+ }%
+}
+
+%% For resonances like "J/psi(1S)" (all arguments ``spelled out'')
+\DeclareRobustCommand{\HepParticleResonanceFull}[6]{%
+ \HepParticleResonance{\HepParticle{#1}{#2}{#3}}{#4}{#5}{#6}%
+}
+
+%% For resonances like "N(1440)P_11" (all arguments ``spelled out'')
+\DeclareRobustCommand{\HepParticleResonanceFormalFull}[9]{%
+ \HepParticleResonanceFormal{\HepParticle{#1}{#2}{#3}}{#4}{#5}{#6}{#7}{#8}{#9}%
+}
+
+
+%% For typesetting HEP processes with these particle names.
+%% TODO: Help on how to widen the math spacing would be nice: I always
+%% find myself putting \, between particle names to make it look good.
+\let\@HepOldto\to
+\DeclareRobustCommand{\HepProcess}[1]{%
+ \begingroup%
+ \renewcommand{\to}{\mspace{1mu}\@HepOldto\mspace{1mu}}%
+ \ensuremath{#1}%
+ \renewcommand{\to}{\@HepOldto}%
+ \endgroup%
+}
+
+
+%% Typesetting tweaks (-> becomes "to", remove mspace) from hyperref labels in PDFTeX
+%% Thanks to Heiko Oberdiek and Donald Arseneau for assistance via comp.text.tex
+\@ifpackageloaded{hyperref}{
+ \pdfstringdefDisableCommands{%
+ \DeclareRobustCommand{\HepProcess}[1]{#1}
+ \let\mspace\@gobble
+ \def\to{to }%
+ }%
+}{}
diff --git a/macros/latex/contrib/hepparticles/hepparticles.tex b/macros/latex/contrib/hepparticles/hepparticles.tex
new file mode 100644
index 0000000000..354de33cee
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/hepparticles.tex
@@ -0,0 +1,225 @@
+\documentclass[12pt]{article}
+\usepackage{setspace}
+\usepackage{a4wide}
+\usepackage{xspace, amsmath}
+\usepackage{relsize}
+\usepackage{hepparticles}
+\onehalfspacing
+
+\newcommand{\hepparticles}{\texttt{hepparticles}\xspace}
+\author{Andy Buckley, \texttt{andy@insectnation.org}}
+\title{The \hepparticles package for \LaTeX\\ \smaller[2] Describing \hepparticles version 2.0}
+
+\begin{document}
+\maketitle
+
+\begin{abstract}
+ This package provides macros for typesetting high energy physics particle
+ names in a consistent, semantic and aesthetically pleasing manner, as well as
+ fixing problems with math-mode boldness problems in section titles. You may
+ also be interested in the \texttt{heppennames} and \texttt{hepnicenames}
+ packages, which
+ use this one to provide a large set of pre-existing particle names.\\
+ This document describes version 2.0, which significantly improves the output
+ quality over versions 1.x, removes several macros \& package options, and
+ changes dependencies.
+\end{abstract}
+
+\section{Motivation}
+Typesetting the names of high-energy fundamental particles (and their elementary
+composites) is well-defined by a set of rules:
+
+\begin{itemize}
+\item The basic particle name consists of a large Roman or Greek symbol with
+ optional following sub- and super-scripts.
+\item Depending on convention, the symbols for particles are either italic or
+ upright. Using the latter convention, the symbols should be upright when
+ describing a specific particle; if describing a generic class of particles
+ they should be italicised (where possible). In italic and bold contexts the
+ symbols should adapt by becoming bold and italic themselves where possible.
+\item Anti-particles are written with a bar on top of the main symbol (but for
+ aesthetic reasons the bar does not extend above the sub- and super-scripts.
+\item Supersymmetric partners of Standard Model particles are written as for
+ anti-particles but with a tilde in place of the bar. SUSY anti-particles
+ (though the use of symbols to represent them is currently uncommon) may be
+ written with a bar above the tilde.
+\item Resonant states may sport an extra resonance specifier consisting of a
+ value in parentheses and optional following sub- and super-scripts. This
+ follows the main particle name.
+\end{itemize}
+
+Several issues arise when typesetting these particle names in standard \LaTeX{}:
+for starters the requirement of sub- and super-scripts and the need to use Greek
+symbols forces us into math mode. But math mode does not usually follow the
+surrounding text context for boldness and italicism: this has been fixed in this
+specific case by use of the \texttt{maybemath} package. Secondly, the positions
+of super-scripts with overlines and tildes are affected: this is also corrected
+by this package. By request, the particle typesetting conventions may be
+specified as a package option. All the \hepparticles commands may be used either
+in or out of math mode.
+
+
+\section{Commands}
+% The commands available are divided into two groups: those which provide
+% appropriate typeset output for a given semantic description and those which are
+% purely designed to implement that typesetting, several of which are exposed to
+% public use for convenience.
+
+% \subsection{Semantic commands}
+\begin{itemize}
+\item For generic particle names e.g. all positively charged leptons:\\
+\texttt{$\backslash{}$HepGenParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
+\texttt{$\backslash{}$HepGenAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}
+
+\item For concrete particle names:\\
+\texttt{$\backslash{}$HepParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
+\texttt{$\backslash{}$HepAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}
+
+\item For supersymmetric ``sparticles'':\\
+\texttt{$\backslash{}$HepGenSusyParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
+\texttt{$\backslash{}$HepSusyParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
+\texttt{$\backslash{}$HepGenSusyAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
+\texttt{$\backslash{}$HepSusyAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}
+
+\item For resonance specifiers (just the extra terms):\\
+\texttt{$\backslash{}$HepResonanceMassTerm\{\textit{mainterm}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
+\texttt{$\backslash{}$HepResonanceSpecTerm\{\textit{mainterm}\}\{\textit{subscript}\}\{\textit{superscript}\}}
+
+\item For a full particle name and resonance specification:\\
+ \texttt{$\backslash{}$HepParticleResonance\{\textit{name}\}\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}}\\
+ \texttt{$\backslash{}$HepParticleResonanceFull\{\textit{main}\}\{\textit{sub}\}\{\textit{sup}\}\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}}\\
+ \texttt{$\backslash{}$HepParticleResonanceFormal\{\textit{name}\}$\backslash{}$\\\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}\{\textit{spec}\}\{\textit{specSub}\}\{\textit{specSup}\}}\\
+ \texttt{$\backslash{}$HepParticleResonanceFormalFull\{\textit{main}\}\{\textit{sub}\}\{\textit{sup}\}$\backslash{}$\\\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}\{\textit{spec}\}\{\textit{specSub}\}\{\textit{specSup}\}}\\
+ (hurrah, we hit the \TeX{} 9-argument limit!)
+
+\item And finally, for containing processes describing particle evolution:\\
+ \texttt{$\backslash{}$HepProcess\{\textit{iParticles} $\backslash$to \textit{fParticles}\}}.\\
+\end{itemize}
+
+% \vspace{-0.5em}
+
+\noindent These commands respectively typeset particle names like this:\\[-1ex]
+\begin{itemize}
+\item Normal particles: \HepParticle{B}{d}{0}, \HepAntiParticle{B}{d}{0}
+\item Generic particles: \HepGenParticle{q}{d}{}, \HepGenAntiParticle{\ell}{\mu}{}
+\item SUSY particles: \HepSusyParticle{\chi}{1}{}, \HepGenSusyParticle{q}{2}{}
+\item Resonances: \HepParticleResonance{J\!/\psi}{1S}{}{\star}
+\item Process: \HepProcess{\HepParticle{B}{d}{0} \to \HepParticle{K}{}{-} \HepParticle{\pi}{}{+}}.
+\end{itemize}
+
+
+% \subsection{Primitive commands}
+% A primitive command, \texttt{$\backslash{}$HepParticleStruct}, is provided for
+% typesetting particle-like structures with a main term and super and sub-scripts
+% with appropriate automatic changing of the text style into bold, italic and
+% upright fonts. It also accounts for most vertical spacing problems in the sub-
+% and super-scripts, largely due to empty script boxes. In addition, three
+% ``styles'': the wrapper macros that apply appropriate text styling are available
+% publicly. The implementation of the semantic commands is built round
+% conditionally using these styles within the structure macro.
+
+% These macros can be used for implementing particle-like structures with custom
+% requirements and it's advised that you take a look at the internals of
+% \texttt{hepparticles.sty} if you're planning on using them.
+
+% \begin{itemize}
+% \item Style which only applies conditional boldness:\\
+% \texttt{$\backslash{}$HepNormStyle\{\textit{text}\}}
+% \item Style appropriate for generic particle names:\\
+% \texttt{$\backslash{}$HepGenStyle\{\textit{text}\}}
+% \item Style appropriate for concrete particle names:\\
+% \texttt{$\backslash{}$HepConStyle\{\textit{text}\}}
+% \item Particle structure:\\
+% \texttt{$\backslash{}$HepParticleStruct\{\textit{main}\}\{\textit{sub}\}\{\textit{sup}\}}
+% \end{itemize}
+
+\section{Package options}
+By request, the package can typeset particles in italic as well as upright
+convention. The choice of convention can be made when the package is loaded with
+the \texttt{italic} %and \texttt{notitalic}
+option, i.e.\\
+\texttt{$\backslash{}$usepackage[italic]\{hepparticles\}}.
+The default mode is upright. % (i.e. \texttt{notitalic}).
+
+The \texttt{forceit}, \texttt{maybess} and \texttt{noss} options have been removed in version 2.0.
+
+% In addition, the \texttt{forceit} option will force \emph{everything} in particle names
+% to be italic, even if they aren't normally italic in math mode (such as Arabic
+% numerals). Note that the italic font that will appear here is that used by
+% \texttt{$\backslash{}$mathit} and so will appear more script-like than normal
+% math mode. I can't say that I recommend using this option, but it's there for
+% flexibility's sake.
+
+% Finally, a pair of options, \texttt{maybess} and \texttt{noss}, are available:
+% using \texttt{maybess} will allow particle names to be typeset in sans-serif if
+% the surrounding context is sans-serif and \texttt{noss} has the converse effect.
+% Note that since there is no italic sans-serif math font in LaTeX, generic
+% particle names will not be typeset in italic sans font. Maybe this behaviour
+% will change in future if there's lots of enthusiasm for a fix. However, it looks
+% pretty good at the moment and I suspect most people will want sans-serif
+% particle names in sans documents, so \texttt{maybess} is set by default.
+
+
+% \section{Known problems}
+% Since this package messes around quite a bit with the sub- and super-scripts,
+% not everything you might want to do can be done. Sorry\dots
+
+% \begin{itemize}
+% \item To make the macros a bit ``safer'', the output is wrapped in a pair of
+% braces --- i.e. it's intended as a packaged unit. Hence you can't add new
+% indices using math mode scripting\dots this example hopefully illustrates what
+% I mean in that it doesn't accomplish the intended effect of placing the $i$
+% subscript directly underneath the \HepParticle{B}{}{} meson superscript.\\
+% \texttt{\$$\backslash{}$HepParticle\{B\}\{\}\{+\}\_i\$} $\quad \Rightarrow
+% \quad \HepParticle{B}{}{+}_i$ \\
+% I don't consider this a problem --- the package structures already manoeuver
+% the vertical positioning of the scripts so much that compliance with
+% externally applied indices is pretty much guaranteed not to happen. If you
+% want this sort of effect then you should use the
+% \texttt{$\backslash{}$HepParticleStruct} macro.
+% \item When putting particle names in sub or superscripts it's a good idea to
+% wrap them in braces. I'd like to be able to avoid this requirement but
+% wrapping everything in braces, despite removing compile errors, hasn't done
+% the trick of actually making the sub/sup-script work as intended. Please let
+% me know how to do it, should the answer spring to mind\dots
+% \end{itemize}
+
+
+
+\section{Installation}
+\textbf{Requirements:} You will need to be using a \LaTeXe{} system to use
+\hepparticles. Hopefully this isn't a problem --- I wasn't feeling up to writing
+a Plain \TeX{} version! \hepparticles 2.0 requires the \texttt{subdepth} package.
+% In addition, you'll need the \texttt{maybemath} package
+% (get a recent version: the first release has bugs which were only discovered
+% when writing the 1.4 version of this package).
+
+To install, simply copy the \texttt{hepparticles.sty} file into a location in
+your \texttt{LATEXINPUTS} path. Tada!
+
+
+\section{Credit where it's due\dots}
+Thanks to Viet-Trung Luu for providing the initial ``way forward'' when writing
+this package: his solution, in expanded form, made its way into what is now
+the \texttt{maybemath} package. Thanks also to Heiko Oberdiek and Donald Arseneau
+for showing how to stop the \texttt{$\backslash{}$mspace}s from turning up in PDF
+bookmarks generated by \texttt{hyperref}. Philip Ratcliffe provided the hack
+that moves over-lines slightly to the right for use with italic particle symbols.
+In version 2.0 I owe a great deal to the subdepth package
+
+
+\vspace{2cm}
+\begin{center}
+\noindent \textbf{Any feedback is appreciated! Email to \texttt{andy@insectnation.org}, please.}
+\end{center}
+
+% In particular, robust solutions for the following would be extremely useful:
+
+% \begin{itemize}
+% \item Upright Greek lower case letters (without using e.g. \texttt{pxfonts})
+% \item Slightly increase horizontal spacing between particles in
+% \texttt{$\backslash{}$HepProcess} (at present, \texttt{$\backslash{}$,} ends
+% up getting used a lot to keep different particles apart)
+% \end{itemize}
+
+\end{document}
diff --git a/macros/latex/contrib/hepparticles/testhepparticles.pdf b/macros/latex/contrib/hepparticles/testhepparticles.pdf
new file mode 100644
index 0000000000..fbabcfa9e0
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/testhepparticles.pdf
Binary files differ
diff --git a/macros/latex/contrib/hepparticles/testhepparticles.tex b/macros/latex/contrib/hepparticles/testhepparticles.tex
new file mode 100644
index 0000000000..b137dece75
--- /dev/null
+++ b/macros/latex/contrib/hepparticles/testhepparticles.tex
@@ -0,0 +1,190 @@
+\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}