graphviz image differs when ran through plain "dot" vs through pandocfilter-graphviz
matthiasbeyer opened this issue · 9 comments
The image which showes up in my example differs from the one I get when running the exact same dot
source through the dot
-tool.
Why is that?
How does it differ?
+++ Matthias Beyer [Jan 14 16 14:10 ]:
The image which showes up in my example differs from the one I get when
running the exact same dot source through the dot-tool.Why is that?
—
Reply to this email directly or [1]view it on GitHub.References
Completely.
That's a screenshot from my paper:
Which is the example from the graphviz page:
The source of the image is here.
I recompiled the source of the image with the plain dot
program and it yielded the correct result, though when ran through pandoc it yields the upper image.
Note: these are just examples, meant for you to study
in making your own filters. So, take a look at the source.
You'll see it uses the pygraphviz library.
Documentation here:
http://pygraphviz.github.io/documentation/pygraphviz-1.3rc1/tutorial.html#graphs
And it's clear what's happening. By default, pygraphviz
uses 'neato' to layout the diagrams. You want 'dot'.
So you need to change the line
G.layout()
to
G.layout(prog='dot')
If you'd like to modify the filter, it would be worth making
it sensitive to a layout attribute.
``` graphviz layout=dot
or
``` graphviz layout=neato
okay, this makes sense.
Now it tells me:
pandoc: Error in $[48][0][0]: expected Object, encountered Array
I can produce this error with your graphviz example as well...
It worked for me. What version of pandoc are you using
(and of pandoc-citeproc)?
+++ Matthias Beyer [Jan 15 16 14:33 ]:
okay, this makes sense.
Now it tells me:
pandoc: Error in $[48][0][0]: expected Object, encountered ArrayI can produce this error with your graphviz example as well...
—
Reply to this email directly or [1]view it on GitHub.References
pandoc 1.15.2.1
pandoc-citeproc 0.8.1.3
The example filters in pandocfilters have been updated to
work with pandoc 1.16.x. You can search through git history
to see how to downgrade so they'll work with 1.15.x.
+++ Matthias Beyer [Jan 15 16 14:42 ]:
pandoc 1.15.2.1
pandoc-citeproc 0.8.1.3—
Reply to this email directly or [1]view it on GitHub.References
Fixed that issie for me. Thanks a lot for your help!