It is a side effect of the implementation of \notin. From fontmath.ltx (reformatted):
\DeclareRobustCommand\notin{%
\mathrel{%
\m@th
\mathpalette\c@ncel\in
}%
}
\def\c@ncel#1#2{%
% #1: math style
% #2: the symbol (here: \in)
\m@th
\ooalign{%
$\hfil#1\mkern1mu/\hfil$%
\crcr
$#1#2$%
}%
}
Simplified \notin makes a special table with one column. The first row contains a horizontally centered / shifted by 1mu to the right.
The second row contains the symbol. However, you do not see two lines. The trick of \ooalign is to set the \baselineskip to zero. Thus both rows share the same baseline. The whole is put into a vertical box (\vtop). The height of the overall box comes from the height of the first box, the first line, the slash. Now a second box, the second line, follows, that means the depth of the first line does not count any more. Also the height of the second line is ignored, but the depth of the symbol in the second line becomes the depth of the overall box.
The following example compares the different variants:
- The first two boxes contain the single glyphs that shows that the character bounding boxes are correct.
- The third box
\notin shows the composed symbol with the original definition as discussed above.
- The fourth box
\NotIn uses a rewritten \c@ncel macro (\NewC@ncel) that takes both heights and depths into account.
- For comparison, the last box uses a different symbol
\not and method for the negation.
\documentclass{article}
\usepackage{xcolor}
\makeatletter
\newcommand*{\NotIn}{%
\mathrel{%
\mathpalette\NewC@ncel\in
}%
}
\newcommand*{\NewC@ncel}[2]{%
% #1: math style
% #2: symbol
\sbox0{$#1#2\m@th$}%
\sbox2{$#1\mkern1mu/\m@th$}%
\ifdim\wd2>\wd0 %
\wd0=\wd2 %
\else
\setbox2=\hbox to \wd0{\hfil\unhcopy2\hfil}%
\fi
\rlap{\copy2}%
\copy0 %
}
\makeatother
\newcommand*{\test}[1]{%
\begingroup
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{.2pt}%
\sbox0{$#1$}%
\typeout{* [\detokenize{#1}: height=\the\ht0, depth=\the\dp0}%
\fcolorbox{blue}{white}{\copy0 } \texttt{\detokenize{#1}}%
\par
\endgroup
}
\begin{document}
\test{\in}
\test{/}
\test{\notin}
\test{\NotIn}
\test{\not\in}
\end{document}

If you want to used \notin (instead of the new macro \NotIn as in the example), then \c@ncel can be redefined:
\makeatletter
\newcommand*{\NewC@cncel}{...}% see above
\let\c@ncel\NewC@ncel
\makeatother
Fixed suggestion for \ooalign
The following test file that can be used with plain TeX and LaTeX redefines \ooalign. The cell contents is first put into a box for measuring its height and depths, then the overall box is set to the maximum height and depth.
\ifx\documentclass\undefined
\nopagenumbers
\catcode`\@=11 %
\else
\documentclass{article}
\pagestyle{empty}
\begin{document}
\makeatletter
\fi
\let\plain@ooalign\ooalign
%%% begin: \ooalign %%%
\newdimen\ooalign@height
\newdimen\ooalign@depth
% The implementation merges the original `\ooalign'
% with the modified contents of `\oalign'.
% The heights and depths are measured and the overall box
% is adjusted to get the maximum height and depth.
\def\ooalign#1{%
\leavevmode
\begingroup
\setbox\z@\vtop{%
\baselineskip\z@skip
\lineskip\z@ % might not be needed
\lineskiplimit=-\maxdimen
\global\ooalign@height\z@
\global\ooalign@depth\z@
\ialign{%
% the cell contents is measured and
% the maximum values for height and depth are remembered
\setbox\z@\hbox{##}%
\ifdim\ht\z@>\ooalign@height
\global\ooalign@height\ht\z@
\fi
\ifdim\dp\z@>\ooalign@depth
\global\ooalign@depth\dp\z@
\fi
\unhcopy\z@
\crcr
#1%
\crcr
}%
}%
\vtop{%
% update the height if needed
\ifdim\ooalign@height>\ht\z@
\hrule width\z@ height \ooalign@height depth\z@
\kern-\ht\z@
\fi
\unvcopy\z@
% update the depth if needed
\ifdim\ooalign@depth>\dp\z@
\kern-\dp\z@
\kern\ooalign@depth
\fi
}%
\endgroup
}
%%% end: \ooalign %%%
% for testing
\ifx\fbox\undefined
\newdimen\fboxrule
\newdimen\fboxsep
\newbox\@tempboxa
\newdimen\@tempdima
\long\def\fbox#1{%
\leavevmode
\setbox\@tempboxa\hbox{%
\begingroup
\kern\fboxsep{#1}\kern\fboxsep
\endgroup}%
\@frameb@x\relax
}%
\def\@frameb@x#1{%
\@tempdima\fboxrule
\advance\@tempdima\fboxsep
\advance\@tempdima\dp\@tempboxa
\hbox{%
\lower\@tempdima\hbox{%
\vbox{%
\hrule height\fboxrule
\hbox{%
\vrule width\fboxrule
#1%
\vbox{%
\vskip\fboxsep
\box\@tempboxa
\vskip\fboxsep}%
#1%
\vrule width\fboxrule}%
\hrule height\fboxrule
}%
}%
}%
}%
\fi
\fboxsep=0pt
\fboxrule=.1pt
\def\test{a\fbox{$\notin$}b\fbox{\copyright}c}
% original \ooalign
\begingroup
\let\ooalign\plain@ooalign
\test
\endgroup
% new \ooalign
\test
\ifx\enddocument\undefined
\def\next{\end}%
\else
\def\next{\end{document}}%
\fi
\next
