[tex4ht] Blackboard bold

Jagath AR jagathar at gmail.com
Tue Aug 25 07:24:17 CEST 2015


Hi Georg,
One of the easiest way to achieve correct MathML tag for this is to use
below tex4ht cfg on your MWE:

%-------------------------------------------------------------------
% 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>}}
\Configure{@HEAD}{}
\Configure{@HEAD}{\HCode{<meta charset="UTF-8" />\Hnewline}}
\Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht
(http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}}
\Configure{@HEAD}{\HCode{<link
         rel="stylesheet" type="text/css"
         href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}}
\Configure{@HEAD}{\HCode{<script type="text/javascript"\Hnewline
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG
"\Hnewline
></script>\Hnewline}}
\Configure{@HEAD}{\HCode{<style type="text/css">\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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20150825/c7da5f18/attachment-0001.html>


More information about the tex4ht mailing list