[HN Gopher] Pikchr - PIC-like markup language for diagrams in te...
___________________________________________________________________
Pikchr - PIC-like markup language for diagrams in technical
documentation
Author : leonim
Score : 26 points
Date : 2022-01-12 17:07 UTC (5 hours ago)
(HTM) web link (pikchr.org)
(TXT) w3m dump (pikchr.org)
| OJFord wrote:
| > Pikchr is designed to be embedded in fenced code blocks of
| Markdown
|
| Odd choice, usually that's how you'd show the (possibly syntax-
| highlighted) code as-is, not execute/render it in situ.
|
| E.g. what if I want a document that says 'this pikchr code
| generates this'? I'd expect to write something like:
| ```pikchr arrow 200% "whatever" ```
| renders: $pikchr arrow 200% "whatever" $
|
| (Or some other syntax) not the code block twice, once with some
| kind of escaping.
| kragen wrote:
| That's maybe the most interesting idea out of the whole setup!
|
| You could reasonably put options on the fenced-code-block
| header line: ```pikchr --source ...
| ``` ```pikchr --caption # caption rendered figure
| with source ... ```
|
| I don't know if pikchr supports anything like this, but it
| seems like you could add it pretty easily if you wanted to.
| electroly wrote:
| Pikchr is really great. The syntax looks strange at first, but
| the learning curve is actually low. Within 5 minutes of looking
| at the pikchr source of some SQLite diagrams, you'll get it. I
| use it to produce railroad syntax diagrams in the same style as
| the ones in the SQLite docs. I don't use the Markdown
| integration; I just generate SVGs using PikchrShow[0] and treat
| them as images in my HTML-based docs.
|
| [0] https://pikchr.org/home/pikchrshow
| paulsmith wrote:
| If it's not immediately apparent, Pikchr is by SQLite creator D.
| Richard Hipp, and is how SQLite's syntax diagrams are generated
| on its website.
|
| It's a great little diagram language that's quite capable, and I
| think of it like a modern web upgrade to Brian Kernighan's PIC.
| fabiospampinato wrote:
| Pikchr is awesome! I'll just mention that the Markdown-based
| note-taking app I'm working on as far as I know is the only app
| on the planet that can syntax-highlight Pikchr code:
| https://github.com/notable/notable-insiders/releases/tag/v1....
| otherflavors wrote:
| contrary to pikchr documentation, troff is not obsolete
___________________________________________________________________
(page generated 2022-01-12 23:02 UTC)