5

I have the need to use greek blackboard bold letters and for this reason I checked this question and solved the package superposition problem thanks to the answer on this other question.

The problem is that I personally don't like the appearence of the bbold package font and I was looking for something like this (I don't see the bottom part of the image with the greek letters in my computer, but it's clearly visible on google images just typing the title of the question; if you have the same problem see here)

So I deduce that another type of blackboard bold greek font doesn't exist yet, am I right? Or maybe I just cannot find it? Thanks!

2
  • 1
    Thanks for the bonus! Sep 23 '20 at 12:03
  • 1
    It's the minimum I could do, you solved me a big problem: the problem became important when I had to write Dirac equation with $\alpha,\beta,\gamma,\sigma$ matrices and at the same time using $\alpha,\beta\gamma$ to indicate components of matrices, matrices for which normally I used '\mathbb' with latin letters until that point. I didn't really know what to do and to change my whole typographic convention (how anyway?) was not thinkable. Thanks a lot again!
    – Rob Tan
    Sep 23 '20 at 12:33
6
+50

The OP cites this question, Who can write a package for the new mathbb font as in the picture and compatible with Computer Modern font?, as a desired endpoint, in which it appears that an outline font is offered.

For work in pdflatex, and adapting my answer here: Outline text using TrueType fonts, you can set color of border, fill and line-thickness metric, and use pdf specials to accomplish the outline.

\documentclass{article}
\usepackage{xcolor}
\input pdf-trans
\newbox\qbox
\def\usecolor#1{\csname\string\color@#1\endcsname\space}
\newcommand\bordercolor[1]{\colsplit{1}{#1}}
\newcommand\fillcolor[1]{\colsplit{0}{#1}}
\newcommand\outline[1]{\leavevmode%
  \def\maltext{\mydelim #1\mydelim}%
  \setbox\qbox=\hbox{\maltext}%
  \boxgs{Q q 2 Tr \bbthickness\space w \fillcol\space \bordercol\space}{}%
  \copy\qbox%
}
\newcommand\mathbb[1]{\def\mydelim{$}\outline{#1}}
\newcommand\textbb[1]{\def\mydelim{}\outline{#1}}
\newcommand\colsplit[2]{\colorlet{tmpcolor}{#2}\edef\tmp{\usecolor{tmpcolor}}%
  \def\tmpB{}\expandafter\colsplithelp\tmp\relax%
  \ifnum0=#1\relax\edef\fillcol{\tmpB}\else\edef\bordercol{\tmpC}\fi}
\def\colsplithelp#1#2 #3\relax{%
  \edef\tmpB{\tmpB#1#2 }%
  \ifnum `#1>`9\relax\def\tmpC{#3}\else\colsplithelp#3\relax\fi
}
\bordercolor{black}
\fillcolor{white}
\newcommand\bbthickness{.15}
\begin{document}
$y=\mathbb{\beta}+\textbb{R}$
\end{document}

enter image description here

12
  • 2
    @Rob Just spending a small amount of time each day on this site, seeing what the active questions are, or else searching out questions of particular interest, helps to expand one's knowledge base. This particular technique of pdf specials is a way to have LaTeX plug into underlying features of the PDF language (in a very brute force way) and so (outside of the interface syntax) is not LaTeX, per se. Two users of this site whose answers taught me about this topic were Malipivo and wipet. Sep 17 '20 at 9:21
  • 2
    @Rob Different people learn different ways. Personally, I find the examples provided by the answers on this site to be every bit as valuable as a reference volume. Also, package documentation is very useful. Having seen in this answer that the pdf-trans package is what provided the utility needed, go to ctan.org and look up the package: ctan.org/pkg/pdf-trans. It provides an example.pdf file of uses. Sep 17 '20 at 11:45
  • 1
    @Rob ...or search this site for \boxgs and find questions like this: tex.stackexchange.com/questions/461534/…, which points you to this: wwwimages2.adobe.com/content/dam/acom/en/devnet/pdf/… Sep 17 '20 at 11:50
  • 1
    @Rob The color of the border is set with my provided macro \bordercolor. Remember, this technique uses a pdf special...it operates outside of the normal LaTeX rules. Sep 17 '20 at 12:37
  • 1
    @Rob In the pdf world, color is not set with terms like red!50, etc. The \colsplit macro converts the given "LaTeX" color into the equivalent "PDF" color syntax. So if you execute \colsplit{1}{red}, the value of \bordercol will contain 1 0 0 RG. If you pass it cyan as the color, \bordercol will be set to 1 0 0 0 K, referring to the cmyk color schemes. The challenge in developing this approach was in developing macros like \colsplit to do the color conversions. Sep 17 '20 at 13:30
2

Blackboard bold letters used to be faked by (over)printing the base letter with a slight displacement, like this old FAQ on (La)TeX:

 A set of LaTeX macros for a ``lazy person's'' blackboard bold are:
       \newcommand{\R}{{\sf R\hspace*{-0.9ex}\rule{0.15ex}%
       {1.5ex}\hspace*{0.9ex}}}
       \newcommand{\N}{{\sf N\hspace*{-1.0ex}\rule{0.15ex}%
       {1.3ex}\hspace*{1.0ex}}}
       \newcommand{\Q}{{\sf Q\hspace*{-1.1ex}\rule{0.15ex}%
       {1.5ex}\hspace*{1.1ex}}}
       \newcommand{\C}{{\sf C\hspace*{-0.9ex}\rule{0.15ex}%
       {1.3ex}\hspace*{0.9ex}}}

You'd have to tweak your own fakes.

2
  • Thanks for the answer, but the way the letters seem is very far from how I wanted it to be and I have no idea how to make it better!
    – Rob Tan
    Sep 17 '20 at 8:14
  • 2
    @Rob, as stated, this is a very rough approximation. Making them better looking requires designing a font.
    – vonbrand
    Sep 17 '20 at 9:30
2

A very simple solution:

\documentclass[a4paper,12pt]{article}
\usepackage[outline]{contour}
\newcommand*{\fancy}[1]{{\color{white}\contour{black}{#1}}}
\begin{document}
\fancy{$\Gamma\Delta$}$\Gamma$$\Delta$\fancy{$\Xi\Theta\Delta$}
\end{document}

enter image description here

5
  • Seems nice, but I can't make it work in my document!
    – Rob Tan
    Sep 22 '20 at 17:14
  • 1
    @Rob If you add a` MWE` showing the problem, I can try to see what is going on.
    – Denis
    Sep 22 '20 at 18:57
  • @Rob Forgot to say: I was assuming that you wanted to compile with pdfLaTeX.
    – Denis
    Sep 22 '20 at 19:03
  • Yes now it works, maybe yesterday, smartly, I forgot to use 'contour' package. Your solution is very clever; the only thing that perplex me is the fact that a math ambient should be used inside '\fancy' command; anyway, the command itself works fine, for example I can do '$\fancy{$A$}^\alpha$. Thanks!
    – Rob Tan
    Sep 23 '20 at 7:50
  • 1
    @Rob Fine. Yes the syntax is a bit clumsy but works fine. If you only need a few mathbb greek letters defining a command is the way to go to be sure the syntax is OK.
    – Denis
    Sep 23 '20 at 8:05
1

If you have an outline font, in TrueType or OpenType, that supports Greek letters, you can load it in unicode-math with

\setmathfontface\varbb{SomeFont-Outline.otf}[
  Scale=MatchUppercase]

Unfortunately, I don’t have a good example at hand of a free outline font with Greek letters.

One disadvantage of doing things this way is that unicode-math might try to find the Unicode mathematical alphanumeric symbols (such as U+1D8FC, 𝛼) instead of the regular Greek letters (such as U+03B1, α). Since you’re loading a display font, not a math font, it will only have the regular letters. To work around this, you might need to type \varbb{\mupalpha}, \varbb{\mupTheta} and so on instead of \varbb{\alpha}. Or I guess you could write a function in expl3 to remap the input.

The \symbfup or \symbfit alphabet might be a good substitute. In PDFTeX, the isomath package also allows you to select an OML font, which support Greek, for your bold upright and bold italic alphabets.

5
  • I think I understood most of it, but sorry I don't get "You might additionally want to have the command select \symup, so that \varbb{\Theta} looks for the correct Unicode character. Otherwise, you might need to write \varbb{\mupTheta}." I tried for example to read here mirrors.ibiblio.org/CTAN/macros/latex/contrib/unicode-math/… but I don't get what '\symup' command should do
    – Rob Tan
    Sep 22 '20 at 13:27
  • @Rob That paragraph wasn’t correct and I’ve changed it.
    – Davislor
    Sep 22 '20 at 21:38
  • Now I understand better, but as you say the problem is to find the font!
    – Rob Tan
    Sep 23 '20 at 7:57
  • 1
    @Rob It’d be possible to start with the bold Greek letters of Latin Modern Math, or maybe CMU Serif, and turn them into an outline or stencil.
    – Davislor
    Sep 23 '20 at 11:11
  • Sure, but I have no idea how ahah is it something like the main answer of the question?
    – Rob Tan
    Sep 23 '20 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.