17

As the title suggests, how do I draw a $\partial$ with a diagonal line through it?

3
  • 1
    Do you mean slashed like in quantum field theory? If so, then have a look at this question.
    – JP-Ellis
    Nov 9, 2015 at 0:15
  • 2
    Are you perhaps looking for an eth ð? This isn't a \partial with a line through it, but there is the \eth command available with amssymb or there's the \dh command if you use T1 fonts. Or you can simply use XeTeX and use a font which contains the symbol
    – Au101
    Nov 9, 2015 at 0:15
  • Welcome to TeX.SE!
    – Mico
    Nov 9, 2015 at 17:47

5 Answers 5

23

Like this?

enter image description here

\documentclass{article}
\usepackage{slashed}
\begin{document}
$\partial\kern-0.5em\raise0.22ex\hbox{/}$ or $\slashed{\partial}$
\end{document}
1
  • 1
    As one working in qft this is the one I prefer due to its simplicity
    – Triatticus
    Nov 10, 2015 at 5:32
14

A variation of \centernot (the slash needs to be raised a bit):

\documentclass{article}

\newcommand{\npartial}{{%
  \mathpalette\raisenot\partial
}}

\makeatletter
\newcommand{\raisenot}[2]{%
  \raise.4\fontdimen22
    \ifx#1\displaystyle
      \textfont2
    \else
      \ifx#1\textstyle
        \textfont2
      \else
        \ifx#1\scriptstyle
          \scriptfont2
        \else
          \scriptscriptfont2
        \fi
      \fi
    \fi
    \rlap{%
    \settowidth\dimen@{$\m@th#1{#2}$}%
    \kern.5\dimen@
    \settowidth\dimen@{$\m@th#1=$}%
    \kern-.5\dimen@
    $\m@th#1\not$%
  }%
  {#2}%
}
\makeatother

\begin{document}
\[
\npartial A_{\npartial_{\npartial}}
\]
\end{document}

enter image description here

12

The cancel package provides a way of cancelling symbols (see the cancel tag)

\documentclass{article}
\usepackage{cancel}
\begin{document}
$\cancel\partial$
\end{document}

Which yields

\cancel\partial

2
  • 1
    Though this is visually correct it does not have the correct semantics. The slash in this case does not mean “cancel”, see Feynman Slash Notation. Nov 10, 2015 at 17:16
  • 1
    @HenriMenke I just answered the question: a $\partial$ with a diagonal line through it. Whether or not it has the correct semantics is a matter of interpretation.
    – Pål GD
    Nov 11, 2015 at 1:48
2

As a \stackinset. Made to obey the math style.

\documentclass{article} 
\usepackage{stackengine,scalerel} 
\def\slashpartial{\ThisStyle{\ensurestackMath{\stackinset{c}{}{c}{}{\SavedStyle/}{%
  \SavedStyle\partial}}}}
\begin{document} 
\[
\slashpartial B\textstyle\slashpartial A_{\slashpartial_{\slashpartial}}
\]
\end{document} 

enter image description here

And here is a version that only presents as the height of \partial. Note it affects vertical height of subscripting. I also tweaked the relative location of the slash by a fraction of a point:

\documentclass{article} 
\usepackage{stackengine,scalerel} 
\def\slashpartial{\vphantom{\partial}\ThisStyle{\ensurestackMath{\smash{%
  \stackinset{c}{.2\LMpt}{c}{-.2\LMpt}{\SavedStyle/}{\SavedStyle\partial}}}}}
\begin{document} 
\[
\slashpartial B\textstyle\slashpartial A_{\slashpartial_{\slashpartial}}
\]
\end{document} 

enter image description here

1

Some times this slashed notation (in physics) is called "Feynman slash". I use it very often. For that I use the centernot package, and define a command \fy

\documentclass{article}
\usepackage{centernot}
\newcommand\fy[1][\partial]{\centernot{#1}}

\begin{document}
\begin{equation}
  \fy \fy[A] \fy[p]
\end{equation}
\end{document} 

This yield enter image description here

However, after reading other answers I tried the package slashed,

\documentclass{article}
\usepackage{slashed}
\newcommand\fy[1][\partial]{\slashed{#1}}

\begin{document}
\begin{equation}
  \fy \fy[A] \fy[p]
\end{equation}
\end{document}

And the result seems improved, enter image description here

Now you have another idea!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .