Hello Sven,

>
>I wanted to define a new LaTeX environment which does nothing but set its
>contents (probably several paragraphs) in italic.  By now I have come up with
>(not quite) half a dozen ways that work in LaTeX, but don't work with
>LaTeX2HTML due to two separate bugs...

The bugs you reported are fixed in v98.1p3
(available at the Darmstadt repository).


>Bug #1: It turns out that LaTeX2HTML does not understand the trivlist
>environment, and chooses to generate an image, rather than simply
>inserting <I>
>and </I> tags.

The {trivlist} environment is now implemented.

It hadn't been done before since it's accepted usage was not clear.

Notice that this use of {trivlist}...

>First I turned to the way that the LaTeX "blue book" would suggest:
>
>\newenvironment{note}{\begin{trivlist}\itshape\item }{\end{trivlist}}
>
>Here the trivlist environment does nothing but delimit the scope of the
>\itshape declaration.  (Of course I cannot use the braces {...} in a
>\newenvironment definition without...)

...does not agree with the description of {trivlist} in the Reference
section C.6.3 of the "blue book".

That description does not seem to allow any material
before the first \item .


List-like environments in LaTeX2HTML had been built upon this assumption
of no preceding material, even if just style-changes.
Now the new  &do_env_trivlist  allows for this possibility.

Indeed it collects all such material and applies it
before each  \item  separately.
This is necessary to get HTML tags nested correctly
within the <DL> description-list structure.
Unfortunately, the zero margins criterion cannot be met,
since the browser itself puts in such margins.





>Even if I add a space, as in:
>
>\newenvironment{note}{\itshape }{\normalfont}
>
>LaTeX2HTML will eat that space and produce the same error.

Fixed.


>If you are wondering about other possibilities:
>
>\newenvironment{note}{\begingroup\itshape}{\endgroup}
>
>works in LaTeX, too, but falls in the "missing space" trap in LaTeX2HTML.
>
>\newenvironment{note}{\begingroup\itshape{}}{\endgroup}
>
>circumvents the "space" problem, but still fails because LaTeX2HTML ignores
>\begingroup ... \endgroup

\begingroup ... \endgroup  is now implemented as follows:


Internally is created the effect of:

        \newcommand{\begingroup}{\begin{tex2html_begingroup}}
        \newcommand{\endgroup}{\end{tex2html_begingroup}}
and similarly
        \newcommand{\bgroup}{\begin{tex2html_bgroup}}
        \newcommand{\egroup}{\end{tex2html_bgroup}}

Now, after newcommand replacements have been made and braces are numbered,
the normal &translate_environments procedure will ensure the correct
groupings and tag-nestings.


Thanks Sven, for a very useful contribution.


Regards,

        Ross Moore


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ross Moore                             email: [EMAIL PROTECTED]
Mathematics Department                 phone:      +612 9850 8955
Macquarie University                     fax:      +612 9850 8114
Sydney, NSW 2109                      office:             E7A-419
Australia              WWW: http://www-math.mpce.mq.edu.au/~ross/

                ***************************

for the best in (La)TeX-nical typesetting and Web page production
join the  TeX Users Group (TUG) --- browse at  http://www.tug.org

                 <[EMAIL PROTECTED]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Reply via email to