Package: python-sphinx
Version: 0.5-1
Severity: normal

Hi,

I tested the sphinx package from experimental and noticed a bug in the
image handling. Sphinx doc states about the image file location (used
with ..image::):

>  When used within Sphinx, the file name given (here gnu.png) must be
>  relative to the source file, and Sphinx will automatically copy image
>  files over to a subdirectory of the output directory on building (e.g.
>  the _static directory for HTML output.)

My test docs structure looks like this:

root/
  pics/
    img.png
    img.pdf
  examples/
    test.txt
  more.txt

test.txt now contains

.. image:: ../pics/img.*
   :align: center

When I run sphinx (html output) I get:

  WARNING: /root/examples/test.txt:: Image file not readable: 
examples/pics/img.png

Apparently, sphinx ignores the '..'. However, if I change the RsT to:

.. image:: pics/img.*
   :align: center

and rerun sphinx (after a full clean, ie. no intermediate results) it
seems to find the file in the first place, meaning the location is
treated as relative to the doc root and not relative to the file (as
written in the docs). But still during HTML generation it complains
about:

  WARNING: /root/examples/test.txt:: no matching candidate for image URI 
u'examples/pics/img.*'

Which is correct, as there is no such file.

I can trick sphinx with a softlink to /root/examples/pics -> /root/pics/
in which case it does generate proper HTML docs and copies the image
into _static, but the current situation is probably not intended.



Thanks,

Michael


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-sphinx depends on:
ii  libjs-jquery                  1.2.6-1    JavaScript library for dynamic web
ii  python                        2.5.2-2    An interactive high-level object-o
ii  python-central                0.6.8      register and build utility for Pyt
ii  python-docutils               0.5-2      Utilities for the documentation of
ii  python-jinja                  1.2-2      small but fast and easy to use sta
ii  python-pygments               0.10-1     syntax highlighting package writte

Versions of packages python-sphinx recommends:
ii  python                        2.5.2-2    An interactive high-level object-o
ii  python-imaging                1.1.6-3    Python Imaging Library
ii  python-simplejson             1.9.2-1    Simple, fast, extensible JSON enco

python-sphinx suggests no packages.

-- no debconf information

-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to