# [tex4ht] Blackboard bold

Hans Georg Schaathun georg+tex at schaathun.net
Tue Aug 25 07:49:57 CEST 2015

On Tue, Aug 25, 2015 at 10:54:17AM +0530, Jagath AR wrote:
> Hi Georg,
> One of the easiest way to achieve correct MathML tag for this is to use
> below tex4ht cfg on your MWE:

Thanks a lot.  It seems that I do not need all the preamble material
that you suggest.  If I just use \mathbb from amssymb instead of
\mathbbm from bbm (as you suggest), it works out of the box, at least
on firefox.  Maybe that preamble material would make it more browser
independent; I don't know; I have just neglected them so far.

Thanks to Michal as well, even though his solution did not solve
any problems when I tried it.

>
> %-------------------------------------------------------------------
> % htlatex <tex> <cfg>
> \RequirePackage{amssymb} % used for \mathbb
> \RequirePackage{bm}      % used for \boldsymbol
>
> \Preamble{xhtml,mathml}
> \Configure{VERSION}{}
> \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
> \Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
> (http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}
>          rel="stylesheet" type="text/css"
>          href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}
> src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG
> "\Hnewline
> ></script>\Hnewline}}
>   .MathJax_MathML {text-indent: 0;}\Hnewline
> </style>\Hnewline}}
> \begin{document}
> \EndPreamble
>
> \def\mathbbm#1{\boldsymbol{\mathbb{#1}}}
> \endinput
> %-------------------------------------------------------------------
>
> But still I am only able to see normal blackboard font through browser,
> while the MathML is <mstyle mathvariant="bold"><mi>&#x2124;</mi></mstyle>.
>
> Regards
> Jagath
>
> On 25 August 2015 at 00:14, Hans Georg Schaathun <georg+tex at schaathun.net>
> wrote:
>
> > On Mon, Aug 24, 2015 at 08:32:58PM +0200, Michal Hoftich wrote:
> > > could you please provide some sample document? This depends on your
> > > input, in particular on used fonts. We can map LaTeX font symbols to
> > > unicode values, so it shouldn't be impossible to get blackboard letters
> > > without some custom macros.
> >
> > Of course here is an example:
> > \documentclass{scrartcl}
> > \usepackage{bbm}
> > \def\Z{\mathbbm{Z}}
> > \begin{document}
> > $\Z$
> > \end{document}
> >
> > I am not sure what you have in mind.  You are right that there is are
> > Unicode characters for blackboard bold letters.  A common solution
> > in LaTeX would however code it as a blackboard bold font.  I have not
> > checked the implementation of the bbm package, so I do not know what
> > that one does.
> >
> > Either way, I am not hellbent on using bbm; any solution which works
> > in both PDF and XML output is fine.
> >
> >
> > --
> > :-- Hans Georg
> >

--
:-- Hans Georg