What's the most elegant way to obtain Dirac operators? (slash notation)

Does

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{slashed}
\begin{document}
$\slashed{p}$
\end{document}

give what you want?

enter image description here


In addition to mas's answer, you could define your own using an overlap (in mathmode) of the \not operator:

\documentclass[12pt]{article}
\usepackage{mathtools}% http://ctan.org/pkg/mathtools
\newcommand{\fsl}[1]{\ensuremath{\mathrlap{\!\not{\phantom{#1}}}#1}}% \fsl{<symbol>}
\begin{document}
\noindent $\not{a}\not{b}=4(a\cdot b)$

\noindent $\fsl{a}\fsl{b}=4(a\cdot b)$
\end{document}

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​Slash operator

Of course this works best for single-symbol/letter slashing. I think this is more commonly referred to as Feynman slash notation.


Small tip to enter the Dirac slash:

k\!\!\!/ = \gamma^\mu k_\mu

Tags:

Math Mode