From 168d38f3ce3ae69b95a4df5c125558af1bfef72b Mon Sep 17 00:00:00 2001 From: Stephane Gourichon Date: Mon, 5 Feb 2018 11:47:18 +0100 Subject: [PATCH] Quick support for inclusion of vector-rendered graphviz through docbook 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; } --------------------------------------------------------------------- --- filters/graphviz/graphviz-filter.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/filters/graphviz/graphviz-filter.conf b/filters/graphviz/graphviz-filter.conf index f1ca264..8b65f58 100644 --- a/filters/graphviz/graphviz-filter.conf +++ b/filters/graphviz/graphviz-filter.conf @@ -38,6 +38,22 @@ ifdef::basebackend-xhtml11[]
{caption={figure-caption} {counter:figure-number}. }{title}
endif::basebackend-xhtml11[] +ifdef::basebackend-docbook[] +[graphviz-svg-block] +{title} +{title%}{pgwide-option?} +# DocBook XSL Stylesheets custom processing instructions. + + + + + + + {alt={target}} + +{title%} +{title#} +endif::basebackend-docbook[] # # DEPRECATED: Pre 8.2.7 filter definition.