[l2h] What is a good way to introduce five or six consecutive, blank spaces within text in a .html file produced using LaTeX2HTML?

Pat Somerville l_pat_s at hotmail.com
Fri Oct 14 16:44:57 CEST 2011

Thank you, Julius O. Smith, III (J.O.S.) and Peter Flynn, for very kindly
taking the time to write to me.  I pursued the simple solution of Julius O.
Smith, III using the structural form of

\begin{verbatim}
The Fortran code and sample input and output files' contents used with that
code were placed here.
\end{verbatim}

in a file of the form MyFile.tex.  Then after executing the commands of the
form "latex MyFile.tex" and "latex2html.........MyFile.tex" on such a file I
found that the respective LaTeX and LaTeX2HTML output files with names of
the form MyFile.dvi (I think this is DeVice Independent for the .dvi file
type.) and MyFile.html gratefully contained column structures and horizontal
blank spacings as in my Fortran code!  The output in the file of the form
MyFile.dvi was vertically double-spaced, which was different from the
original single spacing in the Fortran code, which was not at all a serious
problem and was consistent with the double spacing in the rest of the
document with the name of the form MyFile.dvi.  I had similar success in at
least the LaTeX2HTML output file of the form MyFile.html in displaying the
sample input and output files for my Fortran code.

Prior to this experience I don't think I was very experienced in using the
verbatim environment and might not have even used it at all in .tex files I
prepared completely by myself.  So thank you, Julius O. Smith, III,  for
providing for me this simple solution which worked so well!

Now for my education can anyone explain to me why in modifying a tag in the
HyperText Markup (HTML) document source code of the output file of the form
MyFile.html to include "      " that the
display of such a MyFile.html in both the Konqueror-4.6.00 and Mozilla
Firefox-6.0.2 Web browsers produced what looked like only about two blank
spaces instead of the six blank spaces commanded?  Once again my latex2html
command to produce such an original file of the form MyFile.html used HTML
3.2.  At the top of the document source code of the file of the form
MyFile.html I think I saw HTML 3.2 written there.  So because of that, not
being an expert on this matter, I just guess that the Konqueror-4.6.00 and
Mozilla Firefox-6.0.2 Web browsers might have used HTML 3.2 to interpret the
document source code contained in the modified file of the form MyFile.html.
But another possibility I can at least imagine is that those Web browsers
might have used some more recent version of HTML for the interpreting which
might be backwards-compatible with HTML 3.2.

Pat
--------------------------------------------------
From: "jos" <j at w3k.org>
Sent: Thursday, October 13, 2011 6:24 PM
To: "Peter Flynn" <peter at silmaril.ie>
Cc: <latex2html at tug.org>
Subject: Re: [l2h] What is a good way to introduce five or six  consecutive,
blank spaces within text in a .html file produced using LaTeX2HTML?

> I have been happy just using the verbatim environment:
>
> \begin{verbatim}
>   code
> \end{verbatim}
>
> I think it looks fine, and one can copy/paste it out of a browser window,
> ready to use, more or less. (On the Mac I have to change ^M to ^J with an
> emacs macro.)
>
> Example of how it comes out (in conjunction with my .css file):
> https://ccrma.stanford.edu/~jos/pasp/Software_Delay_Line.html
>
> - jos
>
> At 02:58 PM 10/13/2011, Peter Flynn wrote:
>>On 13/10/11 04:39, Pat Somerville wrote:
>>>Hello. This year of 2011 I wanted to include Fortran computer program
>>>code (footnote below) and output listings in .tex files and then run
>>>latex and latex2html commands on those files to produce .html output
>>>files. But I have yet to produce all of the blank columns or spaces and
>>>in the proper locations that I would like to see them in the output,
>>>.html files at or near the beginnings of all of the desired Fortran
>>>statements.
>>
>>I think you may be pushing l2h beyond the limits of its capability.
>>Essentially, what you need is for LaTeX to use the listings package, so
>>that the spaces in your FORTRAN code are retained, and for the conversion
>>to HTML to turn this into HTML's <pre> element type. I remember seeing a
>>colleague try to do this once, and I'm fairly sure he failed.
>>Alternatives:
>>
>>1. try TeX4ht instead of latex2html
>>
>>2. do it the other way round: write your document in XML (DocBook, for
>>example), and then transform it (a) to LaTeX for making a PDF and (b) to
>>HTML for the web, using a pair of XSLT scripts. Much more work, but much
>>more control.
>>
>>///Peter
>>_______________________________________________
>>latex2html mailing list
>>latex2html at tug.org
>>http://tug.org/mailman/listinfo/latex2html
>
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html
>