On Nov 30, 12:16 am, Henrique Bastos <[email protected]> wrote:
> I've modified sphinx.ext.graphviz to support SVG. It's explained on
> this blog
> post:http://henriquebastos.net/2009/11/30/adding-svg-support-to-sphinxs-gr...
hey, that seems to work nicely. Thanks!
A few comments; some of the blog post isn't very clear
> 1. Create an _ext subdirectory on your Sphinx project;
> 2. Download the modified extension from Gist and save it to _ext;
It's not quite clear what this means. I can think of two options. (1)
creating an _ext subdirectory on the individual documentation project.
This would work but doesn't seem to make much sense... why would I do
this for each documentation project I have? (2) creating an _ext
subdirectory on the sphinx install directory -- which on my computer
is C:\appl\python\2.6.2\Lib\site-packages\Sphinx-0.6.3-py2.6.egg\sphinx
\ -- this didn't work, I just took the graphviz_svg.py file and put it
in the ext directory there.
> 3. Edit your config.py and make sure it contains the below lines;
> sys.path.append(os.path.abspath('_ext'))
> extensions = ['graphviz_svg']
> graphviz_output_format = 'svg'
"Edit your config.py": I figured out you mean the "conf.py" file in
the same directory as my .rst source file.
This didn't work either, I did this instead, after putting
graphviz_svg.py into the sphinx install ext directory
extensions = ['sphinx.ext.graphviz_svg']
Also if there are other extensions they need to be included as usual,
so I replaced
extensions = ['sphinx.ext.todo', 'sphinx.ext.pngmath',
'sphinx.ext.graphviz']
with
extensions = ['sphinx.ext.todo',
'sphinx.ext.pngmath','sphinx.ext.graphviz_svg']
and it works fine on Firefox / Safari / Opera on Windows. (IE just
loses. :p )
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.