TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a TeX/LaTeX newbie. I would like to generate a .png using dvipng for the below equation.

$$\eqalignno{\overline {Z_{w,h}^{(LDGM)}} =&\sum\limits _{e=0}^{t} \left [{{ 1}\over { t\choose e}} {\rm coef}\left (\prod _{u=1}^{\infty} (1 + x^{u}y)^{m {\mathtilde {\lambda }}_{u}}, x^{e}y^{w}\right)\right. \cr & \left . \times {\rm coef} \!\left (\prod _{v=1}^{\infty} [f_{-}(x,v)y \!+\! f_{+}(x,v)]^{n {\mathtilde {\rho }}_{v}}, x^{e}y^{h} \!\right)\!\right]\!. \cr &&{\hbox{(3)}}}$$

Please suggest what is wrong with the equation and how to generate a dvi for this.

share|improve this question
What is the error message you get? What command line are you using to generate the output file? Also, best if you post a fully compilable MWE that illustrates the problem including the \documentclass. – Peter Grill May 13 '12 at 18:22
As far as generating a .png file see How to export a equation as a image without background?, and TeX to image over command line. – Peter Grill May 13 '12 at 18:24
@PeterGrill: Possibly no documentclass. This seems more like Plain TeX to me. – Caramdir May 13 '12 at 18:43
up vote 5 down vote accepted

The TeX source looks like plain TeX code because of the \eqalignno command. If you just want to fix it, replace the & XML entities with plain & characters. Also, \mathtilde is not available in plain TeX. Thus, you can either use \tilde instead, or define a macro that simply maps \mathtilde to \tilde. The resulting document looks something like this:

   \eqalignno{\overline {Z_{w,h}^{(LDGM)}} =
   & \sum\limits _{e=0}^{t} \left [{{1}\over {t\choose e}} {\rm coef}
     \left(\prod _{u=1}^{\infty} (1 + x^{u}y)^{m {\mathtilde {\lambda }}_{u}},
     x^{e}y^{w}\right)\right. \cr 
   & \left . \times {\rm coef} \! \left(\prod_{v=1}^{\infty} 
     [f_{-}(x,v)y \!+\! f_{+}(x,v)]^{n{\mathtilde{\rho}}_{v}}, 
     x^{e}y^{h} \!\right)\!\right]\!. \cr 
   & \hbox{(3)}}

To get a DVI file, compile it with tex <filename>.

enter image description here

share|improve this answer

Your Answer


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.