Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Quick support for inclusion of vector-rendered graphviz into PDF #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fidergo-stephane-gourichon
Copy link
Contributor

Following #122.

Solution based on "the (not very tested) example" provided by Lex Trotman on
https://groups.google.com/forum/#!topic/asciidoc/IddY7N7aIl4

Works for me on Ubuntu 16.04: generated good PDF, html, tex.

Save the text below to test it:

== Exemple of vector graphviz in PDF

Assuming this is saved as
`asciidoc_graphviz_svg_docbook_pdf.asciidoc.txt`, render with:

       a2x -f pdf asciidoc_graphviz_svg_docbook_pdf.asciidoc.txt



["graphviz", "helloworld.svg", format="svg"]
---------------------------------------------------------------------
digraph helloworld {
hello->world;
}
---------------------------------------------------------------------

Open for discussion.

Regards.

@elextr
Copy link
Contributor

elextr commented Feb 5, 2018

Looks ok by inspection, but I don't have access to a docbook toolchain, so somebody (other than the OP :) needs to test that it works and doesn't modify any non-svg graphviz uses.

@fidergo-stephane-gourichon
Copy link
Contributor Author

Okay! I offer to adjust the PR on top of the fixed build. It makes a better impression what all checks pass. :-)

…ok toolchain.

Based on "the (not very tested) example" provided by Lex Trotman on
https://groups.google.com/forum/#!topic/asciidoc/IddY7N7aIl4

Works for me on Ubuntu 16.04.

Save the text below to test:

== Exemple of vector graphviz in PDF

Assuming this is saved as
`asciidoc_graphviz_svg_docbook_pdf.asciidoc.txt`, render with:

       a2x -f pdf asciidoc_graphviz_svg_docbook_pdf.asciidoc.txt



["graphviz", "helloworld.svg", format="svg"]
---------------------------------------------------------------------
digraph helloworld {
hello->world;
}
---------------------------------------------------------------------
@fidergo-stephane-gourichon fidergo-stephane-gourichon force-pushed the feature_graphviz_svg_docbook_pdf branch from bc2bcdc to 168d38f Compare February 6, 2018 08:05
@elextr
Copy link
Contributor

elextr commented Feb 6, 2018

Okay! I offer to adjust the PR on top of the fixed build. It makes a better impression what all checks pass. :-)

For sure, sadly Travis can't look at the output and say it looks good :)

@aerostitch
Copy link
Contributor

@fidergo-stephane-gourichon It seems this repo will no longer accept PR as the latest release has been cut a while ago but https://github.com/asciidoc/asciidoc-py3 would.
If you still want this PR integrated in asciidoc, do you mind pushing it there please?
Once done I think you can close this one.
Thanks!

@elextr
Copy link
Contributor

elextr commented Oct 7, 2018

@aerostitch is essentially correct, as it says at the top of the repository, due to the EOL of Python2 the lifetime of this implementation is limited so it is kept as stable until then unless some major bug is to be fixed. Changes and improvements should be applied to the Python 3 version and/or Asciidoctor.

@aerostitch thanks for noting it on relevant PRs.

@mojavelinux
Copy link
Contributor

mojavelinux commented Oct 8, 2018

I second what @elextr said. The only types of changes that would be accepted into asciidoc/asciidoc (AsciiDoc Python 2) would be to address critical issues, and even then we might think hard about it. Now that distributions have moved on to Python 3, any changes should be invested into AsciiDoc Python 3.

My opinion is that AsciiDoc Python as a whole should still be considered a legacy implementation of AsciiDoc (the original, of course). The AsciiDoc language is evolving in the Asciidoctor project.

@elextr and I have been discussing the prospect of creating an AsciiDoc language definition, which would accommodate multiple, compatible implementations. If/when that were to happen, I see a new implementation for Python emerging that doesn't have all the legacy parsing rules / bugs / baggage of AsciiDoc Python.

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

Successfully merging this pull request may close these issues.

4 participants