[l2h] Bug with \HTMLcode command

David Pritchard drpritch at cs.ubc.ca
Sat Oct 18 07:05:32 CEST 2003


Hi,

I found a bug in the \HTMLcode command. I was trying to do the following:

\HTMLcode{SUP}{0}

to generate a superscript 0. In the process, I discovered that any 
\HTMLcode{xxxx}{0} command fails. The fix is fairly easy, involving a 
change to the do_cmd_HTMLcode routine in latex2html. Change the line 
near the end of the subroutine that reads
            } elsif ($value) {
to
            } elsif (length($value)) {


This is a classic PERL pitfall - testing if $value is true instead of 
testing if $value is a non-empty string.

- David

-- 
David Pritchard                            http://www.david.enigmati.ca
                                                drpritch [at] cs.ubc.ca
Imager Lab, Computer Science Department, University of British Columbia




More information about the latex2html mailing list