[l2h] re: 99.1 htmladdimg problem

jock@ccl.umist.ac.uk jock@ccl.umist.ac.uk
Wed, 28 Jul 1999 19:09:28 +0100 (BST)


On Fri March 8, Graham Gough reported:

> Since installing 99.1 beta (March 8, 1999) from the Bayreuth archive,
> htmladdimg has stopped working. The following complete document worked
> fine with 98.2b8 but produces no trace of the link when using 99.1
>
> \documentclass{article}
> \usepackage{html}
> \begin{document}
> \htmladdimg{http://www.cs.man.ac.uk/logo.gif}
> \end{document}

I've come across the same problem with 99.2alpha. A comparison with earlier
known-to-work versions reveals a return where none had been previously in
sub find_unique in latex2html(.pin)

sub find_unique {
    local($image1) = @_;
    local($imagedata,$image2,$result,$key);
    local($/) = undef;

    if(open(IMG1,"<$image1")) {
        $imagedata = <IMG1>;
        close(IMG1);
    } else {
        print "\nError: Cannot read '$image1': $!\n";
        return; 
#       ^^^^^^
    }
 
    foreach $image2 (keys(%image_size)) {
<etc, etc>

Commenting this return out causes images to appear as they should, when
referred to by a URL. There may be other effects and indeed this part of
the sub could bear re-writing to prevent opening of such a file in the
first place - or perhaps there should be an earlier test to prevent this
sub from being called when dealing with an image that is referred to be
URL?

Jock

--

John McNaught		     	jock@ccl.umist.ac.uk 
Department of 
  Language Engineering
UMIST			     
PO Box 88
Sackville Street
Manchester, UK         	     	tel: +44.161.200.3098 (direct)
M60 1QD                      	fax: +44.161.200.3099