[l2h] Double-spacing command in a .tex file worked in a .dvi file using LaTeX 2e, but not in a .html file using LaTeX2HTML 1.70.

Ross Moore ross.moore at mq.edu.au
Sun Aug 15 22:01:09 CEST 2010

Hi Finn,

On 15/08/2010, at 9:59 PM, Finn Aarup Nielsen <fn at imm.dtu.dk> wrote:

> Hi Pat,
> On Sun, 15 Aug 2010, Ross Moore wrote:
>> That last statement Is not quite true. The CSS language can be used to add extra information about detailed layouts for items on a webpage. When LaTeX2HTML was written, the CSS specifications were in rather early stages of development, and not well supported by web browsers. Nevertheless, there is a mechanism to add CSS rules using LaTeX2HTML. You can learn about it in the book The LaTeX Web Companion. It requires you to adjust your LaTeX source somewhat, and/or edit .CSS files after the translation has been done. These are things which do not happen automatically.
> Adding the line:
> body { line-height: 2; }
> ... to the generated .css file seems to do the trick.

This will affect everything in the generated HTML pages.
Though the number 2 need not be best.
In LaTeX a stretch of 1.5 is frequently used for double-spacing.

> Ideally latex2html would handle this case.

Better would be applying the rule to paragraphs only, thus avoiding headings.
For example:
>                    P { line-height: 1.5 }

But even this may be too much, if the double-spacing is needed only with certain parts of the document. That requires defining a class of paragraph. This is where it is best done with user input, via the extra macros discussed in the LaTeX Web Companion. 

> /Finn

Hope this helps,


More information about the latex2html mailing list