[l2h] recycling images (?) problem

2003-03-19 Thread gabriele balducci
Hello all,

apologies if my question has an obvious answer.

I have a problem concerning what looks like a wrong image recycling.

Consider the following source, containing two xy environments:

--
\documentclass[a4paper]{article}

\usepackage{xy}
\usepackage{html}

\begin{document}

\begin{displaymath}
\begin{xy}
1em,0em:  
*+{O};
p+/u0.1em/**\dir{}?*\dir{|},
p+/d0.1em/**\dir{}?*\dir{|},
p+/r2em/*+{P},**\dir{-};p=P;
P;
p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
\end{xy}
\end{displaymath}

\begin{displaymath}
\begin{xy}
1em,0em:  
*+{O};
p+/u0.1em/**\dir{}?*\dir{|},
p+/d0.1em/**\dir{}?*\dir{|},
p+/r2em/*+{P},**\dir{=};p=P; %This is the only difference
P;
p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
\end{xy}
\end{displaymath}

\end{document}
--

The two environments are almost identical, but for the `double bond'
directional in the second one (marked on the snippet).


I translate with:

--
latex2html  -split 0  \
-link 0\
-address   \
-info  \
-debug  \
-dir /home/balducci/tmp/l2h-d   \
-tmp /home/balducci/tmp/l2h-d \
source  l2h-log 21
--


What I get is the first picture repeated twice.

The images.tex file contains only the first picture: the second one
does not get written to it. The generated html document sources the
same gif twice.

To me, it all works like l2h considers the two environments identical
and simply doubles the first one to avoid waste of resources (but the
two environments are NOT identical, and the double bond needs to be
there).

If I make some more evident change to the second environment, e.g.:

--
\documentclass[a4paper]{article}

\usepackage{xy}
\usepackage{html}

\begin{document}

\begin{displaymath}
\begin{xy}
1em,0em:  
*+{O};
p+/u0.1em/**\dir{}?*\dir{|},
p+/d0.1em/**\dir{}?*\dir{|},
p+/r2em/*+{P},**\dir{-};p=P;
P;
p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
\end{xy}
\end{displaymath}

\begin{displaymath}
\begin{xy}
1em,0em:  
*+{O};
p+/u0.1em/**\dir{}?*\dir{|},
p+/d0.1em/**\dir{}?*\dir{|},
p+/r2em/*+{P},**\dir{=};p=P; %This is the only difference
P;
p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
P; % ADDED THIS ONE
\end{xy}
\end{displaymath}

\end{document}
--

then all works properly.

Why does not l2h  recognize that the two environments are different?

Am I missing something?

Could anybody check that the above behavior is reproducible?


Thank you very much in advance for any help.


Ciao
Gabriele

Here are my main specs:
-
dschbaldx:12 latex2html -version
Note: Loading /home/balducci/.latex2html-init
Note: Initialising with file: /home/balducci/.latex2html-init
This is LaTeX2HTML Version 2002-2-1 (1.70)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.
-
dschbaldx:13 perl -version

This is perl, v5.8.0 built for i686-linux

Copyright 1987-2002, Larry Wall
-
dschbaldx:31 uname -smrp
Linux 2.4.20 i686 unknown

___
latex2html mailing list
[EMAIL PROTECTED]
http://tug.org/mailman/listinfo/latex2html


Re: [l2h] recycling images (?) problem

2003-03-19 Thread Ross Moore

Hi Gabriele,
 
 Hello all,
 
 apologies if my question has an obvious answer.
 
 I have a problem concerning what looks like a wrong image recycling.
 
 Consider the following source, containing two xy environments:

Glad to see that you are making good use of Xy-pic.
 
 --
 \documentclass[a4paper]{article}
 
 \usepackage{xy}
 \usepackage{html}
 
 \begin{document}
 
 \begin{displaymath}
 \begin{xy}
 1em,0em:  
 *+{O};
 p+/u0.1em/**\dir{}?*\dir{|},
 p+/d0.1em/**\dir{}?*\dir{|},
 p+/r2em/*+{P},**\dir{-};p=P;
 P;
 p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
 \end{xy}
 \end{displaymath}
 
 \begin{displaymath}
 \begin{xy}
 1em,0em:  
 *+{O};
 p+/u0.1em/**\dir{}?*\dir{|},
 p+/d0.1em/**\dir{}?*\dir{|},
 p+/r2em/*+{P},**\dir{=};p=P; %This is the only difference
 P;
 p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
 \end{xy}
 \end{displaymath}
 
 \end{document}
 --
 
 The two environments are almost identical, but for the `double bond'
 directional in the second one (marked on the snippet).

It is the almost identical that is the problem.

LaTeX2HTML constructs a key from the source code that
defines an image. This key is of finite length,
shorter than the length of your long environments.
To stay within the length limits, coding is taken from the
beginning and some from the end, disregarding some stuff
from in-between.

What is happening is that both code snippets are producing the same key,
so the recycling mechanism actually thinks that you are just reusing
the same image, so doesn't bother to handle both separately.

You could try making some trivial differences near the beginning
of the environments; e.g. with a comment

\begin{xy} % molecule with single-bond


\end{xy}

and

\begin{xy} % molecule with double-bond


\end{xy}


or put a triviality into the coding for one image:

\begin{xy}
 0+0,1em,0em:
 ...
 ...
\end{xy}

Hope this helps,

Ross Moore

 
 
 I translate with:
 
 --
 latex2html  -split 0  \
 -link 0\
 -address   \
 -info  \
 -debug  \
 -dir /home/balducci/tmp/l2h-d   \
 -tmp /home/balducci/tmp/l2h-d \
 source  l2h-log 21
 --
 
 
 What I get is the first picture repeated twice.
 
 The images.tex file contains only the first picture: the second one
 does not get written to it. The generated html document sources the
 same gif twice.
 
 To me, it all works like l2h considers the two environments identical
 and simply doubles the first one to avoid waste of resources (but the
 two environments are NOT identical, and the double bond needs to be
 there).
 
 If I make some more evident change to the second environment, e.g.:
 
 --
 \documentclass[a4paper]{article}
 
 \usepackage{xy}
 \usepackage{html}
 
 \begin{document}
 
 \begin{displaymath}
 \begin{xy}
 1em,0em:  
 *+{O};
 p+/u0.1em/**\dir{}?*\dir{|},
 p+/d0.1em/**\dir{}?*\dir{|},
 p+/r2em/*+{P},**\dir{-};p=P;
 P;
 p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
 \end{xy}
 \end{displaymath}
 
 \begin{displaymath}
 \begin{xy}
 1em,0em:  
 *+{O};
 p+/u0.1em/**\dir{}?*\dir{|},
 p+/d0.1em/**\dir{}?*\dir{|},
 p+/r2em/*+{P},**\dir{=};p=P; %This is the only difference
 P;
 p+/l1em/;p+/u0.7em/;p+/d1.4em/**\dir{.};
 P; % ADDED THIS ONE
 \end{xy}
 \end{displaymath}
 
 \end{document}
 --
 
 then all works properly.
 
 Why does not l2h  recognize that the two environments are different?
 
 Am I missing something?
 
 Could anybody check that the above behavior is reproducible?
 
 
 Thank you very much in advance for any help.
 
 
 Ciao
 Gabriele
 
 Here are my main specs:
 -
 dschbaldx:12 latex2html -version
 Note: Loading /home/balducci/.latex2html-init
 Note: Initialising with file: /home/balducci/.latex2html-init
 This is LaTeX2HTML Version 2002-2-1 (1.70)
 by Nikos Drakos, Computer Based Learning Unit, University of Leeds.
 -
 dschbaldx:13 perl -version
 
 This is perl, v5.8.0 built for i686-linux
 
 Copyright 1987-2002, Larry Wall
 -
 dschbaldx:31 uname -smrp
 Linux 2.4.20 i686 unknown
 
 ___
 latex2html mailing list
 [EMAIL PROTECTED]
 http://tug.org/mailman/listinfo/latex2html

___
latex2html mailing list
[EMAIL PROTECTED]
http://tug.org/mailman/listinfo/latex2html