I'm trying to produce an html copy of my book, which is written in LaTeX using tex4ht. Things are going better than I expected. But in some places I use the equation environment and in others align. They look essentially the same in PDF, but results differ between the two environments when I use htlatex. Here is an example code sequence:
\documentclass{article}
\usepackage{amsfonts}
\usepackage{mathtools}
\everymath{\displaystyle}
\begin{document}
\begin{equation} \label{eq:radix}
\sum\limits_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
\end{equation}
\begin{align} \label{eq:radix}
\sum\limits_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}
\end{align}
\end{document}
Here are my questions:
- In my PDF version, when should I use equation and when should I use align? I have used equation for showing expressions and single-line equations, and I have used align for continuing equations.
- Is there a way using tex4ht to cause equation and align to produce the same visual results?
Question #1 is the more interesting one to me. I sell my book in both PDF and print-on-demand formats. The HTML version will be available free online, so formatting is less important. It would be nice, though, if the formatting in HTML were consistent between equation and align environments.
pic-align
option in order to make the align look better. It seems that it is treated as inline math by default. – michal.h21 May 3 '15 at 19:03equation
; for multiline displays you can choose betweengather
(no alignment) oralign
(and some other environments, actually). – egreg Sep 5 '15 at 17:06