[l2h] different versions of the tex-file

Ross Moore ross at ics.mq.edu.au
Sun Nov 23 06:47:53 CET 2003


Hi Phil,

On Sun, 23 Nov 2003, Phil Lanch wrote:

> yes: for a start, it encouraged me to try altering my LaTeX in case that
> would help.  it seems to cause problems if i place commands such as
> \excludecomment{versiona} or \begin{versiona} in the middle (or end) of
> a line, so i've now put each at the start of a new line.  now the only

Yes, for include/exclude environments to work properly,
you need to use new lines for the \begin{...} and \end{...} markup.

> thing that doesn't work the way i'd like is that each (included) comment
> environment is turned into an image: they're perfectly good images, but
> images weren't necessary, simple HTML could have done the job.  is this
> what you expect latex2html to do?  is it difficult to stop it doing it?

Your code below simply says to include/exclude the environments.
It doesn't say how to translate their contents; that's why you get
the images.

You still need a \newenvironment definition, even if it
doesn't do much; e.g.

\begin{htmlonly}
 \newenvironment{versionpub}{\begin{flushleft}}{\end{flushleft}}
 \newenvironment{versionpriv}{\begin{flushleft}}{\end{flushleft}}
\end{htmlonly}

or

\begin{htmlonly}
 \newenvironment{versionpub}{}{}
 \newenvironment{versionpriv}{}{}
\end{htmlonly}

The  \begin{htmlonly}...\end{htmlonly}  restricts this
definition to processing by LaTeX2HTML, in case there
is already a sensible definition for LaTeX.


> a minimal example:
>
> ===================== start =====================
> \documentclass[a4paper]{article}
>
> \usepackage{html}
>
> \includecomment{versionpriv}
> \excludecomment{versionpub}
> %\includecomment{versionpub}
> %\excludecomment{versionpriv}
>
> \begin{document}
>
> \begin{versionpriv}Secret info
> \end{versionpriv}
> \begin{versionpub}[Omitted from online version]
> \end{versionpub}
>
> \end{document}
> ====================== end ======================
>
> to the original poster: if you're seeing different problems, please go
> ahead and post your own example.

Hmm; it seems that LaTeX doesn't need a separate definition for the
environment. It wasn't implemented that way for LaTeX2HTML.
I think that it is better to retain delimiters for such environments,
to that extra HTML markup can be added, if desired.


Hope this helps,

	Ross

>
> --
> Phil Lanch                    0xD78D598DA6635CF32AB24593C98994B7D95B33E3
>    http://www.subtle.clara.net/rephrase/ - GnuPG passphrase recovery
>
>   scattered islands of independent-minded reporting are lost in oceans
>   of the stenographic reliance on official sources  -- Norman Solomon
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html
>


More information about the latex2html mailing list