-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pikchr integration #1434
Comments
Just a comment on progress here, this really does look like a simple package to do, but it will depend on an external resource (the Support for creating packages like this as LuaRock dependencies will land in v0.14.0, at which point creating this package should become viable. |
On the not-so-simple side of things, if it does pikchr to SVG and we stream that to our existing SVG support, the latter doesn't support text... (As an aside note, such diagrams are kind of a niche market, so are probably best having separately indeed.) Maybe users are conflating two things here.
|
Why this and not DOT |
Tikz / Kroki / Pikchr / PlantUML / Lilypond -- and whatever other formats: personally I'd have the same answer. It's already doable to invoke a converter to process an external file with an external program. With the above-mentioned escaping, it would also be doable from within raw content in a SILE document, in a generic way, would this be felt cool. Then all those eventually boil down to the same thing -- invoking the external program and grabbing the output back. One can even call inkscape or IM to convert to export as PNG or PDF, avoiding our SVG limitations. People can already write this type of packages. |
If people need a bit of bootstrapping here... Let's even show how easy it is... to support, say, Attached a test file and a supporting package
It's around 50 lines of code only (...a bit less if one removes the compatibility stuff, albeit one should also handle the temporary file in a better way -- that's basic Lua, though -- so all in all, it's small...) With that, one can do
|
Interesting! Is |
That's the proposal from that PR #1347 I kept mentioning on an on above... Might not make it with that name or with the exact same syntax, but the idea is there for discussion: expose a raw escape command, and a registration API for packages to add new handlers. |
Actually relates to #1092 |
Rejected (Wontfix): It does not seem relevant to introduce dependency of that kind in the core distribution. Not that this is therefore out of scope for core SILE, but not necessarily out of scope for the SILE ecosystem: Anything that requires compiling or using external dependencies belongs in a 3rd-party package, not to not to the core distribution. We already have the tooling available for that and anybody can spin up a 3rd-party package. If SILE needs to implement some API to make it more usable, we can look into that. For future reference, at this date here are examples of 3rd-party packages that use external tooling:
The core converters package is also an interesting resource to consider. |
FWIW, https://pikchr.org is a small CLI application in C that is an evolution by SQLite author(s) of the venerable PIC by Brian Kernighan. It allows drawing SVG diagrams from a markup language. The following script allows to roughly reproduce a diagram mentioned in a comment discussing TikZ integration:
which results in the following SVG image:
Notable differences to the TikZ-built diagram:
See also https://kroki.io for some other interesting diagramming tools.
(This issue is extracted from a comment in a thread about TikZ integration. See the thread for some earlier discussion.)
The text was updated successfully, but these errors were encountered: