I need a symbol as an exclamation mark, on which a negation sign exists:

enter image description here

I've just checked The Comprehensive Latex Symbol List to find something useful but all I've found are the negation symbols of Pages 49-57, where there is no symbol like what I need.

  • 1
    Text mode or math mode?
    – CarLaTeX
    Commented May 26, 2017 at 16:59
  • @CarLaTeX: Math mode.
    – user78499
    Commented May 26, 2017 at 17:02
  • Has $\not{!}$ a too long slash?
    – CarLaTeX
    Commented May 26, 2017 at 17:12
  • @CarLaTeX: Unfortunately, Yes. It's a little bit ugly and even unreadable.
    – user78499
    Commented May 26, 2017 at 17:14
  • The slash has to be tilted?
    – Skillmon
    Commented May 26, 2017 at 17:20

2 Answers 2


What about this with stackengine?


    My original answer:
    A \myexc B

    A more correct solution (see Stevens's comment):
    A \stevexc B

    Steven's elegant solution without \verb|\rotatebox|:
    A \steveyc B

enter image description here

  • Your reputation just keeps "stacking" up! ;^) Commented May 26, 2017 at 18:49
  • I was one of the first to upvote. The other approach I considered was a \scalebox{}[]{/}, with skewed vertical/horizontal magnifications. You might be able to avoid rotating it as such. Commented May 26, 2017 at 18:53
  • I note you did the stack in text mode, which could bite you depending on the font. The use of an inset automatically applied \useanchorwidth, which is good, though \topinset is deprecated towards, instead, the use of \stackinset. Commented May 26, 2017 at 18:54
  • 2
    if your stackengines make enough stacks then maybe you can stack exchange?
    – cat
    Commented May 27, 2017 at 23:44
  • 1
    @cat LOL! stackengine is not mine, it's Steven's. But is your code a catcode?
    – CarLaTeX
    Commented May 28, 2017 at 3:32

This might appeal to you.




$a\negexcl b$



enter image description here

A different implementation, with the slash similar to \nmid. The first line shows that the two slashes coincide. The color package is only used for that example.

The symbol won't change according to the math style. It's left as an exercise to adapt it for subscripts and superscripts.






$a\negexcl b\nmid c$

$a\mathrel{!}b\mid c$


enter image description here

  • Much appreciated.
    – user78499
    Commented May 26, 2017 at 20:26
  • @Roboticist You were too fast accepting my answer, please feel free to change your choice!
    – CarLaTeX
    Commented May 26, 2017 at 20:31
  • Dear @egreg, is it possible to have the slanted line with the same proportions as in \nmid? I mean the slope, length, and width. Thanks in advance!
    – Arrow
    Commented Apr 7, 2020 at 20:11
  • @Arrow Do you like the new version?
    – egreg
    Commented Apr 7, 2020 at 20:38
  • @egreg it's perfect! Thanks!
    – Arrow
    Commented Apr 7, 2020 at 20:44

You must log in to answer this question.