Tex4ht does not seem to behave well when using \begin{description}. It produces output where it adds new line after each item[x] entry. While in PDF it works correctly.

Here is below a MWE and screen shot of the HTML output and the PDF output. This makes using \begin{description} not possible in tex4ht since the HTML generated looks very bad.

\documentclass[11pt]{article}% MWE shows problem with tex4ht


Example 1

\item[1]  A
\item[2]  B
\item[3]  C
\item[4]  D
\item[5]  E

Example 2

\item[]  A
\item[]  B
\item[]  C
\item[]  D
\item[]  E

Example 3

\item A
\item B
\item C
\item D
\item E

Compiled with make4ht bug.tex. Here is side-by-side, the HTML and the PDF

Mathematica graphics

Notice that when using \item[] it works OK, but when putting some value inside the item, it adds new line, when it should remain on the same line like with the PDF output. i.e. \item[1] does not work the same way as \item[]. This is example 1 above. example 2 and 3 are OK.

I am using latest update on texlive 2016

which tex4ht

Is this a known issue in tex4ht? Is there a workaround?


It is not easy to style HTML description list to look in the same way as LaTeX description list. Here is my attempt:


\Css{dl:after {content:"";display:table;clear:both;}}


The dt and dd elements hold the description label and text. We use some simple CSS to put them on the same line. Note that it doesn't work in every instance:

enter image description here

So multi-line descriptions still end on new lines. I don't know how to fix that.

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.