[tex4ht] Decimal comma and specing (bug?)

Nasser M. Abbasi nma at 12000.org
Wed May 11 10:39:37 CEST 2016


On 5/11/2016 3:04 AM, Hans Georg Schaathun wrote:
> Hi,
>
> typesetting of decimal numbers in languages which use a
> decimal comma instead of a point (i.e. most languages
> except English AFAIK :-) is a well-known challenge.
> The standard TeX solution does not work in tex4ht though.
>
> A quite typical example would be this:
> $\Delta t = 24, 6, 2, 0{,}5, 0{,}1$.
> In regular TeX, the braces around the commas ensures that there
> is only intra-word spacing around the comma.  Thus, the bracketed
> commas appear as decimal commas, while the unbracketed ones are
> list separators with some spacing after.
>
> This does not work in tex4ht.
> Live example here:
> http://kerckhoffs.schaathun.net/m1draft/week01se1.html#x2-10001
> (Problem 1.1 Item 2)
>
> Does anyone have a fix for this?
>
> The solution using braces was the best recommendation I found
> when I checked it 15-20 years ago :-)
>

This works for me:

----------------------------------
\documentclass[12pt]{article}%
\usepackage{siunitx}
\sisetup{output-decimal-marker = {,}}
\begin{document}
$\pi=\num{3.14}$
\end{document}
-------------------------------------

htlatex foo2.tex

HTML shows comma in place of decimal points.

--Nasser




More information about the tex4ht mailing list