Re: [l2h] Another take on the 'no images' problem

2006-06-08 Thread Ross Moore
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 *vey* 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  2109fax: +61 +2 9850 8114



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


Re: [l2h] Another take on the 'no images' problem

2006-06-08 Thread Jean-Pierre Chretien

From: Ross Moore [EMAIL PROTECTED]
Date: Thu, 8 Jun 2006 17:06:47 +1000
To: Robin Fairbairns [EMAIL PROTECTED]
X-Brightmail-Tracker: AQQ=
X-Whitelist: TRUE
Cc: latex2html@tug.org
Subject: Re: [l2h] Another take on the 'no images' problem

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 *vey* old LaTeX software, the test for
whether pdfTeX is being used should be something like:

Sorry if this is off-thread, but referring to my message of March 2006
http://www.tug.org/pipermail/latex2html/2006-March/003150.html
I wonder if this html.sty update can solve the problem, which appears with an 
upgrade
of a recent latex distribution (texlive-2004-texlive-2005)  ?
In fact I suspect not, as I get the same error with pdflatex or latex 
compilation,
but if html.sty should be updated, this other problem could be considered.

The compilation error I get is this:
! Extra \else.
[EMAIL PROTECTED]@ssect ...t {#1}{#6}\@@par }\endgroup \else 
  \def [EMAIL PROTECTED] 
{#5{\hskip ...
l.1 \begin{thebibliography}
   {xx}
   
As I indicated, the ifacsam.tex and ifacsam.bib files are on CTAN. Is this 
reproducible elsewhere ?


Kind regards

-- 
Jean-Pierre


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


Re: [l2h] Another take on the 'no images' problem

2006-06-07 Thread Robin Fairbairns
 Maybe the graphicx package is one of those that don't detect pdflatex
 correctly?

hahaha.

 I was premature in announcing my solution to the 'no dvi' problem.
 The command line switch has no effect if the preamble includes
 
 /usepackage[pdftex]{graphics}

so (modulo the direction of the \) you were *telling* the graphics
package to switch to pdf mode.

 but works fine if the pdftex option is removed.

what a surprise.

 My solution uses  
 oberdiek's ifpdf package:
 
 \ifpdf
 \usepackage[pdftex]{graphicx}
 \else
 \usepackage{graphicx}
 \fi

the default graphics.cfg detects the latter case and selects pdftex or
dvips options according to whether the package is running under pdftex
... using tests written by heiko o.

so

  \usepackage{graphicx}

has the same effect as the your technique above.

in ordinary use, on a free distribution of latex, you only need a
graphics package switch if you're using something eccentric like
dvipdfm
___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Another take on the 'no images' problem

2006-06-07 Thread Christopher Willmot
Thanks for the explanation.

I thought the [pdftex] option was just for information -- that graphicx  
would perhaps optimize some of its processing.  It didn't occur to me that  
it would determine the filetype *latex* would generate.

We live and learn. :-)

On Wed, 07 Jun 2006 09:05:10 +0100, Robin Fairbairns  
[EMAIL PROTECTED] wrote:

 Maybe the graphicx package is one of those that don't detect pdflatex
 correctly?

 hahaha.

 I was premature in announcing my solution to the 'no dvi' problem.
 The command line switch has no effect if the preamble includes

 /usepackage[pdftex]{graphics}

 so (modulo the direction of the \) you were *telling* the graphics
 package to switch to pdf mode.

 but works fine if the pdftex option is removed.

 what a surprise.

 My solution uses
 oberdiek's ifpdf package:

 \ifpdf
 \usepackage[pdftex]{graphicx}
 \else
 \usepackage{graphicx}
 \fi

 the default graphics.cfg detects the latter case and selects pdftex or
 dvips options according to whether the package is running under pdftex
 ... using tests written by heiko o.

 so

   \usepackage{graphicx}

 has the same effect as the your technique above.

 in ordinary use, on a free distribution of latex, you only need a
 graphics package switch if you're using something eccentric like
 dvipdfm



-- 
Christopher Willmot
___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Another take on the 'no images' problem

2006-06-06 Thread Robin Fairbairns
  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.

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?

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

robin


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


Re: [l2h] Another take on the 'no images' problem

2006-06-06 Thread Christopher Willmot
I am using teTeX as bundled with SuSE Linux 10.0.  Both 'latex' and  
'pdflatex' are symbollic links to the same executable at  
/usr/share/texmf/teTeX/bin/i586-linux/pdflatex.

The solution to my problem seems to be using the following command line  
option:

latex -output-format=dvi

Thanks for the help.



On Mon, 05 Jun 2006 23:47:40 +0100, Ross Moore [EMAIL PROTECTED] wrote:

 Hi Christopher,

 On 06/06/2006, at 4:34 AM, Christopher Willmot wrote:

 Thanks for the good docs.  I checked the troubleshooting, and the path
 passed to dvi was bog-standard stuff.
 However, the 'latex' command wasn't producing a *.dvi file!

 Anyone know how can I stop latex from producing *.pdf output?

 Whoah. Which TeX installation are you using ?
 Do you have separate executables, or scripts,
 named  'latex' and 'pdflatex' ?

 If not, your system should give you a
 TeX+dvips+Ghostscript  mode, that is different to the
 default pdfTeX  mode.
 Find out how that works.


 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.


 (It just needs to do it once, and will not then produce *.dvi any more.)


 Hope this helps,

   Ross Moore


 --Christopher Willmot
 ___
 latex2html mailing list
 latex2html@tug.org
 http://tug.org/mailman/listinfo/latex2html

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





-- 
Christopher Willmot
___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Another take on the 'no images' problem

2006-06-06 Thread Christopher Willmot
Maybe the graphicx package is one of those that don't detect pdflatex
correctly?
I was premature in announcing my solution to the 'no dvi' problem.
The command line switch has no effect if the preamble includes

/usepackage[pdftex]{graphics}

but works fine if the pdftex option is removed. My solution uses  
oberdiek's ifpdf package:

\ifpdf
\usepackage[pdftex]{graphicx}
\else
\usepackage{graphicx}
\fi



On Tue, 06 Jun 2006 09:32:48 +0100, Robin Fairbairns
[EMAIL PROTECTED] 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.

 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?

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

 robin





-- 
Christopher Willmot
___
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] Another take on the 'no images' problem

2006-06-05 Thread Ross Moore
Hi Christopher,

On 06/06/2006, at 4:34 AM, Christopher Willmot wrote:

 Thanks for the good docs.  I checked the troubleshooting, and the path
 passed to dvi was bog-standard stuff.
 However, the 'latex' command wasn't producing a *.dvi file!

 Anyone know how can I stop latex from producing *.pdf output?

Whoah. Which TeX installation are you using ?
Do you have separate executables, or scripts,
named  'latex' and 'pdflatex' ?

If not, your system should give you a
TeX+dvips+Ghostscript  mode, that is different to the
default pdfTeX  mode.
Find out how that works.


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.


 (It just needs to do it once, and will not then produce *.dvi any  
 more.)


Hope this helps,

Ross Moore


 -- 
 Christopher Willmot
 ___
 latex2html mailing list
 latex2html@tug.org
 http://tug.org/mailman/listinfo/latex2html


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



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