[l2h] problems with alignment environment

Ross Moore ross at ics.mq.edu.au
Sun Nov 2 05:12:24 CET 2003


Hi again Bill,

On Sat, 1 Nov 2003, William Martin wrote:

> I have been reading the Latex Web Companion very closely.  I haven't
> quite figured out out to use CSS styles, but I am really close.  Is this
> valid?:
>
> \documentclass{article}
> \usepackage{html}
> \htmlsetstyle[junk]{UL}{list-style-type=square;
> list-style-image=url(http://www.orie.cornell.edu/redcircle.jpg)}

OK; I was intending to answer this question, that you posted
earlier --- last week, wasn't it ?
So this message is going to the latex2html email list too.



There are several problems here.

Firstly, the syntax is:

  \htmlsetstyle[UL]{junk}{list-style-type=square;

as the CLASS is 'junk' which need not qualify anything,
though in this case you want it for  UL.junk .

That will write the rule into the .css file...


Secondly.

  ... *provided* you delete or rename the existing one.

That is, you must *force* LaTeX2HTML to write out the information.
If a CSS file of the correct name already exists, then a new one is
*not* created. This is a rather crude way of not writing .css files
which generally do not change often.



Thirdly,

>
> \begin{document}
> \begin[junk.UL]{itemize}

this should be  \begin[junk]{itemize}
as the UL is implicit in the kind of environment being processed.

However, for some reason the  'CLASS="junk"' isn't being
applied to the list tagging in the HTML output.
I'll need to diagnose why not.


Fourthly,

This will not write to .css properly:

> list-style-image=url(http://www.orie.cornell.edu/redcircle.jpg)}
                           ^
since the ':' is interpreted as a delimiter of CSS properties.

I guess the correct logic is to treat the '(' and ')' as delimiters
that bind more tightly, cancelling the special interpretation of ':'.
This means adding a line of Perl coding to the subroutine:
  sub  process_htmlstyles .
to revert some replacements  ( ':' --> ' : ' ) made earlier,
or to rethink this processing altogether.


> \item item1
> \item item2
> \item item3
> \end{itemize}
>
> \end{document}
>
> The resulting <UL> stuff does not contain any tag information.


Thanks for the reports.
Clearly more work is needed to make use of CSS styles more robust.


Cheers

	Ross


>
> Thank you,
>
> -- Bill --
>
> On Sun, Nov 02, 2003 at 01:50:55PM +1100, Ross Moore wrote:
> >
> > Hello William,
> >
> > On Sat, 1 Nov 2003, William Martin wrote:
> >
> > > Thank you for your input.  I will pass your comments along to the
> > > author of the paper that this Latex code is from.  Latex2html did much
> > > better with the remainder of the paper.
> > >
> > > The Windows version of Latex2html strips out commas from the command
> > > line, so something like "latex2html -html_version
> > > 4.0,latin1,unicode,utf8" does not work, though I can set the options
> > > in the init file.  One interesting observation was that if I specify
> >
> > I never use windows for this kind of work; its special requirements
> > are usually handled by others, sorry.
> > However, the init file mechanism allows full customisation anyway.
> >
> >
> > > an invalid -html option, I get an error message, but Latex2html
> > > renders equation I sent you properly, though as one large image file.
> >
> > Yes; the requested level of HTML output affects what LaTeX2HTML produces,
> > so as to conform with the published W3C recommendations.
> > With lots of mathematics, including aligned environments, it's often
> > best to use larger images rather than lots of smaller images.
> >
> > The LaTeX Web Companion (Addison-Wesley, CSE series) has a whole chapter
> > devoted to LaTeX2HTML and all of its output options, especially for
> > mathematics.
> >
> >
> > >
> > > In http://www-texdev.ics.mq.edu.au/MARTIN/aligntest/
> > > http://www-texdev.ics.mq.edu.au/MARTIN/aligntest.pdf, the equation
> > > label are on different sides of the page.  Is this a settable option?
> >
> > It's a package option to AMS styles and document classes:
> >
> > landau.ics.mq.edu.au> grep eqn `kpsewhich amsmath.sty`
> > \DeclareOption{leqno}{\tagsleft at true}
> > \DeclareOption{reqno}{\tagsleft at false}
> >
> > landau.ics.mq.edu.au> grep eqn `kpsewhich amsart.cls`
> > \DeclareOption{leqno}{%
> >   \tagsleft at true \PassOptionsToPackage{leqno}{amsmath}}
> > \DeclareOption{reqno}{%
> >   \tagsleft at false \PassOptionsToPackage{reqno}{amsmath}}
> >
> > e.g.
> >  \documentclass[reqno]{amsart}
> >  \usepackage{amsmath}
> >
> > is the same as
> >
> >   \documentclass{amsart}
> >   \usepackage[reqno]{amsmath}
> >
> > In the first case, the \usepackage{amsmath}  may even be redundant.
> >
> >
> > LaTeX2HTML defaults to having the tags on the right, as this
> > seems to be the most commmon practice. However, it *does* recognise
> > the options, if you provide them explicitly.
> >
> > >
> > > Thank you for your help.
> > >
> >
> > You're welcome,
> >
> > 	Ross Moore
> >
> >
> > > -- Bill Martin --
> > >
> > >
>
> --
> =======================================================================
> William T. Martin		email:	martin at orie.cornell.edu
> Cornell University/ORIE		Fax:	(607) 255-9129
> 257 Rhodes Hall			Phone:	(607) 255-9134
> Ithaca, NY 14853
> Public Key: http://www.orie.cornell.edu/~martin/public_key.html
> =======================================================================
>


More information about the latex2html mailing list