4

I was suggested to ask a new question about obtaining this sign in XeTeX in the comments elsewhere:

enter image description here

I'd prefer high LaTeX or XeTeX definition rather than the TeX's primitives.

EDIT:

Luckily some of you, the great programmers, have found a workable, but unreadable solutions. The challenge now is to shorten, if not also make it a bit readable and comprehensible for a beginner!

2
  • 2
    Is that like a "not less than or equal", or is it curved like \prec? Commented Apr 5, 2021 at 19:47
  • @StevenB.Segletes Good question. It is curved like $\preceq$. I need both, negated and non-negated form. Commented Apr 5, 2021 at 19:50

2 Answers 2

4

WARNING: DON'T DO THIS TO YOURSELF. The only proper way for this to be done is for a font designer to implement the glyph. But did I listen to that advice? No.

The following solution is totally impractical because it involves so may clips, rotates, scales, etc, that it operates at the slowest of crawls. We are talking about nesting \mathchoices, even though you don't see it in the code.

So, as a challenge, I tried to see what I could do anyhow. Therefore, look at it, laugh at it, vote it up or vote it down, and then move on and try to forget you saw it.

\documentclass[10pt]{article}
\usepackage{trimclip,scalerel,rotate,stackengine}
\newcommand\subprec{\rotatebox{-7.7}{\clipbox{0pt 0pt 0pt {\dimexpr .79ex}}%
  {\rotatebox[origin=c]{7.7}{$\prec$}}}}
\newcommand\precone{\ensurestackMath{%
  \stackinset{c}{-.5pt}{c}{-2.3pt}{\hstretch{.9}{\subprec}}{\prec}}}
\newcommand\nprecone{\stackinset{c}{.45pt}{c}{-.45pt}
  {\rotatebox[origin=c]{50}{\rule{1.2pt}{.3pt}}}{\precone}}\newcommand\prectwo{\ensurestackMath{%
  \stackinset{c}{-.8pt}{c}{-2.1pt}{\hstretch{.79}{\subprec}}{\precone}}}
\newcommand\nprectwo{\stackinset{c}{.25pt}{c}{-.45pt}
  {\rotatebox[origin=c]{50}{\rule{2pt}{.3pt}}}{\prectwo}}
\newcommand\Preceq{\mathrel{\scaleto{\precone}{\dimexpr.2ex+1.65\LMex}}}
\newcommand\Preceqq{\mathrel{\scaleto{\prectwo}{\dimexpr.3ex+1.55\LMex}}}
\newcommand\nPreceq{\mathrel{\scaleto{\nprecone}{\dimexpr.2ex+1.65\LMex}}}
\newcommand\nPreceqq{\mathrel{\scaleto{\nprectwo}{\dimexpr.3ex+1.55\LMex}}}
\begin{document}
\stackMath
$ Z \prec A \Preceq B \Preceqq C \nPreceq D \nPreceqq E$

$\scriptstyle Z \prec A \Preceq B \Preceqq C \nPreceq D \nPreceqq E$

$\scriptscriptstyle Z \prec A \Preceq B \Preceqq C \nPreceq D \nPreceqq E$

\end{document}

enter image description here

4

Here is a "draw-it-from-scratch" TikZ solution. Currently unavailable in other sizes. (But easily adjustable by changing scale=.2.)

Note that the new command \precc should be used instead of \prec to keep them all the same.

enter image description here

\documentclass{article}

\usepackage{tikz}

\newcommand{\precc}{\mathrel{\mkern1.5mu\tikz[baseline={([yshift=.5pt]current bounding box.south)}, line width=.4, line cap=round, line join=round, scale=.2]{
    \draw (1,1) to[out=-100,in=0] (0,.5) to[out=0,in=100] (1,0);
    }\mkern1.5mu}}

\newcommand{\preceqq}{\mathrel{\mkern1.5mu\tikz[baseline={([yshift=.5pt]current bounding box.south)}, line width=.4, line cap=round, line join=round, scale=.2]{
    \draw (1,1) to[out=-100,in=0] (0,.5) to[out=0,in=100] (1,0);
    \draw (0,.3) to[out=0,in=100] (.9,-.2);
    }\mkern1.5mu}}
    
\newcommand{\npreceqq}{\mathrel{\mkern1.5mu\tikz[baseline={([yshift=.5pt]current bounding box.south)}, line width=.4, line cap=round, line join=round, scale=.2]{
    \draw (1,1) to[out=-100,in=0] (0,.5) to[out=0,in=100] (1,0);
    \draw (0,.3) to[out=0,in=100] (.9,-.2);
    \draw (.5,.05) -- (.75,.25);
    }\mkern1.5mu}}

\newcommand{\preceqqq}{\mathrel{\mkern1.5mu\tikz[baseline={([yshift=1pt]current bounding box.south)}, line width=.4, line cap=round, line join=round, scale=.2]{
    \draw (1,1) to[out=-100,in=0] (0,.5) to[out=0,in=100] (1,0);
    \draw (0,.3) to[out=0,in=100] (.9,-.2);
    \draw (0,.1) to[out=0,in=100] (.8,-.4);
    }\mkern1.5mu}}

\newcommand{\npreceqqq}{\mathrel{\mkern1.5mu\tikz[baseline={([yshift=1pt]current bounding box.south)}, line width=.4, line cap=round, line join=round, scale=.2]{
    \draw (1,1) to[out=-100,in=0] (0,.5) to[out=0,in=100] (1,0);
    \draw (0,.3) to[out=0,in=100] (.9,-.2);
    \draw (0,.1) to[out=0,in=100] (.8,-.4);
    \draw (.35,-.1) -- (.75,.25);
    }\mkern1.5mu}}

\begin{document}

$A\precc B\preceqq C\npreceqq D\preceqqq E\npreceqqq F$

\end{document}
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .