[l2h] Inserting javascript in header of each HTML page?

Martin Reed Martin Reed <mjreed@essex.ac.uk>
Wed, 14 Jun 2000 11:19:18 +0000


I am using Latex2html to convert seminar slides into a version that can
be displayed as a screen presentation (a bit like M$ Powerpoint). I have
javascript that can look after navigation (mouse buttons to go forward
back etc.), resizing fonts to display correctly at various screen sizes
and creating a web browser window with minimal adornment. I would like
to insert this javascript so that it is either in the header of each
HTML page created by a section command or inserted just prior to the
<H1> Section Title <H1> item. I am currently inserting the javascript
using a command like:

alert("Some javascript")
// -->

in the preamble and then a suitable macro to mark the start of each
slide with a heading using the section command (I am actually using the
article document class)


This inserts the javascript after the heading so that the style apply
only to items following it. Is there a way of inserting the javascript
on each HTML page? I do not want to go to the expense of learning Perl
to build an extentsion (just yet) or post process the HTML as the
javascript is using some sectioning information grabbed from latex.

i.e. I would like to do


However, this obviously puts the javascript at the end of the previous
section which is not what I want at all.

Any ideas? Is there macro for inserting HTML head script/code. If not
could anyone point me to how I could create such an extension (what Perl
files to look at) which would probably (?) be easier than writing a new
extension to the seminar package.

/ Dr. M.J. Reed                               Room:          4SB.6.15 \
| Dept. Electronic Systems Engineering         Tel:+44 (0)1206 872479 |
| University of Essex, Colchester CO4 3SQ, UK  FAX:+44 (0)1206 872900 |
\ mailto:mjreed@essex.ac.uk    Web: http://esewww.essex.ac.uk/~mjreed /