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@tug.org
http://tug.org/mailman/listinfo/latex2html

_______________________________________________
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html

Reply via email to