Creating new symbols in amssymb package

amssymb

In the amssymb package, there are the \precapprox and \precnapprox symbols. But there isn't a \nprecapprox symbol. How can I create one?

Best Answer

You can use a larger version of the slash, with a handful of tricks to move it a bit down when in script style. However, this would not work in scriptscript style (I don't think it's a big limitation).

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\makeatletter
\DeclareMathSymbol{\bigb@r}{\mathord}{largesymbols}{"0E}
\newcommand{\bigc@ncel}[2]{%
  \ooalign{%
    \hfil$\vcenter{\moved@wn{#1}\hbox{$#1\bigb@r$}}$\hfil\cr % the bar
    $#1#2$\cr % the symbol
  }%
}
\newcommand{\moved@wn}[1]{%
  \sbox\z@{$#1\mkern3mu\nonscript\mkern-3mu$}%
  \vskip\wd\z@
}
\newcommand{\nprecapprox}{%
  \mathrel{\m@th\mathpalette\bigc@ncel\precapprox}%
}
\newcommand{\nsuccapprox}{%
  \mathrel{\m@th\mathpalette\bigc@ncel\succapprox}%
}
\makeatother

\begin{document}

$a \nprecapprox b \nsuccapprox c$

$\scriptstyle a \nprecapprox b \nsuccapprox c$

\end{document}

enter image description here

Related Question