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="13.0, 15.0"; > "aui.auibook.AuiNotebook" > [shape=box,style="setlinewidth(1.0) > ",fontsize=10,URL="#aui.auibook.AuiNotebook",fontcolor=blue,fontname=Vera > Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, > sans,height=0.25]; > "wx._controls.PyControl" -> > "aui.auibook.AuiNotebook" > [color=red,arrowsize=0.5,style="setlinewidth(1.0)"]; > "wx._core.Window" [shape=box,style="setlinewidth(0.5) > ",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, > Arial, Helvetica, sans,height=0.25]; > "wx._core.EvtHandler" -> "wx._core.Window" > [arrowsize=0.5,style="setlinewidth(0.5)"]; > "wx._controls.PyControl" > [shape=box,style="setlinewidth(0.5) > ",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, > Arial, Helvetica, sans,height=0.25]; > "wx._core.Control" -> > "wx._controls.PyControl" > [arrowsize=0.5,style="setlinewidth(0.5)"]; > "wx._core.EvtHandler" [shape=box,style="setlinewidth > (0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation > Sans, Arial, Helvetica, sans,height=0.25]; > "wx._core.Object" -> "wx._core.EvtHandler" > [arrowsize=0.5,style="setlinewidth(0.5)"]; > "wx._core.Object" [shape=box,style="setlinewidth(0.5) > ",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, > Arial, Helvetica, sans,height=0.25]; > "wx._core.Control" [shape=box,style="setlinewidth(0.5) > ",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, > Arial, Helvetica, sans,height=0.25]; > "wx._core.Window" -> "wx._core.Control" > [arrowsize=0.5,style="setlinewidth(0.5)"]; > }" 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
signature.asc
Description: OpenPGP digital signature
