diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-11-04 22:05:43 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-11-05 07:56:56 +0000 |
commit | 45a68ed22a53f5e40b36e1c21090b85a01941b60 (patch) | |
tree | e3be45e7f479b210660e20546f96e4bf157b13fe /subplot.md | |
parent | 45456147deb378288757c7c619911b1a8eb8debc (diff) | |
download | subplot-45a68ed22a53f5e40b36e1c21090b85a01941b60.tar.gz |
doc: Add info and scenario for pikchr
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -2155,6 +2155,47 @@ title: Two embedded files Subplot allows embedding markup to generate graphs into the Markdown document. +### Pikchr + +[Pikchr]: https://pikchr.org/ + +[Pikchr] is a diagramming library which implements a Pic-like diagram language. +It allows the conversion of textual descriptions of arbitrarily complex diagrams +into SVGs such as this one. + +~~~pikchr +arrow right 200% "Markdown" "Source" +box rad 10px "Subplot" "Document Generator" "(sp-docgen)" fit +arrow right 200% "HTML+SVG/PDF" "Output" +arrow <-> down 70% from last box.s +box same "Pikchr" "Formatter" "(docs.rs/pikchr)" fit +~~~ + +The scenario checks that a graph is generated and embedded into the HTML output, +and is not referenced as an external image. + +~~~scenario +given file pikchr.md +and an installed subplot +when I run pandoc --filter sp-filter pikchr.md -o pikchr.html +then file pikchr.html matches regex /img src="data:image/svg\+xml;base64,/ +~~~ + +The sample input file **pikchr.md**: + +~~~~~~~~{#pikchr.md .file .markdown .numberLines} +This is an example markdown file that embeds a simple Pikchr diagram. + +~~~pikchr +arrow right 200% "Markdown" "Source" +box rad 10px "Markdown" "Formatter" "(docs.rs/markdown)" fit +arrow right 200% "HTML+SVG" "Output" +arrow <-> down 70% from last box.s +box same "Pikchr" "Formatter" "(docs.rs/pikchr)" fit +~~~ + +~~~~~~~~ + ### Dot [Graphviz]: http://www.graphviz.org/ |