[l2h] CSS and theorem environments

Ross Moore ross@ics.mq.edu.au
Tue, 15 Oct 2002 07:33:32 +1000 (EST)

> Hi there,
> I am quite new to latex2html, so I guess what I am trying to do should be
> fairly easy, but I haven't found any doc on this yet.
> I am using the amsthm package to declare new environments such as
> 'definition', ...
> The produced html code looks like this:
>     '<DIV><B>Definition ...'
> Now I would like to be able to customize the displayed theorem using a
> stylesheet. So I would like latex2html to add a CSS class tag for me like
> this:
>     '<DIV CLASS="DEFINITON"><B>Definition ...'
> Any help on how to do this would be much appreciated,

Simply use the command-line option:
   -html_version 4.0

With HTML 4.0, the variable $USING_STYLES  is set, and several
class names come automatically.
(You can set also  $USING_STYLES =1;  in an init file, with HTML 3.2;
but then there would be no guarantee of having validatable HTML.)

You can then edit the .css stylesheet to attach styling properties
to these classes.

Indeed, commands \htmlsetstyle and  \htmladdtostyle allow the stylesheet
to be edited from within the LaTeX job.

Also, the \begin command has an optional argument which allows extra
classes and attributes to be attached to some opening tags.
(Make sure \usepackage{html} has loaded the html package.)
These features are discussed in depth in The LaTeX Web Companion.

Hope this helps,

	Ross Moore

> Thanks
> -- 
> __________________________________________________________________________
> Christophe Tournery                            christophe.tournery@epfl.ch
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html