Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
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. –  canaaerus 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
show 12 more comments

1 Answer 1

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

\documentclass[12pt,titlepage]{article}%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}%

\begin{document}

\begin{eqnarray*}
  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
\end{eqnarray*}

\begin{align*}
  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
\end{align*}

\end{document}

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

\Preamble{html}
\begin{document}
  \Configure{$}{\PicMath}{\EndPicMath}{}
  \Configure{PicMath}{}{}{}{ class="math" align="absmiddle"} 
\EndPreamble

and now the command is:

htlatex foo.tex "myconfig.cfg,html,pic-align"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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