I write $P \niton x$
, but it does not work. How can I write the symbol $\notin$
backwards?
6 Answers
After consulting The Comprehensive LaTeX Symbol List a few fonts provide such a symbol:
txfonts
,newtxmath
andpxfonts
have$\notni$
.mathabx
has$\notowner$
and$\varnotowner$
MnSymbol
has$\nowns$
mathdesign
has a small version$\notsmallowns$
, but no normal sized one.kpfonts
has$\notowns$
Note however that using one of these packages changes the complete font set. Of course you can rip this single symbol from a font that has it, let's try with $\notni$
from txfonts, surrounded by Latin Modern:
\DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
\DeclareMathSymbol{\notniFromTxfonts}{\mathrel}{symbolsC}{61}
...
$x \notin P \notniFromTxfonts x$
but the result is not convincing:
-
3You should remark that both these packages change the whole font, not only add some symbols.– yo'Jan 7, 2013 at 14:53
If the math fonts you use don't have the symbol, you can say
\newcommand{\niton}{\not\owns}
Here's a complete example, showing that the symbol will change size in subscripts:
\documentclass{article}
\newcommand{\niton}{\not\owns}
\begin{document}
$A\niton x_{B\niton y}$
\end{document}
If your fonts don't have \owns
(that is, the reverse of \in
) you can emulate it by loading graphicx
and amsmath
:
\usepackage{graphicx}
\usepackage{amsmath}
\newcommand{\niton}{\not\mathrel{\text{\reflectbox{$\in$}}}}
A possibly better definition, that uses the same slash as \notin
, can be the following:
\documentclass{article}
\makeatletter
\newcommand\niton{\mathrel{\m@th\mathpalette\canc@l\owns}}
\newcommand\canc@l[2]{{\ooalign{$\hfil#1/\mkern1mu\hfil$\crcr$#1#2$}}}
\makeatother
\begin{document}
$A\niton x_{B\niton y}$
$A\notin x_{B\notin y}$
\end{document}
-
-
-
Oh, yes indeed it is there. But it is missing from the
\reflectbox
example. Feb 20, 2019 at 19:57
\documentclass{memoir}
\usepackage{graphicx}
\begin{document}
$\notin$ \reflectbox{$\notin$}
\end{document}
-
2It does not work for me. It just prints the same symbol without reversing it. I have a \documentclass[12pt, a4paper]{article} and I use TeXnicCenter 1 RC1 and Tex 3.1n15926 (MiKTeX 2.9 64-bit. Jan 7, 2013 at 14:36
-
4view the pdf output and not the dvi one!– user2478Jan 7, 2013 at 14:42
I believe that \rotatebox
is more proper than \reflectbox
, I suggest this solution:
\documentclass{article}
\usepackage{rotating}
\makeatletter
\newcommand\@notni[2]{\mathrel{\rotatebox[y=#1]{180}{$#2\notin$}}}
\newcommand\notni{
\mathchoice
{\@notni{0.57ex}\displaystyle}
{\@notni{0.57ex}\textstyle}
{\@notni{0.39ex}\scriptstyle}
{\@notni{0.26ex}\scriptscriptstyle}
}
\makeatother
\begin{document}
\[
L\notni x
\quad
x\notin L
\quad
\sum_{L\notni x} f(L)
\quad
\sum_{Z_{L\notni x}} 1
\]
\end{document}
-
3sorry to disagree, but i think
\reflectbox
is the correct interpretation here -- it's a mirror image. the only situation in which i'd use\rotatebox
is if the symbol were sloped, and the slope had to be retained. (this is done, for example, with the firstE
in\XeTeX
when it's rendered in italic; seeltugboat.cls
.) but\in
is usually symmetrical, and besides,\owns
(=\ni
) is defined inplain.tex
, so should be available in any good tex system. Jan 7, 2013 at 15:35 -
2@barbarabeeton I tried to place them next to each other: i.stack.imgur.com/3qXwr.png and I came to conclusion that having all the slashes "forward" is more consistent; on any other symbol the slash is this way, so why should
\ni
be an exception?– yo'Jan 7, 2013 at 15:38 -
1ah -- i was considering just the basic
\in
as being rotated. apologies. i didn't read your code carefully enough, but rashly assumed that you were rotating the non-negated symbol and then applying\not
. in this case you're correct; rotation is appropriate. but still better to use\owns
directly. no need then for\mathchoice
. Jan 7, 2013 at 15:44 -
1@barbarabeeton well, the pointe is whether you want to manually adjust vertical placement of the symbol (as I do) or horizontal placement of the
\not
(as egreg does).– yo'Jan 7, 2013 at 15:47
my solution is: $\ni \negthickspace \negthickspace \negthickspace / $
or$\owns \negthickspace \negthickspace \negthickspace /$
at least on my page it worked fine.
-
this one is slightly more slanted than \not (in default font), but I'm not sure if it's desirable especially if all the other ones have equal slant. / side note, this may mess the spacing after the character up / the 3 repetition is equivalent to
\mskip -3\thickmuskip
Apr 21, 2022 at 11:53
This one works for me:
$\not\ni$
-
As mentioned in a comment above, anywhere
\ni
is defined\owns
should be defined, so this should be identical to egreg's answer. Apr 21, 2022 at 11:48
{}
).