[l2h] alltt gives meaning to more than \ and the braces

Ross Moore ross@ics.mq.edu.au
Mon, 25 Nov 2002 23:13:41 +1100 (EST)


> Hi there,
> 
> latex2html seems do more than it should:
> 
> \begin{verbatim}
> --foo
> >>bar
> \end{verbatim}
> 
> and
> 
> \begin{alltt}
> --foo
> >>bar
> \end{alltt}
> 
> look the same when processed by LaTeX, however, latex2html converts
> alltt environment to an interesting result:
> 
> <DIV ALIGN="LEFT">
> <TT>
>  -foo
  the -- ligature ==> endash  has acted here.
 
> <BR>&#187;bar
  this is another ligature pattern, for guillemot quotes 

> <BR></TT>
> </DIV>
> 
> That looks like a bug to me. ;)
Perhaps.

The {alltt} environment is basically a hack, which is quite
hard to emulate without following the TeX processing model
exactly --- LaTeX2HTML is not designed to do that.

If you really mean verbatim, then you should use
a {verbatim} environment.
 
> Is there a way to turn this processing of?

Not easily, as there is no notion of \catcode in LaTeX2HTML.
It would require a major change to how the {alltt} environment
is processed. 

You could add a post-processing routine, to find the bad patterns
that are characteristic to this document, and fix them.
However, it's value for other documents would be questionable.


Hope this helps,

	Ross Moore


> Thanks in advance,
>   Gregor
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html