[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.

Pat Somerville l_pat_s at hotmail.com
Tue Aug 17 04:22:31 CEST 2010


Thanks, Professor Ross Moore and Dr.(?) Finn Aarup Nielsen, for kindly 
sending me your ideas on double spacing.  Here are results of my recent 
attempts to implement your ideas:

1) I added the command \def\baselinestretch{2} after the command 
\begin{document} and separately \def\baselinestretch{1.7} before the command 
\begin{document} in my .tex file.  In each case I executed the commands 
"latex .....tex" and "latex2html.........tex".  The resulting .dvi files 
contained doubly-spaced or nearly doubly-spaced text; but in each case the 
.html file was within paragraphs of only text that was generally 
single-spaced.

2) In the .css file generated by LaTeX2HTML as suggested I added the line 
"body{line-height: 2;}.  I placed it after the opening .MATH and .BOLDMATH 
lines in the .css file; and I probably saved the file.  But then after 
opening the .html file, it was single-spaced.  Running the latex2html 
command again didn't change the spacing from single spacing in the .html 
file.  What did I do incorrectly?  Did I have a syntax error?  Or what step 
did I miss?  Looking at the "Document Source" code for the .html file, by 
right-touch-pad-button clicking on the .html file while it was open in a 
browser, I saw a reference to the name of the .css file I edited.

A possible clue to what took place is that in the past and days or longer 
before the results of the experiments I reported above, I could place only 
the .html and .png files generated by LaTeX2HTML in a folder, open that 
.html file in a browser, and see the mathematics it contained displayed okay 
(Note that I did not include the .css file in that folder.).  It was as if 
the .css file was not being used in those cases by the .html file, since 
there were no obvious problems without the .css file being in that 
folder.--Or maybe another possibility is that the .css file may not have 
contained anything that the .html files used or needed in those cases, 
without generally having looked inside the .css files in those cases. 
Thanks for help.

Pat
--------------------------------------------------
> From: "Ross Moore" <ross.moore at mq.edu.au>
> Sent: Sunday, August 15, 2010 4:01 PM
> To: "Finn Aarup Nielsen" <fn at imm.dtu.dk>
> Cc: "Pat Somerville" <l_pat_s at hotmail.com>; <latex2html at tug.org>
> Subject: Re: [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.
>
>> 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,
>>
>>       Ross
> 


More information about the latex2html mailing list