# [tex4ht] not translating math

William F Hammond gellmu at gmail.com
Mon Sep 30 23:07:04 CEST 2013

On Mon, Sep 30, 2013 at 3:09 AM, Matteo Gamboz <gamboz at medialab.sissa.it>wrote:

> Hi all,
>   I'm looking for a way to keep math as it is. For example:
>
> J\er\'ome $\alpha < x^{\infty}$ end
> →
> Jèróme $<![CDATA[\alpha < x^{\infty}]]>$ end
>
> but, by now I'm only able to get to this:
> Jèróme $<![CDATA[α &#x003C; x∞]]>$ end
>
>
For translating LaTeX to DocBook you want, as I understand it, to have TeX
source put inside $tags whose content is the literal TeX source as a CDATA marked section. Yes, your .cfg sets up the beginning and end of the CDATA marked section, but it does not give tex4ht a way to understand that the TeX math markup should be passed untouched. Probably, one could write an alternate version of dblatex to do this. The real problem here is that DocBook is not a very satisfactory translation target for LaTeX. Apart from math it's too rich, and for math the options are poor. Common practice, aside from MathML islands, cf. dbmlatex, is insertion of TeX source It would be far better if DocBook incorporated, say, the XML guise of the profile for LaTeX math represented by the TeX input for MathJax -- something that is author-friendly. Then it would be straightforward to accommodate that in something like dblatex, as well as to revise standard DocBook processors. With that hypothetical what would make sense for the output would be something like this: Jèróme [itex]<alpha/> < x<sup><infty/></sup>$ end

N.B., <alpha/> rather than α because the mathematical \alpha in TeX should
not be regarded as the same as α in a unicode-capable version of LaTeX.

-- Bill

--
William F Hammond
Email: gellmu at gmail.com
`