[tex4ht] \bigl. and \bigr. sometimes cause problems.

Radhakrishnan CV cvr at river-valley.org
Sun Sep 12 08:22:00 CEST 2010


,----[ CVR 2010/09/11 ]
| You are still wanting to be in the stone age technology.  Please throw
| away the raster images of math and switch on to MathML. TeX4ht does an
| excellent job of converting LaTeX into MathML+XHTML which is what is
| needed to see your math documents on the web. As a proof of concept, I
| have put in an experimental chapter of my Professor's book, Cross
| Connections (which I am translating for him into MathML with TeX4ht)
| which is available at: http://download.river-valley.com/kssn/test.xml
| You need FireFox to view the documents. STIX fonts might be necessary
| to view MathML perfectly in FireFox. I have created the documents
| without any tweaking in the source files and with a simple TeX4ht
| configuration of, say, less than 100 lines.
`----

,----[ Thomas 2010/09/12 ]
| 
| An excellent idea, except for some hard reality in my case.
| 
| 1) The document I am dealing with is not small, and not uncomplicated.
| 
| 2) Almost all of the target audience will be corporate internal, and
|    will therefore be using IE7. Some may still be using IE6, and a few
|    might of the more adventurous have upgraded (illegally against
|    corporate policy) to IE8. Virtually none will be using Firefox, and
|    I can almost guarantee no one will be using Chrome. There is no way
|    I can ask them to load a plugin to their browser, and even less to
|    ask them to load some kind of exotic (for them) STIX fonts.  As a
|    result, I am forced to aim for the lowest common denominator, plain
|    vanilla html with pic math wherever things get a little
|    complicated.
`----

If you can't request your viewers, you might think about delivering
the same from the server side.  There are many choices like jsmath
(http://www.math.union.edu/locate/jsMath), MathJax
(http://www.mathjax.org). In fact, TeX4ht has a jsmath option and a
'jmlatex' script is provided to generate html pages with math in
jsmath compatible format. jsmath and MathJax allow to keep math in
LaTeX format in the html page and to dynamically process and render
with Javascript. 

I have created an html page from your example sources and is available
as an archive at:

  http://download.river-valley.com/cvr/mathjax.zip

which has thomas.html, thomas.css and mathjax.png. The last one is a
screenshot of the page as rendered in my laptop.

MathJax is easy to setup, you need to add a few extra lines in the
header of your html page to load MathJax.js.  It can also process
MathML and render irrespective of any browser. No special fonts,
plugin, etc are needed at client side. I think, it best fits your
scheme of things.

[...]

,----[ Thomas 2010/08/12 ]
| Please don't abandon the update/fix of the html+picmath aspect of
| TeX4ht.  It is and will still be needed for quite some time,a dn I
| submit these findings in the hope they can be fixed at some time in
| the future and I try and also provide workarounds as well in the
| meantime.
`----

It might be better to approach the image problem in a different way.
What we do at work for some STM publishers is to write out all the
math (inline and display) to a separate TeX file, create dvi (separate
page for each inline or display math), use dvipng to generate png or
gif in a breeze. This saves a lot of hassles associated with the
current picmath setup. Maybe one day, we will find time to include
this feature as an option into TeX4ht once the documentation project
is reasonably finished.

,----[ Thomas 2010/09/12 ]
| As a reference: have a look at all of Wikipedia.  They are still
| firmly in the picmath camp.  Do they use TeX4ht for their rendering,
| or do they use a custom engine?  I'm a little jealous of their layout.
| The in-line picmath they use is much better typeset vertically with
| respect to the html...
`----

Wikipedia uses a custom program to generate images. I doubt, if it can
process really complex math.

,----[ Thomas 2010/08/12 ]
| I would love to upgrade to the use of mathml, but the reality of the
| situation is that we are still bound by the limitations of the
| shortcomings of the MS/IE world.  Sad but true.  Maybe in 5-10 years,
| but not yet today.
`----

People should make use of MathML, enormous number of manhours have
been expended on the development of MathML which has many advantages
like archiving, voice rendering, assistance in cop-paste operation,
reuse data in other applications like Mathmatica, hyperlinking math
elements, etc.

Best regards

-- 
Radhakrishnan



More information about the tex4ht mailing list