Diagrams Written as Text
সূচিপত্র
Diagrams Written as Text
A fenced block in a diagram language is drawn rather than shown: the engine hands the source to the program that language belongs to, keeps the SVG it answers with, and the page shows the picture (khosra ADR-0391). Four languages, four programs, each optional — the host decides which are installed:
| Fence | Program | Good at |
|---|---|---|
```d2 |
D2 | boxes and arrows laid out for you, with labels and containers |
```dot |
Graphviz | graphs: dependencies, state machines, anything with many edges |
```pikchr |
Pikchr | a line drawing placed by hand, the way pic placed them |
```svgbob |
Svgbob | ASCII art turned into clean lines — it reads well even undrawn |
Each drawing is made once, when the site is rebuilt, and kept under /derived/ named by a hash of its source:
an unchanged diagram is never drawn again, and no reader ever waits on a program. A fence the host cannot draw —
the program is not installed, or it could not read the source — is shown as the code block it is, and
khosra check says which and why.
D2
Graphviz
From a file beside this page, with file= — the same option any fence takes, so one diagram can sit in several
posts and stay one file:
Pikchr
Svgbob
Placed
A drawing sits where a picture can, by the same words after the fence’s language — marginal, runaround-right, plate.
marginal hangs a small drawing in the margin beside the paragraph it was written next to, the way a picture or a
side note does. Below the width that has a margin it comes back into the column, small and centred. The words around
it keep their own measure; the drawing does not push them aside.
runaround-right floats the drawing beside the text, the words running round it for as long as it lasts and then
taking back the full width of the column. A drawing taller than the paragraph beside it keeps the next one running
round it too, which is usually what a reader expects of a figure set into the text.
A drawing is never drawn larger than it was made: plate gives a wide one the room to be its own size, and leaves a
small one as it is.
Not a diagram
Every other language is highlighted as code, exactly as before — a fence is drawn only when its language is one of the four above:
func main() { println("still code") }
সাবস্ক্রাইব
মাপ ওঠে যখন মাপা হয়, কোনো নিয়মে নয়: বেশিরভাগ সপ্তাহে দুবার, বর্ষায় রোজ। যেভাবেই অনুসরণ করুন, আপনার কিছুই এখানে রাখা হয় না।
- ফিড রিডারে
- Atom · JSON Feed. প্রতিটি বিভাগের আলাদা ফিডও আছে: বিভাগের ঠিকানার শেষে feed.xml।
- ফেডিভার্সে
- ম্যাস্টোডন বা অন্য যেকোনো ফেডিভার্স অ্যাপে https://adventure.x.bdeshi.space/ খুঁজে ফলো করুন।
- নিজের সাইট থেকে
- ইন্ডিওয়েব রিডারে https://adventure.x.bdeshi.space/bn/ ফলো করুন। নিজের সাইট থেকে কোনো লেখার উত্তর, লাইক বা রিপোস্ট ওয়েবমেনশনে এখানকার লেখায় পৌঁছায়।
মাপ ওঠে যখন মাপা হয়, কোনো নিয়মে নয়: বেশিরভাগ সপ্তাহে দুবার, বর্ষায় রোজ। যেভাবেই অনুসরণ করুন, আপনার কিছুই এখানে রাখা হয় না।
- ফিড রিডারে
- Atom · JSON Feed. প্রতিটি বিভাগের আলাদা ফিডও আছে: বিভাগের ঠিকানার শেষে feed.xml।
- ফেডিভার্সে
- ম্যাস্টোডন বা অন্য যেকোনো ফেডিভার্স অ্যাপে https://adventure.x.bdeshi.space/ খুঁজে ফলো করুন।
- নিজের সাইট থেকে
- ইন্ডিওয়েব রিডারে https://adventure.x.bdeshi.space/bn/ ফলো করুন। নিজের সাইট থেকে কোনো লেখার উত্তর, লাইক বা রিপোস্ট ওয়েবমেনশনে এখানকার লেখায় পৌঁছায়।