Charts and diagrams
A plugin draws something richer from a few plain lines: a chart from a table, a diagram from arrows, an equation from TeX. The document still holds only text, so it reads well anywhere.
Add a plugin to a document
#- Open Tools › Manage plugins…. It lists the plugins by kind, each with examples.
- Choose one and press Add to this document. It writes the rule the plugin needs:
block ``` chart ... ``` -> chart verbatim
From then on, a block like this one is a chart:
```chart
type: bar
Month, Visitors
Jan, 120
Feb, 180
```
If you switch a plugin off, its blocks show their text, with a note.
Pick the plugin you need
#| Plugin | Write | You get |
chart | a table of numbers, with type: line | bars, lines, areas, pies |
mermaid | graph LR and A --> B | flowcharts, sequences, timelines |
flow | node api "API" and web -> api | boxes and arrows, laid out for you |
math | $e^{i\pi} + 1 = 0$, or a $$ block | equations |
mindmap | an indented list | a map that branches out |
map | country Portugal green | countries and regions coloured in |
calc | rent 900 + bills 120 = | each sum worked out after its = |
flashcards | Portugal :: Lisbon | cards that come back when they are due |
poll | a question, then - Tea (3) | options to vote for with a click |
habit | 2026-09-21 run read | a streak for each habit |
heatmap | 2026-09-14 3 | a calendar of weeks, darker on busy days |
timezones | 15:00 London, then places | the time in each place |
league | Ravens 3 - 1 Otters | a league table with points and goals |
sources | [smith2021] Smith, J. (2021)… | numbered citations, [@smith2021] |
toc | an empty block | the document's contents, linked |
sketch | an empty block | a small whiteboard, or a line to sign on |
A few work inside a sentence: ((2026-12-24 Christmas)) counts the days, ~[3 5 2 8 6]~
draws a sparkline, [= 7 of 12 =] a meter, and [roll 2d6] a die to click.
The Dictionary has every plugin, each with an example drawn live.
Draw a flow diagram
#```flow
set direction=LR
node phone "Phone app" :person
node api "Booking service" :service
node db "Sailings" :database
phone -> api -> db moving
step "The app asks": phone api
step "The service reads the sailings": db
```
The boxes are laid out for you. moving sends dots along the arrows, and each step line is a
stage that a bar under the diagram plays through. Shapes such as :battery, :switch and
:lamp draw a circuit, and the lamp lights when the switch is closed.
To edit a diagram by hand, point at it and press Edit. Drag boxes, join them from the dots
on their sides, and double-click to change words. Each change is a short line in the block,
such as at 120,40. Full editor gives the diagram the whole window.
Write maths
#Add Math to the document. TeX between dollar signs sits in a line, $a^2 + b^2 = c^2$, and
a block between two $$ lines is a formula of its own. Word and LaTeX exports keep the maths
as real equations.
Do sums in your notes
#```calc
rent 900 + bills 120 =
food 45 * 4 =
total = rent + bills + food
per person = total / 3
```
Each result shows after its =, and the text never changes. The words before a number name it
for the lines below. 20% of 80, £12.50 * 3 and sum = work too.
Study with flashcards
#```flashcards
Portugal :: Lisbon
Norway :: Oslo
Hungary :: Budapest
```
The deck shows the cards due today. Flip one with Space and grade it from Again to
Easy, or 1 to 4. The grade writes the card's next date at the end of its line, such
as ~ 2026-10-04 6d, so tomorrow the deck shows only what is due.
Install a plugin someone made
#Open Tools › Manage plugins… and press Install a plugin…. Choose a .js file, or a
.zip with one inside. Before anything runs, Selfscribe shows the plugin's name, its version,
the rule it adds, and whether it goes online. Your plugins sit under Yours, with
Remove.
When a plugin cannot draw a block, the block keeps its text, with a red line that says why. The rest of the document draws as usual. To write a plugin of your own, see Write a plugin.