# Identify and import a “curly precneq” from a package

I would like to use the following symbol (from this answer, see the "Symbola" in the picture):

Ideally, I would like to have a command which make it appear without loading a package which may change the fonts in my text.
It is however very unclear to me how to adapt this answer in order to do so. Actually, I can't even find a package where the above pictured symbol is contained. Detexify doesn't help me.

• Try texdoc symobols-a4. There are several \precneq symbols in different fonts. I would just load a package as in most cases then disruption to existing fonts is minimal. – user30471 Sep 28 '18 at 21:28
• Which answer are you referring to? The link points to one that doesn't feature that symbol. – egreg Sep 28 '18 at 21:44
• @egreg sorry, I got confused with the links, let me edit the question. – Surb Sep 28 '18 at 21:46
• @Surb Below the answer you'd like to link to there is a “share” link: click on it and copy the URL, then paste it here. – egreg Sep 28 '18 at 21:47
• @egreg done :).. – Surb Sep 28 '18 at 21:49

Download the Symbola font (it's free) and place it in a working directory.

Prepare the following document and call it precneq.tex:

\documentclass{standalone}
\usepackage{fontspec}
\setmainfont{Symbola}[Path=./,Extension=.ttf]

\begin{document}
\symbol{"2AB1}
\end{document}


Compile it with XeLaTeX to obtain precneq.pdf.

Now copy this PDF file in the same directory as your main document. The code for using it is between \makeatletter and \makeatother (included) in the following test file.

\documentclass{article}
\usepackage{amsmath,graphicx}

\makeatletter
\DeclareRobustCommand{\precneq}{\mathrel{\mathpalette\use@precneq\relax}}
\newcommand\use@precneq{%
\text{%
\raisebox{-0.5ex}{%
\scalebox{\f@size}{%
\includegraphics[scale=0.1]{precneq}%
}%
}%
}%
}
\makeatother

\begin{document}

$a\precneq b$ $a\preceq b$ $x_{\precneq}y_{\preceq}$

\medskip

{\Large $a\precneq b$ $a\preceq b$ $x_{\precneq}y_{\preceq}$}

\end{document}


Is it worth the pain? I'd simply import all the “prec” symbols from mathabx.

• Sorry, it is late here and so I will try your solution tomorrow. Your pictures look great and exactly what I want. As it it for my thesis, I think it is worth the pain. If this slows down the compilation I'll just make the change for the last compilation. Thanks already for your answer. – Surb Sep 28 '18 at 23:07

Here is a way:

\documentclass{article}
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{ <-6> mathb5 <6-7> mathb6 <7-8>
mathb7 <8-9> mathb8 <9-10> mathb9 <10-12> mathb10 <12-> mathb12 }{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}

\DeclareMathSymbol{\precneq}{\mathrel}{mathb}{"AC}

\begin{document}

$a \precneq b$%

\end{document}


• Thank you for your answer, but this is not the symbol I want. The "\prec" has a different shape in your answer. I managed to import \precneq but again, the output is not the one desired. – Surb Sep 28 '18 at 21:42
• I borrowed it from mathabx. Where did you find your symbol? The answer you linked to also uses mathabx. – Bernard Sep 28 '18 at 21:44
• This is the point. I found it in this answer (Symbola version) but it is unclear to me how it is related to any package – Surb Sep 28 '18 at 21:48
• I don't think it's related to a package, since the answer uses fontspec (hence it works with lualatex or xelatex). – Bernard Sep 28 '18 at 21:58
• Indeed, it seems that there is no "simple" solution to my problem.. – Surb Sep 28 '18 at 22:00