Symbol for negated exclamation mark

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


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

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.

\documentclass{article}
\usepackage{amsmath,amssymb,pict2e,picture}

\usepackage{color}

\newcommand{\negexcl}{\mathrel{\smallslash{!}}}
\makeatletter
\newcommand{\smallslash}{%
  \begingroup
  \sbox\z@{$\m@th\mkern1mu$}%
  \dimen@=\wd\z@
  \begin{picture}(0,0)
  \roundcap
  \put(0,\fontdimen22\textfont2){\line(1,0.9){5\dimen@}}
  \end{picture}%
  \endgroup
}
\makeatother

\begin{document}

{\ooalign{\color{red}$\negexcl$\cr$\nmid$\cr}}
{\ooalign{$\nmid$\cr\color{red}$\negexcl$\cr}}

$a\negexcl b\nmid c$

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

\end{document}

enter image description here

Tags:

Symbols