[0] http://linux.math.tifr.res.in/manuals/html/xfig/fig-format.h...
[0] http://linux.math.tifr.res.in/manuals/html/xfig/fig-format.h...
If you want to embed pikchr SVGs in your statically generated HTML content, you may find https://soupault.app/ useful.
(Not affiliated with either, fan of both.)
Not having a diamond object-class for decision seems to be a large miss. [0] Also, unlike Mermaid [1], three downward arrows to boxes aren't spaced from one another, the boxes wind up overwriting one another. This gives pikchr a procedural/syntactical feel rather than an object/semantic one.
0. https://pikchr.org/home/doc/trunk/doc/grammar.md
1. https://github.blog/2022-02-14-include-diagrams-markdown-fil...
pikchr live demo: https://pikchr.org/home/pikchrshow
Mermaid live demo: https://mermaid-js.github.io/mermaid-live-editor/
> for use in SQLite docs
Examples of output, because I too was curious:Here's what the source looks like: https://www2.sqlite.org/cgi/docsrc/blame?filename=art/syntax...
> https://www.sqlite.org/atomiccommit.html
These are actually just GIFs and it's unclear how they're generated. https://www2.sqlite.org/cgi/docsrc/file?name=images/ac/commi...
There was a Changelog podcast episode with Richard Hipp (sqlite author) where he threw out the great idea that it would be nice if there were renderers in popular markdown engines that could display inline pikchr blocks. https://changelog.com/podcast/454
More examples of what is possible are on the linked pikchr page: https://pikchr.org/home/doc/trunk/doc/examples.md
Oh, let’s just take an example, a small excerpt from one of the diagrams at https://www.southampton.ac.uk/~dales/teaching/xfig/xfig.html:
2 1 0 3 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
1 0 3.00 180.00 360.00
11745 6750 9450 6750
Just to explain the first line: 2: polyline or similar. 1: actually polyline. 0: solid line. 3: line is 3⁄80in thick. -1: default pen colour. 0: white fill (… but ignored because of “no fill” later). 0: depth (z-index). 0: unused. -1: no fill. 0.000: to do with dashes (not used because of “solid line” earlier). 0: mitre join. 0: butt cap. -1: radius (not used as this is an actual polyline). 1: forward arrow (so the next line must now define the arrow style). 0: no backward arrow. 2: two points (so on the third line it expects four numbers—x₁, y₁, x₂, y₂).An inexact SVG paraphrase (most inexact because of the two different types of units, which SVG doesn’t fully or consistently have—the closest is vector-effect="non-scaling-vector"; also I will note that a number of the properties are the defaults and would thus be likely to be omitted in real life):
<polyline stroke-dasharray="0" stroke-width="3px" stroke="currentColor" fill="white" stroke-linejoin="mitre" stroke-linecap="butt" marker-end="url(#arrow)"
points="11745,6750 9450,6750"/>
<marker id="arrow" orient="auto-start-reverse" markerWidth="180" markerHeight="360" markerUnits="userSpaceOnUse" viewBox="-2 -1 2 2"><path d="M0 0l-2 1V-1z" stroke="context-stroke" fill="none" stroke-width="3px"/></marker>
This is vastly more human-editable. I write SVG by hand regularly, and edit tool-assisted SVG by hand even more regularly. I could not do the same for Fig in a regular text editor—I’d want tooling that labelled every field and enumeration value.