[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
Thu Aug 19 14:15:41 CEST 2010


Thanks again for kindly taking the time to reply to me, Professor Ross Moore
and (Dr.?) Finn Aarup Nielsen.  I made a test file I called Throwaway4.tex,
this time containing English, not simplified-Chinese text.  After executing
latex and latex2html commands on that file, I edited the so-generated file
Throwaway4.css in the so-generated folder entitled Throwaway4.  I added to
the line "body{line-height: 2;}" after the opening .MATH.... and
.BOLDMATH... lines in the file Throwaway4.css.  I probably saved that file
and refreshed the Throwaway4 directory's contents in my Konqueror Web
browser.  Then in the file Throwaway4.html in that same directory the
English text in it was gratefully double-spaced.  So thanks, Dr. Nielsen.
Your simple strategy worked for English text!

But this same sort of thing did not work in the .css file corresponding to a
.tex file containing simplified-Chinese text and the commands
\usepackage{CJKutf8} plus one or more pairs of \begin{CJK}{UTF8}{gbsn} and
\end{CJK} commands.  I think the reason is likely because each one of the
CJK segments of text corresponding to each one of those pairs of CJK
commands resulted in LaTeX2HTML producing a .png (Portable Network Graphics)
image file.  I suppose that those already-generated .png files are then like
"locked boxes" to the .css file such that the contents of those .png files
cannot be altered at that point in time by a "body{line-height: 2;}" command
in the .css file.

If, on the other hand, as kindly suggested by Dr. Shigeharu Takeno in
response to a different, initial e-mail letter, I had instead chosen
\usepackage{CJK}, then I would probably have had smaller .png files and I
suppose some Chinese text outside of those .png files.  Then I suppose the
"body{line-height: 2;}" line in the corresponding .css file would have been
effective in double-spacing any Chinese text in the .html file that is not
in those .png files.  But this is an experiment I haven't actually tried.
The disadvantage of this approach is that I found that pinyin could not be
handled by the pair of commands \usepackage{CJK} and \usepackage{pinyin},
but could be handled by the commands \usepackage{CJKutf8} and
\usepackage{pinyin} which resulted in the Chinese text in the CJK segments
in the .tex file in effect probably "locked" and unalterable by the .css
file inside the resulting .png image files produced by LaTeX2HTML from the
.tex file.

My native language is English; I am learner of the Mandarin-Chinese language
using simplified Chinese text.  My original purpose was to produce
double-spaced text so that a Chinese friend of mine would have room between
my lines of Chinese text to by hand correct my Chinese writing.   I finally
chose another method to accomplish that goal with a file my friend I hope
could handle.  My LaTeX file was called DiscussionOfMatricesAll.tex.  It
contained commands for double spacing of the text, which might have been,
although I am not absolutely certain now of this, \usepackage{setspace} and
\doublespacing.  The command "latex DiscussionOfMatricesAll.tex" produced
the file DiscussionOfMatricesAll.dvi.  Then I opened that .dvi file in the
program KDVI (which might stand for K DeVice Independent) in an
OpenSuSE-11.1, Linux operating system.  Fortunately via the "File" menu that
program KDVI has an option to "Export" a .dvi file to a .pdf (Portable
Document Format) file which worked with simplified-Chinese text.  The
resulting file DiscussionOfMatricesAll.pdf could be opened using the common
program Adobe Reader in a Windows operating system.  I attached that file to
an e-mail letter to my friend.  I hope he will be able to download and save
that file onto his computer's hard-disk drive and then to open that file in
Adobe Reader in a Windows operating system and print it double-spaced onto
sheets of paper.   After he makes his corrections on those sheets of paper,
I hope he will be able to scan those sheets of paper using a scanner into
one or more computer files that he could then e-mail back to me as
attachments to that e-mail letter.  Thank you, Drs. Finn Aarup
Nielsen,  Shigeharu Takeno, and Ross Moore, for very kindly taking some of
your time to write and send me your ideas and suggestions in the recent
past.

Pat

--------------------------------------------------
From: "Finn Aarup Nielsen" <fn at imm.dtu.dk>
Sent: Tuesday, August 17, 2010 4:22 AM
To: "Pat Somerville" <l_pat_s at hotmail.com>
Cc: <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.

>
>
> Dear Pat,
>
> On Mon, 16 Aug 2010, Pat Somerville wrote:
>
>> 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.
>
> I had something of a similar problem the first time I viewed the file.
> What I can think of is:
>
> 1) It is a cache problem in the browser. Pressing shift+reload button
> should at least clear the cache for the HTML, - hopefully also for the
> CSS.
>
> 2) The line "body{line-height: 2;}" has been overwritten. look at the CSS
> again. The position of the line shouldn't matter.
>
>
> /Finn
>
> ___________________________________________________________________
>
>          Finn Aarup Nielsen, DTU Informatics, Denmark
>  Lundbeck Foundation Center for Integrated Molecular Brain Imaging
>    http://www.imm.dtu.dk/~fn/      http://nru.dk/staff/fnielsen/
> ___________________________________________________________________
>
> 


More information about the latex2html mailing list