3

This question already has an answer here:

I want to type something like this

enter image description here

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

marked as duplicate by Werner math-mode Nov 17 '18 at 6:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Is \bcancel okay? – nidhin Nov 17 '18 at 5:56
  • 1
    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
4

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}

enter image description here

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.