[l2h] Problem with \HTMLcode and APPLET attributes
Wed, 21 Aug 2002 16:04:24 +1000
I'm doing some lecture notes about Java applets, and obviously
want to conditionalize between the online HTML version, which
has a live applet and a link to the source code, and the printed
LaTeX version, which has just a screen-grab of the applet with
the source code included verbatim. (Both versions show the
literal mark-up needed.)
I could do that fine with the right combination of latexonly,
htmlonly and rawhtml environments, but that requires needlessly
repeating the applet's basename and the width and height. So I
decided to abstract that into a macro, parametrized by the
applet's basename, width and height. That required using
\HTMLcode to parameterize the generated raw HTML. Here I get
problems. This simple LaTeX file:
sends LaTeX2HTML into an infinite loop (recursion?) endlessly
*** attributes CODE,HEIGHT,WIDTH are required for <APPLET> ***.
This happens both with 2002-1 and 2K.1beta, on both MacOSX (with
fink) and Red Hat 7.2 (x86).
Wrapping a <DIV> tag around the applet -- as above, but with
doesn't loop. It produces the above "*** attributes" message
just once, but at the end gives the warnings:
*********** WARNINGS ***********
HEIGHT=64 is an invalid value in the <APPLET> tag
CODE=foo is an invalid value in the <APPLET> tag
WIDTH=256 is an invalid value in the <APPLET> tag
I've tried different variants in the attributes (spacing,
quotes), and tried having the applet body non-empty. But it's
much the same result. The -debug and -verbosity flags haven't
shed any light on what's going on.
So I'm stumped. Any ideas?
My workaround (as often when LaTeX(2HTML) can't quite do what I
want) is to generate the bulky original LaTeX (latexonly,
htmlonly, rawhtml) with appropriate substitutions via a Perl
script, and \input it. But it's not the way I'd like to do it,
especially when it looks like LaTeX2HTML *should* be able to do
just what I want.
Les Kitchen, Senior Lecturer <URL:http://www.cs.mu.oz.au/~ljk>
Department of Computer Science and Software Engineering email@example.com
The University of Melbourne phone: +61-3-8344-9101,-9104
Computer Vision & Machine Intelligence Lab fax: +61-3-9348-1184