There is a bug in xdvik versions 22.05d-k 22.15 and probably
more, which mistakenly takes a PSfile special for a WWW URL and then
fails to parse it.  This may be trivially demonstrated by a LaTeX
document containing, eg

\DeclareGraphicsRule{.gif}{eps}{.gif.bb}{`convert #1 eps:-}  
.
.
.
\includegraphics{pic.gif}         

which when viewed with xdvi produces the error message:

    Cannot locate URL: `convert pic.gif eps:-   

and further diagnostics from ghostscript, which complains that there's 
no file.

The error is in function "htex_is_url()" in file
"texk/xdvik/hypertex.c", which calls "HTURL_isAbsolute()" which in
turn can not cope with a "filename" such as "`convert pic.gif eps:-"
containing a shell escape.  Here's my patch:


metropolis% diff -c hypertex.c{,~}
*** hypertex.c  Tue May 16 13:36:30 2000
--- hypertex.c~ Tue Jun 15 00:09:05 1999
***************
*** 880,887 ****
  const char *href;
  {
      /* Why reinvent the wheel?  Use libwww routines! */
-    if(href && href[0] == "`" )
-       return 0;
      return (HTURL_isAbsolute(href)==YES ? 1 : 0);
  }

--- 880,885 ----     

Keith Refson
-- 
Dr Keith Refson,        "Paradigm is a word too often used by those who would
Dept of Earth Sciences      like to have a new idea but cannot think of one." 
Parks Road,                  -- Mervyn King, Deputy Governor, Bank of England
Oxford OX1 3PR, UK        
Keith.Refson@                       Tel: 01865 272026
             earth.ox.ac.uk         Fax: 01865 272072

Reply via email to