Scientific word insists in generating displayed math using

\begin{align*} ... \end{align*}

and htlatex has a bug in that it does not generate bit mapped images in this case.

The fix that I found after trial and error is to replace the above with

  \begin{eqnarray*} ....  \end{eqnarray*}

So I just need to know what the syntax is supposed to be. The bug that describes this more is here http://puszcza.gnu.org.ua/bugs/?179

  • Is it possible to show how are you trying to redefine, the new environment?
    – Thanos
    Feb 11 '13 at 6:24
  • eqnarray is deprecated and should not be used any more as it produces inconsistent spacing. If you still want to do it (I'm not familiar with htlatex), you will need to take care of the special issues of starred and no starred form and probably use \NewEnviron from the environ package. Also you should put your actual question into the body and reduce the title.
    – bodo
    Feb 11 '13 at 6:26
  • @Thanos, I tried silly things, since I do not know the syntax. I looked at many sites, and confused about if I should use \renewcommand or \newcommand or \let or \newenvironemnt or \renewenvironment etc... showing my attempts will make people laugh and will not add much value. I simply do not know the syntax.
    – Nasser
    Feb 11 '13 at 6:29
  • 3
    \renewenvironment{align*}{\begin{eqnarray*}}{\end{eqnarray*}} if you keep all the above warnings in mind. And you must promise never to use it with pdflatex. :-)
    – T. Verron
    Feb 11 '13 at 6:55
  • 1
    @Nasser As tex4ht hooks into \begin{document}, put your redefinition statement after \begin{document}.
    – deimi
    Feb 11 '13 at 7:30

Thanks to CV Radhakrishnan from tex4ht, the bug has been fixed.

There is an option now to handle the problem with images for math in the align environment. The option is pic-align

  htlatex  foo.tex  "html,pic-align"

Here is the result now using this option



  v^{2} & =& \left(  \dot{x}+v_{x}\right)  ^{2}+v_{y}^{2}\\
        & =& \dot{x}^{2}+l^{2}\dot{\theta}^{2}+2\dot{x}l\dot{\theta}\cos\theta

  v^{2} & =\left(  \dot{x}+v_{x}\right)  ^{2}+v_{y}^{2}\\
        & =\dot{x}^{2}+l^{2}\dot{\theta}^{2}+2\dot{x}l\dot{\theta}\cos\theta


Here is the output from htlatex foo.tex "html,pic-align"

enter image description here

We can see that align now works fine in htlatex !

Just for completion, if someone is using htlatex, you'd need to also add these 2 lines to your config file to force some of the inlined math to be bit mapped. An example myconfig.cfg

  \Configure{PicMath}{}{}{}{ class="math" align="absmiddle"} 

and now the command is:

htlatex foo.tex "myconfig.cfg,html,pic-align"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.