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 using TeX4ht and I noticed that the displayed equations always forces the current paragraph to end. For example, if I write:

We define
\[ x = 3 \]
and continue the discussion.

I would expect only one paragraph produced, but TeX4ht produces two (one before, and one after the equation).

Here is a minimal working example, to be compiled first with latex, then with tex4ht:


We define
\[ x = 3 \]
and continue the discussion.

Any idea of a workaround, or a solution?

(I think that I figured out that the TeX4ht file which produces those paragraph ending is html-mml.4ht, but I'm not sure how to fix it)

share|improve this question

You might add the following after \begin{document} and rerun:

   \csname a:mathml[]\endcsname
   \DviMath\Tg<\a:mathml mrow\Hnewline>$$\DisplayMathtrue }
  {$$\Tg</\a:mathml mrow>\EndDviMath\csname b:mathml[]\endcsname}
share|improve this answer
Thank you. That's a good start, but it does not quite work. First, after the equation, a p tag is produced, which should not be there. Second, that solution works only for the \[\] environment, not for the equation environment, for example... – Olivier Oct 6 '12 at 15:16

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.