I want to create an operator that works like a minus sign (including the spacing), but has the characters res
on top (in \textrm
mode). The length of the minus sign should be adjusted to look like underlining the res
characters, and it needs to work in a subscript. Currently I am using
\newcommand{\residue}[2]{#1\overset{\text{res}}{\relbar\mathrel{\mkern-3mu}\relbar\rule{0pt}{2pt}}#2}
which means in particular the operator I am using is
\relbar\mathrel{\mkern-3mu}\relbar\rule{0pt}{2pt}
but it leaves a bit of space between the two dashes (especially in subscripts), and in inline or display mode, there's too much line to the left of the letters res
.
What is a better way to produce this symbol?
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it.