Debian Codegraph @

texmf-dist/doc/latex/hepparticles/hepparticles.tex

raw
1 \documentclass[12pt]{article}
2 \usepackage{setspace}
3 \usepackage{a4wide}
4 \usepackage{xspace, amsmath}
5 \usepackage{relsize}
6 \usepackage{hepparticles}
7 \onehalfspacing
8
9 \newcommand{\hepparticles}{\texttt{hepparticles}\xspace}
10 \author{Andy Buckley, \texttt{[email protected]}}
11 \title{The \hepparticles package for \LaTeX\\ \smaller[2] Describing \hepparticles version 2.0}
12
13 \begin{document}
14 \maketitle
15
16 \begin{abstract}
17 This package provides macros for typesetting high energy physics particle
18 names in a consistent, semantic and aesthetically pleasing manner, as well as
19 fixing problems with math-mode boldness problems in section titles. You may
20 also be interested in the \texttt{heppennames} and \texttt{hepnicenames}
21 packages, which
22 use this one to provide a large set of pre-existing particle names.\\
23 This document describes version 2.0, which significantly improves the output
24 quality over versions 1.x, removes several macros \& package options, and
25 changes dependencies.
26 \end{abstract}
27
28 \section{Motivation}
29 Typesetting the names of high-energy fundamental particles (and their elementary
30 composites) is well-defined by a set of rules:
31
32 \begin{itemize}
33 \item The basic particle name consists of a large Roman or Greek symbol with
34 optional following sub- and super-scripts.
35 \item Depending on convention, the symbols for particles are either italic or
36 upright. Using the latter convention, the symbols should be upright when
37 describing a specific particle; if describing a generic class of particles
38 they should be italicised (where possible). In italic and bold contexts the
39 symbols should adapt by becoming bold and italic themselves where possible.
40 \item Anti-particles are written with a bar on top of the main symbol (but for
41 aesthetic reasons the bar does not extend above the sub- and super-scripts.
42 \item Supersymmetric partners of Standard Model particles are written as for
43 anti-particles but with a tilde in place of the bar. SUSY anti-particles
44 (though the use of symbols to represent them is currently uncommon) may be
45 written with a bar above the tilde.
46 \item Resonant states may sport an extra resonance specifier consisting of a
47 value in parentheses and optional following sub- and super-scripts. This
48 follows the main particle name.
49 \end{itemize}
50
51 Several issues arise when typesetting these particle names in standard \LaTeX{}:
52 for starters the requirement of sub- and super-scripts and the need to use Greek
53 symbols forces us into math mode. But math mode does not usually follow the
54 surrounding text context for boldness and italicism: this has been fixed in this
55 specific case by use of the \texttt{maybemath} package. Secondly, the positions
56 of super-scripts with overlines and tildes are affected: this is also corrected
57 by this package. By request, the particle typesetting conventions may be
58 specified as a package option. All the \hepparticles commands may be used either
59 in or out of math mode.
60
61
62 \section{Commands}
63 % The commands available are divided into two groups: those which provide
64 % appropriate typeset output for a given semantic description and those which are
65 % purely designed to implement that typesetting, several of which are exposed to
66 % public use for convenience.
67
68 % \subsection{Semantic commands}
69 \begin{itemize}
70 \item For generic particle names e.g. all positively charged leptons:\\
71 \texttt{$\backslash{}$HepGenParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
72 \texttt{$\backslash{}$HepGenAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}
73
74 \item For concrete particle names:\\
75 \texttt{$\backslash{}$HepParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
76 \texttt{$\backslash{}$HepAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}
77
78 \item For supersymmetric ``sparticles'':\\
79 \texttt{$\backslash{}$HepGenSusyParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
80 \texttt{$\backslash{}$HepSusyParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
81 \texttt{$\backslash{}$HepGenSusyAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
82 \texttt{$\backslash{}$HepSusyAntiParticle\{\textit{main}\}\{\textit{subscript}\}\{\textit{superscript}\}}
83
84 \item For resonance specifiers (just the extra terms):\\
85 \texttt{$\backslash{}$HepResonanceMassTerm\{\textit{mainterm}\}\{\textit{subscript}\}\{\textit{superscript}\}}\\
86 \texttt{$\backslash{}$HepResonanceSpecTerm\{\textit{mainterm}\}\{\textit{subscript}\}\{\textit{superscript}\}}
87
88 \item For a full particle name and resonance specification:\\
89 \texttt{$\backslash{}$HepParticleResonance\{\textit{name}\}\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}}\\
90 \texttt{$\backslash{}$HepParticleResonanceFull\{\textit{main}\}\{\textit{sub}\}\{\textit{sup}\}\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}}\\
91 \texttt{$\backslash{}$HepParticleResonanceFormal\{\textit{name}\}$\backslash{}$\\\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}\{\textit{spec}\}\{\textit{specSub}\}\{\textit{specSup}\}}\\
92 \texttt{$\backslash{}$HepParticleResonanceFormalFull\{\textit{main}\}\{\textit{sub}\}\{\textit{sup}\}$\backslash{}$\\\{\textit{mass}\}\{\textit{massSub}\}\{\textit{massSup}\}\{\textit{spec}\}\{\textit{specSub}\}\{\textit{specSup}\}}\\
93 (hurrah, we hit the \TeX{} 9-argument limit!)
94
95 \item And finally, for containing processes describing particle evolution:\\
96 \texttt{$\backslash{}$HepProcess\{\textit{iParticles} $\backslash$to \textit{fParticles}\}}.\\
97 \end{itemize}
98
99 % \vspace{-0.5em}
100
101 \noindent These commands respectively typeset particle names like this:\\[-1ex]
102 \begin{itemize}
103 \item Normal particles: \HepParticle{B}{d}{0}, \HepAntiParticle{B}{d}{0}
104 \item Generic particles: \HepGenParticle{q}{d}{}, \HepGenAntiParticle{\ell}{\mu}{}
105 \item SUSY particles: \HepSusyParticle{\chi}{1}{}, \HepGenSusyParticle{q}{2}{}
106 \item Resonances: \HepParticleResonance{J\!/\psi}{1S}{}{\star}
107 \item Process: \HepProcess{\HepParticle{B}{d}{0} \to \HepParticle{K}{}{-} \HepParticle{\pi}{}{+}}.
108 \end{itemize}
109
110
111 % \subsection{Primitive commands}
112 % A primitive command, \texttt{$\backslash{}$HepParticleStruct}, is provided for
113 % typesetting particle-like structures with a main term and super and sub-scripts
114 % with appropriate automatic changing of the text style into bold, italic and
115 % upright fonts. It also accounts for most vertical spacing problems in the sub-
116 % and super-scripts, largely due to empty script boxes. In addition, three
117 % ``styles'': the wrapper macros that apply appropriate text styling are available
118 % publicly. The implementation of the semantic commands is built round
119 % conditionally using these styles within the structure macro.
120
121 % These macros can be used for implementing particle-like structures with custom
122 % requirements and it's advised that you take a look at the internals of
123 % \texttt{hepparticles.sty} if you're planning on using them.
124
125 % \begin{itemize}
126 % \item Style which only applies conditional boldness:\\
127 % \texttt{$\backslash{}$HepNormStyle\{\textit{text}\}}
128 % \item Style appropriate for generic particle names:\\
129 % \texttt{$\backslash{}$HepGenStyle\{\textit{text}\}}
130 % \item Style appropriate for concrete particle names:\\
131 % \texttt{$\backslash{}$HepConStyle\{\textit{text}\}}
132 % \item Particle structure:\\
133 % \texttt{$\backslash{}$HepParticleStruct\{\textit{main}\}\{\textit{sub}\}\{\textit{sup}\}}
134 % \end{itemize}
135
136 \section{Package options}
137 By request, the package can typeset particles in italic as well as upright
138 convention. The choice of convention can be made when the package is loaded with
139 the \texttt{italic} %and \texttt{notitalic}
140 option, i.e.\\
141 \texttt{$\backslash{}$usepackage[italic]\{hepparticles\}}.
142 The default mode is upright. % (i.e. \texttt{notitalic}).
143
144 The \texttt{forceit}, \texttt{maybess} and \texttt{noss} options have been removed in version 2.0.
145
146 % In addition, the \texttt{forceit} option will force \emph{everything} in particle names
147 % to be italic, even if they aren't normally italic in math mode (such as Arabic
148 % numerals). Note that the italic font that will appear here is that used by
149 % \texttt{$\backslash{}$mathit} and so will appear more script-like than normal
150 % math mode. I can't say that I recommend using this option, but it's there for
151 % flexibility's sake.
152
153 % Finally, a pair of options, \texttt{maybess} and \texttt{noss}, are available:
154 % using \texttt{maybess} will allow particle names to be typeset in sans-serif if
155 % the surrounding context is sans-serif and \texttt{noss} has the converse effect.
156 % Note that since there is no italic sans-serif math font in LaTeX, generic
157 % particle names will not be typeset in italic sans font. Maybe this behaviour
158 % will change in future if there's lots of enthusiasm for a fix. However, it looks
159 % pretty good at the moment and I suspect most people will want sans-serif
160 % particle names in sans documents, so \texttt{maybess} is set by default.
161
162
163 % \section{Known problems}
164 % Since this package messes around quite a bit with the sub- and super-scripts,
165 % not everything you might want to do can be done. Sorry\dots
166
167 % \begin{itemize}
168 % \item To make the macros a bit ``safer'', the output is wrapped in a pair of
169 % braces --- i.e. it's intended as a packaged unit. Hence you can't add new
170 % indices using math mode scripting\dots this example hopefully illustrates what
171 % I mean in that it doesn't accomplish the intended effect of placing the $i$
172 % subscript directly underneath the \HepParticle{B}{}{} meson superscript.\\
173 % \texttt{\$$\backslash{}$HepParticle\{B\}\{\}\{+\}\_i\$} $\quad \Rightarrow
174 % \quad \HepParticle{B}{}{+}_i$ \\
175 % I don't consider this a problem --- the package structures already manoeuver
176 % the vertical positioning of the scripts so much that compliance with
177 % externally applied indices is pretty much guaranteed not to happen. If you
178 % want this sort of effect then you should use the
179 % \texttt{$\backslash{}$HepParticleStruct} macro.
180 % \item When putting particle names in sub or superscripts it's a good idea to
181 % wrap them in braces. I'd like to be able to avoid this requirement but
182 % wrapping everything in braces, despite removing compile errors, hasn't done
183 % the trick of actually making the sub/sup-script work as intended. Please let
184 % me know how to do it, should the answer spring to mind\dots
185 % \end{itemize}
186
187
188
189 \section{Installation}
190 \textbf{Requirements:} You will need to be using a \LaTeXe{} system to use
191 \hepparticles. Hopefully this isn't a problem --- I wasn't feeling up to writing
192 a Plain \TeX{} version! \hepparticles 2.0 requires the \texttt{subdepth} package.
193 % In addition, you'll need the \texttt{maybemath} package
194 % (get a recent version: the first release has bugs which were only discovered
195 % when writing the 1.4 version of this package).
196
197 To install, simply copy the \texttt{hepparticles.sty} file into a location in
198 your \texttt{LATEXINPUTS} path. Tada!
199
200
201 \section{Credit where it's due\dots}
202 Thanks to Viet-Trung Luu for providing the initial ``way forward'' when writing
203 this package: his solution, in expanded form, made its way into what is now
204 the \texttt{maybemath} package. Thanks also to Heiko Oberdiek and Donald Arseneau
205 for showing how to stop the \texttt{$\backslash{}$mspace}s from turning up in PDF
206 bookmarks generated by \texttt{hyperref}. Philip Ratcliffe provided the hack
207 that moves over-lines slightly to the right for use with italic particle symbols.
208 In version 2.0 I owe a great deal to the subdepth package
209
210
211 \vspace{2cm}
212 \begin{center}
213 \noindent \textbf{Any feedback is appreciated! Email to \texttt{[email protected]}, please.}
214 \end{center}
215
216 % In particular, robust solutions for the following would be extremely useful:
217
218 % \begin{itemize}
219 % \item Upright Greek lower case letters (without using e.g. \texttt{pxfonts})
220 % \item Slightly increase horizontal spacing between particles in
221 % \texttt{$\backslash{}$HepProcess} (at present, \texttt{$\backslash{}$,} ends
222 % up getting used a lot to keep different particles apart)
223 % \end{itemize}
224
225 \end{document}