Is there any package that makes the math symbols with blackboard bold style?
For example, I want to have $mathbb{\leq}$
2 Answers
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}
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
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}
-
1What is pdfliteral? Does it also work in xetex or luatex? Where can I learn about it?– UserMar 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.– wipetMar 4, 2016 at 20:41
mathbbleq
: A \leq B iff [[A]] \mathbbleq [[B]].\leqslant
.