How to add a cross-out “/” to any latex symbol? [duplicate]

I want to type something like this

How to add a / in a latex symbol in general? Like the \nexists, \notin.

marked as duplicate by Werner math-mode StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 17 '18 at 6:38

• Is \bcancel okay? – nidhin Nov 17 '18 at 5:56
• Your write-up is a bit confusing: the screenshot shows a backward-leaning slash character, but \notin and \nexists (requires the amssymb package) use a forward-leaning slash. Which type of slash character do wish to employ? – Mico Nov 17 '18 at 5:58
• @Mico Sorry my sense of direction is so not good that both slashes look same to me. – High GPA Nov 17 '18 at 6:02

There are many possible ways, here are three of them:

1. a simple \not,
2. \cancel,
3. or a TikZy strike out.

Some people would call TikZ overkill, others just very flexible, in the end it is up to you to decide.

\documentclass{article}
\usepackage{cancel}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark,shapes.misc}
\begin{document}
$\in$ $\not\in$ $\cancel\in$ $\tikzmarknode[strike out,draw]{1}{\in}$

$B$ $\not B$ $\cancel{B}$ $\tikzmarknode[strike out,draw]{2}{B}$
\end{document}


As you can see, \not works only well for selected symbols. \cancel is arguably nicer but also not too easy to customize. Personally I would say that loading TikZ only for that might be too much, but if you are thinking of using it anyway, this might be a more flexible alternative to the more traditional approaches.