Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get working links in graphviz #2175

Closed
wsw70 opened this issue Dec 16, 2015 · 4 comments
Closed

Cannot get working links in graphviz #2175

wsw70 opened this issue Dec 16, 2015 · 4 comments
Labels
extensions:graphviz The `sphinx.ext.graphviz` or `sphinx.ext.inheritance_diagram` extensions

Comments

@wsw70
Copy link

wsw70 commented Dec 16, 2015

question initially asked at stackoverflow but it looks like this is rather a bug

I use graphviz in my Sphinx documentation and would like to reuse links automatically generated by the RestructuredText code.

The output I get from

Hello
-----
Test of a graph

.. graphviz::

    digraph process {
           a [label="first", href="http://google.com"];
           b [label="second", href="#World"];
           a -> b;
        }

World
-----
Something else.

is correct, but despite the fact that the generated image is an SVG, firstand second are not clickable:

enter image description here

If I right click the embedded image and open it in a new tab, it has active links I can click on. It looks like if embedding the image prevented the links from being active.

The elements of my conf.py relevant to graphviz:

extensions = [
    'sphinx.ext.todo', 'sphinx.ext.graphviz'
]
graphviz_output_format = 'svg'

Is there something specific to set up in Sphinx to have this behaviour for embedded graphs?

@tk0miya
Copy link
Member

tk0miya commented Dec 16, 2015

MEMO: related with #2014 and #2176

@tk0miya
Copy link
Member

tk0miya commented Dec 19, 2015

For now, #2176 is merged into stable branch.
It enables to click the links in SVG images.
Please check it.

Thanks,

@tk0miya tk0miya closed this as completed Dec 19, 2015
@Ellon
Copy link

Ellon commented Jun 24, 2021

Hello @tk0miya and @wsw70,
Found this issue while looking for a way to make the PNG images generated from the graphviz extension clickable.
Is there a way to open the PNG in another window with a click?

@astrojuanlu
Copy link
Contributor

Hello @Ellon , I recommend you to ask in the https://groups.google.com/g/sphinx-users mailing list, Stack Overflow, or open a new feature request if you are certain that what you're asking cannot be done at the moment. Commenting on a 6 year old issue that's unrelated to your question makes it less visible and you're less likely to get help.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2021
@AA-Turner AA-Turner added extensions:graphviz The `sphinx.ext.graphviz` or `sphinx.ext.inheritance_diagram` extensions and removed extensions labels Jan 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions:graphviz The `sphinx.ext.graphviz` or `sphinx.ext.inheritance_diagram` extensions
Projects
None yet
Development

No branches or pull requests

5 participants