I'm using accents to produce a variant of the \in
operator but when I place an accent on it, as in \tilde{\in}
, I get spacing that is different from \in
, see the example and the image below. My question is: what is the best way to make it so that \tilde{\in}
get the same spacing as \in
?
In the example below I also provide two failed attempts of getting the right spacing. I'm not especially accustomed to math mode and definitions of operators. Maybe the right way to go with \DeclareMathOperator
?
\documentclass{article}
\begin{document}
The spacing I want:
\[
w_{1} \in w_{2}
\]
The spacing I get with an accent:
\[
w_{1} \tilde{\in} w_{2}
\]
Better spacing but an ugly hack:
\[
w_{1}~\tilde{\in}~w_{2}
\]
The wrong spacing (too tight?):
\[
w_{1} \mathop{\tilde{\in}} w_{2}
\]
\end{document}