# How do I write $\notin$ backwards?

I write $P \niton x$, but it does not work. How can I write the symbol $\notin$ backwards?

-
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). – Claudio Fiandrino Jan 7 '13 at 14:25
Wouldn't it be more bizarre if it actually worked? :) – percusse Jan 7 '13 at 15:12
Do you want the slash to be backwards too? – asmeurer Jan 7 '13 at 17:50

After consulting The Comprehensive LaTeX Symbol List a few fonts provide such a symbol:

• txfonts, newtxmath and pxfonts 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:

-
That works, thanks!!! – Ohto Nordberg Jan 7 '13 at 14:42
You should remark that both these packages change the whole font, not only add some symbols. – yo' Jan 7 '13 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}


-
\documentclass{memoir}
\usepackage{graphicx}
\begin{document}

$\notin$ \reflectbox{$\notin$}

\end{document}

-
It 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. – Ohto Nordberg Jan 7 '13 at 14:36
view the pdf output and not the dvi one! – Herbert Jan 7 '13 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}

-
sorry 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 first E in \XeTeX when it's rendered in italic; see ltugboat.cls.) but \in is usually symmetrical, and besides, \owns (= \ni) is defined in plain.tex, so should be available in any good tex system. – barbara beeton Jan 7 '13 at 15:35
@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 '13 at 15:38
ah -- 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. – barbara beeton Jan 7 '13 at 15:44
@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 '13 at 15:47

my solution is: $\ni \negthickspace \negthickspace \negthickspace /$ or$\owns \negthickspace \negthickspace \negthickspace /$ at least on my page it worked fine.

-