5

Is there any package that makes the math symbols with blackboard bold style? For example, I want to have $mathbb{\leq}$

enter image description here

4
  • i've never seen "blackboard bold" inequalities. can you cite a published source? it they are in use, then they should be added to unicode, and i can make such a submission. Mar 4, 2016 at 16:38
  • No, I have not seen either. Just I have an order on a model and based on that order there is the order in the language. So to distinguish them but still be similar I would like to have mathbbleq: A \leq B iff [[A]] \mathbbleq [[B]]. Mar 4, 2016 at 16:54
  • 1
    . Bad idea, in my opinion, as it might easily be confused with \leqslant.
    – Bernard
    Mar 4, 2016 at 17:05
  • @Bernard that's why I put thick part up that it will be less confused. Mar 4, 2016 at 18:01

2 Answers 2

3

It could be perfected in scriptscript style, but I don't think you really need it in second level subscripts or superscripts.

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

\makeatletter
\DeclareRobustCommand{\bleqslant}{%
  \mathrel{\mathpalette\@bleqslant\relax}%
}

\newcommand{\@bleqslant}[2]{%
  \sbox\z@{$#1\m@th\leqslant$}%
  \ifx#1\displaystyle
    \def\@blqwd{0.75}%
  \else
    \ifx#1\textstyle
      \def\@blqwd{0.75}%
    \else
      \ifx#1\scriptstyle
        \def\@blqwd{0.7}%
      \else
        \def\@blqwd{0.65}%
        \linethickness{0.75\@wholewidth}%
      \fi
    \fi
  \fi
  \setlength{\unitlength}{\dimexpr\wd\z@+\dp\z@}%
  \vcenter{\hbox{%
    \begin{picture}(1,1)
    \roundcap\roundjoin
    \polyline(\@blqwd,0.3)(0.1,0.6)(\@blqwd,0.9)
    \polyline(0.1,0.4)(\@blqwd,0.1)
    \polyline(\@blqwd,0.8)(0.22,0.555)
    \end{picture}%
  }}%
}
\makeatother

\begin{document}

$\leqslant\bleqslant$

$\scriptstyle\leqslant\bleqslant$

$\scriptscriptstyle\leqslant\bleqslant$

\end{document}

enter image description here

5

If you are using pdftex, then you can use \pdfliteral like this:

\def\spleq{\mathrel{\hbox to5pt{%
   \pdfliteral{q .9963 0 0 .9963 0 0 cm .5 0 0 .5 0 1.5 cm 1 j 1 J .7 w
   10 8 m 0 3 l 10 -3 l S 0 1 m 10 -5 l S 2 2 m 10 6 l S Q}\hss}}}

$A \spleq B < C$

\bye

spleq

If you need different sizes in \scriptstyle and scriptscriptstyle then you use this modification:

\def\spleq{\mathrel{\mathpalette\spleqA\relax}}
\def\spleqA#1#2{\mkern1mu\hbox to\spleqB#1em{%
   \pdfliteral{q .9963 0 0 .9963 0 0 cm \spleqB#1 0 0 \spleqB#1 0 1\spleqB#1 cm 
   1 j 1 J .7 w 10 8 m 0 3 l 10 -3 l S 0 1 m 10 -5 l S 2 2 m 10 6 l S Q}\hss}%
   \mkern1mu}
\def\spleqB#1{\ifx#1\displaystyle.5\fi \ifx#1\textstyle.5\fi     
   \ifx#1\scriptstyle.35\fi \ifx#1\scriptscriptstyle.25\fi} 
2
  • 1
    What is pdfliteral? Does it also work in xetex or luatex? Where can I learn about it?
    – User
    Mar 4, 2016 at 19:20
  • When using xetex, you must define \def\pdfliteral#1{\special{pdf:literal #1}}. When using luatex then you have no problem, because pdfliteral is ready, pdfTeX is a part of luatex. pdfliteral produces low levet PDF code, you can learn about it in PDF specification.
    – wipet
    Mar 4, 2016 at 20:41

You must log in to answer this question.

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