[l2h] newbie questions

Ross Moore ross@ics.mq.edu.au
Thu, 27 Sep 2001 23:41:39 +1000 (EST)


> hi, 
> I'm a new user and I'm having trouble getting l2h to work well on 
> a particular document.  A lot of the latex source appears in the converted
> html document and it does not seperate it into seperate pages based on the
> sections... on more simple documents I have had no trouble.

Yes; this happens because of the attempt to mix TeX constructions
within LaTeX; in particular the definition of \PreserveBackSlash
and the use of \let\PBS=\PreserveBackSlash .

These are definitions that belong within a LaTeX style file.

Note that \PBS is never used explicitly in your LaTeX source,
so LaTeX2HTML has no chance of knowing what it's meant to do.
Instead, the \let\\.... part of its definition gets interpreted
to mean that *all* backslashes are to have a different meaning
to what they normally have, hence the big mess that you get.

At the very least, the definition of \PreserveBackSlash
should be moved into the preamble, and surrounded by conditional comments:

%begin{latexonly}
\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
%end{latexonly}


Also, the document-class  nrc1  is unknown to LaTeX2HTML.
THis is not fatal in itself, but there are macros that are defined
in that .cls  which *are* used in your document.
These will cause problems, and almost certainly force image-generation
to get out-of-whack.
(especially on a system where  nrc1.cls  is not available.


Those usages within the preamble can also be shielded by placing
the comments around them:

%begin{latexonly}
 ...
 ...
%end{latexonly}


Finally, the \documentclass  line itself can be shielded:

%begin{latexonly}
\documentclass[%% french,        %% use with \usepackage[french]{babel}
               %% leqno,         %% only for nrc1 (default is right eqno)
 ...
 ...
 ]{nrc1}
                          %% choose one: nrc1 or nrc2
\usepackage{html}
%end{latexonly}
\begin{htmlonly}
 \documentclass{article}
\end{htmlonly}


Note the need to load   \usepackage{html}
so that LaTeX can know how to interpret  \begin{htmlonly} ... \end{htmlonly} .


After these modifications, I get a nice translation of your pages:

	http://www-texdev.mpce.mq.edu.au/MARLES/P01-081a/

Some things are missing, since I didn't get the .eps sources of your figures.


 
> This document uses a custom style class, but even if I remove that 
> and use the 'article' class, I get a messy result.  Also, the postscript
> images included in the latex are not converted for the webpatge, and
> the manual suggests that they should be.

Where are the image sources ?

 
> I am in the process of comparing 3 latex -> html converters and the latex
> source and html output I am describing can be viewed at
> http://delfino.cisti.nrc.ca:9000/~apm/comparison.html
> 
> Any suggestions and/or help would be MOST appreciated. :)

The above should help you to get better results from LaTeX2HTML.

My modified source is at:  http://www-texdev.mpce.mq.edu.au/MARLES/P01-081a.tex



All the best,

	Ross Moore

> 
> Allison
> 
> -- 
> pi seconds is a nano-century (to within 10%)
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html