[l2h] avoiding conversion of "--" to "-"

Fred L. Drake, Jr. fdrake at acm.org
Tue Dec 30 18:00:54 CET 2003

Ross Moore writes:
 > It happens in the &text_cleanup routine:


 > I'd suggest that you replace the above line by a subroutine call,
 > then define the subroutine to do whatever replacements you think
 > are best for you -- perhaps none at all.

I've been using a stock LaTeX2HTML installed via RPM, and am hesitant
to change that.  There are several people who run the document
conversions I run, and keeping tool installation simple is important.

I was able to find a suitable definition for my helper function, so
I'll stick with the current route for now.  Should a future LaTeX2HTML
have a hook for this, I'll likely use it, but I don't know how
widespread this issue is.

I'd love to be able to suppress conversion of "<<" and ">>" to
guillemets as well in the same context, but that appears to be handled
differently.  I didn't see it in text_cleanup() at any rate.

 > So perhaps you should be using a construct that creates a 'sensitive'
 > marker for the whole block of content, in a similar way to how
 > verbatim-like environments are handled. (These have their content
 > stored in a database, and a 'marker' inserted into the document;
 > to be replaced much later by the &replace_sensitive_markers routine.)
 > However, environments like {alltt} cannot be done this way, as for
 > those macros still need to be expanded.

Unfortunately, that's also the case here.  The markup I'm processing
is sufficient to tell me that what I'm looking at needs to be
presented as code, but it can certainly have additional markup
embedded within it.


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation

More information about the latex2html mailing list