Can side-by-side Pikchr diagrams be created on a page?
(1) By anonymous on 2021-08-06 05:12:03 [link] [source]
I would like to create a diagram made of a series of Pikchr shapes (boxes and lines) where each box has information in comments in the Pikchr code. Having each visual object as a separate Pikchr would make each object separately expandable to show the content contained in the comments. However, the diagram needs boxes to be neighbors both horizontally and vertically. For the horizontal neighbors, I think I would need to be able to tell one Pikchr to locate itself next to the last one rather than below it. Is there a way to do that? Thanks.
(2) By Stephan Beal (stephan) on 2021-08-06 06:34:05 in reply to 1 [link] [source]
I think I would need to be able to tell one Pikchr to locate itself next to the last one rather than below it. Is there a way to do that?
Pikchr simply outputs an SVG, the placement of which is up to the client. If you are using the pikchr binary, or pikchr embedded in your own app, to generate the output for embedding in your docs, you have full control over the placement. However, if you're using the pikchr embedded in the Fossil SCM, along with fossil's wiki or embedded docs, then no, fossil does not have a way to do that.
It "might be interesting" to add a pikchr pragma or command which adds a client-defined CSS class to the SVG, allowing a client to style their layout somewhat. Being able to add CSS classes to any element might be interesting but it's unclear to me how that might syntactically be achieved.
(3) By drh on 2021-08-06 12:15:44 in reply to 2 [link] [source]
Side by side Pikchr diagram example in Markdown (using a <table>
):
arrow box "1st" "Pikchr" "diagram" arrow→ /pikchrshow |
arrow oval "2nd" "Pikchr" "diagram" arrow→ /pikchrshow |
(4.1) By drh on 2021-08-06 12:29:51 edited from 4.0 in reply to 3 [source]
Unrelated markdown bug in Fossil:
If you "Edit" the parent post and add another paragraph of text after
the </table>
it messes up the formatting. To be clear, this has nothing
to do with Pikchr. It appears to be a bug in the Markdown formatter of Fossil.
Bug reported here: https://fossil-scm.org/forum/forumpost/3f0136cd80
(5) By Stephan Beal (stephan) on 2021-08-06 12:27:58 in reply to 3 [link] [source]
Side by side Pikchr diagram example in Markdown (using a
<table>
):
Well, that's just cheating ;). (And i'm just annoyed that i didn't think of it first.)
(6) By anonymous on 2021-08-06 18:26:35 in reply to 5 [link] [source]
Thank you. I didn’t think of it either but cheating works fine for what I’m trying to.