[l2h] How to suppress \write output in the generated html

Ross Moore ross@ics.mq.edu.au
Fri, 9 Nov 2001 09:05:42 +1100 (EST)


> Hi everybody,
> 
> my LaTeX file contains commands that write into a separate file
> (\jobname.jhf) using \newrite and \write. The file is used for special 
> postprocessing (we try to make JavaHelp input files automatically from
> LaTeX).
> 
> When I convert to html, the contents of this file appears in
> the html text at the place of the \write.

> MY QUESTION IS:
> How can I suppress this output?

You certainly need to be using one or more of LaTeX2HTML's
"conditional code" constructions.

If \write appears explicitly in the body of your LaTeX document,
then simply skip this part, by surrounding it with

\begin{latexonly}
 ...
\end{latexonly}
 

> 
> I have tried the environment 'latexonly', but without
> any success. Anyway, in my oppinion, the output should not be in the
> html
> at the first place.

It is more common for the \write command to be called as part
ofthe expansion of another macro.

In that case, use an alternative definition for the macro, so that
in LaTeX2HTML the action is to simply ignore the string that LaTeX
would write to a file.

Use something like...

  \begin{htmlonly}
   \renewcommand{\mywritemacro}[1]{}
  \end{htmlonly}

in the preamble of your document, after the original definition
of \mywritemacro .

 
> Can anybody shed some light onto this?

Hope this helps,

	Ross Moore


 
> Thanks in advance
> 
> - Josef
> 
> P.S. I am using an up to date installation of latex2html and miktex.
> The installation works just fine otherwise. Also the 'latexonly'
> environment
> works for normal text.
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html