16

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 May 26 '17 at 16:59
  • @CarLaTeX: Math mode. – Roboticist May 26 '17 at 17:02
  • Has $\not{!}$ a too long slash? – CarLaTeX May 26 '17 at 17:12
  • @CarLaTeX: Unfortunately, Yes. It's a little bit ugly and even unreadable. – Roboticist May 26 '17 at 17:14
  • The slash has to be tilted? – Skillmon May 26 '17 at 17:20
19

What about this with stackengine?

\documentclass[12pt]{article}
\usepackage{graphicx,amsmath}
\usepackage{stackengine}
\newcommand{\myexc}{\mathrel{\topinset{\rotatebox{-45}{\scalebox{.5}{/}}}{!}{}{}}}
\newcommand{\stevexc}{\mathrel{\stackinset{c}{}{t}{}{\rotatebox{-45}{\scalebox{.5}{$/$}}}{$!$}}}
\newcommand{\steveyc}{\mathrel{\stackinset{c}{}{t}{.15ex}{\scalebox{1.5}[.4]{$/$}}{$!$}}}

\begin{document}
    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
    \]
\end{document}

enter image description here

  • Your reputation just keeps "stacking" up! ;^) – Steven B. Segletes May 26 '17 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. – Steven B. Segletes May 26 '17 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. – Steven B. Segletes May 26 '17 at 18:54
  • 2
    if your stackengines make enough stacks then maybe you can stack exchange? – cat May 27 '17 at 23:44
  • 1
    @cat LOL! stackengine is not mine, it's Steven's. But is your code a catcode? – CarLaTeX May 28 '17 at 3:32
14

This might appeal to you.

\documentclass{article}
\usepackage{amsmath}

\DeclareMathSymbol{\smallslash}{\mathord}{operators}{32}
\newcommand{\negexcl}{\mathrel{\smallslash\mkern-5mu{!}}}

\begin{document}

$a\negexcl b$

$a\mathrel{!}b$

\end{document}

enter image description here

  • Much appreciated. – Roboticist May 26 '17 at 20:26
  • @Roboticist You were too fast accepting my answer, please feel free to change your choice! – CarLaTeX May 26 '17 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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