Am 13.12.2009 16:28, schrieb Infinity77:
> Hi All,
> 
>     I encountered a couple of issues while using the development
> version of Sphinx from http://bitbucket.org/birkenfeld/sphinx/ . The
> (artificially fixed after building by hacking the html code itself)
> documentation from my project is here:
> 
> http://xoomer.virgilio.it/infinity77/AGW_Docs/index.html
> 
> I found that, when using the inheritance_diagram.py extension, the
> generated images have the entire "dot" command as "alt" tag. For
> example, for one of the documented classes, the generated html for the
> inheritance diagram looks like this:
> 
> <img src="_images/
> inheritance-9201bffa49dcefd9cb9c6ab25f9c85b7725e3f63.png" alt="digraph
> inheritance8212698eef {
> rankdir=LR;
> fontsize=14;
> ratio=compress;
> size=&quot;13.0, 15.0&quot;;
>   &quot;aui.auibook.AuiNotebook&quot;
> [shape=box,style=&quot;setlinewidth(1.0)
> &quot;,fontsize=10,URL=&quot;#aui.auibook.AuiNotebook&quot;,fontcolor=blue,fontname=Vera
> Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica,
> sans,height=0.25];
>   &quot;wx._controls.PyControl&quot; -&gt;
> &quot;aui.auibook.AuiNotebook&quot;
> [color=red,arrowsize=0.5,style=&quot;setlinewidth(1.0)&quot;];
>   &quot;wx._core.Window&quot; [shape=box,style=&quot;setlinewidth(0.5)
> &quot;,fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans,
> Arial, Helvetica, sans,height=0.25];
>   &quot;wx._core.EvtHandler&quot; -&gt; &quot;wx._core.Window&quot;
> [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
>   &quot;wx._controls.PyControl&quot;
> [shape=box,style=&quot;setlinewidth(0.5)
> &quot;,fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans,
> Arial, Helvetica, sans,height=0.25];
>   &quot;wx._core.Control&quot; -&gt;
> &quot;wx._controls.PyControl&quot;
> [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
>   &quot;wx._core.EvtHandler&quot; [shape=box,style=&quot;setlinewidth
> (0.5)&quot;,fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation
> Sans, Arial, Helvetica, sans,height=0.25];
>   &quot;wx._core.Object&quot; -&gt; &quot;wx._core.EvtHandler&quot;
> [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
>   &quot;wx._core.Object&quot; [shape=box,style=&quot;setlinewidth(0.5)
> &quot;,fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans,
> Arial, Helvetica, sans,height=0.25];
>   &quot;wx._core.Control&quot; [shape=box,style=&quot;setlinewidth(0.5)
> &quot;,fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans,
> Arial, Helvetica, sans,height=0.25];
>   &quot;wx._core.Window&quot; -&gt; &quot;wx._core.Control&quot;
> [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
> }" usemap="#inheritance8212698eef" class="inheritance"/>
> 
> Obviously, when the image is loading slowly, the website visitor can
> see this bunch of characters instead of a simple "alt" tag
> description. Am I doing something wrong or is it a bug in Sphinx/
> docutils?

No, you're doing nothing wrong.  The inheritance diagrams use the graphviz
extension, which puts the graphviz code into the image's alt text.  I've
changed that in the 0.6 and trunk branches, it reads "Inheritance diagram
of ..." now.

> Secondly, I have put images in titles as described here:
> 
> http://groups.google.com/group/sphinx-dev/browse_thread/thread/81f9db9ed077d99c/2f1a2899bb0a4706?lnk=gst&q=image+titles#2f1a2899bb0a4706
> 
> And specifically using this technique:
> 
>     .. |incompatible| image:: _static/warning.png
>         :align: bottom
> 
> then used it in a section as
> 
>     |incompatible| MyClass
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> The problem is, when you reference the title somewhere else using
> the :ref: or :toctree: directives, the link appears as:
> 
> incompatible MyClass

This is an artifact of docutils behavior I didn't anticipate: image
substitutions automatically get assigned the substitution name as an
"alt" text.  I've now added a workaround for this in the development
version.

Thanks for reporting these glitches!

cheers,
Georg


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to