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

graphviz with asciidoctor #32

Closed
GSebastian-Adil opened this issue Mar 8, 2019 · 5 comments
Closed

graphviz with asciidoctor #32

GSebastian-Adil opened this issue Mar 8, 2019 · 5 comments
Labels

Comments

@GSebastian-Adil
Copy link

I use graphviz with asciidoctor, but I can't set double quoted string as ID.
Thanks

@clue clue added the question label Mar 8, 2019
@clue
Copy link
Member

clue commented Mar 8, 2019

@GSebastian-Adil Thanks for this question!

This project will automatically quote and escape any identifiers as needed. This means that simple integers/floats will be exported without quotes in the DOT output, whereas all other string values will automatically be quoted. Note that there's no semantic difference between both variants, it's merely a matter of making it "more readable" (https://graphviz.gitlab.io/_pages/doc/info/lang.html).

I hope this helps!

@clue clue closed this as completed Mar 8, 2019
@GSebastian-Adil
Copy link
Author

This file Example_Diagram.txt shows exactly my problem:

  1. Please change the extension to (.adoc)
  2. Open it with a browser

And you will that the second diagram don't work just because I changed the (ID=G) to (ID="Reflux Gastro Oesophagien") a double quotted string.
I am not a programmer.

Thanks

@clue
Copy link
Member

clue commented Mar 9, 2019

I'm not sure I follow the exact problem you're seeing, so here's my best guess:

If you want to assign the root graph ID or name, this is supported as of #28 like this:

$graph = new Fhaculty\Graph\Graph();
$graph->setAttribute('graphviz.name', 'G');
$graph->createVertex('first');

Note that #28 will only be released as part of the upcoming v0.3.0, so you may have to use the current master branch in the meantime.

I hope this helps 👍

@GSebastian-Adil
Copy link
Author

But did you try my example. my example has two diagrams:
`==========
[graphviz]
..........
digraph G {
"Reflux Gastro \n Oesophagien" -> "Oesophagite \n Peptique" -> "Stenose \n Peptique"
}
..........

[graphviz]
..........
digraph "Reflux Gastro Oesophagien" {
"Reflux Gastro \n Oesophagien" -> "Oesophagite \n Peptique" -> "Stenose \n Peptique"
}
..........
==========`
If you save this example in file (.adoc) and you open it with a browser(I use Firefox), the first diagram works, but the second has an error message because I changed the diagram's name(ID) to a quoted string.

@clue
Copy link
Member

clue commented Mar 9, 2019

The way I understand this problem it looks like you're asking for help in the wrong project. This project deals with using GraphViz to render graphs created with GraPHP.

Both your example graphs look good to me, so I can only assume there's some problem in one of the other programs you're using. Perhaps use StackOverflow or reach out to asciidoctor support channels for help?

I hope this helps 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants