[Tex/LaTex] Precedes Or Not Equal To Symbol

relation-symbolssymbols

This question is related to Element of or Equal To Symbol and Creating a \precneq symbol.

From those pages, I learned about the mathabx package and its \precneq symbol. However I noticed that it uses a modified version of the \prec symbol. It isn't a replica of the standard \prec symbol. Instead it uses a modified version of \prec.

I've been trying to research how to construct a math symbol that's a modification of either \prec or \preceq but to no avail. Does anyone have solution/advice?

The solution in Element of or Equal To Symbol is extremely nice (I prefer the "roundcap bar" version); More generally is there a general procedure for making such "or not equal to" symbols from already defined binary operators?

Best Answer

Here's a solution that builds the underbar with the help of picture mode.

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

\makeatletter
\newcommand{\pnrelbar}{%
  \linethickness{\dimen2}%
  \sbox\z@{$\m@th\prec$}%
  \dimen@=1.1\ht\z@
  \begin{picture}(\dimen@,.4ex)
  \roundcap
  \put(0,.2ex){\line(1,0){\dimen@}}
  \put(\dimexpr 0.5\dimen@-.2ex\relax,0){\line(1,1){.4ex}}
  \end{picture}%
}

\newcommand{\precneq}{\mathrel{\vcenter{\hbox{\text{\prec@neq}}}}}
\newcommand{\prec@neq}{%
  \dimen2=\f@size\dimexpr.04pt\relax
  \oalign{%
    \noalign{\kern\dimexpr.2ex-.5\dimen2\relax}
    $\m@th\prec$\cr
    \noalign{\kern-.5\dimen2}
    \hidewidth\pnrelbar\hidewidth\cr
  }%
}
\makeatother
\begin{document}
$\alpha\precneq\beta_{\precneq}$ $\prec\preceq\precneq$

$\alpha\preceq\beta_{\preceq}$
\end{document}

enter image description here