Hi Robin, and others.

On 06/06/2006, at 6:32 PM, Robin Fairbairns wrote:

>   One way to fix the problem is to have
>       \pdfoutput=0
>   at the top of your LaTeX jobs, but there should
>   be an easier way to configure the same result.
>
> no, after loading the package that breaks things.  the problem is  
> that some
> packages (including html.sty, last i looked) use a broken means of  
> detecting
> that they're using pdflatex, and on modern distributions this  
> brokenness means
> that it *always* decides it's using pdflatex, regardless of how  
> latex was
> called.

Yes, it's true that  html.sty  does have a slight problem in this  
regard,
but that *should not* be relevant to the generation of images by
a LaTeX2HTML job.

The  images.tex  file that is created by LaTeX2HTML should not include
lines that cause either  html.sty  or  hyperref.sty  to be loaded.

However, that being said, it *is* possible that a user's own package
or \input source might be requiring some coding that has a side-effect
of causing such a package to be loaded as part of the processing
of  images.tex .

The *easy* way to avoid this is to identify lines of coding that lead
to this effect, but which are irrelevant to any images that need to
be created. Then simply surround these lines by "comments" as follows:

   %begin{latexonly}
   ...
   ...
   %end{latexonly}

This causes the intervening ... lines to be ignored by LaTeX2HTML,
while having no effect at all when LaTeX processes the same job.



>
> i've mentioned this before here.  is there a way to distribute a  
> "working"
> html.sty, or do we have to wait until someone (presumably poor old  
> ross)
> has time to produce a new distribution?

Yes;  html.sty  needs an update.
To be fully compatible with *verrrry* old LaTeX software, the test for
whether pdfTeX is being used should be something like:


\ifx\csname IfFileExists\endcsname\relax
  \let\pdfunknown\relax        % too old for packages ??
\else   %  using a modern LaTeX
   \IfFileExists{ifpdf.sty}{%
     \usepackage{ifpdf}%
     \ifpdf\else
       \let\pdfunknown\relax   % not making PDF
     \fi
   }{%
    \ifx\csname pdfoutput\endcsname\relax
      \let\pdfunknown\relax    % not using pdfetex
    \else  %  either  pdftex  or  pdfetex
      \ifnum \pdfoutput=0\relax
        \let\pdfunknown\relax  % not making PDF
      \fi
    \fi
   }%
\fi

Now the test for what to do about PDF and hyperref becomes:

[EMAIL PROTECTED]
\ifx\undefined\hyperref
  \ifx\relax\pdfunknown
    [EMAIL PROTECTED]
  \else
    % making PDF  so force loading of  hyperref  package
    \RequirePackage{hyperref}%
  \fi
\fi


This means that if methods other than pdfTeX are being used
to make PDF (e.g., via  dvips + Ghostscript) then the user
must ensure that  \usepackage{hyperref}
comes before  \usepackage{html} .


Does this all look OK to you Robin ?

>
> for reference: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ifpdf
>
> robin
>

Cheers,

        Ross
>

------------------------------------------------------------------------
Ross Moore                                         [EMAIL PROTECTED]
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------


_______________________________________________
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html

Reply via email to