SelfscribeDownloadOpen the app

Dictionary

Every word you can type in a rules block, every piece of kernel syntax, every target and plugin, and the ideas behind them, each with a live example. The editor's hover cards and its Help window (F1) show exactly these entries.

Start here

#

What Selfscribe is, in five minutes.

Start here guide

#

Plain to write, rich to read: a document is plain text, and its own rules turn it into a page.

A Selfscribe document is a plain text file. A few lines at its top, the rules block, say what its marks mean, and the editor draws the page from them. Change a rule and the whole document follows.

A file with no rules block reads as Markdown, so you can start writing at once and add a rule only when you want a mark Markdown does not have.

Try it: open the example below, change crimson to seagreen in its rules block, and watch the line change colour.

  • Alt+M steps through the five ways to see the text: Source (every mark showing), Hybrid (drawn as you type, Hybrid mode), Write (type on the finished page), Preview (to read) and Split (both).
  • F1 on any word of the rules block opens its entry here. Hover a word for a short card.
  • The Inspector says what the text under the caret is and which rule made it.
  • Rules you like can become a rulebook, which any document borrows them with use NAME.

Everything the editor shows is text you could type. Panels and dialogs only write lines into the .self file.

A document with one rule of its own
selfscribe
~~~ selfscribe
use markdown
line  // ! _  -> p.urgent  { color: crimson; font-weight: 600 }
~~~
# Weekly notes

Markdown works as usual: **bold**, *italic*, `code` and [links](https://example.com).

// ! This line uses the rule defined above.

- plan the week
- write it down
Rendered

See also Document Rules block Rule Hybrid mode Keyboard shortcutsSpec 01 §1, 06 §1

How do I…

#

Everyday tasks, step by step: print on A4, pictures, fonts, maths, restyle, share rules, recover work.

Print on A4 or Letter guide

#

File › Page setup… chooses the paper and margins, and keeps them in the document.

Open File › Page setup…. Pick the paper (A4, Letter, A5, A3, Legal), portrait or landscape, and the margins, then Save to document. It writes one line in the rules block, such as set page Letter landscape.

Printing (Ctrl+P), PDF, Word and the Pages view in Preview all use it, so what you see is what prints.

See also page widthSpec 06 §1

Change how the whole page looks guide

#

Pick a look (paper, newspaper, academic…) from the Look button in the status bar.

The Look button in the status bar (or View › Document look…) shows each look on your own document: paper, newspaper, academic, a dark or light page, wide or compact, serif or sans, numbered headings, a drop cap, two columns. Looks add up.

Each click edits one line, set style …, in the rules block. Your own rules keep their colours. A look only changes the page around them.

See also style font Change how one kind of text looksSpec 06 §1

Change how one kind of text looks guide

#

Put the caret on it, open the Inspector, press Change how it looks…

Put the caret on the text (a heading, a bold word, a line your rules make) and open the Inspector in the side panel. Change how it looks… opens a designer: colours, weight, spacing, borders, with ready-made styles to start from.

It writes CSS into the rule, in braces. If the rule came from a rulebook, it is first copied into your document, so the rulebook stays as it was. The Inspector warns when colours are hard to read on light or dark pages.

See also Inspector Rule wizardSpec 06 §1

Make a mark of my own guide

#

Add one rule to the rules block. A rule says where to look, what to look for, what it becomes and how it looks.

Say you want lines starting !! to be red warnings. Add a line to the rules block:

line !! _ -> p.warn { color: crimson; font-weight: 700 }

line looks at whole lines, !! _ is the pattern (_ is any text), p.warn is what it becomes (a paragraph with the class warn), and the braces hold its CSS. Tools › New rule… builds a rule for you from an example of your text.

A warning line
selfscribe
~~~ selfscribe
use markdown
line  !! _  -> p.warn  { color: crimson; font-weight: 700 }
~~~
# Ferry notes

!! The last boat leaves at nine.
Rendered

See also Rule Rule wizard Short formSpec 06 §1

Make a checklist guide

#

With Markdown: - [ ] for a box, - [x] for a ticked one.

Write - [ ] Pack the tent for a box and - [x] Book the ferry for a ticked one. Click a box in Preview or Hybrid mode to tick it: the text changes with it.

For a list you can sort, filter and count, use a data table with a done:toggle column instead.

See also Data and viewsSpec 06 §1

Make a table guide

#

With Markdown, write each row between bars.

Write each row between bars: | Saturday | 09:40 |. The line of dashes under the first row, |---|---|, stays off the page.

For a table you can sort and total, use a data block instead.

A timetable
selfscribe
~~~ selfscribe
use markdown
~~~
| Day | Ferry |
|---|---|
| Saturday | 09:40 |
| Sunday | 11:15 |
Rendered

See also Tables Keep a table I can sort and filterSpec 06 §1

Write the words in square brackets and the address in round ones.

Write [the timetable](https://example.com/ferry). In a folder, link to another document the same way: [the market](market.self), or [parking](getting-there.self#parking) to reach a heading.

A link
selfscribe
~~~ selfscribe
use markdown
~~~
Check [the timetable](https://example.com/ferry) before you go.
Rendered

See also Links and images Folder of documentsSpec 06 §1

Leave a comment guide

#

Select the words and choose Edit › Comment on selection… (Alt+Shift+C).

Select the words and choose Edit › Comment on selection… (Alt+Shift+C). The Comments panel lists every comment, and you can answer or resolve each one.

See also CommentsSpec 06 §1

Keep a table I can sort and filter guide

#

A data block holds CSV. It shows as a table, cards, a board or a calendar.

Add use data to the rules block, then a block of CSV that starts with ```data NAME. The first line names the columns and can give them types: status:choice(todo|doing|done), due:date, hours:number.

The view has buttons to search, sort, filter and switch between table, cards, board and calendar. Edits you make there are written back to the CSV.

See also Data and views dataSpec 06 §1

Make slides guide

#

Choose Slides from Page and view beside the modes, or write set layout slides.

The Page and view button beside the modes shows the document as Slides. A new slide starts at each ---page--- line, else at each ---, else at each heading. F5 presents full screen. O shows every slide.

To keep it, choose Keep slides for this document in the same menu: it writes set layout slides.

See also Preview modeSpec 06 §1

Use the same rules in many documents guide

#

Save them as a rulebook, then use NAME in each document.

In the Inspector, More › Save to a rulebook… keeps a rule under a name. Tools › Manage rulebooks… lists them. Any document can then start with use NAME.

In a folder, a file of rules such as house-style.self works too: use ./house-style.self. selfscribe.css at the root of the folder styles every document in it.

See also Rulebook WorkbookSpec 06 §1

Send a document to someone guide

#

File › Export… makes a web page, PDF, Word, EPUB or Markdown.

A web page is one .html file with everything inside: it opens in any browser, offline. PDF and Word use the paper of the document (set page). Markdown is the text without its rules. The .self file itself opens in any text editor.

The Export dialog lists what each format cannot keep, and a folder or workbook can be exported whole, as a book or a small website.

See also Print on A4 or LetterSpec 06 §1

Put a website online guide

#

Export the folder as a Website, then press Publish… and pick Cloudflare Pages or GitHub Pages.

In File › Export… choose Every document, then Website, and press Publish…. For Cloudflare Pages, paste an API token with Account › Cloudflare Pages › Edit and your account ID, then press Publish. The dialog shows the address, and each later press uploads only the files that changed. Staging publishes to a preview address first.

For GitHub Pages, Save for GitHub Pages… adds a workflow and the steps to the website, and you push it to a repository of yours. The folder remembers where it was published. Publish from the desktop app: browsers block the web app from calling Cloudflare.

See also Send a document to someoneSpec 06 §1

Use other files in a document guide

#

Name a file of the same folder: a picture, a diagram, a table, a database, another document.

A document in a folder can show what is beside it, by a path from the document. A picture: ![The quay](images/quay.jpg). A diagram kept in its own file: a flow block holding from orders.flow view checkout, and import parts.flow for its blocks. A table: view: ./contacts.csv as table, or a data block that reads it (```data contacts from ./contacts.csv); what you change in the view is written to the file. Another document's rules: use ./house-style.self. Another document's text: a rule with the include target.

In the desktop app a SQLite database works the same way, table by table: view: shop.sqlite/clients.csv as board by status shows the table clients of shop.sqlite, and edits go into the database. Nothing is read from outside the folder or from the network. A document opened on its own, not from a folder, still reads what is beside it.

See also from include Add a picture Folder of documentsSpec 06 §1

Show a diagram on your own website guide

#

Point at a drawn block, press Export… and choose For your website. Paste the code into your page.

Point at a diagram, a chart or a TikZ picture and press Export… over it, then choose For your website. The dialog shows a script line and a tag holding the block’s text. Copy the code and paste it into the HTML of a web page, a forum post or a blog that allows scripts. The picture is drawn there from its text, in the reader’s browser. Nothing is uploaded, and there is no image to keep up to date: to change the picture, change the text in the tag.

<self-tikz> draws TikZ with no TeX installed anywhere, <self-flow> a flow diagram (write <self-flow editable> for an Edit button), <self-block type="chart"> any other block, and <self-doc> a whole document with its own rules. They come from the selfscribe-embed package, which is free to use, to build on and to host yourself: copy its dist folder to your own site and point the script line at it. Its README lists the functions for tools that draw things themselves.

See also Send a document to someone Put a website onlineSpec 06 §1

Collect answers with a form online guide

#

Run Put a table’s form online… from the command palette. Answers come back as records.

In the desktop app, put the caret in a table and run Put a table’s form online…. The table’s columns become a form at a public address on your own Cloudflare account. Paste an API token with Pages › Edit and D1 › Edit and your account ID, then press Put online. The table can be a .csv file the document shows: put the caret on its view: line, and each answer is a line at the end of the file.

Answers wait on your account until the app takes them in, every ten minutes while the document is open or at once with Check now. Each is added to the table once. Take the form down… deletes the form and every answer still on Cloudflare. For people nearby, Share a table’s form on your network… needs no account.

See also Keep a table I can sort and filter Put a website onlineSpec 06 §1

Reach a shared form from anywhere guide

#

While a form is shared, run Reach the shared form from anywhere… It goes through a Cloudflare Tunnel.

In the desktop app, share a table’s form on your network, then press Also reach it from anywhere…. Quick, no account gives an address on trycloudflare.com that changes each time. On your own domain gives a name of yours, with an API token for Cloudflare Tunnel › Edit and DNS › Edit. Both need Cloudflare’s cloudflared installed on this computer. The app never downloads it.

Answers arrive only while the app is open, straight into the table, and nothing is kept on a server. Only the form comes through the tunnel, with a hidden field for robots and limits per connection and per day. For a form that stays up while your computer is off, use Put a table’s form online….

See also Collect answers with a form online Keep a table I can sort and filterSpec 06 §1

Get back work I lost guide

#

Unsaved work waits on Home. Each save keeps a version.

If Selfscribe closed before you saved, open it again: Unsaved work from last time on Home has the text. Each time you save, a version is kept (the last 30): File › Earlier versions… shows how each differs and restores one as a single undo step.

All of this stays on your computer.

See also Send a document to someoneSpec 06 §1

Turn a photo or a web page into a document guide

#

Tools › AI prompt builder… writes the instructions for any AI assistant.

Choose what to make (a document or a workbook) and from what (a photo, a web page, a file, notes), tick the rulebooks and plugins it may use, and copy the prompt into your assistant with the picture or text. Paste its answer back: the builder opens the files it wrote.

See also Open a Word file or a PDF RulebookSpec 06 §1

Add a picture guide

#

Open the document from a folder or a workbook, then paste or drop the picture. It is saved next to the document.

In a document opened from a folder or a workbook, paste a picture (Ctrl+V) or drop the file on the text. It is saved in images/ beside the document and a line like ![A map of the harbour](images/map.png) is written for you. Change the words in the brackets to describe it for people who cannot see it.

Outside a folder, link to a picture on the web: ![The ferry](https://example.com/ferry.jpg). Audio and video work the same way with the media plugin.

A picture in the text
selfscribe
~~~ selfscribe
use markdown
~~~
# Sunset at the beach

![An orange sun over a blue sea](data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='120'><rect width='240' height='120' fill='steelblue'/><circle cx='120' cy='120' r='44' fill='darkorange'/></svg>)

In a folder, a pasted picture is a short line instead: `![The beach](images/beach.jpg)`.
Rendered

See also Pictures, audio and video in folders Send a document to someoneSpec 06 §1

Change the font guide

#

For this document, File › Page setup…. For every document, Settings › Text and fonts.

For one document, open File › Page setup… and pick a font for the text and one for the headings. It writes set font Literata and set heading-font Inter in the rules block, so the font travels with the file into Preview, the pages and every export.

For every document you open, Settings › Text and fonts › Default document font. A document that names its own font keeps it. Any font installed on your computer works too: set font Garamond. Word files name the font. Word uses it when the computer that opens the file has it.

See also font Change how the whole page looksSpec 06 §1

Switch the app to dark guide

#

Choose a dark theme in View › Theme, or in Settings › Appearance.

Choose a dark theme in View › Theme, or in Settings › Appearance. Follow system matches the light or dark setting of your computer.

Your theme stays in the app. To make a document's page dark for everyone, use a look such as set style dark. To have the app switch theme while a document is open, add set theme to it.

See also preferences.self Change how the whole page looksSpec 06 §1

Use a plugin in a document guide

#

In Tools › Manage plugins…, choose the plugin and press Add to this document.

Open Tools › Manage plugins…, choose the plugin and press Add to this document. It adds the plugin's rules and an example to the document. The plugins that come with the app are already on.

See also Plugin Write mathsSpec 06 §1

Add a footnote guide

#

With Markdown: a mark in the text, the note on its own line.

Write [^1] where the note belongs, and the note on a line of its own anywhere below: [^1]: The ferry was late again. The marks are numbered in order and the notes gather at the end of the document, with links both ways. Words work as names too: [^ferry].

Word export turns them into real Word footnotes.

A footnote
selfscribe
~~~ selfscribe
use markdown
~~~
The last boat leaves at nine.[^1]

[^1]: Ten on Saturdays.
Rendered

See also footref Send a document to someoneSpec 06 §1

Write maths guide

#

In Tools › Manage plugins…, choose Math (KaTeX) and press Add to this document. Then $…$ sits in a line and $$…$$ is an equation of its own.

Open Tools › Manage plugins…, choose Math (KaTeX) and press Add to this document. It writes two rules. Then $e^{i\pi} + 1 = 0$ sits in a line of text and a block between $$ lines is an equation of its own, drawn with KaTeX.

Word export writes real Word equations. A web page keeps them drawn.

See also math Send a document to someoneSpec 06 §1

See tasks as a board or a calendar guide

#

A data block shows as board by status. A view: line shows the same records again.

Give a data block a choice column and say how to show it: ```data tasks as board by status. Drag a card to another column and its status changes in the text.

Show the same records again anywhere, another way: view: tasks as calendar (by a date column) or view: tasks as table sort due.

See also data Keep a table I can sort and filterSpec 06 §1

Open a Word file or a PDF guide

#

File › Import Word or PDF… makes a Selfscribe document of it.

Choose the file: headings, paragraphs, lists, tables, links and pictures come across as Markdown in a new document, which you then save where you like. Check the result: complex layouts (text boxes, columns in a PDF) come across as plain paragraphs.

See also Send a document to someone Turn a photo or a web page into a documentSpec 06 §1

Put the same block on many pages guide

#

Insert › Page blocks adds a block defined once in the folder’s blocks/, like a properties card at the top.

Open Insert, then pick one under Page blocks: Properties puts a card at the top of the page with a name and a value on each line (status:: draft), and it folds away. The first time, the template is copied to the folder’s blocks/properties.self. The page gets use properties in its rules block and the card’s text under it.

To fill in fields like a form, pick Details form. Its fields have types: in Write, click the card and choose a status from its options, pick a date from a calendar or tick a box, then Save. In Properties, click a value on the page and type.

The look lives in that one file. Change blocks/properties.self and every page that uses it follows, while each page keeps its own values. Its rules block says how the block looks, and its text is what a page starts with: {{isodate}}, {{title}} and {{cursor}} are filled in.

Whole pages start from Planning, Notes, Money and Life: a project tracker, a roadmap, goals and key results, meeting notes, book notes, a decision record, a budget and a daily review. Their tables are linked, so the numbers work themselves out. In the budget, each category adds up its own expenses and says what is left. In the project tracker, each person adds up their tasks. On the roadmap, move one milestone and the ones after it follow.

To file your own templates under a heading in Insert, give them set group Recipes, and set summary for the line under the name.

To add a block to new pages by itself, give its template set auto new. Add set for journal/ to keep it to one folder, and set place end to put it at the bottom. set auto empty fills empty pages too, when you open them. A page block of your own… in Insert starts a new template to change.

A properties card, with the look in the rules
selfscribe
~~~ selfscribe
use markdown
block  ::: properties ... :::  -> details.properties  summary=Properties  open=open
line   _:: _  -> div.prop  data-key=_1  group div.props
class  properties  { padding: 0.5em 0.9em; border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-radius: 10px }
class  props  { display: grid; grid-template-columns: max-content 1fr; column-gap: 1.5em }
class  prop  { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid }
class  prop::before  { content: attr(data-key); opacity: 0.6 }
~~~
::: properties
status:: draft
route:: Harbour to the island
:::

# The winter timetable
Rendered

See also Find and replace asSpec 06 §1

Find and replace in every document guide

#

Ctrl+Shift+F searches the open folder and every open tab.

The Search side panel (Edit › Find in folder…, Ctrl+Shift+F) finds text in every document of the folder and every open tab, grouped by file. Replace all shows each file it would change, line by line, before it changes anything, and Undo in the panel puts them back.

Search only headings, only rules or only the text of one kind of element with a structure filter: in:heading ferry.

See also Find and replace Search filtersSpec 06 §1

Add a plugin of my own guide

#

A plugin is one JavaScript file: a name, the rule a document adds, and a function that draws.

A plugin file exports an object: name (what documents write after ->), rules (the line Add to this document writes, which must end in -> NAME), and hydrate(element), which draws one block from its text. It may also give title, summary, examples, css, version, network (the hosts it contacts) and credits.

Install it from Tools › Manage plugins… › Install a plugin…. Selfscribe reads its name, rules and the sites it contacts first, apart from your documents and without letting it fetch anything, and asks before installing. In the desktop app you can also drop files in the plugins folder. Selfscribe’s source has a small starter (a clock) and a bigger example (a map with a library). The guide is docs/PLUGINS.md there.

See also Keep a table I can sort and filter RuleSpec 06 §1

Style @mentions, #tags or times guide

#

A word rule with _ styles a mark and the word after it: word @_ -> span.mention.

Add a word rule to the rules block with the mark and _. The _ takes one word, and keep shows the mark as well. @ana, @9:30, #groceries, $12 and v1.2 all work this way.

A comma or full stop after the word stays outside it, and the rule never starts inside a word, so an email address stays plain. To make a tag a link, use the word in an attribute: word #_ -> a.tag href="#_1" keep.

Mentions and tags
selfscribe
~~~ selfscribe
word  @_  -> span.mention  keep  { color: teal; font-weight: 600 }
word  #_  -> span.tag  keep  { color: slateblue }
word  @_:_  -> span.time  keep  { font-variant-numeric: tabular-nums }
~~~
Meet @ana at @9:40, by the ferry. #harbour
Rendered

See also word keepSpec 06 §1

Find out why a rule does nothing guide

#

The status bar and the line of the rule say what is wrong. The Inspector says which rule won.

A number in the status bar counts problems. Click it for the list. A pattern that can never match, or a rule another one always beats, is marked on its line with the reason and often a fix.

Put the caret on the text and open the Inspector: Where it comes from says which rule made it and which rules it won over. Inline patterns need something you type at both ends (==_==, not _!), and the CSS of a rule goes to its as name when it has one.

See also Inspector RuleSpec 06 §1

Write in one document with other people guide

#

File › Share this document live… gives you a code. Others join with it and type alongside you.

In the open document, choose File › Share this document live… and a bar at the bottom shows a code. Send it to the others, and they choose File › Join a live document… and paste it. Each person sees the others type, and where their carets are.

Choose what guests may do when you share. Change everything suits writing a plan together. Fill in the tables only suits a sign-up sheet or a shared budget: guests add and change records in the data blocks, and the text around them stays yours. Only read suits a talk or a lesson.

The document stays one plain file, on your computer. Nothing goes through our servers: in the desktop app the others connect to your computer over your network.

To write with people anywhere, in the web app too, put the address of a relay of your own in Settings › Sync › Relay. Share live then gives a Link for anywhere to send. The relay passes what you type encrypted, with a key that is only in the link, and keeps nothing.

To review rather than write, select the words and choose Edit › Comment on selection… (Alt+Shift+C). Comments are written into the document, so they travel with the file and anyone can answer them.

Note: a table can name who may change it. Write editors ana, tom at the end of the data block's first line, and only those guests change it during a live session.

See also Leave a comment Keep my computers in step Keep a table I can sort and filter Send a document to someoneSpec 06 §1

Keep my computers in step guide

#

Settings › Sync keeps a folder in step with storage you choose. Link another computer with a QR code.

There are three kinds of sync. Live together is one document, as you type, between computers: File › Share this document live…. Your own storage keeps a folder in step with a disk, WebDAV, S3, SFTP, git or Google Drive, in the desktop app. A folder another app syncs is a folder inside Dropbox, OneDrive, iCloud Drive or Syncthing, and that app does the syncing. None of them stores your documents on our servers.

For your own storage, open the folder, then Settings › Sync. The quickest way is Sync through your own Cloudflare account: a private bucket in your account, about five minutes to set up, and free for most people. Your files are encrypted before they leave, so Cloudflare cannot read them.

To add another computer, open the place and choose Link a device…. It shows a QR code and a short code. On the other computer choose Join from another device, paste the link or scan the code, and type the short code. The short code never travels, so a photo of the QR code alone opens nothing.

A second disk, a Nextcloud or a server of your own work too. Each keeps your documents as plain files, unless you encrypt them before upload.

For a folder of your Google Drive, make a Google Cloud OAuth client of type "Desktop app", give the place its client id and secret, save it, and press Sign in with Google on the place. The desktop app opens Google’s own page in your browser and keeps the sign-in in the system keychain. Nothing is pasted.

Note: a sync never removes most of a folder by itself. It stops and asks, because that is what an emptied disk looks like.

See also Write in one document with other people Get back work I lostSpec 06 §1

Put places on a map guide

#

A map block holds places, routes, areas and circles, one a line. Records with lat and lng show as a map too.

Write a map block and one thing a line: Café @ 38.7075, -9.1364 is a place, route Walk: Café -> Market goes through places or coordinates, area Old town: … / … / … goes around them, and circle Delivery @ 38.71, -9.13 2km has a middle and a radius. End a line with a colour (red, #e5484d) and -- a note.

Name a city or a country instead of its numbers: Lunch @ Porto, a line of just Coimbra, route Down: Porto -> Coimbra -> Lisbon, circle Near @ Faro 5km, center: Lisbon. A few hundred places are built in, so nothing is looked up on the network; San José, Costa Rica picks between two of one name. Type in Find a place to go there, and press Ctrl-Enter (or Add) to put it on the map. A place you drag away is written as numbers.

Draw on the map instead of typing: pick Place, Route, Area or Circle and click. Drag a place, or a point of a route, to move it; drag the small dot between two points to add one. Rename, recolour or add a note in the strip under the map. Every change is written into the text.

Records with lat and lng columns (or names like start_lat, or one column of lat, lng values) show as a map with view: places as map by kind: the pins take their colour from kind, and dragging a pin moves the record. It works for a data block, a CSV or TSV file, a table of a database or a query, so a map stays up to date as automations change the records.

Mix your own drawing with records: a layer places.csv by kind line in a map block draws those records among its routes and areas. Dragging one of them writes the record, and picking it picks it in every view of that table.

Note: the map draws on a plain grid until you click Show the street map, because the street pictures come from openstreetmap.org. Save as GeoJSON for other map tools, or drop a GeoJSON file on the map.

See also Keep a table I can sort and filter Write in one document with other peopleSpec 06 §1

Plan who goes where, and when guide

#

One table of people, places and dates, shown as a timeline and a map that follow each other.

Keep the plan as one table: a title, who, start and end dates, lat and lng, and, if you like, after (what it waits for) and progress. Then show it twice: view: visits as gantt by start to end group who and view: visits as map by who.

The views are linked. Click a bar, a pin or a row and the same record is picked in every view of the table: the map brings it into sight, the timeline scrolls to it.

Under the map, drag out a few days on the time strip (or press play). Pins outside those days fade, each person’s places are joined in date order, and the timeline shades the same days. Dragging along the timeline’s dates does the same the other way.

Write dates as links and the plan keeps itself: +4wd in an end column is four working days after the start, & in a start column is the day after what it waits for ends (its after, else the row above), &+2d leaves a gap of two days and &-1d overlaps by one. Move one task and everything after it follows. The table shows the date with the link beside it.

&s starts with what it waits for (start to start), &s+2d two days after it starts. Critical path marks the tasks that would delay the end if they slipped, and shows how many working days the others could slip as a dotted tail.

Link two tasks by dragging: hover a bar, drag the dot at its end onto the task that waits for it. Its after gains the name and its start becomes &; drag again to take the link out.

Right-click a bar (or press Shift-F10) for its menu: add a task after it, start it after what it waits for, keep its length when moved, fix its dates, move it a week, delete it. Dragging keeps the links.

On the timeline, after draws arrows. A task that starts before what it follows ends turns red; Move it after moves it, and everything after it. Two tasks of the same person on the same days are marked, with the days listed. progress fills each bar.

See the order of work as a diagram with view: visits as flow group who: a step per task, arrows from after, a lane per person, colours by status (done is green, blocked red). Click a step to pick it everywhere; Join two steps (the first, then the one after it) to write after for you.

A diagram you draw yourself can show the same records: in a flow block, write set data=visits. Each step whose words are a record’s title (or that says record="Fit the kiosks") takes the colour of its status, is marked when the record is picked anywhere, and picks it when clicked. The bar under the diagram sets the status (written into the table) or opens the record.

Keep phases in a table of their own and let tasks wait for them: with after:choice(from phases.name), a task’s & follows the phase it names, so a phase that runs late moves its tasks.

Tables linked by a choice (who:choice(from people.name)) follow each other too: pick a person and their visits are marked in every view of the visits; pick a visit and its person is marked.

Note: zoom with Fit, Weeks and Days; Today goes to today. Every drag writes the dates back into the table, one undo step each.

See also Put places on a map Keep a table I can sort and filterSpec 06 §1

Ideas

#

Documents, rules, rulebooks, folders, workbooks.

Document concept

#

One text file: an optional rules block, then the body.

A document is one .self file (any UTF-8 text works). It has two parts: an optional rules block at the very top, and the body, which is everything after it.

The rules decide how the body is read. With no rules block, a document behaves as if it started with use markdown, unless it is inside a folder or a workbook that supplies default rules.

Only three things in the body belong to Selfscribe itself: backslash escapes and the @scope and @end lines. Everything else means what the rules say.

Syntax
~~~ selfscribe
…rules…
~~~
body text
A document with its own rules
selfscribe
~~~ selfscribe
use markdown
word  NOTE:  -> strong.note  { color: steelblue }
~~~
# A document

NOTE: the rules block above adds one word to Markdown.
Rendered
A document with no rules block (Markdown)
selfscribe
# Just Markdown

No rules block, so the built-in **Markdown** rules apply.
Rendered

See also Rules block ~~~ selfscribe \ (escape) useSpec 01 §1, D40

Rules block concept

#

The lines between ~~~ selfscribe and ~~~ at the top of a document.

The rules block is the first non-blank thing in a file. It opens with a line that is exactly ~~~ selfscribe and closes with the next line that is exactly ~~~. It is never part of the rendered output.

Each line inside is blank, a # comment, a line starting with use, scope, set, off, palette or class, a one-line rule starting with its kind (inline, line, block, word), or a full-form rule.

A mistake on one line is reported and that line is skipped. The rest of the document still renders. set rules hide asks editors to fold the block away.

Syntax
~~~ selfscribe
# a comment
use markdown
line  // ! _  -> p.urgent
~~~
Comments, a use line and two rules
selfscribe
~~~ selfscribe
# House style for meeting notes
use markdown
line  ? _   -> p.question  { color: #2f80ed }
word  DONE  -> strong.done  { color: seagreen }
~~~
? Who owns the budget?

Budget review DONE
Rendered

See also ~~~ selfscribe # Short form rulesSpec 01 §1-2, D2, D3

Rule concept

#

A rule says where to look, what to look for, what it becomes and how it looks.

A rule is one line of the rules block: its kind, a pattern, an arrow ->, and what it becomes. line # _ -> h1 means: a whole line that looks like # something becomes an h1 heading.

After what it becomes come optional attributes (href=_2), options (group ul, nest), a { css } style and a name (as critical). Long rules can be written in full form instead, one key per line. Both forms mean exactly the same.

The rules drive everything the editor does: highlighting, folding, the formatting toolbar, the slash menu and smart lists all come from the document's rules, not from a built-in grammar.

A later rule with the same kind and pattern replaces an earlier one, including one that came from use. When two different rules could match at the same place, the longest pattern wins.

Syntax
KIND  PATTERN  ->  BECOMES [attr=value …] [options …] [{ css }] [as NAME]
Four kinds of rule
selfscribe
~~~ selfscribe
inline  **_**             -> strong
line    # _               -> h1
block   ::: tip ... :::   -> aside.tip  { border-left: 3px solid seagreen; padding-left: 0.8em }
word    TODO:             -> span.todo  { color: darkorange; font-weight: 600 }
~~~
# Rules at work
Some **strong** text. TODO: more.
::: tip
A tip box from a block rule.
:::
Rendered

See also Short form rule inline Longest pattern wins Rule wizardSpec 02 §1, 02 §6

Rulebook concept

#

A reusable set of rules you bring in with use NAME.

A rulebook is an ordinary .self file whose rules block you want in more than one document. use NAME reads its rules block (its body is ignored) and applies the rules in place, as if you had typed them there.

Six rulebooks are built in: markdown, bbcode, comments, form, plain and workbook. Rulebooks you save yourself live in your library and are used by name in the same way. A built-in name always means the built-in. A saved rulebook cannot shadow it.

Inside a folder, any document can also borrow another file's rules by path: use ./house-style.self.

Your own rules come after the use line and win over the rulebook's, so you can override or switch off (off) any rule you do not like.

Syntax
use NAME
use ./path/to/file.self
A built-in rulebook plus a tweak
selfscribe
~~~ selfscribe
use comments
line  // ! _  -> p.critical  { color: darkred; text-decoration: underline }
~~~
// ! Critical, now dark red and underlined
// ? A question, unchanged
// - Done and struck through
TODO: the built-in keywords still work
Rendered

See also use Library offSpec 05 §1, D14, D72

Library concept

#

Your saved rulebooks, available to every document by name.

The library holds the rulebooks you save. Once a rulebook called my-notes is saved, use my-notes works in any document, just like use markdown.

Where the files live depends on the app: the web editor keeps them in the browser's storage, the desktop app in its app data folder, and the self command line in ~/.selfscribe/rulebooks (or --library DIR). Each rulebook is a plain NAME.self file you can export, edit and import.

The engine asks the host for the key lib:NAME. If there is no such rulebook the use line reports unknown template 'NAME'. A library rulebook may use built-ins and other library rulebooks by name, but not relative paths, because it has no folder.

One library rulebook can be the default for new documents: set default-rulebook NAME in preferences.self.

Using built-ins by name (library names work the same way)
selfscribe
~~~ selfscribe
use markdown
use comments
~~~
# Two rulebooks

// ~ Markdown and the comment colours together.
Rendered

See also Rulebook use preferences.selfSpec 05 §1, D72

Folder of documents concept

#

A folder of documents that share rules through use and selfscribe.self.

A folder is simply a folder you open in the editor. Every .self file in it is a document, and documents can share rules: use ./house-style.self pulls in the rules block of a sibling file, and paths are relative to the file that writes them.

A file named selfscribe.self at the root of the folder holds the folder rules: they apply to every document in the folder, before the document's own rules, unless it says set project off. They replace the built-in Markdown default, so selfscribe.self usually starts with use markdown.

The editor keeps its own state (open tabs, folds) in a .selfscribe/ folder that is safe to delete and never holds rules. Paths that climb out of the folder with .. are refused.

Rules for every document of a folder (selfscribe.self)
selfscribe
~~~ selfscribe
# selfscribe.self: applies to every document in this folder
use markdown
word  DRAFT  -> mark
~~~
# Project defaults

Every document here gets Markdown plus the DRAFT keyword.
Rendered

See also Workbook folder use DocumentSpec 05 §2, 05 §4, D18

Workbook concept

#

Many documents and their rulebooks bundled as one .zip or .gz file.

A workbook is a folder or a zip file with a workbook.self at its root. It is the easiest way to share a set of documents: send one file and everything, rulebooks included, travels together. A .gz workbook holds a single document.

workbook.self is itself a Selfscribe document. Its body lists the documents in order, one per line, nested by indentation and grouped under headings. The editor's Workbook panel is a view over exactly those lines: dragging a document rewrites the file.

The rules in workbook.self are the workbook defaults: they apply to every document in the workbook, the way selfscribe.self does for a folder.

A workbook.self table of contents
selfscribe
~~~ selfscribe
line  # _  -> section  fold 1
line  - _  -> doc      nest
set   title  Q3 Planning
~~~
# Planning
- intro.self
- goals.self
  - goals/engineering.self
# Appendix
- glossary.self
Rendered

See also Folder of documents doc DocumentSpec 05 §2-3

Scope concept

#

A named set of extra rules used only between @scope NAME and @end.

Rules normally apply to the whole body. A scope lets some rules apply only to a region: write scope NAME in the rules block, then the rules for that region, then scope alone to go back.

In the body, @scope NAME on its own line switches those rules on until @end. Inside the region the active rules are the default rules plus the scope's rules (a scope rule with the same pattern replaces the default one there).

Scopes are flat: @scope b inside @scope a uses the default rules plus b, not a plus b. Forms are the classic use: questions and checkboxes only where you ask for them.

A form region
selfscribe
~~~ selfscribe
use markdown
scope form
line  ? _    -> label  input=text
line  [ ] _  -> label  input=checkbox
scope
~~~
# Sign-up

? Outside the region this is just text.

@scope form
? Your name
[ ] Send me the newsletter
@end
Rendered

See also scope @scope @endSpec 01 §2-3, D6, D7, D37

Plugin concept

#

Something the app knows how to draw: diagrams, maths, charts, music…

A document can only name a plugin, as what a rule becomes: block ``` mermaid ... ``` -> mermaid verbatim. The drawing is done by code the app installed. Documents never carry code.

Some plugins are built into the engine (emoji, csv, tsv, var, include, mermaid, math). Others are client plugins from the app's catalog, switched on and off in Settings › Plugins. Switching is app state, kept in preferences.self as set plugin-NAME on|off. A plugin's options are set plugin-NAME-KEY VALUE lines.

Without the plugin the document still reads well: a chart is still its data, a diagram still its text. A plugin that is switched off shows its blocks with a dashed outline and a note, and the editor offers to switch it on.

No document can make the app fetch anything by itself. Only embed reaches the network, and only after a click or for sites you allowed.

Two built-in plugins
selfscribe
~~~ selfscribe
inline  :_:  -> emoji
block   ``` csv ... ```  -> csv  verbatim
~~~
Launch day :rocket: :tada:
``` csv
Planet, Moons
Earth, 1
Mars, 2
```
Rendered

See also mermaid chart An unknown name after -> preferences.selfSpec 04 §1-4, D48, D73, D74

Writing rules

#

The rules block, rule lines, the four kinds, the long form.

~~~ selfscribe kernel

#

Opens the rules block. A line of ~~~ closes it.

The opening fence is a line that is exactly ~~~, one or more spaces, and selfscribe (any case), with no indentation. It must be the first non-blank line of the file (a UTF-8 byte order mark is skipped). ~~~selfscribe without a space is not a fence.

The closing fence is the next line that is exactly ~~~. Trailing spaces are allowed on both. Later ~~~ lines in the body are ordinary text.

If the block is never closed, there is no rules block: the whole file is body under the default rules, with the warning unclosed rules block. While you type, you see text and a squiggle instead of an empty page.

Syntax
~~~ selfscribe
…
~~~
The smallest rules block
selfscribe
~~~ selfscribe
use markdown
~~~
# Hello
Rendered

See also Rules block #Spec 01 §1, D2, D3

# kernel

#

A comment in the rules block.

A line whose first non-blank character is # is a comment.

A comment can also follow a rule: a # preceded by two or more spaces and followed by a space (or the end of the line) starts a trailing comment, unless it is the first token after the keyword (so line # _ -> h1 is a heading rule), or inside quotes or { }.

Some comments fold in the editor: # region NAME down to # endregion (regions may nest), and a section comment that starts with ---, such as # ---- Headings ----, down to the next one. Use them to tidy a long rules block. To the rules they are still comments.

Syntax
# comment
RULE  # trailing comment
# region NAME … # endregion
Whole-line and trailing comments
selfscribe
~~~ selfscribe
# Headings first
line  # _   -> h1   # one hash, a heading
line  ## _  -> h2
~~~
# Title
## Section
Rendered

See also Rules block ~~~ selfscribeSpec 01 §2, 02 §1, D12, D124

@scope kernel

#

In the body: switch to a named scope's rules until @end.

@scope NAME alone on a body line (after indentation) switches the active rules to the default rules plus the rules of scope NAME, until @end or the end of the enclosing region. The line itself produces no output.

A name with no rules declared gives the warning unknown scope 'NAME' and still opens, so @end pairs correctly. An @scope still open at the end of its region closes silently. Inside verbatim content these lines are just text.

Syntax
@scope NAME
…
@end
A scoped region
selfscribe
~~~ selfscribe
scope loud
line  _  -> p  { font-weight: 700; text-transform: uppercase }
~~~
A normal line.
@scope loud
This region shouts.
@end
Back to normal.
Rendered

See also Scope @end scopeSpec 01 §3, D6, D7

@end kernel

#

Closes the innermost @scope.

@end alone on a body line closes the innermost open @scope and returns to the enclosing rules. An @end with nothing open gives the warning @end without @scope and is dropped. Other lines that start with @ are ordinary text.

Syntax
@end
Closing a region
selfscribe
~~~ selfscribe
scope quiet
line  _  -> p  { opacity: 0.6 }
~~~
@scope quiet
Dimmed.
@end
Full strength again.
Rendered

See also @scope ScopeSpec 01 §3, D6

\ (escape) kernel

#

In the body, a backslash makes the next punctuation character literal.

In the body, \ followed by ASCII punctuation makes that character literal: it is shown without the backslash and can never start, end or form part of a pattern match. So \*not emphasis\* stays as typed.

Before anything else a backslash is an ordinary character, so C:\Users is left alone. Inside verbatim content (code) the backslash is kept, as in Markdown code spans.

Syntax
\*   \_   \#   \\
Escaped delimiters
selfscribe
~~~ selfscribe
use markdown
~~~
\*These stars\* are literal, and so is this \# hash.

A path like C:\Users\me is untouched.
Rendered

See also \ (in a pattern) verbatimSpec 01 §3, D5

Indentation kernel

#

Leading spaces or tabs of a body line: its nesting level.

Selfscribe measures the indentation of each body line and keeps it on the node. Rules match against the line after its indentation. A tab always counts as one level. Spaces count in steps of set indent (2 by default).

Indentation only matters to rules with nest: more-indented lines after such a line become its children. Elsewhere a more-indented line is simply the next line.

Nested list by indentation
selfscribe
~~~ selfscribe
use markdown
~~~
- fruit
  - apples
  - pears
- vegetables
Rendered

See also nest indentSpec 01 §4, D30

Short form syntax

#

A whole rule on one line: kind, pattern, ->, what it becomes.

Columns are separated by spaces. The first word is its kind (inline, line, block, word). The pattern runs up to the first -> that stands on its own. It may contain single spaces (// ! _).

After what it becomes, attributes (href=_2), bare slots (_1), options, one { css } block and as NAME may come in any order.

Mistakes are reported and the line is skipped: a missing ->, nothing after it, an empty pattern. An unknown option is only a warning. The rule is kept without it.

Syntax
KIND  PATTERN  ->  BECOMES [attr=value …] [slot …] [options …] [{ css }] [as NAME]
Everything on one line
selfscribe
~~~ selfscribe
line  // ! _  -> p.critical  { color: crimson; font-weight: 600 }  as critical
inline  [_](_)  -> a href=_2
~~~
// ! Ship on Friday, see [the plan](https://example.com).
Rendered

See also rule -> name=value { css } RuleSpec 02 §1, D11, D19

-> syntax

#

Separates the pattern from what it becomes.

The first -> with spaces on both sides ends the pattern. Everything after it is the output: what it becomes, its attributes, options, style and name. To match a literal arrow in a pattern, write \->.

Syntax
PATTERN  ->  BECOMES
An arrow in the pattern, escaped
selfscribe
~~~ selfscribe
word  \->  -> span.arrow  { color: seagreen; font-weight: 700 }
~~~
parse -> render -> html
Rendered

See also Short form \ (in a pattern)Spec 02 §1, D11

name=value syntax

#

Attributes on the output element, filled from slots or written out.

An attribute is name=value after what the rule becomes. The value can be a slot (href=_2), a quoted string (class="a b"), or a bare word (rel=noopener). Inside quotes, a slot character followed by a digit is replaced by that slot's text: style="color: _1".

A slot used in an attribute is consumed: it is not also shown as content. To show it too, list the content slots after it as bare tokens: -> a href=_1 _1 shows the URL as the link text.

Names are checked: they must be lower case, must not start with on, and srcdoc, formaction, action, http-equiv and xmlns are refused. URL attributes (href, src, cite …) accept http, https, mailto, tel, ftp or relative links, and data:image/… on img src only. Anything refused is dropped with a warning. An attribute whose slot came out empty is left out.

Syntax
BECOMES name=_N  name="text _N"  name=word  _N
Slot, quoted and bare values
selfscribe
~~~ selfscribe
inline  [_](_)          -> a href=_2 rel=noopener
inline  [url]_[/url]    -> a href=_1 _1
inline  [color=_]_[/color]  -> span style="color: _1"
~~~
A [link](https://example.com), a bare [url]https://example.org[/url], and [color=seagreen]green text[/color].
Rendered

See also _ href style classSpec 02 §4, D22, D23, D43

{ css } syntax

#

Plain CSS for everything the rule produces.

A { … } block after what the rule becomes holds ordinary CSS declarations. The rule gets a class of its own (its as name, or self-rN for rule N) and the document's one <style> block gets a line for it, with a comment saying which file and line it came from.

There are no shorthand tokens: it is just CSS. Anything that could fetch or escape is dropped with the warning unsafe css dropped: url(, image(, image-set(, expression(, javascript:, @, \, <, >, { and }. No document can make the browser load something through its styles.

To use one colour in several rules, name it in a palette and write var(--name). To give several rules one look, style a class.

In full form the same declarations go on a style line, without braces.

Syntax
RULE  { property: value; property: value }
A styled callout
selfscribe
~~~ selfscribe
line  !! _  -> p.callout  { background: #fff6e0; border-left: 4px solid darkorange; padding: 0.4em 0.8em; border-radius: 4px }
~~~
!! Styles are plain CSS, scoped to the rule.
Rendered

See also style as styleSpec 02 §4, D41, D42

inline WHERE

#

A span inside a line of text.

An inline rule matches a stretch of text inside one line: **bold**, [a link](url). The pattern must start and end with a literal (inline pattern must start and end with a literal). Slots take as little text as possible, up to the next literal, and a content slot is never empty.

Inline rules never cross a line break. Text is scanned once from left to right: the match that starts leftmost wins, and at the same start the longest pattern wins. Matched content is scanned again, so inline rules nest: **bold with *italic* inside**.

An inline pattern may have no slots at all ((c)). Its content is then empty unless the rule uses keep.

Syntax
inline  PATTERN  ->  BECOMES [attr=value …] [options …] [{ css }]
Emphasis, highlights and links
selfscribe
~~~ selfscribe
inline  **_**   -> strong
inline  *_*     -> em
inline  ==_==   -> mark
inline  [_](_)  -> a href=_2
~~~
Some **strong** words, *emphasis*, a ==highlight== and a [link](https://example.com).
***Both at once*** works too.
Rendered

See also line word _ boundSpec 02 §2, D26, D35

line WHERE

#

A whole line, after its indentation.

A line rule matches an entire line, anchored at both ends. A trailing slot takes the rest of the line (# _). A pattern with no slot matches a line that is exactly that text (---). A lone _ matches every line.

The line is matched after its indentation, with trailing spaces removed. Each space in the pattern matches exactly one space, and captured text is trimmed.

Lines that no rule matches become paragraphs: consecutive plain lines merge into one p, and a blank line ends it.

Syntax
line  PATTERN  ->  BECOMES [attr=value …] [options …] [{ css }]
Headings, a rule line and a coloured line
selfscribe
~~~ selfscribe
line  # _     -> h1
line  ## _    -> h2
line  ---     -> hr
line  // ! _  -> p.urgent  { color: crimson }
~~~
# A title
## A section
Two plain lines
make one paragraph.
---
// ! An urgent line
Rendered

See also block group nest IndentationSpec 02 §2, D31, D32

block WHERE

#

An opening line, any number of body lines, and a closing line.

A block pattern has three parts separated by ...: the opening line, the body, and the closing line. Both the opening and the closing part need a literal. Each space in them matches zero or more spaces, so ``` _ also matches ```js.

Block rules are tried before line rules. An opener only counts if its closer is found. Otherwise the warning unclosed block is shown and the opening line becomes an ordinary paragraph. A verbatim body ends at the first closing line and is kept as raw text. Other bodies are parsed with the same rules and may nest.

When the opening part has no slot, the one-line form also works: <!-- note --> or $$ x^2 $$. Slots in the opening line can only feed attributes (lang=_1). The body is the content.

Any block can be given a size at the end of its opening line: ``` mermaid maxwidth:800px, width:50%, height:20em, align:center. These words are not part of what the rules match, so the diagram is still a diagram. A length is a number with px, em, rem, ch, %, vw, vh, cm, mm, in or pt (a bare number is pixels), or full.

Syntax
block  OPEN ... CLOSE  ->  BECOMES [attr=value …] [options …] [{ css }]
Code, a callout and a hidden comment
selfscribe
~~~ selfscribe
use markdown
block  ::: tip ... :::  -> aside.tip  { border-left: 3px solid seagreen; padding-left: 0.8em }
~~~
```js
const answer = 42;
```

::: tip
Block bodies are parsed with the same rules, so **bold** works here.
:::

<!-- this comment renders nothing -->
Rendered

See also ... verbatim lineSpec 02 §2-3, D26, D33, D34

word WHERE

#

A word, or a mark and one word, wherever it appears.

A word rule matches a fixed token wherever it appears in text, outside verbatim content: TODO:, FIXME:, (c). It respects word boundaries on any edge that is a letter, digit or _, so TODO: does not match inside xTODO:.

Add _ to match a mark and one word: word @_ -> span.mention styles @ana and @9:30, word #_ styles #groceries, word _% styles 50%. A word is letters, digits and _, with -, ., : or / allowed between them, so a full stop or comma after it stays outside. A slotted word rule never starts inside a word, so email@host stays plain.

As in inline rules, the mark is dropped and the word is the content. Add keep to show the mark too, or use the word in an attribute: word #_ -> a.tag href="#_1" keep. A word rule has one or two _ (#_/_) and some fixed text. A longer fixed part wins, so word @ana beats word @_.

Syntax
word  TOKEN  ->  BECOMES [attr=value …] [{ css }]
Keywords that stand out
selfscribe
~~~ selfscribe
word  TODO:   -> span.todo   { color: darkorange; font-weight: 600 }
word  FIXME:  -> span.fixme  { color: crimson; font-weight: 600 }
word  (c)     -> text
~~~
TODO: write the intro. FIXME: the date.
But notTODO: stays plain.
Rendered
Mentions, tags and prices
selfscribe
~~~ selfscribe
word  @_  -> span.mention  keep  { color: teal; font-weight: 600 }
word  #_  -> span.tag  keep  { color: slateblue }
word  $_  -> span.money  keep  { font-variant-numeric: tabular-nums }
~~~
Ask @ana about the 9:40 ferry, #harbour.
Tickets are $12.50, and email@host stays plain.
Rendered

See also inline keep Style @mentions, #tags or timesSpec 02 §2, D26, D36, D38, D133

where full-form key

#

Full form: where the rule matches.

The kind of a full-form rule: inline, line, block or word. Any other value is a warning.

Syntax
  where  inline|line|block|word
where line
selfscribe
~~~ selfscribe
rule
  where  line
  match  => _
  out    p.arrow
~~~
=> an arrow line
Rendered

See also rule lineSpec 02 §5, D20

match full-form key

#

Full form: the pattern.

The pattern, exactly as in the short form: literals, slots, _#, ... in blocks. A rule has either match or re, never both.

Syntax
  match  PATTERN
match
selfscribe
~~~ selfscribe
rule shout
  where  inline
  match  !!_!!
  out    strong
~~~
That is !!loud!!.
Rendered

See also rule re Literal textSpec 02 §5, D20

out full-form key

#

Full form: what the rule becomes, its attributes and content slots.

What the rule becomes: the element with its classes, attributes, and bare slots, as after -> in the short form. Options are keys of their own in the full form, not part of out.

Syntax
  out  BECOMES[.class] attr=value … [_N …]
out with an attribute
selfscribe
~~~ selfscribe
rule link
  where  inline
  match  <_|_>
  out    a href=_2 rel=noopener
~~~
Visit <the site|https://example.com>.
Rendered

See also rule name=valueSpec 02 §5, D20

style full-form key

#

Full form: CSS declarations, without braces.

The same declarations as a { css } block in the short form. Several style lines are joined with ; .

Syntax
  style  property: value; property: value
Two style lines
selfscribe
~~~ selfscribe
rule note
  where  line
  match  NB _
  out    p.nb
  style  color: steelblue
  style  font-style: italic
~~~
NB this is a note
Rendered

See also { css } ruleSpec 02 §5, D20, D41

editor full-form key

#

Full form: hints for the source editor.

Comma-separated hints for how the rule's text looks in the editor: colour C, icon "X", bold, italic, hide. They are stored with the rules and never change the HTML.

Syntax
  editor  colour C, icon "X", bold, italic, hide
Editor hints
selfscribe
~~~ selfscribe
rule
  where   inline
  match   !!_!!
  out     strong.shout
  editor  colour crimson, bold, hide
~~~
In the editor, !!this!! is red and bold.
Rendered

See also colour hide ruleSpec 02 §5, D20

doc full-form key

#

Full form: a human description of the rule.

A sentence explaining the rule, shown in the Inspector and the rule wizard. Several doc lines are joined with a space.

Syntax
  doc  TEXT
A documented rule
selfscribe
~~~ selfscribe
rule aside
  where  line
  match  ( _ )
  out    p.aside
  style  opacity: 0.7
  doc    An aside: a quieter paragraph in brackets.
~~~
( a quieter thought )
Rendered

See also rule InspectorSpec 02 §5, D20

colour editor hint

#

Editor hint: the colour of the rule's text in the source editor.

colour C colours the text the rule matches in the source editor (any CSS colour). The formatting toolbar also uses it for the rule's button.

Syntax
  editor  colour C
colour
selfscribe
~~~ selfscribe
rule
  where   word
  match   NOTE:
  out     strong
  editor  colour steelblue
~~~
NOTE: blue in the editor.
Rendered

See also editorSpec D20

icon editor hint

#

Editor hint: an icon for the rule (stored, not shown yet).

icon "X" records an icon for the rule. It is kept with the rules for editors, but this editor does not show icons yet.

Syntax
  editor  icon "X"
icon
selfscribe
~~~ selfscribe
rule
  where   line
  match   ! _
  out     p.alert
  editor  icon "!"
~~~
! An alert line
Rendered

See also editorSpec D20, D71

bold editor hint

#

Editor hint: bold in the source editor.

Shows the rule's text in bold in the source editor. No effect on the HTML.

Syntax
  editor  bold
bold
selfscribe
~~~ selfscribe
rule
  where   word
  match   IMPORTANT
  out     strong
  editor  bold
~~~
IMPORTANT in bold, in both places.
Rendered

See also editor italicSpec D20

italic editor hint

#

Editor hint: italic in the source editor.

Shows the rule's text in italic in the source editor. No effect on the HTML.

Syntax
  editor  italic
italic
selfscribe
~~~ selfscribe
rule
  where   inline
  match   ~_~
  out     em
  editor  italic
~~~
A ~slanted~ word.
Rendered

See also editor boldSpec D20

hide editor hint

#

Editor hint: hide the rule's delimiters in hybrid mode.

Hides the dropped delimiters of the rule's matches in hybrid mode, except on the lines under the caret, so !!loud!! reads as just loud until you edit it.

Syntax
  editor  hide
hide
selfscribe
~~~ selfscribe
rule
  where   inline
  match   !!_!!
  out     strong
  editor  hide
~~~
The !!marks!! disappear while you read.
Rendered

See also editor Hybrid modeSpec D20

Patterns

#

What a rule matches: the _, the text you type, which rule wins.

Literal text pattern

#

Everything in a pattern is matched as written, except slots, ... and \.

A pattern is literal text with holes. Only four things are special: slots (_, _1…_9), the digit slot _#, ... in block patterns, and the backslash escape. There are no regular expressions in the short form.

Runs of spaces in a pattern collapse to one space. To match two spaces, write \ \ . A pattern can be at most 256 characters.

A closing literal made of one repeated character, such as **, slides to the end of a run of that character, so ***c*** becomes strong around emphasis.

Literals around a slot
selfscribe
~~~ selfscribe
inline  <<_>>    -> q
inline  [[_]]    -> kbd
~~~
She said <<hello>>. Press [[Ctrl]] + [[K]].
Rendered

See also _ \ (in a pattern) Longest pattern winsSpec 02 §3, D11, D26, D35

_ pattern

#

A capture slot: the part of the match that varies.

_ captures text. Slots are numbered left to right. A bare _ takes the next number after the highest so far. A pattern has at most 9 slots, and two slots need a literal between them (adjacent slots in pattern).

By default the slots become the node's content, in order, except slots used by attributes (href=_2). Bare slot tokens after what the rule becomes list the content explicitly.

The slot character can be changed per file with set slot, useful when _ itself is a delimiter: after set slot $, __$__ means double underscores around a slot.

Syntax
_   _1 … _9
Two slots: text and address
selfscribe
~~~ selfscribe
inline  [_](_)  -> a href=_2
~~~
Read [the spec](https://example.com/spec) first.
Rendered

See also _1 … _9 _# slot name=valueSpec 02 §3, D22, D25

_1 … _9 pattern

#

A slot with an explicit number.

_1 to _9 are numbered slots. The number is how attributes and bare slots refer to it. Writing the numbers lets you reorder: [_2|_1] captures the second part first. A number used twice is an error (duplicate slot N).

_0 is not a slot: it is a literal underscore followed by 0. An attribute or bare token naming a slot that is not in the pattern gets the warning slot N not in pattern and is dropped.

Syntax
_1 … _9
Numbered slots feeding an attribute
selfscribe
~~~ selfscribe
inline  {_1|_2}  -> abbr title=_2 _1
~~~
The {WHO|World Health Organization} met today.
Rendered

See also _ name=valueSpec 02 §3, D25

_# pattern

#

One or more digits: never content, but an attribute can read them.

_# matches one or more ASCII digits and is not part of the content, which is exactly what ordered lists need: _#. _ matches 1., 2. and 10..

An attribute can read the first _# of a pattern as _#: value=_#, or group-start=_# so that a list starting at 5. counts from 5 (group).

It counts as one literal character for "longest pattern wins", and as a slot for the rule that two slots need a literal between them.

Syntax
_#
Numbered list
selfscribe
~~~ selfscribe
line  _#. _  -> li  group ol
~~~
1. first
2. second
10. tenth
Rendered
A list that starts at 5
selfscribe
~~~ selfscribe
line  _#. _  -> li  group ol  group-start=_#
~~~
5. fifth
6. sixth
Rendered

See also _ groupSpec 02 §3, D24

... pattern

#

In a block pattern: separates the opening line, the body and the closing line.

In a block pattern, a ... standing on its own between spaces splits the pattern into the opening line, the body and the closing line. A block pattern must contain it (block pattern needs '...'), and both sides need a literal.

In inline, line and word patterns ... is ordinary text.

Syntax
block  OPEN ... CLOSE  -> BECOMES
A block with a titled opener
selfscribe
~~~ selfscribe
use markdown
block  ::: note _ ... :::  -> section.note title=_1  { border: 1px solid steelblue; border-radius: 6px; padding: 0.4em 0.8em }
~~~
::: note Remember
Blocks take **any** body.
:::
Rendered

See also blockSpec 02 §3, D26, D33

\ (in a pattern) pattern

#

Makes the next pattern character literal.

In a pattern, \ makes the next character literal: \_ matches an underscore instead of opening a slot, \-> matches an arrow, and \ is a space that is never collapsed.

Syntax
\_   \->   \ 
Underscores as delimiters
selfscribe
~~~ selfscribe
inline  \__\_  -> em
~~~
Some _underscored_ emphasis.
Rendered

See also \ (escape) slot Literal textSpec 02 §3, D11

Longest pattern wins pattern

#

How Selfscribe picks between rules that could match at the same place.

When two rules could match at the same position, the one with more literal characters wins: **_** beats *_*. The digit slot counts as one character. Other slots count zero. A block counts its opening and closing parts.

A tie goes to the rule defined last, so a document overrides what it imported. For inline rules, the match that starts leftmost wins first.

Matching happens in a fixed order: block rules, then line rules, then inline and word rules inside the resulting text.

A rule with exactly the same kind and pattern as an earlier one replaces it. The Inspector shows the replaced rule struck through.

Two stars beat one
selfscribe
~~~ selfscribe
inline  *_*    -> em
inline  **_**  -> strong
~~~
*one star* and **two stars**
Rendered

See also Literal text off InspectorSpec 02 §3, 02 §6, D27, D35

re full-form key

#

Full form only: a regular expression instead of a pattern.

In a full-form rule, re replaces match with a regular expression whose numbered groups 1 to 9 are the slots. It works for inline and line rules only. A line regex must match the whole line.

It is an escape hatch and off unless the host enables it (allow_re). This editor leaves it off, so the rule is skipped with the warning regex rules are disabled. A bad expression is the error invalid regex. The short form never has regular expressions.

Syntax
rule
  where  inline
  re     REGEX
  out    BECOMES
A regex rule (skipped here, because regex is off)
selfscribe
~~~ selfscribe
rule ticket
  where  inline
  re     #(\d+)
  out    a href="https://example.com/issues/_1"
~~~
See #42.
Rendered

Shows a warning on purpose: “regex rules are disabled”.

See also rule match Literal textSpec 02 §5, D63

What rules make

#

Elements, special words, attributes.

hidden target

#

Shows nothing. The text stays in the file.

A reserved name after ->: the match renders nothing, but the node stays in the document for the editor (highlighting, folding). Comments and Markdown's table separator rows use it. Hidden nodes inside a group do not break it.

Syntax
->  hidden
Comments that never render
selfscribe
~~~ selfscribe
use markdown
line  %% _  -> hidden
~~~
Visible text.
%% a private note
More visible text.
Rendered

See also textSpec 02 §4, 04 §1, D29

text target

#

Renders the content with no element around it.

A reserved name after ->: the content is emitted as is, unwrapped. Use it to drop delimiters without adding markup, or to turn a word into a plain symbol.

Syntax
->  text
Just the text
selfscribe
~~~ selfscribe
inline  <<_>>  -> text
~~~
The <<brackets>> vanish, nothing is added.
Rendered

See also hiddenSpec 02 §4, 04 §1

An unknown name after -> target

#

A rule that becomes something that is neither an element nor a plugin that is on.

What a rule becomes is looked up in order: the reserved hidden and text, then registered plugins, then allowed HTML elements. Anything else is unknown: it renders as <div class="self-unknown" data-target="NAME"> (a span for inline rules) around the content, and the rule gets one warning unknown target 'NAME'.

The most common cause is a plugin that is switched off. The editor offers to switch it on.

A typo in a target
selfscribe
~~~ selfscribe
line  ! _  -> blink
~~~
! This renders, with a dashed outline and a warning.
Rendered

Shows a warning on purpose: “unknown target 'blink'”.

See also Plugin Elements Selfscribe refusesSpec 02 §4, 04 §1, D44

Elements Selfscribe refuses target

#

script, iframe, style and friends are not allowed.

These names are refused unless the host enables unsafe HTML: script, iframe, object, embed, style, link, meta, base, form. They render like unknown names, with the warning target 'X' is not allowed.

To show a web page, use the embed plugin. For live HTML, use the html plugin. Both run in a sandbox.

A script target is refused
selfscribe
~~~ selfscribe
block  <js> ... </js>  -> script  verbatim
~~~
<js>
alert(1)
</js>
Rendered

Shows a warning on purpose: “target 'script' is not allowed”.

See also An unknown name after -> html embedSpec 04 §1, D43

footref target

#

A footnote reference: [^key] becomes a numbered link to the note.

A built-in plugin, in the Markdown rules as [^key]. References are numbered in the order their notes are first referenced. The number links to the note, and the note's number links back. A key with no note stays as written, with a warning. See footnote.

Syntax
inline  [^_]  -> footref
A note and its reference
selfscribe
~~~ selfscribe
use markdown
~~~
Plain text lasts.[^1]

[^1]: Longer than any app.
Rendered

See also footnoteSpec 04 §3, D87

bibliography target

#

The list of works cited, from a .bib file or a records block.

A built-in plugin. The content names a source: a BibTeX file (refs.bib) or a data block of records. It lists the references the document cites (add all to list every one), author-year by default or numbered with set cite-style numeric (cite-style). See citation.

Syntax
line  bibliography: _  -> bibliography
A reference list
selfscribe
~~~ selfscribe
use markdown
inline  [@_]  -> citation
line  bibliography: _  -> bibliography
block  ```data\ _ ... ```  -> data  info=_1  verbatim
~~~
As Knuth argued [@knuth1984].

```data refs records as hidden
key: knuth1984
author: Donald E. Knuth
title: Literate Programming
year: 1984
```

bibliography: refs
Rendered

See also citation cite-styleSpec 04 §3, D88

eqref target

#

A reference to a numbered equation: [@eq:label] becomes (1).

A built-in plugin. The content is an equation's label (a leading eq: is optional). The result is its number in parentheses, linked to it. An unknown label stays as written, with a warning. See equation.

Syntax
inline  [@eq:_]  -> eqref
A reference
selfscribe
~~~ selfscribe
block  $$ {#_} ... $$  -> equation label=_1 verbatim
inline  [@eq:_]  -> eqref
~~~
See [@eq:area].

$$ {#area}
A = \pi r^2
$$
Rendered

See also equation ref mathSpec 04 §3, D89

ref target

#

A reference by label: [@fig:map] becomes Figure 2, linked, and stays right when things move.

A built-in plugin. The content is a label. Its kind comes from kind= on the rule, else from a prefix as pandoc-crossref writes them (fig:, tbl:, thm:, lem:, def:, eq: and more), else any numbered block with that label. It shows the name and number (Figure 2, or (3) for an equation), links to it, and its caption shows on hover. An unknown label stays as written, with a warning.

In a LaTeX export it becomes Figure~\ref{…}, so LaTeX keeps the numbers.

Syntax
inline  [@fig:_]  -> ref kind=figure
A table, referred to before it comes
selfscribe
~~~ selfscribe
use markdown
block  ::: table {#_} _ ... :::  -> numbered kind=table label=_1 caption=_2
inline  [@tbl:_]  -> ref kind=table
~~~
The times are in [@tbl:tides].

::: table {#tides} High water
| Day | Time |
| --- | ---- |
| 1   | 06:10 |
:::
Rendered

See also numbered eqrefSpec 04 §3, D140

abbreviation target

#

Defines a term without showing it: its uses get the meaning on hover.

A built-in plugin, like glossary but the definition renders nothing (as Markdown Extra's *[HTML]: ... lines). Every use of the term in the text becomes an <abbr> with its meaning.

Syntax
line  *[_]: _  -> abbreviation key=_1
A hidden definition
selfscribe
~~~ selfscribe
use markdown
line  *[_]: _  -> abbreviation key=_1
~~~
The W3C writes the standards.

*[W3C]: World Wide Web Consortium
Rendered

See also glossarySpec 04 §3, D90

csv target

#

A table from comma-separated lines.

A built-in plugin: a verbatim body of comma-separated lines becomes a real table. The first row is the header. Fields may be quoted with " ("" is a quote). Cells are plain text, never parsed for rules.

Syntax
block  ``` csv ... ```  -> csv  verbatim
A data table
selfscribe
~~~ selfscribe
block  ``` csv ... ```  -> csv  verbatim
~~~
``` csv
City, Country, "Population, millions"
Lisbon, Portugal, 0.5
Porto, Portugal, 0.2
```
Rendered

See also tsv chartSpec 04 §3, D49, D66

tsv target

#

A table from tab-separated lines.

The same as csv, with tabs between the fields instead of commas.

Syntax
block  ``` tsv ... ```  -> tsv  verbatim
Tab-separated
selfscribe
~~~ selfscribe
block  ``` tsv ... ```  -> tsv  verbatim
~~~
``` tsv
Name	Role
Ada	Engineer
Grace	Admiral
```
Rendered

See also csvSpec 04 §3, D49

data target

#

Typed records (CSV, TSV, JSON, JSON Lines, records or a file of the folder), shown as a view of themselves.

A built-in plugin. The info attribute holds NAME [FORMAT] [from PATH] [VIEW OPTIONS]. The verbatim body holds the records, the first line naming the columns and their types. Views find the block by its name. use data brings the rule (and Markdown).

Unlike csv, cells are typed and checked, and the block can be sorted, filtered, shown as cards or a board, and edited. See Data and views.

Syntax
block  ```data\ _ ... ```  -> data  info=_1  verbatim
A typed table
selfscribe
~~~ selfscribe
use data
~~~
```data costs sort amount desc sum amount
item, amount:number, paid:bool
Rent, 900.00, yes
Coffee, 3.20, no
```
Rendered

See also Data and views view csvSpec 04 §3, 04 §7, D80

var target

#

Shows the value of a variable by name.

A built-in plugin. The content is a variable name. The result is its value, from the host first, then the document's set lines (including title). A missing variable is empty, with no warning.

Syntax
inline  {{_}}  -> var
Filling in values
selfscribe
~~~ selfscribe
set event  Launch party
set date   Friday
inline  {{_}}  -> var
~~~
You are invited to the {{event}} on {{date}}.
Rendered

See also Variables titleSpec 04 §3, 04 §5, D49

include target

#

Pulls in the body of another file.

A built-in plugin. The content is a path, resolved like use. The other file's body is parsed here with this document's rules. If the other file has a rules block of its own, those rules read its body too, laid over this document's for that body only, so a part written with its own notation can be included as it is. Its links and pictures are read from its own folder. In a folder, !include chapters/one.self stitches chapters together.

It needs a line or block rule. A cycle is cut with a warning, and a file that cannot be found is the error cannot resolve include.

Syntax
line  !include _  -> include
Including the built-in workbook template's body
selfscribe
~~~ selfscribe
use markdown
line  !include _  -> include
~~~
The next line pulls in a body from another file:

!include workbook
Rendered

See also use Folder of documentsSpec 04 §3, D49, D263

doc target

#

In workbook.self: one document of the workbook.

doc and section are names only a workbook knows: in a workbook.self, doc names one document by path (its order and nesting are recorded) and section groups documents under a heading. Outside a workbook they are not registered, so doc is unknown there.

Syntax
line  - _  -> doc  nest
A workbook list
selfscribe
~~~ selfscribe
line  # _  -> section  fold 1
line  - _  -> doc  nest
~~~
# Part one
- intro.self
- chapter-1.self
Rendered

See also WorkbookSpec 05 §3

Headings target

#

h1 to h6 and hgroup.

A target that is an allowed HTML element name makes that element: h1, h2, h3, h4, h5, h6, hgroup. Add classes with dots (p.note, li.task.done).

Heading rules usually carry fold N so the editor can fold each section.

Syntax
->  h1[.class]
Three levels
selfscribe
~~~ selfscribe
line  # _    -> h1  fold 1
line  ## _   -> h2  fold 2
line  ### _  -> h3  fold 3
~~~
# Book
## Chapter
### Scene
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

Text elements target

#

Inline elements: strong, em, code, mark, span and the rest.

A target that is an allowed HTML element name makes that element: abbr, b, bdi, bdo, br, cite, code, data, del, dfn, em, i, ins, kbd, mark, q, s, samp, small, span, strong, sub, sup, time, u, wbr. Add classes with dots (p.note, li.task.done).

These are what inline and word rules usually become.

Syntax
->  abbr[.class]
A handful of text elements
selfscribe
~~~ selfscribe
inline  **_**    -> strong
inline  ==_==    -> mark
inline  ^_^      -> sup
inline  ,,_,,    -> sub
inline  ++_++    -> ins
inline  [[_]]    -> kbd
~~~
**Strong**, ==marked==, E = mc^2^, H,,2,,O, ++inserted++ and [[Ctrl]]+[[S]].
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

Block elements target

#

Paragraphs, quotes, preformatted text, sections and dividers.

A target that is an allowed HTML element name makes that element: address, article, aside, blockquote, div, figcaption, figure, footer, header, hr, main, nav, p, pre, section. Add classes with dots (p.note, li.task.done).

Lines no rule matches become p paragraphs on their own. Block rules often become aside, section or div with a class and a style for callouts.

Syntax
->  address[.class]
Quote, divider, aside
selfscribe
~~~ selfscribe
line   > _                -> p  group blockquote
line   ---                -> hr
block  ::: aside ... :::  -> aside  { border-left: 3px solid gray; padding-left: 0.8em; color: gray }
~~~
> To be read slowly.
---
::: aside
A remark on the side.
:::
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

Lists target

#

ul, ol, li and description lists (dl, dt, dd).

A target that is an allowed HTML element name makes that element: dd, dl, dt, li, ol, ul. Add classes with dots (p.note, li.task.done).

List items are grouped into their list with group ul or group ol, and nested with nest. Two rules with the same group dl build one description list.

Syntax
->  dd[.class]
Bullets and definitions
selfscribe
~~~ selfscribe
line  - _  -> li  group ul  nest
line  = _  -> dt  group dl
line  : _  -> dd  group dl
~~~
- bread
  - rye
- cheese

= Slot
: The part of a match that varies.
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

Tables target

#

table, rows, cells and their parts.

A target that is an allowed HTML element name makes that element: caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr. Add classes with dots (p.note, li.task.done).

A row rule with split makes the cells, and group table collects the rows.

Syntax
->  caption[.class]
A small table
selfscribe
~~~ selfscribe
line  | _ |  -> tr  group table  split "|" td
~~~
| Tea    | Coffee |
| Green  | Black  |
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

a for links and img for pictures.

A target that is an allowed HTML element name makes that element: a, img. Add classes with dots (p.note, li.task.done).

Their URL attributes are checked: http, https, mailto, tel, ftp or relative, and data:image/… on img src only.

Syntax
->  a[.class]
A link and an inline picture
selfscribe
~~~ selfscribe
inline  ![_](_)  -> img alt=_1 src=_2
inline  [_](_)   -> a href=_2
~~~
A [link](https://example.com) and a dot: ![a blue dot](data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><circle cx='8' cy='8' r='7' fill='steelblue'/></svg>)
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

Details and form controls target

#

details, summary, label and input.

A target that is an allowed HTML element name makes that element: details, input, label, summary. Add classes with dots (p.note, li.task.done).

details makes a disclosure widget. Browsers show a caption only for a summary element inside it, so give the caption line a rule of its own that becomes summary, as in the example. For inputs prefer the input= option, which puts a control in front of the content.

Syntax
->  details[.class]
A disclosure
selfscribe
~~~ selfscribe
block  ??? ... ???  -> details
line   Q: _          -> summary
~~~
???
Q: What does Selfscribe stand for?
Text that formats itself.
???
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

Ruby annotations target

#

ruby, rt and rp for pronunciation guides.

A target that is an allowed HTML element name makes that element: rp, rt, ruby. Add classes with dots (p.note, li.task.done).

Ruby annotations put small text above characters. Nest an rt rule inside a ruby rule.

Syntax
->  rp[.class]
A pronunciation guide
selfscribe
~~~ selfscribe
inline  {_}  -> ruby
inline  ^_^  -> rt
~~~
{漢^kan^}{字^ji^}
Rendered

See also An unknown name after -> name=valueSpec 02 §4, D43

href attribute

#

The address of a link.

On a. URLs are checked: http, https, mailto, tel, ftp or relative. Anything else (such as javascript:) is dropped with unsafe url dropped.

Syntax
->  BECOMES href=VALUE
The href attribute
selfscribe
~~~ selfscribe
inline  [_](_)  -> a href=_2
~~~
Read [the guide](https://example.com/guide).
Rendered

See also name=valueSpec D43

src attribute

#

The source of an image.

On img. Checked like href. data:image/png, gif, jpeg, webp, avif and svg+xml are also allowed here, and only here.

Syntax
->  BECOMES src=VALUE
The src attribute
selfscribe
~~~ selfscribe
inline  ![_](_)  -> img alt=_1 src=_2
~~~
![a green square](data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14'><rect width='14' height='14' fill='seagreen'/></svg>) a picture from a data URL.
Rendered

See also name=valueSpec D43

alt attribute

#

The text description of an image.

On img: read aloud by screen readers and shown when the picture cannot load. An alt slot may be empty (![](x.png)).

Syntax
->  BECOMES alt=VALUE
The alt attribute
selfscribe
~~~ selfscribe
inline  ![_](_)  -> img alt=_1 src=_2
~~~
A picture with a description: ![an orange sun over a blue sea](data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='30'><rect width='60' height='30' fill='steelblue'/><circle cx='30' cy='30' r='12' fill='darkorange'/></svg>)
Rendered

See also name=valueSpec D35, D43

title attribute

#

Tooltip text.

Shown when the pointer rests on the element. Here an abbreviation carries its expansion.

Syntax
->  BECOMES title=VALUE
The title attribute
selfscribe
~~~ selfscribe
inline  {_|_}  -> abbr title=_2 _1
~~~
Written in {HTML|HyperText Markup Language}.
Rendered

See also name=valueSpec D43

lang attribute

#

A language, for example of a code block.

On a code block, lang=_1 records the language written after the opening fence, for highlighters.

Syntax
->  BECOMES lang=VALUE
The lang attribute
selfscribe
~~~ selfscribe
block  ``` _ ... ```  -> code lang=_1  verbatim
~~~
```python
print("hello")
```
Rendered

See also name=valueSpec 02 §1, D43

class attribute

#

Extra classes for styling.

Classes can also be written with dots after the element (p.note). Quote several: class="a b".

Syntax
->  BECOMES class=VALUE
The class attribute
selfscribe
~~~ selfscribe
inline  !!_!!  -> span class="loud big"
~~~
This is !!loud!!.
Rendered

See also name=valueSpec D39, D43

id attribute

#

An element id, for links to it.

An id makes a place other links can point to with #id.

Syntax
->  BECOMES id=VALUE
The id attribute
selfscribe
~~~ selfscribe
use markdown
line  ## _ (#_)  -> h2 id=_2
~~~
## Getting there (#travel)

Jump to [the section](#travel).
Rendered

See also name=valueSpec D43

cite attribute

#

The source of a quotation (a URL).

On blockquote or q. Checked like other URLs.

Syntax
->  BECOMES cite=VALUE
The cite attribute
selfscribe
~~~ selfscribe
block  [quote=_] ... [/quote]  -> blockquote cite=_1
~~~
[quote=https://example.com/speech]
We choose to go.
[/quote]
Rendered

See also name=valueSpec D43

summary attribute

#

An attribute on the element, as in the spec's spoiler rule.

The spec's details example keeps the caption in a summary=_1 attribute. It is an ordinary attribute: browsers show a visible caption only for a summary element, which a rule of its own can make (see Details and form controls).

Syntax
->  BECOMES summary=VALUE
The summary attribute
selfscribe
~~~ selfscribe
block  ::: spoiler _ ... :::  -> details summary=_1
~~~
::: spoiler The ending
They all lived.
:::
Rendered

See also name=valueSpec 02 §1

style attribute

#

Inline CSS on one element.

Checked like { css } blocks: a value that could fetch or escape drops the whole attribute (unsafe style attribute dropped). Use quotes and slot references: style="color: _1".

Syntax
->  BECOMES style=VALUE
The style attribute
selfscribe
~~~ selfscribe
inline  [color=_]_[/color]  -> span style="color: _1"
~~~
Some [color=crimson]red[/color] and [color=seagreen]green[/color].
Rendered

See also name=valueSpec D23, D42

target attribute

#

Where a link opens.

For example target="_blank" (quoted, so the underscore is not a slot).

Syntax
->  BECOMES target=VALUE
The target attribute
selfscribe
~~~ selfscribe
inline  [_](_)  -> a href=_2 target="_blank" rel=noopener
~~~
Opens [in a new tab](https://example.com).
Rendered

See also name=valueSpec D43

rel attribute

#

How a link relates to the page it opens.

Commonly rel=noopener or rel=nofollow.

Syntax
->  BECOMES rel=VALUE
The rel attribute
selfscribe
~~~ selfscribe
inline  [_](_)  -> a href=_2 rel=nofollow
~~~
A [sponsored link](https://example.com).
Rendered

See also name=valueSpec D43

datetime attribute

#

A machine-readable date on time.

Lets tools read the date while people read the text.

Syntax
->  BECOMES datetime=VALUE
The datetime attribute
selfscribe
~~~ selfscribe
inline  @_@  -> time datetime=_1 _1
~~~
Due @2026-09-30@.
Rendered

See also name=valueSpec D43

Rule options

#

group, nest, split, fold, verbatim and friends.

key modifier

#

A keyboard shortcut that applies the rule while you write: key Ctrl+B.

Pressing the shortcut wraps the selection in an inline rule (again to unwrap it), or turns the lines you are on into a line or block rule (again for plain text). It changes nothing in the output.

A shortcut is Ctrl, Alt and Shift (any of them, joined with +) and one key: a letter, a digit, a punctuation mark, or F1 to F24. It needs Ctrl or Alt, except F-keys. On a Mac, Ctrl means ⌘. Inside the document it wins over the app's own shortcuts, except save, undo, copy, paste, select all, find, the palette, close and new.

Syntax
RULE  key SHORTCUT
Your own highlighter key
selfscribe
~~~ selfscribe
inline  ==_==  -> mark  key Ctrl+Shift+H
~~~
Select a word and press Ctrl+Shift+H: it gets ==marked==.
Rendered

See also inlineSpec D122

verbatim modifier

#

The content is not scanned for other rules. Whitespace is kept.

With verbatim, whatever the rule captures is taken exactly as written: no inline rules inside, spaces and line breaks preserved, backslashes kept. Code, maths and diagram blocks use it.

A verbatim block ends at the first closing line. It cannot nest.

Syntax
RULE  verbatim
Code stays as typed
selfscribe
~~~ selfscribe
inline  **_**  -> strong
inline  `_`    -> code  verbatim
~~~
**bold** but `**not bold**` in code.
Rendered

See also block \ (escape)Spec 02 §4, D33

group modifier

#

Wraps neighbouring matches in one element, such as list items in a ul.

group X wraps a run of neighbouring matches of rules with the same group X in one X element: list items in ul, table rows in table, quote lines in blockquote.

Blank lines and @scope/@end lines do not break the run. A paragraph or any other node does. ul and ol are different groups. The wrapper may have classes: group ul.tasks.

An attribute named group-NAME= goes on the wrapper, from the first match of the run: group-start=_# starts an ol at the number of its first item (left out when it is 1), and group-class=wide adds a class to it.

Syntax
RULE  group ELEMENT[.class]
Bullets and quotes
selfscribe
~~~ selfscribe
line  - _  -> li  group ul
line  > _  -> p   group blockquote
~~~
- one
- two

- still the same list
> A quote of
> two lines
Rendered

See also nest split ListsSpec 02 §4, D29

nest modifier

#

More-indented following lines become children of this node.

A node from a nest rule claims every following line that is indented deeper than its own line, until a non-blank line that is not. Claimed lines are parsed with all the rules and become the node's children, after its own text. That is how nested lists work.

Indentation is counted in levels: a tab is one level, spaces count in steps of set indent.

Syntax
RULE  nest
A nested list
selfscribe
~~~ selfscribe
line  - _  -> li  group ul  nest
~~~
- Fruit
  - Apples
  - Pears
    - Conference
- Vegetables
Rendered

See also Indentation indent groupSpec 02 §4, D30

split modifier

#

Splits the content on a separator and wraps each piece.

split "S" T cuts the content at every literal S and wraps each trimmed piece in a T element. Table rows are the usual case: split "|" td.

An escaped separator (\|) never splits. No piece is dropped: empty content gives one empty cell.

Syntax
RULE  split "SEPARATOR" ELEMENT
A table from pipes
selfscribe
~~~ selfscribe
line  | _ |  -> tr  group table  split "|" td
~~~
| Planet | Moons |
| Earth  | 1     |
| Mars   | 2     |
Rendered

See also group TablesSpec 02 §4, D66

fold modifier

#

Makes a foldable section in the editor.

fold N starts a section that runs until the next node with fold level N or lower, like chapters and sections under headings. The editor shows a fold marker for it.

A bare fold folds the node's own indented children (on a line rule) or its body (on a block rule).

Syntax
RULE  fold N
RULE  fold
Sections under headings
selfscribe
~~~ selfscribe
line  # _   -> h1  fold 1
line  ## _  -> h2  fold 2
~~~
# Chapter
## Section one
Text.
## Section two
More text.
Rendered

See also line Source modeSpec 02 §4, D51

keep modifier

#

Keeps the matched delimiters in the output.

Normally the literal parts of a match (the delimiters) are dropped: **x** renders just x. With keep, the content is the whole matched text, delimiters included as plain text, while slot parts are still scanned for other rules.

Useful for tags and mentions that should stay visible but be styled.

Syntax
RULE  keep
Styled but visible
selfscribe
~~~ selfscribe
inline  {_}  -> span.tag  keep  { color: steelblue; font-weight: 600 }
~~~
Filed under {travel} and {food}.
Rendered

See also inline wordSpec 02 §4, D38

bound modifier

#

No matches in the middle of a word.

With bound, a match may not start right after, or end right before, a letter, digit or _. Markdown's _emphasis_ rule uses it so that snake_case_names stay as typed.

Selfscribe has no Markdown "flanking" rules. bound is the simple, explicit replacement. word rules behave this way on their own.

Syntax
RULE  bound
Not inside words
selfscribe
~~~ selfscribe
inline  +_+  -> ins  bound
~~~
a+b+c stays as typed, but +this is inserted+.
Rendered

See also inline wordSpec 02 §4, D36

url modifier

#

A word rule whose slot takes a whole web address: bare links.

On a word rule, url lets the slot take a whole address instead of one word: query strings (?q=1&r=2), #fragments and brackets inside it (Tide_(sea)) are kept, while a full stop, comma or closing bracket after it stays outside, as in prose.

The Markdown template links bare https://, http:// and www. addresses this way. A URL used as the text of a link is not linked again.

Syntax
word  https://_  -> a  href="https://_1"  keep  url
Bare links
selfscribe
~~~ selfscribe
word  https://_  -> a  href="https://_1"  keep  url
~~~
The tides are at https://tides.example/harbour?day=1#high, every day.
Rendered

See also word keepSpec 02 §4, D141

input modifier

#

Puts a checkbox, radio button or text field in front of the content.

input=checkbox, input=radio or input=text prepends a form control to the node. Add checked to start it checked. In full form the key is written without =: input checkbox checked.

Controls are disabled unless the host enables forms. The document stays a static, readable file.

Syntax
RULE  input=checkbox|radio|text [checked]
Tasks and a question
selfscribe
~~~ selfscribe
line  - [ ] _  -> li.task       group ul  input=checkbox
line  - [x] _  -> li.task.done  group ul  input=checkbox checked
line  ? _      -> label  input=text
~~~
- [x] Buy paint
- [ ] Paint the fence
? Colour
Rendered

See also checked Scope Details and form controlsSpec 02 §4, 04 §5, D45

checked modifier

#

With input=checkbox or input=radio: start checked.

checked only makes sense after input=checkbox or input=radio. On its own it is an unknown option.

Syntax
RULE  input=checkbox checked
Done tasks
selfscribe
~~~ selfscribe
line  - [x] _  -> li.done  group ul  input=checkbox checked
~~~
- [x] Written
- [x] Checked
Rendered

See also inputSpec 02 §4, D45

as modifier

#

Gives the rule a name.

as NAME names a rule. The name is used by off NAME, shown in the Inspector, becomes the rule's style class (instead of self-rN), and is the name of a full-form rule.

Names start with a letter and may contain letters, digits, _ and -. If two rules take the same name, the later one keeps it (duplicate rule name).

A rule's style is for its own elements. If another rule writes the name as a class (-> div.critical), the styled rule's class becomes self-rN beside the name, and a note says so. To style every element with the class, write class critical { … }.

Syntax
RULE  as NAME
A named rule and its class
selfscribe
~~~ selfscribe
line  // ! _  -> p  { color: crimson; font-weight: 600 }  as critical
~~~
// ! Rendered as <p class="critical">
Rendered

See also off rule { css }Spec 02 §4, D28

Rules-block lines and settings

#

use, scope, set, off and every setting.

use directive

#

Brings in another file's rules, right here.

use NAME or use PATH reads another file's rules block (never its body) and applies it in place, as if its lines were written there. Later rules win, so put use lines first if your own rules should override them.

The name can be a built-in rulebook (markdown, bbcode, comments, form, plain, workbook), a rulebook from your library, or a path relative to this file (./house-style.self, ../shared/comments.self). Remote URLs work only if the host allows them.

Imports may import. A cycle is cut with a warning. The imported file's slot and title stay in that file. Its other settings apply unless you set them again.

Syntax
use NAME
use ./PATH.self
Two built-ins
selfscribe
~~~ selfscribe
use markdown
use comments
~~~
# Notes
// ! Markdown and colour comments together
Rendered

See also Rulebook Library offSpec 01 §2, 05 §1, D14-D17, D72

scope directive

#

The rules that follow belong to a named scope.

scope NAME makes the rules after it belong to scope NAME, until the next scope line or the end of the block. scope with no name returns to the default scope.

Scoped rules only apply between @scope NAME and @end in the body, on top of the default rules.

Syntax
scope NAME
…rules…
scope
A scope for a glossary
selfscribe
~~~ selfscribe
use markdown
scope glossary
line  :: _  -> p  { margin-left: 1em; font-style: italic }
scope
~~~
:: outside the scope this stays as typed.

@scope glossary
:: Slot, the part of a match that varies
@end
Rendered

See also Scope @scope @endSpec 01 §2, D15, D37

set directive

#

A document setting, or a variable.

set KEY VALUE sets one of the built-in settings: rules, blanklines, linebreaks, indent, title, slot and project. Any other key is a variable that a rule becoming var can show.

An invalid value is a warning and is ignored. Settings from a used file apply too, except slot and title, unless you set them again later.

Syntax
set KEY VALUE
A title and a variable
selfscribe
~~~ selfscribe
set title  Trip notes
set city   Lisbon
inline  {{_}}  -> var
~~~
{{title}}: three days in {{city}}.
Rendered

See also Variables title preferences.selfSpec 01 §2, D15, D19

off directive

#

Switches off an earlier rule.

off PATTERN disables every earlier rule in the current scope with that pattern. off KIND PATTERN only the one of that kind (off inline **_**). off NAME the rule named with as NAME. The pattern is compared compiled, so *_* also switches off an imported *$*.

Only rules defined above the off line are affected. If nothing matches you get the warning off: no rule matches.

Syntax
off PATTERN
off KIND PATTERN
off NAME
Markdown without single-star emphasis
selfscribe
~~~ selfscribe
use markdown
off inline *_*
~~~
*single stars* stay as typed, **double stars** are still bold.
Rendered

See also use as Longest pattern winsSpec 01 §2, 02 §6, D13

palette directive

#

Names a colour once, with a version for dark pages if you like.

To use one colour in several rules, name it once: palette harbour #0b6e8a. Rules then write var(--harbour), so changing the colour means changing one line.

Add dark and a second colour for dark pages: palette harbour #0b6e8a dark #6cc8e0. It is used in a dark theme, with set style dark and in dark exports. A dark page prints light, with the first colour.

An entry can use an earlier one. color-mix() makes a paler or deeper shade, and the shade follows the colour's dark version by itself: tint color-mix(in srgb, var(--harbour) 15%, transparent). A gradient cannot take dark, so build it from palette colours.

Each hex or rgb() colour also gets --on-NAME, near-black or white, whichever reads better on each shade: background: var(--harbour); color: var(--on-harbour) keeps a badge readable on light and dark pages.

Write one entry per palette line, or palette alone with the entries indented under it. A name starts with a lower-case letter, then lower-case letters, digits and -. A later entry with the same name replaces the whole earlier one, dark included, so one line after a use recolours a rulebook. The editor says when a replacement drops a dark shade, and when a rulebook used below your own entry replaces it.

In the rules block, the swatch beside a colour opens a picker with Add a shade for dark pages. The swatch beside var(--harbour) changes the entry, so every rule follows. Make a palette from repeated colours in the command palette names the hex colours your rules repeat.

Syntax
palette NAME COLOUR [dark COLOUR]
palette
  NAME COLOUR [dark COLOUR]
One colour, light and dark
selfscribe
~~~ selfscribe
use markdown
palette  harbour  #0b6e8a  dark #6cc8e0
word  NOTE:  -> strong  { color: var(--harbour) }
~~~
NOTE: the ferry leaves at six.
Rendered
A tint and a gradient from one colour
selfscribe
~~~ selfscribe
use markdown
palette
  harbour  #0b6e8a  dark #6cc8e0
  tint     color-mix(in srgb, var(--harbour) 15%, transparent)
  band     linear-gradient(90deg, var(--tint), transparent)
line  > _  -> p  { background: var(--band); border-left: 3px solid var(--harbour); padding: 0.4em 0.8em }
~~~
> A quote with a fading band behind it.
Rendered

See also class { css } useSpec 01 §2, 02 §4, D129

class directive

#

Styles every element with a class, so several rules can share one look.

Rules that should look alike share a class, styled once: class badge { … }. Each rule names the class in what it becomes (-> span.badge) and adds only what differs.

A rule's own CSS wins over the class:word TODO -> span.badge { background: var(--rust) }.

A class also styles what group and split make: the wrapper around a group, or the pieces of a split line.

To add a mark before or after each one, or style the elements inside it, follow the name with a pseudo or one element: class crumb::after { content: "›" }, class card h3 { … }, class card > p:first-child { … }. The pseudos are ::before, ::after, ::marker, :hover, :first-child, :last-child and :nth-child(2n+1).

A later class with the same name and the same ending replaces the earlier one. A name starts with a letter, then letters, digits, - and _. Names starting self-, cm-, ed- or pg- belong to Selfscribe and the editor, and are refused.

Syntax
class NAME[::after | :hover …] [[>] ELEMENT] { css }
Two labels, one look
selfscribe
~~~ selfscribe
use markdown
class badge  { padding: 0.15em 0.45em; border-radius: 5px; font-size: 0.8em; font-weight: 700; color: white; font-family: var(--doc-font-ui) }
word  TODO  -> span.badge  { background: #c2410c }
word  DONE  -> span.badge  { background: #0b6e8a }
~~~
TODO write the report. DONE book the ferry.
Rendered
Breadcrumbs with a separator
selfscribe
~~~ selfscribe
line  > _  -> nav.crumbs  split "/" span.crumb
class crumb::after  { content: " › "; opacity: 0.5 }
class crumb:last-child::after  { content: none }
~~~
> Home / Ferries / Timetable
Rendered

See also palette group splitSpec 01 §2, 02 §4, D130

rewrite directive

#

Lets you write a block in your own short notation, turned into a plugin's language before it is drawn.

Write rewrite block, the block's pattern and what it becomes, as for a block rule. Under it, indent one line per shortcut: line _1 > _2 -> _1 -> _2 moving. Each line of the block that matches a pattern becomes its template, with _1, _2 … filled in. The block is then drawn as if you had written the long form.

A line no pattern matches stays as written. So you shorten only the lines you write often, and the plugin's own syntax still works for everything else.

first -> TEXT adds a line before the block, once, and last -> TEXT one after it. Use them for a set direction=LR or a \begin{aligned} you would otherwise write every time.

Everything after the -> of a template line is copied as it is, backslashes and # included. Only _1 to _9 and _# are filled in, and only when the pattern has them. If the language uses _ itself, as LaTeX does for subscripts, write set slot @ before the rewrite and use @1, @2.

Put a notation in a rulebook and use it to share it. A later rule with the same block pattern replaces the whole rewrite. A rewritten block is drawn but cannot be edited through the plugin's own editor: edit its lines instead.

Syntax
rewrite block OPEN ... CLOSE -> TARGET
  line  PATTERN  ->  TEMPLATE
  first  ->  TEXT
  last   ->  TEXT
A friendlier flow notation
selfscribe
~~~ selfscribe
use markdown
rewrite block ``` route ... ``` -> flow
  line   _1: _2    ->  node _1 "_2"
  line   _1 > _2   ->  _1 -> _2 moving
  first            ->  set direction=LR
~~~
``` route
pier: Ferry pier
island: Island quay
pier > island
```
Rendered
A short notation for TikZ
selfscribe
~~~ selfscribe
use markdown
rewrite block ``` shapes ... ``` -> tikz
  line   box _1 at _2,_3  ->  \node[draw, rounded corners] (_1) at (_2,_3) {_1};
  line   _1 to _2         ->  \draw[->] (_1) -- (_2);
~~~
``` shapes
box harbour at 0,0
box island at 4,1
harbour to island
```
Rendered
Fractions for LaTeX maths
selfscribe
~~~ selfscribe
use markdown
set slot @
rewrite block ``` sums ... ``` -> math
  line   @ over @  ->  \frac{@1}{@2}
  first           ->  \begin{aligned}
  last            ->  \end{aligned}
~~~
``` sums
a over b
x_1 + x_2
```
Rendered

See also block verbatim slot flow tikzSpec 02 §8, D255

rule directive

#

Starts a full-form rule: one key per indented line.

rule [NAME] starts a rule written as keyed lines: where, match (or re), out, style, editor, doc, and the options as keys (group ul, nest, input checkbox checked …). The key lines are the indented lines that follow. A blank or unindented line ends the rule.

It is the same rule as the one-line form, so the editor can convert between them. Only the full form has re, editor and doc. A rule without where, match/re or out is skipped as incomplete rule. An unknown key is a warning.

Syntax
rule NAME
  where   KIND
  match   PATTERN
  out     BECOMES attr=value
  style   css: declarations
  editor  colour C, bold
  doc     A description
The spec's example rule
selfscribe
~~~ selfscribe
rule critical
  where   line
  match   // ! _
  out     p.critical
  style   color: crimson; font-weight: 600
  editor  colour crimson, icon "!"
  doc     Critical item, shows red in source and preview
~~~
// ! A critical item
Rendered

See also Short form where editor Rule wizardSpec 02 §5, D20

use markdown directive

#

Markdown: headings, emphasis, links, lists, quotes, code, tables, pictures and task lists.

The rules every document without a rules block gets. Headings #, bold, *italic*, code, links, pictures, lists (nested, numbered, task lists - [ ]), quotes >, fenced code, tables with |, rules ---, footnotes and emoji short names.

A built-in rulebook: use markdown in the rules block applies its rules in place; your own rules after it win.

Syntax
use markdown
use markdown
selfscribe
~~~ selfscribe
use markdown
~~~
# A title

Some **bold** text, a [link](https://example.com) and a list:

- [x] done
- [ ] to do
Rendered

See also use RulebookSpec 05 §1, D14

use data directive

#

Data: records in ``data blocks and view:` lines that show them as tables, cards, boards, calendars, timelines and forms.

Everything of Markdown, plus a ```data NAME block for records (CSV, TSV, JSON, records) with a typed header, and view: lines that show a source another way: as board by status, sort due, filter not done, columns, totals. In the editor views are live and write back into the text. See Data and views.

A built-in rulebook: use data in the rules block applies its rules in place; your own rules after it win.

Syntax
use data
use data
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as board by status
title, status:choice(todo|doing|done), due:date
Write the spec, doing, 2026-09-20
Review, todo, 2026-09-24
```

view: tasks as table sort due
Rendered

See also use RulebookSpec 05 §1, D14

use workbook directive

#

Workbook: the contents file of a workbook, parts (# Part) and documents (- file.self).

For workbook.self: each # heading is a part and each - file.self line a document, nested by indent. The editor shows it as a contents page and the Files panel as Contents. See Workbooks.

A built-in rulebook: use workbook in the rules block applies its rules in place; your own rules after it win.

Syntax
use workbook
use workbook
selfscribe
~~~ selfscribe
use workbook
~~~
# Start here
- index.self
- first-week.self
# Reference
- glossary.self
Rendered

Shows a warning on purpose: “unknown target 'doc'”.

See also use RulebookSpec 05 §1, D14

use form directive

#

Forms: checkboxes, radio buttons and text fields from plain lines.

Between @scope form and @end, a line that starts with ? is a text field, [ ] a checkbox and ( ) a radio button; the rest of the line is its label. Everything of Markdown works around them. Forms can be read back by the host.

A built-in rulebook: use form in the rules block applies its rules in place; your own rules after it win.

Syntax
use form
use form
selfscribe
~~~ selfscribe
use form
~~~
@scope form
? Your name
[ ] Subscribe
( ) Weekly
( ) Monthly
@end
Rendered

See also use RulebookSpec 05 §1, D14

use bbcode directive

#

BBCode: [b], [i], [url], [quote] and friends, as on forums.

Square-bracket tags: [b]bold[/b], [i], [u], [s], [url=…], [img], [quote], [code], [list] with [*], [color=…].

A built-in rulebook: use bbcode in the rules block applies its rules in place; your own rules after it win.

Syntax
use bbcode
use bbcode
selfscribe
~~~ selfscribe
use bbcode
~~~
[b]Bold[/b] and [i]italic[/i]
[quote]A quote[/quote]
Rendered

See also use RulebookSpec 05 §1, D14

use comments directive

#

Colour comments: lines that start with //, // !, // ? and // TODO shown in colour.

For notes in code-like documents: // a quiet comment, // ! an alert, // ? a question, // TODO a task.

A built-in rulebook: use comments in the rules block applies its rules in place; your own rules after it win.

Syntax
use comments
use comments
selfscribe
~~~ selfscribe
use comments
~~~
// a note
// ! this matters
// ? is this right
Rendered

See also use RulebookSpec 05 §1, D14

use plain directive

#

Plain: nothing but paragraphs. Every character stays as written.

No syntax at all: blank lines separate paragraphs. Useful as a base for rules of your own.

A built-in rulebook: use plain in the rules block applies its rules in place; your own rules after it win.

Syntax
use plain
use plain
selfscribe
~~~ selfscribe
use plain
~~~
Just text.

Another paragraph, *not* italic.
Rendered

See also use RulebookSpec 05 §1, D14

rules setting

#

set rules hide folds the rules block away in the editor.

show (the default) or hide. With hide, hybrid mode and preview treat the rules block as folded and hidden. Rendered HTML never contains the rules block either way.

Syntax
set rules show|hide
A tidy document
selfscribe
~~~ selfscribe
set rules hide
use markdown
~~~
# Clean

The rules above stay folded in hybrid mode.
Rendered

See also Rules block Hybrid modeSpec 01 §2, D4

cite-style setting

#

set cite-style numeric numbers citations. The default is author and year.

author-year (the default: (Knuth 1984, p. 99)) or numeric ([1, p. 99], numbered in the order works are first cited). An ordinary variable (01 §2), read by the citation and bibliography plugins.

Syntax
set cite-style author-year|numeric
Numbered citations
selfscribe
~~~ selfscribe
use markdown
inline  [@_]  -> citation
line  bibliography: _  -> bibliography
block  ```data\ _ ... ```  -> data  info=_1  verbatim
set cite-style numeric
~~~
Programs are essays [@knuth1984].

```data refs records as hidden
key: knuth1984
author: Donald E. Knuth
title: Literate Programming
year: 1984
```

bibliography: refs
Rendered

See also citation setSpec 01 §2, D88

blanklines setting

#

set blanklines keep turns blank lines into line breaks.

collapse (the default) or keep. With keep, each blank line between two top-level blocks renders as a <br>, so extra blank lines add space. Blank lines at the start and end, and inside lists or blocks, still render nothing.

Syntax
set blanklines collapse|keep
Keep the gaps
selfscribe
~~~ selfscribe
use markdown
set blanklines keep
~~~
A first paragraph.



Three blank lines above this one.
Rendered

See also setSpec 01 §2, D54

linebreaks setting

#

set linebreaks keep ends each line where you wrote it.

collapse (the default) or keep. Lines next to each other make one paragraph. With keep, each line break inside it stays a line break (<br>), for poems, addresses and lists written as plain lines. The Plain rulebook keeps them.

Syntax
set linebreaks collapse|keep
An address
selfscribe
~~~ selfscribe
use markdown
set linebreaks keep
~~~
12 Harbour Road
Aldery
AL1 2BC
Rendered

See also blanklines setSpec 01 §2, D123

source-width setting

#

set source-width reading keeps Source mode in a reading column.

How wide Source mode shows this document: full (the whole window, the usual default), reading (the reading column) or a length such as 80ch. For the other modes, see width.

It only changes the editor. The width switch in the toolbar still works, and remembers what you choose for each document.

Syntax
set source-width full|reading|LENGTH
Prose in Source too
selfscribe
~~~ selfscribe
use markdown
set source-width reading
set line-numbers off
~~~
# A letter

Dear Sam, the lighthouse is lit again.
Rendered

See also width line-numbersSpec D126

line-numbers setting

#

set line-numbers off hides line numbers in Source mode for this document.

on or off. Without it, Source follows your Line numbers setting, and Hybrid shows none unless you turn them on. on shows them in Hybrid too. A rulebook can set it for every document that uses it (the Plain rulebook turns them off), and the Line numbers switch remembers what you choose for each document.

Syntax
set line-numbers on|off
No numbers for notes
selfscribe
~~~ selfscribe
use markdown
set line-numbers off
~~~
Buy bread
Call Ana
Rendered

See also source-widthSpec D126

indent setting

#

Spaces per nesting level, 1 to 16 (default 2).

How many spaces make one level of indentation for nest. A tab always counts as one level. Values outside 1 to 16 are a warning and ignored.

Syntax
set indent N
Four-space lists
selfscribe
~~~ selfscribe
use markdown
set indent 4
~~~
- top
    - four spaces in
- top again
Rendered

See also nest IndentationSpec 01 §2, D30

title setting

#

The document's title.

The title is available to renderers and to rules that become var ({{title}}). Rulebooks set their own title for menus, but a title is never inherited through use, so importing a rulebook never renames your document.

Syntax
set title TEXT
Showing the title
selfscribe
~~~ selfscribe
set title  Field notes
inline  {{_}}  -> var
~~~
This document is called “{{title}}”.
Rendered

See also Variables varSpec 01 §2, D15, D62

slot setting

#

Changes the slot character for the patterns that follow.

set slot $ makes $ the slot character for the rules after it, in this file only: patterns write $, $1, $#, and attributes write href=$2. Handy when _ is itself a delimiter, as in Markdown's __strong__.

Any single character except space, \, . and # works. The choice never leaks into files that use this one.

Syntax
set slot CHAR
Underscore delimiters
selfscribe
~~~ selfscribe
set slot $
inline  __$__  -> strong
inline  _$_    -> em  bound
~~~
__Strong__ and _emphasis_, while snake_case_names stay.
Rendered

See also _ \ (in a pattern)Spec 01 §2, 02 §3, D21

folder setting

#

set project off ignores the rules of the folder (selfscribe.self) and of the workbook.

on (the default) or off. In a folder or workbook, default rules from selfscribe.self or workbook.self are applied first. set project off in a document opts that document out, leaving only its own rules (and the built-in Markdown default if it has no rules block).

Syntax
set project on|off
Leaving out the folder rules
selfscribe
~~~ selfscribe
set project off
use comments
~~~
// ~ Only this document's own rules apply.
Rendered

See also Folder of documents WorkbookSpec 01 §2, 05 §2, D18

style setting

#

set style dark wide numbered gives the whole document a look.

A look is one line in the rules block: set style and one or more look words. The words add up, so set style paper numbered is a printed sheet with numbered headings. The engine only stores the line (it is a variable). The editor, the site and self render --standalone draw it with one shared stylesheet.

Of dark, light and paper only the last one written counts, and the same for serif, sans and mono. A word written with a look replaces that part of it: newspaper sans is a sans-serif newspaper.

A look set in a rulebook or a folder's selfscribe.self applies to every document that uses it. A document's own set style replaces it. A look never changes your rules' own { css }, only the page around them.

In the editor, Look in the status bar (and Document looks in Settings) shows each look on your document and writes the line for you. The preview shows everything. Hybrid mode shows the colours, type, width and heading numbers.

Syntax
set style WORD WORD ...
A dark, wide page with numbered sections
selfscribe
~~~ selfscribe
use markdown
set style dark wide numbered
~~~
# Field report

## Findings

The survey found three new nesting sites.

### North shore

Two of them, both on the cliffs.

## Next steps

Return in spring.
Rendered

See also set Variables View options paperSpec 04 §6, D79

font setting

#

set font Literata sets the document in a font. set heading-font sets the headings, set code-font the code.

A document can ask for its own typeface: set font NAME for the text, set heading-font NAME for headings and set code-font NAME for code and anything else set at one width. The text font is used inside the document's blocks too (boxes to fill in, tables, pictures of ideas), so a record is set in one face throughout. NAME is a font from the editor's gallery (by name or id, like literata or Atkinson Hyperlegible Next) or any font installed on the computer.

Like set style it is only a line the engine stores. The editor loads the font and uses it in hybrid mode and the preview. Where the font is not available (another computer, the CLI) the look's own font is used instead, and nothing is downloaded to find one.

In a rule's CSS, use the page's fonts rather than naming one: var(--doc-font) for the text, var(--doc-font-heading) for headings, var(--doc-font-ui) for labels and badges, and var(--doc-font-mono) for code. They work in the app, on the web and in every export.

Your own reading font is an editor preference (Settings › Text and fonts, or Choose fonts… in the command palette). A document's set font wins inside that document.

Syntax
set font NAME
set heading-font NAME
set code-font NAME
A literary page
selfscribe
~~~ selfscribe
use markdown
set style paper
set font EB Garamond
set heading-font Playfair Display
~~~
# The Lighthouse

The lamp was lit at dusk, and the keeper wrote the weather in a small grey book.
Rendered

See also style Variables preferences.selfSpec D93

page setting

#

set page A4 landscape chooses the paper for pages, printing, PDF and Word.

A document can say what paper it is for: set page and a size (A4, A5, A3, Letter or Legal), optionally landscape (or portrait) and margins narrow, normal or wide (12, 20 or 28 mm). The words go in any order.

The editor uses it for the Pages view (the shape of each page and its margins), for printing and PDF, and for Word export. Without it, pages are A4, portrait, with normal margins.

The easiest way to write it is File › Page setup…, which shows the line it writes.

Syntax
set page SIZE [landscape] [margins narrow|normal|wide]
A landscape handout
selfscribe
~~~ selfscribe
use markdown
set page A4 landscape margins narrow
set layout pages
~~~
# Timetable

Boats leave every hour from the north quay.
Rendered

See also width lang style Page breakSpec D117

width setting

#

set width wide or set width 40em makes the reading column that wide (or full for the whole window).

How wide the text runs on screen and in an exported web page: a word, narrow (or compact), normal or wide, which follows your own reading width; a length such as 40em, 70ch, 720px or 16cm; or full for the whole window. It wins over the width a style gives (wide, compact) and over your own reading width in Settings, for this document only.

Pages and slides take their width from the paper and the screen instead.

Syntax
set width narrow|normal|wide
set width LENGTH
set width full
A narrow column
selfscribe
~~~ selfscribe
use markdown
set width 32em
~~~
# Notes

A short column is easier to read on a wide screen: the eye finds the next line without searching for it.
Rendered

See also page styleSpec D117, D244

lang setting

#

set lang fr says what language the document is in (spellcheck, hyphenation, screen readers).

A language tag such as en-GB, en-US, fr, de or pt-BR. The editor spellchecks in that language (when your browser has its dictionary), and every export says it, so screen readers pronounce the text properly and justified text breaks words in the right places.

Without it, the browser's own language is used.

Syntax
set lang TAG
A French note
selfscribe
~~~ selfscribe
use markdown
set lang fr
~~~
# Horaires

Le bateau part toutes les heures du quai nord.
Rendered

See also page VariablesSpec D117

theme setting

#

set theme cyber-dark colours the whole app in that theme while this document is open.

The name of a built-in theme: paper, snow, sepia, dusk, graphite, nord, dracula, cyber-dark, cyber-light, twotone and the others in the theme picker in the status bar. While the document is the one you are looking at, the app takes that theme. Go to another tab or Home and your own theme comes back.

Exports use the theme too. Colours in File › Export… chooses another.

To keep your own theme always, turn off Settings › Appearance › Documents choose the theme. The theme picker in the status bar says when a document is choosing. The look of the page itself is set style.

Syntax
set theme NAME
A neon talk
selfscribe
~~~ selfscribe
use markdown
set theme cyber-dark
set layout slides
~~~
# Night market

Open the Preview to see the deck in its own colours.
Rendered

See also style layoutSpec D132

author setting

#

set author Ada Lindqvist names who wrote the document, in every export.

An e-book shows the name under its title and on its cover. A Word file has it in its properties, and a web page in its author tag.

Without it, exports use Settings › Your name. Like any setting, {{author}} shows it in the text.

Syntax
set author NAME
A signed guide
selfscribe
~~~ selfscribe
use markdown
set author Ada Lindqvist
set description Where to eat, sleep and swim on the island.
~~~
# The harbour guide

Boats leave every hour from the north quay.
Rendered

See also description cover dateSpec D137

description setting

#

set description … is the one-line summary of the document that e-books, Word and websites show.

An e-book shop or library shows it under the title. A website puts it in each page's description, which search engines and link previews show, and on the contents page.

Keep it to a sentence or two. Without it, a web page uses its first paragraph.

Syntax
set description TEXT
A described page
selfscribe
~~~ selfscribe
use markdown
set description Opening hours, prices and the ferry timetable.
~~~
# Visiting the island

The ferry runs every hour from April to October.
Rendered

See also author coverSpec D137

cover setting

#

set cover pictures/cover.jpg gives an e-book its cover picture.

A picture in the folder, written as a path from the document. An EPUB shows it as its first page and as the book's thumbnail. A website with an address uses it in link previews.

Without it, an EPUB gets a cover made of its title and author.

Syntax
set cover PATH
A book with a cover
selfscribe
~~~ selfscribe
use markdown
set cover pictures/harbour.jpg
set author Ada Lindqvist
~~~
# Island stories

Twelve stories from the north quay.
Rendered

See also author descriptionSpec D137

date setting

#

set date 2026-10-28 dates the document in its exports.

Write the date as 2026-10-28 (or 2026-10, or 2026) so e-books, Word and sitemaps can read it. set date today is the day you export. Running headers and footers show it with {date}.

Syntax
set date YYYY-MM-DD
A dated notice
selfscribe
~~~ selfscribe
use markdown
set date 2026-10-28
inline {{_}} -> var
~~~
# Ferry timetable

Valid from {{date}}.
Rendered

See also author descriptionSpec D137

set footer Page {page} of {pages} puts a line at the foot of every printed page.

The footer has three places: left, centre and right, with | between them. One text is the centre; two are the left and the right; write all three to choose (set footer HT-01 | Reproduce only in full | Page {page} of {pages}). Leave a place empty to skip it.

{page}, {pages}, {title} and {date} fill themselves in. {name} shows any other setting of the document, so set record HT-01 can be said once and used in the footer and the text.

It shows in Print, PDF and Word, and it is the document’s own: it wins over the footer in File › Export, and is not carried to the next document. set footer none prints no footer.

Syntax
set footer LEFT | CENTRE | RIGHT
A record that says what it is on every page
selfscribe
~~~ selfscribe
use markdown
set record HT-01
set header {record} | Harbour Trust | {date}
set footer Reproduce only in full | | Page {page} of {pages}
~~~
# Quay inspection

Walked the north quay at low water.
Rendered

See also header page dateSpec D137

header setting

#

set header HT-01 | Harbour Trust puts a line at the top of every printed page.

Written like set footer: left, centre and right with | between them, and {title}, {date}, {page}, {pages} or {name} (another setting of the document) filling themselves in.

A header the document sets is on every page, the first too: a record’s number belongs on its first page. (The title that File › Export adds on its own skips the first page.) set header none prints no header.

Syntax
set header LEFT | CENTRE | RIGHT
A reference on every page
selfscribe
~~~ selfscribe
use markdown
set header Ref. HT-01 | | {date}
~~~
# Quay inspection

Walked the north quay at low water.
Rendered

See also footer pageSpec D137

layout setting

#

set layout pages shows the document as pages of a book in Preview. slides makes a deck.

scroll is one long page, pages turns like a book on the paper of set page, and slides is one screen at a time: a new slide at each ---page--- line, else at each ---, else at each heading. F5 presents the slides full screen.

Without it, Preview uses your own choice (the Page and view button, or Settings › Layout and devices). Choosing a layout there lasts for the session. Keep … for this document writes this line.

Syntax
set layout scroll | pages | slides
A small deck
selfscribe
~~~ selfscribe
use markdown
set layout slides
~~~
# Harbour tour

Three stops, twenty minutes.

## The market

Opens at six.

## The lighthouse

Climb at noon.
Rendered

See also page Preview modeSpec D102

Variables setting

#

Any other set KEY VALUE is a variable, shown where a rule makes a var.

A set line with a key that is not a built-in setting stores a variable. A rule that becomes var shows its value by name. Host data comes first, then the document's variables. A missing variable is empty.

Inside a block that draws an idea (a fill form, a sheet, facts, a cover and the rest) {{name}} shows the variable too, with no rule needed, so a template filled row by row from a table carries each row's values in its boxes and tables as well as its sentences. A name the document does not set stays as written.

Syntax
set KEY VALUE
Mail-merge style
selfscribe
~~~ selfscribe
set name     Ada
set version  1.2
inline  {{_}}  -> var
~~~
Hello {{name}}, version {{version}} is out.
Rendered

See also var setSpec 01 §2, D49

paper setting

#

A printed sheet on a desk: serif type, page margins, prints cleanly.

The document becomes a sheet of paper with margins, a soft shadow and serif type. It is a light page whatever the editor theme, and it prints without the desk or the shadow.

Written as a word of set style. It combines with the other words.

Syntax
set style paper
Printed page
selfscribe
~~~ selfscribe
use markdown
set style paper
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

newspaper setting

#

A masthead, two justified serif columns and a drop cap.

A look made of serif, justified, columns, dropcap and compact, plus a masthead: the first h1 spans the columns between two rules. Paragraphs after the first are indented.

Written as a word of set style. It combines with the other words.

Syntax
set style newspaper
Newspaper
selfscribe
~~~ selfscribe
use markdown
set style newspaper
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

academic setting

#

A centred title, numbered sections, justified serif text.

A look made of serif, justified and numbered, with a centred h1 title, a slightly narrower column, quiet section headings and indented paragraphs.

Written as a word of set style. It combines with the other words.

Syntax
set style academic
Academic
selfscribe
~~~ selfscribe
use markdown
set style academic
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

dark setting

#

Always a dark page, whatever the app theme.

The page is dark. In the editor it takes the colours of your dark theme (theme-dark in preferences.self), or of the current theme when it is dark already. Pages outside the editor use built-in dark colours. A dark page prints light.

Written as a word of set style. It combines with the other words.

Syntax
set style dark
Dark page
selfscribe
~~~ selfscribe
use markdown
set style dark
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

light setting

#

Always a light page, whatever the app theme.

The page is light, even when the editor uses a dark theme. In the editor it takes the colours of your light theme (theme-light).

Written as a word of set style. It combines with the other words.

Syntax
set style light
Light page
selfscribe
~~~ selfscribe
use markdown
set style light
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

wide setting

#

A wider column, 1.6 times the reading column.

The text column is 1.6 times as wide as the reading column, for tables, code and wide screens. Hybrid mode widens too.

Written as a word of set style. It combines with the other words.

Syntax
set style wide
Wide
selfscribe
~~~ selfscribe
use markdown
set style wide
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

compact setting

#

Tighter lines and less space between blocks.

Lines sit closer together and blocks and headings have less space around them: more on one screen or page.

Written as a word of set style. It combines with the other words.

Syntax
set style compact
Compact
selfscribe
~~~ selfscribe
use markdown
set style compact
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

serif setting

#

Serif type for text and headings.

Text and headings are set in a serif face (Source Serif in the editor).

Written as a word of set style. It combines with the other words.

Syntax
set style serif
Serif
selfscribe
~~~ selfscribe
use markdown
set style serif
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

sans setting

#

Sans-serif type for text and headings.

Text and headings are set in a sans-serif face (Inter in the editor). With a look, it replaces the look's serif.

Written as a word of set style. It combines with the other words.

Syntax
set style sans
Sans
selfscribe
~~~ selfscribe
use markdown
set style sans
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

mono setting

#

Monospaced type, like a manuscript.

Everything is set in a monospaced face, like a typescript.

Written as a word of set style. It combines with the other words.

Syntax
set style mono
Typewriter
selfscribe
~~~ selfscribe
use markdown
set style mono
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

justified setting

#

Justified, hyphenated paragraphs.

Paragraphs are justified to both edges and hyphenated where the browser can. A rule's own text-align still wins for its element.

Written as a word of set style. It combines with the other words.

Syntax
set style justified
Justified
selfscribe
~~~ selfscribe
use markdown
set style justified
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

numbered setting

#

Sections numbered 1, 1.1, 1.1.1 (h2 to h4).

Headings are numbered: h2 as 1, h3 as 1.1, h4 as 1.1.1. An h1 is the title: it has no number and starts the numbering again. Only headings at the top level of the document count.

Written as a word of set style. It combines with the other words.

Syntax
set style numbered
Numbered headings
selfscribe
~~~ selfscribe
use markdown
set style numbered
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

dropcap setting

#

A large initial letter on the first paragraph.

The first letter of the first paragraph of the document is set large, across several lines.

Written as a word of set style. It combines with the other words.

Syntax
set style dropcap
Drop cap
selfscribe
~~~ selfscribe
use markdown
set style dropcap
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

columns setting

#

Text set in two columns.

The text runs in two columns with a rule between them. A first h1 spans both. In the editor, documents of more than 2 000 blocks stay one column.

Written as a word of set style. It combines with the other words.

Syntax
set style columns
Two columns
selfscribe
~~~ selfscribe
use markdown
set style columns
~~~
# The harbour

Fishing boats left before dawn, and the market opened to a crowd that had waited since the first bells.

## Weather

A light westerly breeze with clear skies until the evening.

### Tides

High water at noon.
Rendered

See also styleSpec 04 §6, D79

Plugins

#

Diagrams, maths, charts, music, embeds and more.

mermaid plugin

#

Diagrams from text: flowcharts, sequence, class (UML), state, ER, Gantt, pie, mind maps, timelines.

A built-in plugin: a verbatim body becomes a <pre class="mermaid"> that the app draws as a diagram with Mermaid. Without Mermaid it stays readable text.

Mermaid runs in strict mode and its SVG is cleaned before it reaches the page, so a diagram can never fetch anything.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-mermaid on in preferences.self). Settings: set plugin-mermaid-theme auto|default|neutral|dark|forest (auto follows light and dark).

Syntax
block  ``` mermaid ... ```  -> mermaid  verbatim
A flowchart
selfscribe
~~~ selfscribe
block  ``` mermaid ... ```  -> mermaid  verbatim
~~~
```mermaid
flowchart LR
  A[Write] --> B{Rules?}
  B -- yes --> C[Render]
  B -- no --> D[Plain text]
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D49, D70, D73

math plugin

#

TeX formulas, inline or displayed, typeset with KaTeX.

A built-in plugin: from an inline rule the formula sits in the text. From a block rule it is centred on its own. The app typesets it with KaTeX. Without KaTeX the TeX source stays readable.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-math on in preferences.self).

Syntax
inline  $_$  -> math  verbatim
block  $$ ... $$  -> math  verbatim
Inline and display maths
selfscribe
~~~ selfscribe
inline  $_$  -> math  verbatim
block  $$ ... $$  -> math  verbatim
~~~
Euler's identity $e^{i\pi} + 1 = 0$.

$$
\int_0^\infty e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2}
$$
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D49, D73

equation plugin

#

Numbered display equations, referred to by label.

A built-in plugin: a display equation opened with $$ {#label} is numbered (1), (2)… in document order, and eqref ([@eq:label]) refers to it by its number. The formula is typeset by math.

The client half shows the equation when you hover or focus a reference.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-equation on in preferences.self).

Syntax
block  $$ {#_} ... $$  -> equation label=_1 verbatim
block  $$ ... $$  -> math verbatim
inline  $_$  -> math verbatim
inline  [@eq:_]  -> eqref
A numbered equation
selfscribe
~~~ selfscribe
block  $$ {#_} ... $$  -> equation label=_1 verbatim
block  $$ ... $$  -> math verbatim
inline  $_$  -> math verbatim
inline  [@eq:_]  -> eqref
~~~
Euler's identity [@eq:euler]:

$$ {#euler}
e^{i\pi} + 1 = 0
$$
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D89, D92

numbered plugin

#

Numbers figures, tables, theorems or any kind you name: Figure 1, Table 1, Theorem 1.

A built-in plugin. kind= says what it numbers (figure when missing; any one word, so kind=recipe numbers recipes), and each kind counts on its own in the order of the document. label= gives it a name to refer to with ref, caption= a caption, and name= what the number is called (name=Satz, else the kind with a capital letter).

Figures, charts, diagrams and maps get their caption underneath (Figure 1. A right-angled triangle); tables and listings above. Any other kind is set as theorems are in print: Theorem 1 (Pythagoras). runs into its first line.

A label used twice in one kind, or with a space in it, gives a warning and no link. Numbered equations are the equation plugin.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-numbered on in preferences.self).

Syntax
block  ::: figure {#_} _ ... :::  -> numbered kind=figure label=_1 caption=_2
block  ::: table {#_} _ ... :::  -> numbered kind=table label=_1 caption=_2
block  ::: theorem {#_} _ ... :::  -> numbered kind=theorem label=_1 caption=_2
inline  [@fig:_]  -> ref kind=figure
inline  [@tbl:_]  -> ref kind=table
inline  [@thm:_]  -> ref kind=theorem
A figure, a table and a theorem
selfscribe
~~~ selfscribe
use markdown
block  ::: figure {#_} _ ... :::  -> numbered kind=figure label=_1 caption=_2
block  ::: table {#_} _ ... :::  -> numbered kind=table label=_1 caption=_2
block  ::: theorem {#_} _ ... :::  -> numbered kind=theorem label=_1 caption=_2
inline  [@fig:_]  -> ref kind=figure
inline  [@tbl:_]  -> ref kind=table
inline  [@thm:_]  -> ref kind=theorem
~~~
The triangle in [@fig:triangle] has sides 3, 4 and 5, a row of [@tbl:triples]. [@thm:pythagoras] says why.

::: figure {#triangle} A right-angled triangle
![A right-angled triangle with sides 3, 4 and 5](data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='210' height='160'><polygon points='20,135 180,135 180,15' fill='lightblue' stroke='steelblue' stroke-width='3'/><text x='96' y='155' font-size='15' fill='steelblue'>4</text><text x='188' y='80' font-size='15' fill='steelblue'>3</text><text x='84' y='68' font-size='15' fill='steelblue'>5</text></svg>)
:::

::: table {#triples} Whole-number right triangles
| a | b  | c  |
| --- | --- | --- |
| 3 | 4  | 5  |
| 5 | 12 | 13 |
:::

::: theorem {#pythagoras} Pythagoras
In a right-angled triangle, the square on the longest side is the sum of the squares on the other two.
:::
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D140

calc plugin

#

Calculator notes: end a line with = and its result shows after it, with names, percentages and currencies.

A client plugin. In a calc block, a line that ends in = shows its result after the = (rent 900 + bills 120 = reads 1,020). Words before a number are its label and name it, so rent is 900 and bills 120 on the lines below. name = sum names a result too, and a name can be several words (per person = total / 3). Other lines stay as notes.

Operators: + - * / ^, brackets, % for percentages (20% of 80, 80 + 10%) and for the remainder between two numbers (10 % 3). A currency sign before or after a number (£12, 12 €) carries through the sums; two currencies never mix, and the line says so. Numbers are exact decimals, with thousands separators if you like. sum = and avg = add up the results above, back to a blank line. An unknown name or a broken sum gets a quiet note on its line.

Inside a sentence, [calc 4 * £7.50] shows £30, and hovering shows the sum. Nothing is written into the text.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-calc on in preferences.self).

Syntax
block  ``` calc ... ```  -> calc  verbatim
inline  [calc _]  -> calc kind=inline  verbatim
Sharing a flat
selfscribe
~~~ selfscribe
block  ``` calc ... ```  -> calc  verbatim
inline  [calc _]  -> calc kind=inline  verbatim
~~~
```calc
rent 900 + bills 120 =
food 45 * 4 =
total = rent + bills + food
per person = total / 3
```

Lunches this month: [calc 4 * 5 * £7.50].
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

chart plugin

#

Bar, line, area and pie charts from a few lines of data.

A client plugin that turns CSV-like text into an SVG chart, with no library and nothing fetched. A few header lines (type:, title: …) come first, then the data: the first row names the series, each following row is one point.

Without the plugin the block is still its data.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-chart on in preferences.self). Settings: set plugin-chart-palette theme|vivid|pastel|mono.

Syntax
block  ``` chart ... ```  -> chart  verbatim
A bar chart
selfscribe
~~~ selfscribe
block  ``` chart ... ```  -> chart  verbatim
~~~
```chart
type: bar
title: Visitors
Month, 2025, 2026
Jan, 120, 180
Feb, 140, 210
Mar, 165, 260
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

spark plugin

#

A tiny line or bar chart inside a sentence: ~[3 5 2 8 6]~.

A client plugin. Numbers between ~[ and ]~, with spaces or commas between them, become a small line as tall as the text, with dots on the lowest and highest values. Start with bar: for bars. Hover over it, or tab to it and use the arrow keys, to read the values. Without the plugin the numbers stay in the sentence.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-spark on in preferences.self).

Syntax
inline  ~[_]~  -> spark  verbatim
Visitors this week
selfscribe
~~~ selfscribe
inline  ~[_]~  -> spark  verbatim
~~~
Visitors this week ~[120 135 128 160 190 240 210]~ and rain by month ~[bar: 80 62 55 40 31 12]~.
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

heatmap plugin

#

Dates, one per line, as a calendar of weeks with busier days darker.

A client plugin. Each line is a date with an optional number after it (2026-09-14 3). A date alone counts 1, and a date written twice adds up. A # Title line names it. The grid covers the weeks from the first date to the last, up to a year. Hover over a day, or tab to it and use the arrow keys, to see its date and value. Nothing is written back.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-heatmap on in preferences.self). Settings: set plugin-heatmap-weekstart mon|sun.

Syntax
block  ``` heatmap ... ```  -> heatmap  verbatim
Days I ran
selfscribe
~~~ selfscribe
block  ``` heatmap ... ```  -> heatmap  verbatim
~~~
```heatmap
# Running, kilometres
2026-09-01 5
2026-09-03 8
2026-09-06 12
2026-09-10 5
2026-09-13 21
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

habit plugin

#

A habit tracker from one line a day: a row of days per habit, streaks, and a tick for today.

A client plugin. Write one line a day, the date and what you did (2026-09-21 run read). Each habit shows as a row of the last days, with its current streak and its best. habits: run, read fixes the rows and their order, # Title names the tracker and days: 14 shows fewer days. A habit can keep its own line of dates instead (run: 2026-09-01 2026-09-02).

Click the box in front of a habit to mark today done or not: today's line changes (or is written), as one undo step, so the document stays a plain log. Tab to a row and use the arrow keys to read its days. In a read-only view the rows show without boxes.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-habit on in preferences.self). Settings: set plugin-habit-days 14|21|28|60|90 (how many days a row shows; days: in the block wins).

Syntax
block  ``` habit ... ```  -> habit  verbatim
Autumn habits
selfscribe
~~~ selfscribe
block  ``` habit ... ```  -> habit  verbatim
~~~
```habit
# Autumn habits
habits: run, read
2026-09-21 run read
2026-09-22 read
2026-09-23 run read
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

meter plugin

#

A small bar inside a sentence: [= 72 / 100 =], [= 3 of 8 =] or [= 45% =].

A client plugin. An amount and its whole between [= and =] become a small bar filled that far, with the numbers beside it. A full bar turns green. Without the plugin the numbers stay in the sentence.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-meter on in preferences.self).

Syntax
inline  [=_=]  -> meter  verbatim
Progress in a sentence
selfscribe
~~~ selfscribe
inline  [=_=]  -> meter  verbatim
~~~
Raised so far [= 7200 / 10000 =] for the new lifeboat.
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

view plugin

#

Tables, cards, boards, lists, calendars and forms from records in plain text, editable in place.

A built-in plugin that shows a data source (a data block or a data file). The engine draws a static table, cards or calendar for every renderer. The client half makes it interactive: search, sort, filter chips, pages, editing cells by type, dragging board cards and a form to add records. Each change is written back into the text as one undo step. A view with dates has Add to calendar, which saves its records as an .ics file for any calendar app.

The rules are those of the built-in data rulebook, so use data is all a document needs. See Data and views.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-view on in preferences.self).

Syntax
block  ```data\ _ ... ```  -> data  info=_1  verbatim
line  view: _  -> view  verbatim
A board and a table
selfscribe
~~~ selfscribe
block  ```data\ _ ... ```  -> data  info=_1  verbatim
line  view: _  -> view  verbatim
~~~
```data tasks as board
title, status:choice(todo|doing|done), due:date
Write the spec, doing, 2026-09-20
Review fixtures, todo, 2026-09-24
```

view: tasks as table sort due
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §7, D80, D82, D83

map plugin

#

Places, routes, areas and circles, one a line, on a map you can move and draw on.

A client plugin. A place is its name, @ and where it is: Café @ 38.7075, -9.1364. route Walk: Café -> Market -> 38.715, -9.14 goes through places or coordinates; area Old town: … / … / … goes around them; circle Wifi @ 38.71, -9.13 300m has a middle and a radius. End a line with a colour (red, #e5484d) and -- a note. # Title, tiles:, center:, zoom:, height: and units: change how it shows.

The map is the editor too: drag places and points, drag the dot between two points to add one, pick Place, Route, Area or Circle and click to draw, rename and recolour in the strip under the map. Every change is written into the text. Save as GeoJSON, or drop a GeoJSON file on the map. Street pictures load from OpenStreetMap only after you click Show the street map. Records with lat and lng show on the same map with view: places as map.

country Portugal green fills a country, and region Catalonia, state Texas or province Ontario a region. shade Visitors: Portugal 12, Spain 30 colours several by a number, palest for the smallest. Names work in any case, without accents and by their other names. A name the map does not know is listed under it with the nearest ones. The outlines come in a data pack you get once with Get under the map, or in Settings › App › Data packs. A table with a country column shows as shaded countries with view: trips as map. An exported page carries the outlines it draws.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-map on in preferences.self). Settings: set plugin-map-tiles ask|always|never (street pictures), set plugin-map-tile-url https://…/{z}/{x}/{y}.png (another tile server), set plugin-map-height 400, set plugin-map-units metric|imperial, set plugin-map-labels auto|on|off.

Syntax
block  ``` map ... ```  -> map  verbatim
A weekend away
selfscribe
~~~ selfscribe
block  ``` map ... ```  -> map  verbatim
~~~
```map
# A weekend in Lisbon
Café on the pier @ 38.7075, -9.1364  orange -- best pastéis in town
The market @ 38.7069, -9.1459
route Walk: Café on the pier -> The market  blue
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D219, D257

progress plugin

#

A progress bar counting the ticked tasks of its section.

A built-in plugin: progress: Label counts the task items (- [ ] and - [x]) of its section, from the heading above it to the next heading of the same level (the whole document before any heading), and draws a bar. The count is the engine's, so every view shows it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-progress on in preferences.self).

Syntax
line  progress: _  -> progress
A checklist
selfscribe
~~~ selfscribe
use markdown
line  progress: _  -> progress
~~~
## Launch

progress: Launch checklist

- [x] Write the announcement
- [ ] Update the website
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D91, D92

timeline plugin

#

Milestones on a vertical timeline: done, current and planned.

A client plugin. One milestone per line: [x] DATE | Title | details ([x] done, [>] current, [ ] planned). title: and layout: alternate lines at the top set a heading and place milestones on both sides of the line.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-timeline on in preferences.self). Settings: set plugin-timeline-layout vertical|alternate.

Syntax
block  ``` timeline ... ```  -> timeline  verbatim
Milestones
selfscribe
~~~ selfscribe
block  ``` timeline ... ```  -> timeline  verbatim
~~~
```timeline
[x] 2025-06 | Planning approved
[>] 2026-09 | Fitting out | Kitchen, stage and lighting
[ ] 2027-04 | Opening day
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D92

events plugin

#

Dated events as an agenda or month grids.

A client plugin. One event per line: 2026-09-14 10:00-11:30 Kick-off @ Room 2 (a date, an optional time or range, the title and @ place). Write DATE..DATE for an event over several days. The agenda groups them by month and marks what is next from the reader's date. view: month draws month grids.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-events on in preferences.self). Settings: set plugin-events-view agenda|month and set plugin-events-weekstart mon|sun.

Syntax
block  ``` events ... ```  -> events  verbatim
An agenda
selfscribe
~~~ selfscribe
block  ``` events ... ```  -> events  verbatim
~~~
```events
2026-09-14 10:00 Kick-off @ Room 2
2026-09-30 18:30 Launch party @ Rooftop
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D92

until plugin

#

How far away a date is, inside a sentence: ((2026-12-24 Christmas)) reads “Christmas in 3 days”, then “today”.

A client plugin. A date between (( and )), with an optional name after it, reads “in 12 days”, “tomorrow”, “today” or “3 days ago”, counted from the reader's own date. With a time (2026-12-24 18:00) the last day counts in hours and minutes. It keeps counting while the page is open, and hovering shows the full date. Without the plugin the date stays as written.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-until on in preferences.self).

Syntax
inline  ((_))  -> until  verbatim
Dates in a sentence
selfscribe
~~~ selfscribe
inline  ((_))  -> until  verbatim
~~~
The winter timetable starts ((2026-11-01)). Next up: ((2027-06-20 Summer fair)).
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

poll plugin

#

A question with options drawn as bars of votes. Clicking an option adds a vote to the text.

A client plugin. The first line is the question. Each option starts with -, and its votes follow as tally marks (- Tea |||) or a number (- Tea (3)). Each option shows as a bar with its count and share. Click one to add a vote: that line of the text changes, as one undo step, so the document stays the record. In a read-only view the bars show without buttons.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-poll on in preferences.self).

Syntax
block  ``` poll ... ```  -> poll  verbatim
Where to eat
selfscribe
~~~ selfscribe
block  ``` poll ... ```  -> poll  verbatim
~~~
```poll
Where shall we eat on Friday?
- The Thai place |||
- Noodle bar (2)
- Bring our own
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

graphviz plugin

#

Graphs and architecture diagrams in the DOT language.

A client plugin that lays out DOT graphs with Graphviz compiled to WebAssembly, loaded only when a document uses it.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-graphviz on in preferences.self). Settings: set plugin-graphviz-engine dot|neato|fdp|circo|twopi|osage (the layout engine).

Syntax
block  ``` dot ... ```  -> graphviz  verbatim
block  ``` graphviz ... ```  -> graphviz  verbatim
A directed graph
selfscribe
~~~ selfscribe
block  ``` dot ... ```  -> graphviz  verbatim
block  ``` graphviz ... ```  -> graphviz  verbatim
~~~
```dot
digraph { rankdir=LR; order -> kitchen; kitchen -> pass; pass -> table; pass -> takeaway }
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

uml plugin

#

Class and component diagrams from a compact text syntax (nomnoml).

A client plugin that draws UML-style diagrams with nomnoml, loaded only when used.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-uml on in preferences.self).

Syntax
block  ``` uml ... ```  -> uml  verbatim
block  ``` nomnoml ... ```  -> uml  verbatim
A class diagram
selfscribe
~~~ selfscribe
block  ``` uml ... ```  -> uml  verbatim
block  ``` nomnoml ... ```  -> uml  verbatim
~~~
```uml
[Member|name;card number|borrow();renew()]
[Member]->[Loan|due date]
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

mindmap plugin

#

An indented list drawn as a map that branches out. Click a node to fold its branch.

A client plugin. Write one idea per line and indent a line to make it a branch of the one above (list bullets are fine). The first line is the middle of the map. With several lines at the left edge, a # Title line names the map that joins them. Click a node or press Enter on it to fold or unfold its branch, and use the arrow keys to move between nodes. Folding changes only the view: the text stays a list.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-mindmap on in preferences.self).

Syntax
block  ``` mindmap ... ```  -> mindmap  verbatim
Planning a trip
selfscribe
~~~ selfscribe
block  ``` mindmap ... ```  -> mindmap  verbatim
~~~
```mindmap
Lisbon in May
  Travel
    Flights
  Stay
    Alfama flat
  See
    Tram 28
    Sintra
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

flow plugin

#

Boxes and arrows from lines of text, laid out for you: flowcharts, systems, database tables.

A client plugin with no library behind it. Each node ID "Label" :shape line is a box and each a -> b "label" line an arrow; the boxes are laid out in layers (set direction=LR turns the flow sideways) and the arrows go round the boxes in their way. group ID "Name" { a b } draws a box around others, lane a band across the flow. Shapes include :decision, :database, :person, :note and :table (its indented lines are rows, and arrows can join rows: orders.e2 -> users.w1). at X,Y pins a box where you want it. Boxes are coloured by kind from the theme (decisions orange, databases teal, starts and ends green); color= picks another, and set colors=plain draws it all in one colour. A mistake shows the line it is on.

A wide diagram can say which part to open on. Name a part with view front at 0,0 size 300x200, then write set open=front. The page shows that part, and the editor opens there.

To make an arrow move, end its line with moving (or moving=slow, moving=fast); set moving=on moves them all, and a -> b -> c joins several in one line. To show the diagram in stages, add step "The browser asks": web api lines: a bar under it steps through them, and print, export and reduced motion show everything. For a circuit, use the shapes :battery, :resistor, :lamp, :switch, :switch-closed, :led, :diode, :capacitor, :motor, :ground and :junction: they are drawn as schematic symbols joined by wires, one loop is drawn as a rectangle, and current only moves (and a lamp only lights) when the loop is closed. Click a switch to flip it, or hold down a :button; the text does not change.

To keep boxes lined up while you edit, write a keep line: keep web api db in-a-row gap=60, keep a b in-a-column, keep a left-of b, keep a above b, keep a b same-size (or same-width, same-height) or keep a centred-on b. The first name stays and the others follow; names can be boxes, groups or placements. In the editor a drag takes the tied boxes along, "…and keep it" beside the line-up buttons writes the rule, and a selected box lists its rules with a × to take each away.

To make a state machine a reader can run, write set start=idle. Nodes are states and a link's text is the event that moves along it. The events that leave the current state are buttons under the diagram, with Reset and a trail of where it has been. A state with no way out says so.

To drive a packet over a detailed drawing instead (groups, tables and all), add move lines to set start=: move "accepted": filter app is an event and the boxes the packet passes, from the stop it leaves to the stop it reaches (a b c, a, b, c and a -> b -> c alike; speed=fast to hurry it). The events leaving the stop it is on are the buttons; the packet travels the links between, lighting each box, the stop it reaches is lit, and the trail names each stop with its group (INPUT filter). A box no move starts or ends at is only passed. Each path incoming "For this machine": a b c color=green line is a button that lights a way through the diagram and sends a packet round it; the arrows beside it walk it a hop at a time (next, back, the arrow keys), and play lets it go round again.

To edit a diagram by hand, hover over it and press Edit (or double-click an empty part of it). Drag boxes to move them (at X,Y is written), drag from the dot on a box's side to another box to join them, double-click to change words, Delete to take away, and use the toolbar to add shapes, undo, tidy and zoom. Every change is a short line in the block's text, which is still what is saved.

Full editor (or a .flow file) gives the editor the whole page area: a library of shapes on the left, the outline, views and steps on the right. To show one diagram in several places, name it with a first line diagram booking "Booking", save windows onto it with view front "Front" at 0,0 size 300x120 (or Add view), and show one elsewhere with a block that holds only from booking view front (or from orders.flow view checkout for a file). set hidden=on keeps a diagram out of the page except through its views.

To place a part many times, define it once as block pump "Pump {n}" n=1 { … } and place it with use pump as p1 at 0,0 n=2; {n} takes the use line's value or the block's default. Links go to p1 or into it, p1.motor. import parts.flow uses another file's blocks. In the editor, Make a block turns a selection into one, and double-clicking a placement edits the block for every placement.

A state is the same drawing with a few things different, one thing a line: state night { lamp color=yellow / door at 120,40 / guard hidden / sw closed / sign "Closed" }. A line written as a link changes the links between those boxes, either way round: door -> hall color=red dashed moving, hall -> yard hidden, still to stop one that moves, "words" for its text. Long words on a link wrap to three lines (the rest on hover), and boxes placed too close for a link to pass between are joined straight across, with a problem naming them. Show it with set state=night, state=night on a view or a step, or by naming it after a machine state; the boxes glide between states. In the full editor, clicking a state in the States list edits it.

To have a diagram remember what the reader clicked, write set keep=panel and add a data block panel whose first line is name, value. Each switch, the machine's state and the step shown become rows such as kettle.state, boiled (a named diagram puts its name in front, so diagrams can share a block). The diagram opens as it was left, every showing of it agrees, view: panel as table shows the rows, and automations hear each click as a changed record. A missing block shows the three lines to add and Create it; in the editor, Forget takes the rows away.

To show the state of records on your own drawing, write set data=tasks (a data block, a .csv file or a database table) and give steps the titles of the records, or record="Book the ferry" where the words differ. A step takes the colour of its record's status (done green, doing the accent, blocked red), a pick in any view of the records marks it, a click picks the record, and the bar under the diagram sets the status or opens the record.

With nothing picked, that bar says how many records are drawn, and Add records not drawn writes a step for each record that has none (node pack "Pack the bags" record="Pack the bags", with an arrow from each record named in its after column), as one undo step. set data=tasks lane=status puts each step in the lane of its record's value in that column (any column will do), and a step moves lane when its record changes; the lanes are drawn, not written. Give a record a new title and its step follows it.

Draw one part and place it many times with a repeat line: repeat cell as c 4x3 at 0,0 gap 20 n={i*2} places block cell four across and three down, named c1 to c12. 5 across (or just 5) makes a row and 5 down a column. In its values, {i} is the copy's number, {row} and {col} its place, and small sums like {i*2} or {row+1} work them out; joined links each to the next in its row (joined all goes on from the end of each row to the start of the next, so the whole grid is one chain), and join="{this}.out -> {below}.in" writes a link of your own for each ({next} in the row, {below} under it, {after} by number). Link to a copy by its name (tank -> c7, c3.motor). One line makes at most 500 copies, and the copies are kept side by side, gap apart (joined ones at least 40, room for their arrows), however big each is drawn. In the editor, Repeat in a placement's strip writes the line, and the handle at the end of the row adds copies or takes them away. More keep rules: keep b right-of a gap=30, keep b below a, keep a beside b, keep a inside g (a is in group g wherever it is written), alongside in-a-row, in-a-column and same-size; where two rules want the same thing, the earlier line wins and the later one is named as the problem.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-flow on in preferences.self).

Syntax
block  ``` flow ... ```  -> flow  verbatim
A small system
selfscribe
~~~ selfscribe
block  ``` flow ... ```  -> flow  verbatim
~~~
```flow
set direction=LR
node web "Web app" :person
node api "API" :service
node db "Orders" :database
web -> api "HTTPS" moving
api -> db
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

trail plugin

#

What happens, step by step, down the page or across it: branches indented, who does it or a time lined up beside each step, ticked as a reader goes.

A client plugin with no library behind it. One step a line, joined down a line with a dot each. Indent a line to put it on a branch of the step above; yes: or no: at its start names the branch, and a step that ends in ? is drawn as a decision. Everything after a | is a side column (who does it, a time, a note): the columns line up across the steps, each only as wide as its widest entry. [x], [>], [ ] and [!] at the start of a step mark it done, now, to do and failed.

With lanes: Customer, Shop, Bank as its first line it draws messages between parties: Customer -> Shop: what is sent, with --> for a reply. Without the plugin the block is its own text, which already reads as an indented list.

A line across (or horizontal) before the first step lays the steps left to right, wrapping to more rows; a branch is listed under its step and the side columns become small lines under each step. Below about 520 pixels wide it goes back down the page; lanes always go down the page. Click a step, or press Enter or Space on it, to tick it done: the tick lasts while the page is open, is never written into the document, and does not print.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-trail on in preferences.self).

Syntax
block  ``` trail ... ```  -> trail  verbatim
An online order, step by step
selfscribe
~~~ selfscribe
block  ``` trail ... ```  -> trail  verbatim
~~~
```trail
Basket checked out | customer
Card accepted? | card issuer
  yes: Order number sent by email | shop
  no: Ask for another card
Packed at the warehouse | | same day
Handed to the courier | warehouse team | ≤4h
Left at the door | courier | 1 day
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

anatomy plugin

#

A line or a few taken apart: a command, an address or a piece of code with each part underlined in its own colour and named below it.

A client plugin with no library behind it. The first line is the thing itself. Each line after it is part: name | note: the part is found in the first line as written (the next place it occurs, so a part that occurs twice is named in order), underlined in its own colour, and labelled below with a line joining the two. The labels step down from right to left, so no line crosses another.

Put a part in backticks when it holds a colon and a space. A # Title line first is a caption. Point at a part or its label to light the pair. Without the plugin the block is its own text.

For several lines, such as a short piece of code, end them with a line ---: every line above it is the thing, kept as indented, and the parts below it are found through those lines in order. Each line's labels sit under that line, and the lines below move down to make room.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-anatomy on in preferences.self).

Syntax
block  ``` anatomy ... ```  -> anatomy  verbatim
A web address
selfscribe
~~~ selfscribe
block  ``` anatomy ... ```  -> anatomy  verbatim
~~~
```anatomy
https://shop.example.com:8443/orders/42?expand=items
https: scheme | how to talk to it
shop.example.com: host | which machine
8443: port | which door on it
/orders/42: path | which thing
expand=items: query | how you want it
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

layers plugin

#

A stack from the top, one layer a line: its name, what lives in it and a note. Stacks side by side, a path through them, or a pyramid.

A client plugin with no library behind it. Each line is Name | things, in, it | note, drawn as a band in its own colour with the things as small tags. > before a name lights that layer, and a line that says pyramid draws the stack narrowing to its top. A # Title line first is a caption.

A line that is a name and a colon alone (Laptop:) starts a stack drawn beside the one before, bottoms level. path Request: Application > Transport > Link draws a journey through the layers named, with an arrowhead at each and the name in a key below. With stacks side by side it goes down the first and crosses to the next where it turns upward or names a layer twice (Link > Link); path Reply: Server Application > ... starts in the stack named. A layer it cannot find is said in words.

Without the plugin the block is its own text, which already reads as a list from the top.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-layers on in preferences.self).

Syntax
block  ``` layers ... ```  -> layers  verbatim
How a page reaches you
selfscribe
~~~ selfscribe
block  ``` layers ... ```  -> layers  verbatim
~~~
```layers
Application | HTTP, DNS, TLS | what programs say to each other
Transport | TCP, UDP | getting it there whole
> Internet | IP | finding the machine
Link | Ethernet, Wi-Fi | the next hop
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

nest plugin

#

What is inside what: an indented outline drawn as boxes inside boxes.

A client plugin with no library behind it. Indent a line to put it inside the line above. A thing that holds others is a box with its name on top and its contents side by side; a thing that holds nothing is a tile. Everything after | is a small note. The outermost boxes each take a colour, and contents wrap where the page ends.

Without the plugin the block is its own text: an indented list.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-nest on in preferences.self).

Syntax
block  ``` nest ... ```  -> nest  verbatim
Where your code runs
selfscribe
~~~ selfscribe
block  ``` nest ... ```  -> nest  verbatim
~~~
```nest
Your laptop
  Browser
    Tab | your page
    Extension
  Editor
The data centre
  Load balancer
  App servers | three of them
  Database
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

scale plugin

#

Amounts placed along one measure, so a nanosecond and a second, or a village and a city, can be seen against each other.

A client plugin with no library behind it. Each line is What: amount, drawn as a row with a dot where the amount falls. Units of one kind are brought to one measure: times (ns us ms s min h d y), sizes (B KB MB GB TB), lengths (nm um mm cm m km) and weights (mg g kg t); 3k, 2M and 1bn are thousands, millions and billions; any other unit works when every line uses the same one.

When the largest is a thousand times the smallest, each step along the line is ten times the one before; a line that says log or linear chooses. > before a name lights its row. A # Title line first is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-scale on in preferences.self).

Syntax
block  ``` scale ... ```  -> scale  verbatim
How long things take
selfscribe
~~~ selfscribe
block  ``` scale ... ```  -> scale  verbatim
~~~
```scale
Read from memory: 100 ns
Read from an SSD: 150 us
Round trip in a data centre: 0.5 ms
> A disk seek: 10 ms
Packet to another continent and back: 150 ms
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

versus plugin

#

Two or more choices side by side, point by point, with strengths and weaknesses marked and a verdict under them.

A client plugin with no library behind it. The first line names the choices, each after a bar (| This | That); * before one marks the one chosen and tints its column. Each line after is Point: first | second. A cell that starts with + is a strength, - a weakness and ~ in between; yes and no alone count as + and -. A line that starts => is the verdict.

Without the plugin the block is its own text, which reads as a list of points.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-versus on in preferences.self).

Syntax
block  ``` versus ... ```  -> versus  verbatim
Where to keep the data
selfscribe
~~~ selfscribe
block  ``` versus ... ```  -> versus  verbatim
~~~
```versus
| A server database | *One file | Plain files
Setup: - a server to run | + nothing | + nothing
Many writers at once: + yes | ~ one at a time | - no
Backups: a dump or a replica | copy the file | copy the folder
=> One file: the app has one writer, and a backup is a copy.
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

bits plugin

#

The fields of a packet header, file format or record, drawn as a ruled strip with the bit or byte numbers above.

Write Name: width, one field a line: Version: 4, Length: 2 bytes. A line that says bytes counts in bytes, and row 16 sets how many go in a row. A field that runs past the end of a row carries on in the next, and variable fills the rest of a row.

Add | note for a small note under the name and put > before a name to light it. Narrow fields get a letter, named in a key under the strip.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-bits on in preferences.self).

Syntax
block  ``` bits ... ```  -> bits  verbatim
The IPv4 header
selfscribe
~~~ selfscribe
block  ``` bits ... ```  -> bits  verbatim
~~~
```bits
# IPv4 header
Version: 4
IHL: 4 | header length in words
Type of service: 8
Total length: 16
Identification: 16
Flags: 3
Fragment offset: 13
> Time to live: 8
Protocol: 8
Header checksum: 16
Source address: 32
Destination address: 32
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

split plugin

#

One whole divided into named shares, drawn as a single bar with a legend of amounts and percentages.

Write Name: amount, one share a line, and each gets its share of one bar. Write 35% to make a share that much of the whole, and a line of 2400 to state the whole: what is not filled is shown as what is left.

Put > before a name to light that share, and add | note for a small note.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-split on in preferences.self).

Syntax
block  ``` split ... ```  -> split  verbatim
Where the month's pay goes
selfscribe
~~~ selfscribe
block  ``` split ... ```  -> split  verbatim
~~~
```split
# Where the pay goes
Rent: £900
Food: £320
> Travel: £140 | season ticket
Bills: £180
Savings: £400
of £2,400
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

budget plugin

#

Parts laid end to end against a limit, with what is left, or what is over and by how much.

Write the limit first, as limit: 200 ms, then Part: amount a line. The parts fill a track as wide as the limit; what is left is said, and what goes past the limit is drawn in red with how much it is over.

Amounts of one kind may mix units (ms and s, kg and lb), and 20% is that much of the limit. Put > before a name to light it, and add | note for a small note.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-budget on in preferences.self).

Syntax
block  ``` budget ... ```  -> budget  verbatim
A web page's time budget
selfscribe
~~~ selfscribe
block  ``` budget ... ```  -> budget  verbatim
~~~
```budget
# Loading the page on a phone
limit: 1 s
DNS lookup: 60 ms
Connect and TLS: 180 ms
> Server: 320 ms
Download: 240 ms
Render: 150 ms
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

range plugin

#

Values against their bands, such as a blood test against the normal range, with the band each falls in named and coloured.

Write Measure: value | band | band, as Potassium: 5.9 | low < 3.5 | normal 3.5 to 5.1 | high > 5.1. Each measure gets a banded track with a pin at the value, and the band it falls in is named beside it.

Put +, ~ or - and a space before a band to mark it good, a warning or bad; otherwise the middle band is good and the outer ones are warnings. A last cell that is not a band is a note, and > before a name lights that row.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-range on in preferences.self).

Syntax
block  ``` range ... ```  -> range  verbatim
A blood test
selfscribe
~~~ selfscribe
block  ``` range ... ```  -> range  verbatim
~~~
```range
# Blood test, 3 March
Potassium: 5.9 mmol/L | low < 3.5 | normal 3.5 to 5.1 | high > 5.1
Sodium: 139 mmol/L | low < 135 | normal 135 to 145 | high > 145
> Glucose, fasting: 6.4 mmol/L | normal 3.9 to 5.5 | ~ raised 5.6 to 6.9 | - diabetic > 7 | before breakfast
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

ledger plugin

#

Double-entry bookkeeping: journal entries posted to T-accounts, with totals, balances and a check that the books balance.

Write one entry a line, as Buy stock: Stock 500 / Cash 500: the debit before the slash, the credit after it. Join accounts on one side with +, and leave the amount off one account to take the other side's total.

Each account becomes a T with its debits left and credits right, every amount numbered by its entry. The line under the Ts says whether the books balance; put > before an entry to light it, and add | note for a small note.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-ledger on in preferences.self).

Syntax
block  ``` ledger ... ```  -> ledger  verbatim
A bakery's first week
selfscribe
~~~ selfscribe
block  ``` ledger ... ```  -> ledger  verbatim
~~~
```ledger
# The bakery's first week
Owner puts in cash: Cash £5,000 / Capital £5,000
Buy an oven: Equipment 2,400 / Cash 2,400
Buy flour on credit: Stock 300 / Suppliers 300 | invoice 117
> Sell bread for cash: Cash 450 / Sales 450
Pay the flour bill: Suppliers 300 / Cash 300
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

waterfall plugin

#

Where an amount starts, the steps that raise or lower it, and where it ends, each step floating from the last.

Write Name: amount one a line. The first is the start; after it, -640 is a fall and +150 a rise, each bar floating from where the last ended. A line = Name is a total at the sum so far, and = Name: 3,190 checks it.

Put > before a name to light it, add | note for a small note, and end with => for a conclusion. A line that says costs draws a fall as good news and a rise as bad. A # Title line first is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-waterfall on in preferences.self).

Syntax
block  ``` waterfall ... ```  -> waterfall  verbatim
From salary to take-home pay
selfscribe
~~~ selfscribe
block  ``` waterfall ... ```  -> waterfall  verbatim
~~~
```waterfall
# From salary to take-home
Salary: £4,200
Income tax: -640
National insurance: -310
Pension: -210 | 5% of pay
Bonus: +150
= Take-home
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

funnel plugin

#

How many are left at each stage, drawn as centred bars narrowing down, with the share that went on from one stage to the next.

Write Stage: how many one a line, from the first stage to the last. Each stage is a centred bar, and between two stages a band says what share went on, such as 15% went on. From the third stage on, each also says its share of the first.

Put > before a name to light it, add | note for a small note, and end with => for a conclusion. A # Title line first is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-funnel on in preferences.self).

Syntax
block  ``` funnel ... ```  -> funnel  verbatim
From visit to paying customer
selfscribe
~~~ selfscribe
block  ``` funnel ... ```  -> funnel  verbatim
~~~
```funnel
# From visit to paying customer
Visited the site: 12,000
Signed up: 1,800
> Started a trial: 950 | the week we changed the welcome email
Paid: 240
=> Most people leave before signing up, so the front page comes first.
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

through plugin

#

Where an amount comes from and where it goes, drawn as bands as wide as the amount that joins one thing to the next.

Write From -> To: amount one a line. Each thing is a bar as tall as what passes through it, and each flow a band as wide as its amount. A -> B -> C: 2 sends the same amount along each step.

Put > before a line to light its band and end with => for a conclusion. A flow that loops back to where it started is left out and named. A # Title line first is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-through on in preferences.self).

Syntax
block  ``` through ... ```  -> through  verbatim
Where the month's money goes
selfscribe
~~~ selfscribe
block  ``` through ... ```  -> through  verbatim
~~~
```through
# Where the month's money goes
Salary -> Rent: £900
Salary -> Food: 320
Salary -> Savings: 300
Freelance -> Savings: 400
> Savings -> Holiday: 250
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

arc plugin

#

One smooth curve over named beats, for the shape of something that rises and falls: a story, a season, a week of training.

Write Beat: height one a line, in order. A smooth curve runs through a dot on every beat, scaled from the lowest height to the highest, and each beat is named under the line.

Put > before a name to light it, add | note for a small note under the name, and end with => for a conclusion. A # Title line first is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-arc on in preferences.self).

Syntax
block  ``` arc ... ```  -> arc  verbatim
The shape of a story
selfscribe
~~~ selfscribe
block  ``` arc ... ```  -> arc  verbatim
~~~
```arc
# The shape of the story
Ordinary world: 2
The call: 4
Trials: 6
> The ordeal: 9 | the darkest hour
The road back: 5
Home, changed: 3
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

quadrant plugin

#

Things placed on two axes in a square split into four named corners, such as effort against impact.

Write one thing a line as Name: across, up, each from 0 to 10, as in Dark mode: 2, 8. Percentages (30%, 80%) and the words low, mid and high work too. across: Effort | low | high and up: Impact | low | high name the axes and their ends, and corners: Quick wins | Big bets | Fill-ins | Money pits names the quarters from top left to bottom right.

Put > before a name to light that thing. A line the block cannot place is named under the plot, and the rest is still drawn.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-quadrant on in preferences.self).

Syntax
block  ``` quadrant ... ```  -> quadrant  verbatim
What to build next
selfscribe
~~~ selfscribe
block  ``` quadrant ... ```  -> quadrant  verbatim
~~~
```quadrant
# What to build next
across: Effort | low | high
up: Impact | low | high
corners: Quick wins | Big bets | Fill-ins | Money pits
Dark mode: 2, 8
Offline sync: 9, 9
> New onboarding: 4, 7
Export to PDF: 3, 4
A new billing system: 8, 2
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

rubric plugin

#

Criteria against levels in a grid, with the level that applies lit in each row and a count or score under it.

Name the levels on the first line, each after a bar: | Starting | Getting there | Secure | Beyond. Then write Criterion: level one | level two | level three | level four, and put * before the cell that applies, as in * a point carried through.

Give each level a number, as in | Starting 1 | Secure 3, and the line under the grid adds up a score. Put > before a criterion to light its row.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-rubric on in preferences.self).

Syntax
block  ``` rubric ... ```  -> rubric  verbatim
Marking an essay
selfscribe
~~~ selfscribe
block  ``` rubric ... ```  -> rubric  verbatim
~~~
```rubric
# Year 9 essay: Sam
| Starting | Getting there | Secure | Beyond
Argument: no clear point | a point, stated once | * a point carried through | answers the other side
Evidence: none | one example | * quotes that fit | quotes weighed against each other
Writing: hard to follow | * clear in places | clear throughout | a voice of its own
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

who plugin

#

Tasks against people with each person's part as a lettered badge, flagging tasks no one does or two people sign off.

Name the people on the first line, each after a bar: | Ana | Ben | Chloe. Then write Task: R | A | C, or more readably Task: does | signs off | told, one cell a person. asked (or C) is someone consulted before, and told (or I) someone informed after. A dash or an empty cell is no part.

A cell that starts with a name, as in Ben signs off, goes to that person. A task that no one does, or that two people sign off, is flagged under its name.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-who on in preferences.self).

Syntax
block  ``` who ... ```  -> who  verbatim
Launching a new menu
selfscribe
~~~ selfscribe
block  ``` who ... ```  -> who  verbatim
~~~
```who
# Launching the spring menu
| Ana | Ben | Chloe | Dev
Write the dishes: does | signs off | asked | told
Price the menu: asked | does, signs off | - | told
Order the produce: told | signs off | does | -
> Print the menu cards: - | signs off | told | does
Train the floor staff: does | told | asked | does
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

cases plugin

#

Which conditions lead to which outcome, one numbered case a row, with yes and no drawn as ticks and crosses.

Name the conditions on the first line, each after a bar, and the outcome after =>: | Member | Order over £40 | => Delivery. Then write one case a line, as in yes | any | free. yes and no become a tick and a cross, and any or - a quiet dash.

A case with too few or too many cells is named under the table, and so are two cases with the same conditions but different outcomes.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-cases on in preferences.self).

Syntax
block  ``` cases ... ```  -> cases  verbatim
Free delivery
selfscribe
~~~ selfscribe
block  ``` cases ... ```  -> cases  verbatim
~~~
```cases
# Who gets free delivery
| Member | Order over £40 | => Delivery
yes | any | free
no | yes | free
no | no | £3.50
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

cross plugin

#

Two parents' genes crossed in a Punnett square, with each child's genes and the share that shows each trait.

Write each parent as Mother: Bb, two letters a gene with the capital dominant, and name what a letter gives with B: brown eyes. Two genes, as in RrYy, give a 4 by 4 square. Bb x Bb on one line gives both parents.

Under the square each outcome is listed with its share, as 3 in 4 brown eyes, then the genotype ratio. Put > before a trait line to light the children that show it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-cross on in preferences.self).

Syntax
block  ``` cross ... ```  -> cross  verbatim
Eye colour
selfscribe
~~~ selfscribe
block  ``` cross ... ```  -> cross  verbatim
~~~
```cross
# Eye colour
Mother: Bb
Father: Bb
B: brown eyes
b: blue eyes
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

spans plugin

#

Things that last, such as reigns, lifetimes, leases or project phases, laid over one time line so overlaps show.

Write Name: 1837 to 1901, one thing a line, and each gets a bar on one shared time line. Dates can be years, months (2024-03, Mar 2024) or days (15 Mar 2024), and now ends a thing today. A line with one date is a moment, drawn as a diamond.

End a line with a colon and indent the lines under it to group them under a heading. > before a name lights it, | adds a note, and # Title on the first line is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-spans on in preferences.self).

Syntax
block  ``` spans ... ```  -> spans  verbatim
Who was on the throne
selfscribe
~~~ selfscribe
block  ``` spans ... ```  -> spans  verbatim
~~~
```spans
# Who was on the throne
Victoria: 1837 to 1901
Edward VII: 1901 to 1910
George V: 1910 to 1936
Edward VIII: 1936
George VI: 1936 to 1952
> Elizabeth II: 1952 to 2022
Charles III: 2022 to now
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

seasons plugin

#

What happens in which months: sowing and harvest, a financial calendar, a busy season, as rows across twelve months.

Write Harvest: Jul to Oct, one thing a line, and each gets a row across twelve months with its months filled. A range may wrap the year end (Nov to Feb), several go with commas (Mar to Apr, Sep), and all year fills the row.

| adds a note at the row's end and > before a name lights it. A line that says from Apr starts the year at April. # Title on the first line is a caption.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-seasons on in preferences.self).

Syntax
block  ``` seasons ... ```  -> seasons  verbatim
Growing tomatoes
selfscribe
~~~ selfscribe
block  ``` seasons ... ```  -> seasons  verbatim
~~~
```seasons
# Tomatoes
Sow indoors: Feb to Apr
Plant out: May to Jun
> Harvest: Jul to Oct | earlier under glass
Feed weekly: Jun to Sep
Clear the beds: Nov
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

hours plugin

#

A day as a ring: shifts, sleep, medicine or a routine as arcs on a 24-hour dial, with how long each lasts.

Write Sleep: 23:00 to 07:00, one thing a line, and each becomes an arc on a 24-hour dial with midnight at the top. A time alone, or several with commas (Pills: 08:00, 20:00), are dots. Things that overlap sit on separate rings, and the legend says how long each lasts.

A line that says 12 hours draws a twelve-hour face. Name days (Work: Mon to Fri 09:00 to 17:30) or write week to get seven rows instead. > lights a thing and | adds a note.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-hours on in preferences.self).

Syntax
block  ``` hours ... ```  -> hours  verbatim
A nurse's day
selfscribe
~~~ selfscribe
block  ``` hours ... ```  -> hours  verbatim
~~~
```hours
# A nurse on days
Sleep: 22:30 to 06:30
> Shift: 07:00 to 19:30
Break: 12:00 to 12:45
Pills: 8am, 8pm | with food
Walk the dog: 20:00 to 20:30
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

timezones plugin

#

One moment in several places, for a meeting or a handover: each place's local time, its day, and whether it is working hours, evening or night.

The line with a time is the moment: Tuesday 3 March 2026, 15:00 London, or 17:00 Berlin for today. Other lines name the places, separated by commas: cities, countries with one clock, short names such as ET, or zones such as Europe/Lisbon. Each place gets a row with its local time, +1 when it is the next day, and whether that is working hours, evening or night, with a strip of the day around it. The reader's own time zone comes last.

hours 8-18 sets the working hours and 12-hour writes 3:00 pm. > before a place lights its row, and a # Title line first is a caption. Summer time is right for the date written, from the browser's own data.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-timezones on in preferences.self).

Syntax
block  ``` timezones ... ```  -> timezones  verbatim
A call across the world
selfscribe
~~~ selfscribe
block  ``` timezones ... ```  -> timezones  verbatim
~~~
```timezones
Tuesday 3 March 2026, 15:00 London
New York, Toronto, São Paulo, Lagos, Delhi, Sydney
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

loop plugin

#

A cycle that comes back to its start, such as the water cycle or plan, do, check, act, or a cause loop that grows or settles.

Write one stage a line, Name | note, and they go round a ring clockwise from the top, the last leading back to the first. The # Title sits in the middle, or write centre: words to put something else there. > before a name lights it.

For a cause loop write links such as More roads -> more driving +, with + or - at the end. Each arrow gets its sign, and the middle says whether the loop reinforces itself (an even number of -) or balances itself (an odd number).

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-loop on in preferences.self).

Syntax
block  ``` loop ... ```  -> loop  verbatim
The water cycle
selfscribe
~~~ selfscribe
block  ``` loop ... ```  -> loop  verbatim
~~~
```loop
# The water cycle
Evaporation | the sun lifts water from the sea
Condensation | it cools into cloud
> Rain | it falls on the hills
Run-off | rivers carry it back to the sea
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

formula plugin

#

A formula with each name given a value, worked out on the page, with a field for each value to try others.

Write the formula as revenue = visitors × conversion × price, then one value a line as visitors: 12,000 | people a month. Amounts can be 2.5%, £40 or 12k, and a later formula can use an earlier result: profit = revenue - costs.

Each value gets a field: change it and the result is worked out again, without touching the text. As written puts the values back. Put > before a name to light it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-formula on in preferences.self).

Syntax
block  ``` formula ... ```  -> formula  verbatim
A month at the shop
selfscribe
~~~ selfscribe
block  ``` formula ... ```  -> formula  verbatim
~~~
```formula
# What the shop takes in a month
revenue = visitors × conversion × price
visitors: 12,000 | people a month
conversion: 2.5% | of visitors buy
price: £40 | the average order
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

odds plugin

#

Choices, what may happen on each with its chance and payoff, and what each choice is worth on average.

Write each choice at the left and what may happen under it, indented, as Sells well 30%: +400k. A chance can be 30%, 0.3 or 3 in 10, and one outcome with no chance takes what the others leave. Outcomes can have outcomes of their own under them.

Each choice shows what it is worth on average, and the best is marked and named underneath. Chances that do not add up to 100% are named in plain words. Do nothing: 0 is a sure payoff, and a line starting => is your own verdict.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-odds on in preferences.self).

Syntax
block  ``` odds ... ```  -> odds  verbatim
Launch the cider now or wait
selfscribe
~~~ selfscribe
block  ``` odds ... ```  -> odds  verbatim
~~~
```odds
# Launch the cider now, or wait a year
Launch now
  Sells well 30%: +400k
  Sells poorly 70%: -100k
Wait a year
  Sells well 60%: +250k
  Sells poorly: -50k
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

argument plugin

#

A claim with the reasons for it and against it, the answers to each, and what follows, in two columns.

Write the claim first, then because: for a reason for it, but: for a reason against and so: for what follows. +, - and => work too, and a note goes after |.

Indent a line under a reason to answer it: however: sets it against the reason, because: backs it up. Each column counts the reasons that still stand unanswered.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-argument on in preferences.self).

Syntax
block  ``` argument ... ```  -> argument  verbatim
Moving a launch
selfscribe
~~~ selfscribe
block  ``` argument ... ```  -> argument  verbatim
~~~
```argument
# Should the launch move?
We should move the launch to May
because: The payments work will not be done in April | two engineers are out
because: May has the trade fair
but: Marketing has booked April
  however: the booking can be moved for £2k
so: Move it, and pay the fee
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

causes plugin

#

One effect and its causes in groups, drawn as a fishbone with a bone for each group.

Write the effect first, then one group a line as People: new starters not trained, one packer on Mondays. A group's name can stand alone with its causes indented under it, one a line, and ; splits a line whose causes have commas.

It is drawn as a fishbone with the effect at the right. With more than six groups or long causes it becomes cards around the effect, and on a phone it is always cards. Put > before a group or a cause to light it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-causes on in preferences.self).

Syntax
block  ``` causes ... ```  -> causes  verbatim
Why orders ship late
selfscribe
~~~ selfscribe
block  ``` causes ... ```  -> causes  verbatim
~~~
```causes
# Why orders ship late
Orders ship late
People: new starters not trained, one packer on Mondays
Process: orders printed twice a day
Supplier: boxes arrive Thursday
Systems: stock count wrong
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

truth plugin

#

A truth table worked out from a logic expression, with a row for every way its inputs can be.

Write a logic expression a line, as alarm = door and not key or A and (B or not C). and or not xor, && || !, ∧ ∨ ¬, -> and <-> work, and the other names are the inputs, up to six.

Each expression gets a result column. A line steps adds a column for each bracketed part and a line bits writes 1 and 0. Under the table it says in how many rows each is true, and which agree in every row.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-truth on in preferences.self).

Syntax
block  ``` truth ... ```  -> truth  verbatim
When the alarm sounds
selfscribe
~~~ selfscribe
block  ``` truth ... ```  -> truth  verbatim
~~~
```truth
# When the alarm sounds
alarm = door and not key
siren = alarm or test
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

bracket plugin

#

A knockout tournament drawn round by round, each match joined to the next, with the champion at the end.

Write a round's name, then one match a line under it: Ravens 3 - 1 Otters, or Swifts v Stoats when not yet played. A round left empty, such as a lone Final, is filled in from the winners, and a side not yet known shows as winner of Swifts v Stoats. A draw needs a note naming who went through: Swifts 1 - 1 Badgers | Swifts on penalties.

Put > before a team's name to follow it through the bracket. Each round needs half the matches of the one before it. A wide bracket scrolls sideways inside its frame.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-bracket on in preferences.self).

Syntax
block  ``` bracket ... ```  -> bracket  verbatim
A five-a-side cup
selfscribe
~~~ selfscribe
block  ``` bracket ... ```  -> bracket  verbatim
~~~
```bracket
# Spring cup
Quarter-finals
Ravens 3 - 1 Otters
Herons 0 - 2 Foxes
Swifts 1 - 1 Badgers | Swifts on penalties
Stoats 2 - 0 Wrens
Semi-finals
Ravens 1 - 2 > Foxes
Swifts v Stoats
Final
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

league plugin

#

A league or group table worked out from the results: points, goals and form for each team, and the matches still to play.

Write one match a line: Ravens 3 - 1 Otters once played, Herons - Ravens or Herons v Ravens before, with a note after a bar if you like (| 4 Dec). The table works out played, won, drawn, lost, goals, the difference, points and the last five results, and lists the matches still to play under it.

points 3 1 0 sets the points for a win, a draw and a loss. top 2 marks the places that go through and bottom 1 the places that go down. Level teams are split by goal difference, goals for, the matches between them and then their names. Write tie-break head-to-head, goal difference to change the order. A # line starts a group, and > before a team lights its row.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-league on in preferences.self).

Syntax
block  ``` league ... ```  -> league  verbatim
A five-a-side league
selfscribe
~~~ selfscribe
block  ``` league ... ```  -> league  verbatim
~~~
```league
# Thursday five-a-side
Ravens 3 - 1 Otters
Foxes 2 - 2 Herons
Ravens 1 - 0 Foxes
Otters 4 - 2 > Herons
Herons - Ravens | 4 Dec
Otters - Foxes | 4 Dec
top 2
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

family plugin

#

A family tree drawn top down: couples side by side, each generation in a row under its parents.

Write one person or couple a line, as Jean (1946) + Tom, and indent their children under them. Details go in brackets after a name. > before a name lights that person, and a name ending in † or details like (1921 to 2004) show someone who has died.

A line that says pedigree draws squares for (m), circles for (f) and fills those marked *. Someone who married twice is written twice, once with each partner; the second card has a dashed edge. A wide tree scrolls sideways inside its frame.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-family on in preferences.self).

Syntax
block  ``` family ... ```  -> family  verbatim
Three generations of a family
selfscribe
~~~ selfscribe
block  ``` family ... ```  -> family  verbatim
~~~
```family
# The Hendersons
Margaret (1921 to 2004) + Arthur (1919 to 1988)
  Jean (1946) + Tom
    Sarah (1972)
    > David (1975) + Priya
      Anil (2003)
  Robert (1949)
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

railroad plugin

#

A command's syntax or a grammar drawn as a track: follow it from left to right, taking any branch or loop.

Write a command as a manual prints it, as git commit [-a] [-m <message>], or one grammar rule a line, as digits = digit { digit }. Words sit in rounded boxes; <name> or the name of another rule sits in a square box.

[ ] may be left out, { } or * repeat any number of times, ... or + repeat once or more, a | b is a choice and ( ) groups. A line that will not read says where, and a wide track scrolls sideways inside its frame.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-railroad on in preferences.self).

Syntax
block  ``` railroad ... ```  -> railroad  verbatim
A command and its options
selfscribe
~~~ selfscribe
block  ``` railroad ... ```  -> railroad  verbatim
~~~
```railroad
git commit [-a] [-m <message>] [<file>...]
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

formation plugin

#

Players placed on a pitch or court, line by line from the goal to the front, numbered and named.

Name the sport and the shape on the first line, as football 4-3-3, then one line of players a line from the goalkeeper forwards, split by bars: 8 Nakata | 4 Silva | 10 Rowe. Football, basketball and hockey have their markings drawn; other sports use a plain ground.

> before a player lights them. A line against Rovers 4-4-2 starts the other side, drawn in the other half. The pitch stands upright with your goal at the bottom, on a phone and on a page alike.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-formation on in preferences.self).

Syntax
block  ``` formation ... ```  -> formation  verbatim
A Sunday league side
selfscribe
~~~ selfscribe
block  ``` formation ... ```  -> formation  verbatim
~~~
```formation
# How we line up
football 4-3-3
1 Okafor
2 Lindqvist | 3 Marsh | 5 Adeyemi | 6 Barros
8 Nakata | 4 Silva | 10 Rowe
7 Ito | > 9 Hartmann | 11 Diallo
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

cover plugin

#

The title block at the head of a report or proposal: title, subtitle, details such as author, date and version, and a marking.

The first line is the title and a second line with no colon is the subtitle. Then Label: value lines are the details: Prepared by: Okafor & Lind, Date: 3 March 2026, Version: 1.2 | draft for comment. A short line such as Confidential or Draft for comment is a marking, shown as a small ruled label.

A line that says centred makes a title page, which in print takes the whole first page. A line that says banner sets the title on a tinted band with the details in a row beneath.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-cover on in preferences.self).

Syntax
block  ``` cover ... ```  -> cover  verbatim
A proposal
selfscribe
~~~ selfscribe
block  ``` cover ... ```  -> cover  verbatim
~~~
```cover
Harbour footbridge
A proposal for the Harbour Trust
Prepared by: Okafor & Lind
Date: 3 March 2026
Version: 1.2 | draft for comment
Reference: HT-2026-014
Confidential
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

facts plugin

#

A panel of key facts, labels beside values, like the box at the side of an encyclopaedia page or atop a proposal.

Write one fact a line, Client: Harbour Trust, with | note after a value for a small note. A line with no colon, such as Team, is a heading for the facts under it. The # Title line is the panel's head, and > before a label lights that fact.

A line across lays the facts out as a strip of label-over-value cells for the top of a page. A line aside makes the panel narrow and sets it to the right of the text on a wide page.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-facts on in preferences.self).

Syntax
block  ``` facts ... ```  -> facts  verbatim
A bridge project at a glance
selfscribe
~~~ selfscribe
block  ``` facts ... ```  -> facts  verbatim
~~~
```facts
# Harbour footbridge
Client: Harbour Trust
Location: Old Quay, Port Maren
> Value: £1.8M
Start: March 2026
Finish: November 2026 | weather permitting
Team
Engineer: Okafor & Lind
Contractor: Bexley Civil
Project lead: Sara Quinn, sara.quinn@harbourtrust.example
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

stats plugin

#

A few headline numbers as tiles, each with how it moved since last time and a small line of where it has been.

Write Name: value one a line, and after it | +12% for a change, | 3 4 6 5 8 for a trend and | note for a note, in any order. A rise is green and a fall red; write -0.4 good when a fall is the good news.

Put > before a name to light its tile. A # Title line first is a caption, and a line => is a conclusion under the tiles.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-stats on in preferences.self).

Syntax
block  ``` stats ... ```  -> stats  verbatim
A quarter in four numbers
selfscribe
~~~ selfscribe
block  ``` stats ... ```  -> stats  verbatim
~~~
```stats
# The quarter in four numbers
Revenue: £1.24M | +12% | against last quarter | 0.98 1.05 1.11 1.24
New customers: 318 | +41
Churn: 2.1% | -0.4 good | lower is better
> Cash in the bank: £860k | 14 months of runway
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

status plugin

#

Workstreams marked red, amber or green, with a trend, what is going on and who owns each, under a bar counting each state.

Write Workstream: state | what is going on | owner one a line. A state is green, amber or red (or on track, at risk, off track), done, not started or paused, and after a comma a trend: improving, slipping or steady.

A bar above the rows counts each state. A bare line worst first puts red at the top, > before a name lights its row, and a line => is a conclusion.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-status on in preferences.self).

Syntax
block  ``` status ... ```  -> status  verbatim
A programme in week 12
selfscribe
~~~ selfscribe
block  ``` status ... ```  -> status  verbatim
~~~
```status
# Programme status, week 12
Payments: green | on track for the March release | Ana
Mobile app: amber, slipping | two weeks behind after the design change | Ben
Data migration: red | blocked on the supplier's export | Chloe
Training: green, improving | first sessions done
Website: done
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

okr plugin

#

Objectives with the key results that measure them, each with a bar showing how far along it is, and the average for each objective.

Write an objective with no indent and its key results indented under it as Name: progress. Progress is 140 of 300, 7/10, 65%, 0.7, done or not started, and a result that counts down is from 40 to 10, now 12.

A result at its target is done and one under 30% is at risk. Each objective shows its average, and the whole block an overall figure. Add | note to any line, > before a line to light it, and => for a conclusion.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-okr on in preferences.self).

Syntax
block  ``` okr ... ```  -> okr  verbatim
A software team's quarter
selfscribe
~~~ selfscribe
block  ``` okr ... ```  -> okr  verbatim
~~~
```okr
# Goals for the spring quarter
Make sign-up effortless
  Time to sign up: from 3 min to 1 min, now 1.4 min
  Completion rate: 61% of 75%
  Support tickets about sign-up: from 40 to 10, now 12
Grow in Germany
  Paying customers: 140 of 300
  German help pages: 22/30
  Local payment methods: not started | waiting on the bank
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

score plugin

#

Options scored against criteria that matter differently, with each option's weighted total and the top one marked.

Name the options on the first line, each after a bar: | Northgate | Harrow & Co | Bexley. Then write Criterion (weight 3): 4 | 3 | 5 one a line; x3 and [3] also give a weight, and no weight counts once. A bare line out of 5 sets the scale.

The total row gives each option's weighted sum and its share of the most possible, and the top column is tinted. Put * before the option chosen, > before a criterion to light it, and end with => for the conclusion.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-score on in preferences.self).

Syntax
block  ``` score ... ```  -> score  verbatim
Choosing a supplier
selfscribe
~~~ selfscribe
block  ``` score ... ```  -> score  verbatim
~~~
```score
# Which supplier
| Northgate | Harrow & Co | Bexley
Price (weight 3): 4 | 3 | 5
Quality (weight 5): 5 | 4 | 3
Delivery time (weight 2): 3 | 5 | 4
Support: 4 | 4 | 2
=> Northgate: the best quality, at a fair price.
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

risks plugin

#

A risk register with its heat map: how likely each risk is, how bad it would be, what is being done and who owns it.

Write one risk a line as Risk: likelihood, impact | what is being done | owner, as in Flooding in March: likely, severe | pumps on site | Ana. Likelihood runs rare, unlikely, possible, likely, almost certain; impact runs negligible, minor, moderate, major, severe; low, medium, high and the numbers 1 to 5 work for either. Add -> unlikely, major for where the risk stands after the work, and its dot moves there with an arrow.

The grid is banded by score (likelihood times impact) and the register is sorted highest first; a line as written keeps your order and a line 3 by 3 uses a three-step grid. Put > before a risk to light it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-risks on in preferences.self).

Syntax
block  ``` risks ... ```  -> risks  verbatim
Risks to the bridge works
selfscribe
~~~ selfscribe
block  ``` risks ... ```  -> risks  verbatim
~~~
```risks
# Risks to the bridge works
Flooding in March: likely, severe | pumps on site from February | Ana
Steel arrives late: possible, major -> unlikely, major | second supplier agreed | Ben
Crane failure: rare, severe | weekly inspection | Ben
Complaints about the road closure: likely, minor | a letter to every house on the route | Chloe
A cable struck while digging: possible, major -> rare, major | ground scan before each dig | Ana
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

swot plugin

#

Strengths, weaknesses, opportunities and threats in the usual two by two, with a conclusion under it if you give one.

Write Strengths, Weaknesses, Opportunities and Threats each on a line of its own, with the points under each one a line. The points may also follow the heading on its line, as Weaknesses: one oven; no parking. The four are drawn as a two by two: strengths and weaknesses on top, opportunities and threats below.

Put | a note after a point for a small note, > before a point to light it, and a line => what follows for the conclusion under the grid. A heading left out is an empty panel.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-swot on in preferences.self).

Syntax
block  ``` swot ... ```  -> swot  verbatim
The bakery on Mill Street
selfscribe
~~~ selfscribe
block  ``` swot ... ```  -> swot  verbatim
~~~
```swot
# The bakery on Mill Street
Strengths
A loyal local customer base
The only bakery open before seven
Weaknesses
One oven, no spare
No parking outside
Opportunities
> The new estate, 400 homes | first families move in this spring
Wholesale to the two cafés on the square
Threats
A supermarket bakery counter | opening in June
Flour prices up a fifth this year
=> Open the second oven before the estate fills, and sell on mornings the supermarket cannot match.
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

horizons plugin

#

A roadmap in columns, such as now, next and later, or quarters, or phases, with a card for each piece of work.

Write a heading for each column, such as Now, Next and Later, Q1 2027, Phase 2 or any line ending in a colon, and the cards under it one a line as Name | note or owner. Put [x] before a card that is done and [>] before one under way, and > before a card to light it.

The columns sit side by side and stack on a phone. A line lanes makes each card Theme: name, set in rows by theme across the columns.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-horizons on in preferences.self).

Syntax
block  ``` horizons ... ```  -> horizons  verbatim
Where the product is going
selfscribe
~~~ selfscribe
block  ``` horizons ... ```  -> horizons  verbatim
~~~
```horizons
# Where the product is going
Now
[>] Faster search | Ana
[x] New sign-up flow
> [>] Invoices in the app | Ben
Next
Offline mode | needs the sync work first
Team accounts
Later
A phone app
Open data export
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

steps plugin

#

A process in a few numbered stages drawn across the page, with what happens at each and how far along it is.

Write one stage a line as Name | what happens, with a third cell for a time if you want one: Design | two directions | 2 weeks. The stages are drawn across the page as numbered discs joined by a line.

Put [x] before a stage that is done and > or [>] before the one under way; once any stage is marked, the rest are drawn quietly as still to come. More than five stages, or a phone, set the stages down the page.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-steps on in preferences.self).

Syntax
block  ``` steps ... ```  -> steps  verbatim
How we work with you
selfscribe
~~~ selfscribe
block  ``` steps ... ```  -> steps  verbatim
~~~
```steps
# How we work with you
[x] Brief | we agree what is wanted and what it costs | 1 week
[x] Design | two directions, one round of changes | 2 weeks
> Build | weekly previews | 6 weeks
Launch | we stay for a month after | 1 month
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

org plugin

#

An organisation chart drawn top down from an indented list: a card a person, lines from each head to their reports.

Write one person a line, as Priya Nair | Operations, and indent the people who report to someone under them. Each becomes a card, joined to their head by an elbow line, and each department takes its own colour.

> before a name lights that person. A post in brackets, (Head of marketing), or with a cell vacant is still to fill and is drawn dashed. Lines at the left edge make separate charts side by side. A wide chart scrolls sideways, and on a phone it becomes an indented list.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-org on in preferences.self).

Syntax
block  ``` org ... ```  -> org  verbatim
A food wholesaler's senior team
selfscribe
~~~ selfscribe
block  ``` org ... ```  -> org  verbatim
~~~
```org
# Who reports to whom
Maria Okafor | Chief executive
  James Lindqvist | Finance
    Accounts | 3 people
    Payroll
  > Priya Nair | Operations
    Warehouse | Leeds
    Delivery
  Tom Hale | Sales
  (Head of marketing)
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

pricing plugin

#

Plans side by side as cards: each with its price, who it is for and what it includes, the recommended one raised.

Name the plans after bars, | Starter | *Team | Company, with * on the one you recommend. Then one row a line, Storage: 1 GB | 50 GB | 1 TB. A Price: row is drawn large at the head of each card and a For: row under the plan's name; yes and no become a tick and a dash.

The recommended card is raised with a ribbon; label: Most popular changes its word. > before a row lights it, and => starts a note under the cards. On a phone the cards stack, the recommended one first.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-pricing on in preferences.self).

Syntax
block  ``` pricing ... ```  -> pricing  verbatim
Plans for a booking app
selfscribe
~~~ selfscribe
block  ``` pricing ... ```  -> pricing  verbatim
~~~
```pricing
# Plans for Harbour Books
| Starter | *Team | Company
Price: Free | £8 a user a month | Talk to us
For: one person | a team of up to 50 | everyone
Projects: 3 | unlimited | unlimited
Storage: 1 GB | 50 GB | as much as you need
Single sign-on: no | no | yes
Priority support: no | yes | yes
=> Every plan starts with a month free.
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

agenda plugin

#

A meeting's items with who leads each and how long, the start of every item worked out, and the end time and total.

Write starts 09:30, then one item a line: Finance report | Ana Ruiz | 25 min | paper 3. A cell that reads as a length (25 min, 1h 30, 45) is the length, one that reads as a clock time (12:30) sets the item's time, and the others are who and a note. Each item's start is worked out, with the end time and the total under the agenda.

Items called Break, Lunch or Coffee are drawn quieter and not numbered. A gap before a set time is shown as free time, and a set time the items before it run past is flagged. > before a title lights it. A line approximate shows only the times written (10:30 | Site walk) and works out no end or total.

A cell in square brackets, [Training], is a small label saying what kind of item it is, and a line no numbers leaves the items unnumbered.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-agenda on in preferences.self).

Syntax
block  ``` agenda ... ```  -> agenda  verbatim
A board meeting
selfscribe
~~~ selfscribe
block  ``` agenda ... ```  -> agenda  verbatim
~~~
```agenda
# Board meeting, 12 March
starts 09:30
Welcome and apologies | Chair | 5 min
Minutes of the last meeting | Chair | 10 min
> Finance report | Ana Ruiz | 25 min | paper 3
Break | 15 min
Strategy for next year | Ben Marsh | 45 min | paper 4
Any other business | 10 min
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

approvals plugin

#

Who prepared, reviewed and approved a document: signed with a date, awaiting with a line to sign on, or an open slot.

Write Approved by: Chloe Adeyemi | Managing director | 9 March 2026, one role a line. With a date it is signed, with no date it is awaiting a signature, and with no name (Approved by: | Chair of the board) it is an open slot with lines to fill in by hand.

declined or withdrawn in place of the date is shown in red. A line that says stacked sets the sign-offs as a table. The lines are thin and unshaded, so the block prints and can be signed.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-approvals on in preferences.self).

Syntax
block  ``` approvals ... ```  -> approvals  verbatim
A report waiting on the board
selfscribe
~~~ selfscribe
block  ``` approvals ... ```  -> approvals  verbatim
~~~
```approvals
Prepared by: Ana Ruiz | Finance lead | 3 March 2026
Reviewed by: Ben Marsh | Operations | 5 March 2026
Approved by: Chloe Adeyemi | Managing director
Approved by: | Chair of the board
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

fill plugin

#

Labelled boxes to write in by hand, some already filled, with tick boxes: the head of a printed record or form.

Write one box a line: Serial no.: is a blank box, Rated load: 3,500 kg a box with its value printed in it, and Date of visit: | dd / mm / yyyy a blank with a grey hint. One colon shares the row with other boxes, two colons (Client and site::) is the full width, and | 3 lines makes a box taller.

[ ] Fine to keep using [ ] Not to be used prints empty tick boxes with their words, and [x] a ticked one. A line with no colon is a heading, 3 across sets how many boxes share a row, and > before a label lights that box.

A label in quotes may hold a colon of its own ("Repair: what was done":: | 3 lines), and colons with no label make a box with none. ___ in a label, a heading or a tick option is a blank to write on, as in [ ] Other: ___. A line right or centre places boxes that do not fill the row, such as one box for initials, and stacked sets tick options one under another with each question in full-size type.

A line indented two spaces or more is a note to the line above it, in small type: under a box it sits under the label, and under a tick line, a question or an option it sits under that. Lines next to each other make a paragraph, a blank line starts another, and lines that start with - or 1. make a list. With stacked, a question that ends in ? or : takes the lines under it that are only [ ] words as its options, each with notes of its own. A line landscape prints the form on a page turned sideways.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-fill on in preferences.self).

Syntax
block  ``` fill ... ```  -> fill  verbatim
The head of a lift inspection record
selfscribe
~~~ selfscribe
block  ``` fill ... ```  -> fill  verbatim
~~~
```fill
# Visit details
Record no.: THJ-IVR-01
> Date of visit: | dd / mm / yyyy
Last examination: | dd / mm / yyyy
Client and site:: Northgate Storage, Mill Road
Serial no.:
Rated load: 3,500 kg
Notes:: | 3 lines
Outcome: [ ] Fine to keep using  [ ] Fine to use, with actions  [ ] Not to be used until fixed
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

sheet plugin

#

A ruled table to fill in by hand: a log, a checklist or a set of readings, with blanks, hints, tick boxes and rows to carry on.

Name the columns first: | Reading | Value | OK. Then one row a line: Gap at the top | (mm) | [ ]. An empty cell is a blank to write in, (mm) is a blank with a small hint, and [ ] is a printed tick box. + 10 rows adds blank rows to carry on by hand.

== Safety stops starts a group of rows under a heading, tall makes every row tall, widths: 50% 25% wide sets the column widths, and > before a row lights it. The header repeats on each printed page.

+ 6 rows like above repeats the row before it, tick boxes and all. A cell < joins the cell to its left across both columns. In the header 1..31 is thirty-one columns, and a line dense sets the sheet small and tight for such a grid.

In a cell, **bold**, a link [words](https://…) and ___ (a blank to write on) are drawn, and // starts a small second line. A row that starts with a bar has an empty first cell, unless every row starts with one.

+ rows for: Area clear · No oil leaks · Locks adds a row for each item of a list, the item in the first cell; end it with like above to copy the other cells from the row above. A header cell each: Mon · Tue · Wed is a column for each item. Items are split by ·, or by ; when there is no middle dot. When the document keeps the list in a setting (set checks Area clear · Locks), write {{checks}} in its place: an empty list, or one never filled in, is shown as a problem. A line landscape prints the sheet on a page turned sideways.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-sheet on in preferences.self).

Syntax
block  ``` sheet ... ```  -> sheet  verbatim
Readings at a lift inspection
selfscribe
~~~ selfscribe
block  ``` sheet ... ```  -> sheet  verbatim
~~~
```sheet
# Key readings
| Reading | From | Value | OK
widths: 50% 10% 25% 15%
== Empty
Smallest gap at the top | 2.1 | (mm) | [ ]
> Platform level, worst corner | 2.2 | (mm) | [ ]
== With the car loaded
Smallest gap at the top | 2.1 | (mm) | [ ]
Touched in the forced test? | 3.13 | [ ] No  [ ] Yes |
== Safety stops
Stop button at the top landing | 4.1 | [ ] Works  [ ] Faulty |
Stop button in the car | 4.2 | [ ] Works  [ ] Faulty |
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

sketch plugin

#

A drawing by hand: pen, lines, arrows, boxes, sticky notes and words. With set mode=signature, a line to sign on.

A client plugin. Press Draw on the block and use the pen, the line, the arrow, the box, the oval, a sticky note or words. The rubber takes a stroke away, and the pointer picks a thing to move, recolour or delete. On a phone the tools open over the whole screen and a finger draws. Every stroke is written as one line of the text and one undo step, so the document is always the drawing.

One thing per line: pen blue 4: 40,60 52,58 (a colour, a width, then the places), line 40,200 300,200, arrow 300,120 420,160 red, box 40,40 160x80 "Draft" yellow, oval 300,40 120x70, note 440,40 "Call the yard", text 40,300 "Deck plan". The colours are ink, red, orange, yellow, green, blue, purple and grey. size 640x360 sets the size; dragging the bar under the sketch changes its height.

For a signature, start with set mode=signature. The block is then a line to sign on directly, with name "Ada Lovelace" under it. Signing writes the strokes and signed 2026-11-21 14:05; Clear takes them away. In a read-only view a sketch is a picture.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-sketch on in preferences.self).

Syntax
block  ``` sketch ... ```  -> sketch  verbatim
A plan on a napkin
selfscribe
~~~ selfscribe
block  ``` sketch ... ```  -> sketch  verbatim
~~~
```sketch
size 560x200
box 30,40 150x70 "Quay" blue
box 380,40 150x70 "Island" green
arrow 180,75 380,75
note 210,110 "Two sailings a day"
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D248

tikz plugin

#

TikZ drawings as sharp SVG in the page, with no TeX installed.

A client plugin. Write TikZ commands (\draw, \node, \fill, each ending in ;), or paste a whole \begin{tikzpicture} or even a full LaTeX document: only the picture is drawn. Nodes, arrows, shapes, arcs, grids, plots, anchors, |- corners, bends, relative and polar coordinates, \tikzset styles and xcolor mixes such as blue!80!black work. What it does not draw (\foreach, \matrix) is named in a note under the picture. Black follows the text colour, so pictures read in dark themes; the Theme setting recolours a picture. For TeX itself (pgfplots, packages), use the latex plugin.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-tikz on in preferences.self). Settings: set plugin-tikz-theme auto|tex|dark|mocha|nord|solarized-light|solarized-dark|blueprint|mono (auto follows the page: black is the text colour, and dark colours are lightened on a dark page).

Syntax
block  ``` tikz ... ```  -> tikz  verbatim
A triangle
selfscribe
~~~ selfscribe
block  ``` tikz ... ```  -> tikz  verbatim
~~~
```tikz
\filldraw[fill=blue!15, draw=blue!70!black] (0,0) -- (4,0) -- (1,3) -- cycle;
\node[below] at (2,0) {base};
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

highlight plugin

#

Colours for code blocks in 30 languages, with a copy button and line numbers.

A client plugin that claims ordinary code blocks (pre > code) instead of a name of its own: the language after the fence (```ahk, ```python) picks the colours, which come from your theme. More words on the fence line: lines or nolines, {2,4-6} to mark lines, title=script.ahk. Unknown languages stay plain. Every block gets a Copy button.

Languages: AutoHotkey, JavaScript, TypeScript, Python, Rust, C, C++, C#, Go, Java, Kotlin, Swift, PHP, Ruby, Lua, shell, PowerShell, batch, SQL, JSON, YAML, TOML, INI, HTML and XML, CSS, Markdown, diff, regular expressions and Selfscribe.

Nothing to add to a Markdown document: its rules already have it. Switch the plugin on in Settings › Plugins (set plugin-highlight on in preferences.self). Settings: set plugin-highlight-numbers off|on|long (line numbers, and long for blocks of 12 lines or more) and set plugin-highlight-copy on|off.

AutoHotkey
selfscribe
~~~ selfscribe
use markdown
~~~
```ahk
#n::Run "notepad"  ; Win+N
MsgBox "Hello, " A_UserName
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §2, D84

callout plugin

#

Notes, tips and warnings with an icon, in Selfscribe or GitHub style.

A client plugin. ::: tip Title … ::: sets a passage apart with an icon and a tint: note, info, tip, success, question, important, example, warning, caution, danger, bug or quote. ::: warning- Title starts folded. GitHub alerts (> [!NOTE] as a quote's first line) work too.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-callout on in preferences.self).

Syntax
block  ::: _ ... :::  -> callout kind=_1
line  > [!_]  -> callout  group blockquote
A tip
selfscribe
~~~ selfscribe
use markdown
block  ::: _ ... :::  -> callout kind=_1
line  > [!_]  -> callout  group blockquote
~~~
::: tip Save time
Press **Ctrl+K** for the palette.
:::
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D92

tab plugin

#

Tabbed content: consecutive ::: tab Label blocks become one tab set.

A client plugin. One ::: tab Label block per tab, one after the other (the rule's group div keeps them together). Picking a label picks it in every tab set of the page. Arrow keys move between tabs. Without the plugin every tab shows.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-tab on in preferences.self).

Syntax
block  ::: tab _ ... :::  -> tab label=_1  group div
Two tabs
selfscribe
~~~ selfscribe
use markdown
block  ::: tab _ ... :::  -> tab label=_1  group div
~~~
::: tab Windows
Press **Win+R**.
:::
::: tab macOS
Press **Cmd+Space**.
:::
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D92

spoiler plugin

#

Hidden ||text|| revealed on click, and foldable details.

A client plugin for ||hidden text||: covered until the reader clicks it or presses Enter. Its catalog entry also brings ::: details Summary … :::, the details element with a summary, which needs no plugin.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-spoiler on in preferences.self).

Syntax
block  ::: details _ ... :::  -> details summary=_1
inline  ||_||  -> spoiler
A spoiler
selfscribe
~~~ selfscribe
use markdown
block  ::: details _ ... :::  -> details summary=_1
inline  ||_||  -> spoiler
~~~
It was ||the gardener||.

::: details How do you know?
The rake.
:::
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D86, D92

toc plugin

#

A contents list of the document's headings, linked to them, in every export.

A client plugin. An empty ```toc block lists the headings with links to them and follows them as you write. levels: 2-3 chooses the levels (without it, a document with one level-1 title lists 2 and 3), numbered: yes numbers the entries 1, 1.1, 1.2, and title: none leaves the word Contents out.

Web pages, PDF and EPUB keep the list and its links. Word gets a real contents field, which shows page numbers once Word updates it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-toc on in preferences.self).

Syntax
block  ``` toc ... ```  -> toc  verbatim
A guide with contents
selfscribe
~~~ selfscribe
use markdown
block  ``` toc ... ```  -> toc  verbatim
~~~
# Harbour guide

```toc
numbered: yes
```

## Getting there

The ferry leaves every hour.

## Where to eat

### By the quay
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D137

secret plugin

#

A block locked with a passphrase: ciphertext in the file, its text on screen once you unlock it.

A client plugin. Select text and choose Edit › Encrypt selection…, then type a passphrase twice: the text becomes a ```secret block whose lines are ciphertext, so the file stays plain text and any other editor shows gibberish. Locked, the block asks for the passphrase. Unlocked, it shows its content with the document's rules, and Edit changes it; Save encrypts it again, so the text and the undo history only ever hold ciphertext.

Lock forgets the passphrase, and so does the app after some idle minutes. The passphrase is never stored and cannot be recovered. Exports, find, the outline and the Write view never see the content. Edit › Decrypt block turns the block back into plain text, after asking. The first line names the format (selfscribe-secret v1 aes-256-gcm pbkdf2-sha256 600000), so any tool can open it; the spec shows how.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-secret on in preferences.self). Settings: set plugin-secret-idle 1|2|5|10|15|30|60 (minutes without typing or clicking before every block locks again).

Syntax
block  ``` secret ... ```  -> secret  verbatim
Door codes (passphrase: harbour lights)
selfscribe
~~~ selfscribe
block  ``` secret ... ```  -> secret  verbatim
~~~
```secret
selfscribe-secret v1 aes-256-gcm pbkdf2-sha256 600000
salt: DRG2cFh4e3gugyBRzJ3gEg==
iv: VTh2Hs78Iz5vDxzv
Gy7NmVqY0976bd0uMOcRNgAxs04jBygnRGrcvEIj6wD4LR99Uhfojh6CkvIXc5KIj10WLJakKT9d
yRPSWW4jVCIyVMzlKlxlibL/oy8OmP7UaHIHTY7VXvGUBzUiJ+sR9WKCO0/urx4W/1qmKDcIvRXl
mUjRUuteYGDVcGVr9kZ5lt1hvshxgJwD4KEC0TaX6vh89TjsmcZaLsyGdxleLsk=
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §8, D136

footnote plugin

#

Numbered footnotes linked both ways: [^key] and [^key]: text.

A built-in plugin, already in the Markdown rules: [^key] is a reference and a line [^key]: text is the note. Notes are numbered in the order they are first referenced and drawn where you write them (usually under a Footnotes heading at the end). Unknown, unused and repeated keys get a warning.

The client half shows the note when you hover or focus a reference. Other rulebooks add inline [^_] -> footref and line [^_]: _ -> footnote key=_1.

Nothing to add to a Markdown document: its rules already have it. Switch the plugin on in Settings › Plugins (set plugin-footnote on in preferences.self).

A footnote
selfscribe
~~~ selfscribe
use markdown
~~~
Plain text lasts.[^1]

[^1]: Longer than any app that edits it.
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D87

citation plugin

#

Citations [@key] from a .bib file or a records block.

A built-in plugin. [@key], [@key, p. 12] and [@a; see @b] cite works listed by a bibliography line (a BibTeX file or a data block of records). Author-year by default, numbered with cite-style. The client half previews the reference on hover.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-citation on in preferences.self).

Syntax
inline  [@_]  -> citation
line  bibliography: _  -> bibliography
block  ```data\ _ ... ```  -> data  info=_1  verbatim
A citation
selfscribe
~~~ selfscribe
use markdown
inline  [@_]  -> citation
line  bibliography: _  -> bibliography
block  ```data\ _ ... ```  -> data  info=_1  verbatim
~~~
Programs are essays [@knuth1984, p. 99].

```data refs records as hidden
key: knuth1984
author: Donald E. Knuth
title: Literate Programming
year: 1984
```

bibliography: refs
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D88

sources plugin

#

Citations [@key] numbered in the order you make them, and a ```sources block of one reference a line that lists what is cited.

A client plugin. In a ``sources block, write each source on its own line: a key in square brackets, then the reference as it should read ([smith2021] Smith, J. (2021). Street trees. *Urban Ecology* 7.). An indented line carries the one above on. In the text, [@smith2021], [@smith2021, p. 4]and[@lee2019; see @smith2021]` cite them.

Citations are numbered [1], [2] in the order they are first made, and each links to its source. The list shows only what is cited, in that order, with links back to each citation. style author-year cites as (Smith 2021) and sorts the list by name, style superscript raises the numbers, and all lists the sources nobody cites too. A key the list does not have is marked in the text and named under the list.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-sources on in preferences.self).

Syntax
inline  [@_]  -> sources  verbatim
block  ``` sources ... ```  -> sources  verbatim
A paper's sources
selfscribe
~~~ selfscribe
use markdown
inline  [@_]  -> sources  verbatim
block  ``` sources ... ```  -> sources  verbatim
~~~
Shade cools a pavement by 15 °C [@smith2021, p. 4], more in a narrow street [@lee2019; @smith2021].

```sources
[smith2021] Smith, J. (2021). Street trees and summer heat. *Journal of Urban Ecology* 7(2).
[lee2019] Lee, K., & Park, S. (2019). Canyon streets at noon. *Urban Climate* 28.
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D269

glossary plugin

#

Terms defined once, marked with their meaning wherever they are used.

A built-in plugin. *[HTML]: HyperText Markup Language defines a term and shows it in a glossary list. Every use of the word in the text (not in code or links) becomes an <abbr> with its meaning. abbreviation defines one without showing it.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-glossary on in preferences.self).

Syntax
line  *[_]: _  -> glossary key=_1  group dl
A glossary
selfscribe
~~~ selfscribe
use markdown
line  *[_]: _  -> glossary key=_1  group dl
~~~
HTML pages are styled with CSS.

*[HTML]: HyperText Markup Language
*[CSS]: Cascading Style Sheets
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D90

lint plugin

#

A style check for the document it sits in: words to watch, -ing endings, long sentences, passive voice and repeated words, marked in the page with counts.

A client plugin. Each line is a check: words AND OR NOT (any case), exact SHALL MUST (as written), ending ing, starting un, adverbs, long 30, passive and repeats. as LABEL names it. A last word underline, highlight or colour says how hits are drawn. An empty block runs a sensible set. Click a count to go through the hits. The box shows or hides a check. Only the rendered page is marked: the text never changes.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-lint on in preferences.self).

Syntax
block  ``` lint ... ```  -> lint  verbatim
The default set
selfscribe
~~~ selfscribe
block  ``` lint ... ```  -> lint  verbatim
~~~
```lint
```

If the tide is turning AND the wind is rising, we were told that sailing was really quite dangerous.
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D115

emoji plugin

#

An emoji from its short name, like :tada:.

A built-in plugin. The content is a short name such as smile, heart, +1, rocket, tada or warning. The result is the emoji from a bundled table of about 150 common names. An unknown name leaves the source text as it was. The editor's emoji picker inserts emoji by name.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-emoji on in preferences.self).

Syntax
inline  :_:  -> emoji
Short names
selfscribe
~~~ selfscribe
inline  :_:  -> emoji
~~~
Shipped :rocket: :tada:  Thanks :+1:  Not a name: :zzzz:
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §3, D49, D92

music plugin

#

Sheet music from ABC notation.

A client plugin that engraves ABC notation with abcjs, loaded only when used.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-music on in preferences.self).

Syntax
block  ``` abc ... ```  -> music  verbatim
A scale
selfscribe
~~~ selfscribe
block  ``` abc ... ```  -> music  verbatim
~~~
```abc
X:1
T:Scale
M:4/4
K:C
CDEF GABc|
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

chess plugin

#

A chess board for a FEN position or a PGN game, with its moves.

A client plugin. A FEN line shows a position. PGN (headers and moves) shows the game with a move list, buttons and arrow keys to replay it. [Orientation "black"] turns the board.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-chess on in preferences.self). Settings: set plugin-chess-board theme|green|brown|blue and set plugin-chess-coordinates on|off.

Syntax
block  ``` chess ... ```  -> chess  verbatim
block  ``` pgn ... ```  -> chess  verbatim
An opening
selfscribe
~~~ selfscribe
block  ``` chess ... ```  -> chess  verbatim
block  ``` pgn ... ```  -> chess  verbatim
~~~
```chess
1. e4 e5 2. Nf3 Nc6 3. Bb5 a6
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D92

cards plugin

#

Playing cards from text: hands, a board and notes, with poker hands named and blackjack totals.

A client plugin. A card is a rank and a suit (As, 10h, Q♣). ?? is a card face down. hand NAME: lines give the players, board: the community cards with | between the flop, the turn and the river, title: and pot: say what the hand is. Other lines are notes.

With a board, step through the streets with the buttons or the arrow keys. Each hand is named and the winner marked at the river. game: poker scores five-card hands, game: blackjack counts totals.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-cards on in preferences.self). Settings: set plugin-cards-table felt|theme and set plugin-cards-colours two|four.

Syntax
block  ``` cards ... ```  -> cards  verbatim
block  ``` poker ... ```  -> cards  verbatim
A hold'em hand
selfscribe
~~~ selfscribe
block  ``` cards ... ```  -> cards  verbatim
block  ``` poker ... ```  -> cards  verbatim
~~~
```cards
board: Ah Kd 7s | 7c | Kh
hand Ana: As Ad
hand Bo: Ks Kc
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D105

flashcards plugin

#

A deck to study with spaced repetition: question :: answer per line, the cards due today, and the next date written back.

A client plugin. One card per line: the question, :: (or |) and the answer. A # line names the deck, and its head says how many cards are due today and how many you have learned. Click a card or press Space to flip it, then grade it Again, Hard, Good or Easy (or press 1 to 4).

The grade writes the card's next date at the end of its line, as one undo step: Portugal :: Lisbon ~ 2026-10-04 6d is due on 4 October, six days after its last review, and a third number (230%) is the card's ease when it is not the usual 250%. The spacing is SM-2, as in Anki. A card without ~ is new, and ten new cards join a day; new: 5 in the block changes that for one deck. You can edit or delete the ~ part by hand.

Practise all goes through every card without writing anything, with the missed ones again at the end of a round (the arrow keys work too). In a read-only view the deck is that practice deck.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-flashcards on in preferences.self). Settings: set plugin-flashcards-new 0|5|10|20|30|50 (how many new cards join a day's review; new: in the block wins).

Syntax
block  ``` flashcards ... ```  -> flashcards  verbatim
Capitals
selfscribe
~~~ selfscribe
block  ``` flashcards ... ```  -> flashcards  verbatim
~~~
```flashcards
# European capitals
Portugal :: Lisbon  ~ 2026-10-04 6d
Norway :: Oslo
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D105

timer plugin

#

Countdowns written as text: Focus 25m, Break 5m, repeat 4, with a chime between phases. An empty block is a pomodoro.

A client plugin (fences timer and pomodoro). Each line is a phase, a name and a duration in either order (25m, 90s, 1h30m, 1:30). repeat N repeats the phases above it. Lines after it, or starting with then, come once at the end. # Title names it and sound off keeps it quiet. Start, Pause, Skip and Reset. Space starts a focused timer. Nothing is written back.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-timer on in preferences.self).

Syntax
block  ``` timer ... ```  -> timer  verbatim
block  ``` pomodoro ... ```  -> timer  verbatim
Tea and stretches
selfscribe
~~~ selfscribe
block  ``` timer ... ```  -> timer  verbatim
block  ``` pomodoro ... ```  -> timer  verbatim
~~~
```timer
# Morning
Kettle 4m
Stretch 1:30
repeat 2
then Tea 3m
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D112

dice plugin

#

A die inside a sentence: [roll 2d6] rolls when you click it.

A client plugin. Dice between [roll and ], in tabletop notation: d20, 3d6+2, d%, 4d6kh3 (keep the highest three), 2d20kl1 (the lowest), or several added up (1d8+1d6+3). Words after the dice name the roll ([roll d20 initiative]). Click it, or tab to it and press Enter, to roll again; hovering shows each die. The result is only on your screen, so the text never changes. Without the plugin the dice stay as written.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-dice on in preferences.self).

Syntax
inline  [roll _]  -> dice  verbatim
A stuck door
selfscribe
~~~ selfscribe
inline  [roll _]  -> dice  verbatim
~~~
The door is stuck. Roll [roll 1d6] and on 4 or more it opens.
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

pick plugin

#

A list of options and a Pick one button that shuffles and lands on one at random.

A client plugin. List the options one per line, each starting with -, under an optional question or # Title. Pick one shuffles through them for a moment and lands on one; with reduced motion the choice shows at once. The pick is only on your screen, so the text never changes.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-pick on in preferences.self).

Syntax
block  ``` pick ... ```  -> pick  verbatim
What's for dinner?
selfscribe
~~~ selfscribe
block  ``` pick ... ```  -> pick  verbatim
~~~
```pick
What's for dinner?
- Pasta
- Fish and chips
- Curry
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

grid plugin

#

Other documents side by side or in a grid, each in its own style: a dashboard, a reading desk, a split view.

A client plugin, for documents in a folder or workbook. Draw the grid with file names: each line is a row and | separates its cells, so draft.self | notes.self puts two documents side by side. The same name in neighbouring cells spans them (it must make a rectangle). . is an empty cell. notes.self#Todo shows only the section under that heading.

Lines before the grid set it up: columns 2fr 1fr (plain numbers are shares, and columns 3 is three equal columns), rows auto 1fr, gap 24 (or narrow, wide, none), height 80vh (or screen, and the cells then scroll), look cards|plain|split and title Some words. // starts a comment. Each cell shows its document's title and an Open button and keeps that document's rules and colours. On a narrow screen the cells stack.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-layout on in preferences.self).

Syntax
block  ``` grid ... ```  -> grid  verbatim
block  ``` split ... ```  -> grid  verbatim
A dashboard
selfscribe
~~~ selfscribe
block  ``` grid ... ```  -> grid  verbatim
block  ``` split ... ```  -> grid  verbatim
~~~
```grid
title Monday
columns 2fr 1fr
plan.self  | todo.self
plan.self  | budget.self#Totals
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D106, D245

style plugin

#

CSS of your own for one document, in a ```style block; selfscribe.css does the same for a whole folder or workbook.

A client plugin. The CSS in a ``style block styles only the document it is in: h1 { color: teal }colours its headings;.self-doc { --doc-link: teal } sets a page colour that every built-in style uses (--doc-bg, --doc-fg, --doc-heading, --doc-link, --doc-quote-bar, --doc-code-bg, --doc-mark-bg, --doc-font, --doc-font-heading`).

As in a rule's { } block, what could load files or escape the page (url(), @import, @font-face, backslash escapes) is left out, and the block's label says how much. The label shows only while writing. Exports keep the style. For every document of a folder or workbook, write the CSS in selfscribe.css at its root. View › Custom CSS… builds either, with looks to start from, colour pickers, touches and a reference of properties in plain words.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-style on in preferences.self).

Syntax
block  ``` style ... ```  -> style  verbatim
Teal headings and links
selfscribe
~~~ selfscribe
use markdown
block  ``` style ... ```  -> style  verbatim
~~~
# A teal page

With a [link](https://example.com).

```style
.self-doc { --doc-heading: #0f766e; --doc-link: #0f766e }
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec D108

media plugin

#

Audio and video players for files of the folder and https links.

A client plugin. media: clips/demo.mp4 | Caption (or audio: / video:) plays a file of the folder or workbook the document is in, read on your machine, or an https: link that loads only when you press play. See Pictures, audio and video in folders.

To use it, add these rules to the rules block and switch the plugin on in Settings › Plugins (set plugin-media on in preferences.self).

Syntax
line  media: _  -> media
line  audio: _  -> media kind=audio
line  video: _  -> media kind=video
A video
selfscribe
~~~ selfscribe
line  media: _  -> media
line  audio: _  -> media kind=audio
line  video: _  -> media kind=video
~~~
video: media/demo.mp4 | The editor in two minutes
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D85, D92

qr plugin

#

A QR code for a link or any text.

A client plugin that draws a QR code as SVG from the rest of the line.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-qr on in preferences.self). Settings: set plugin-qr-size PX (80 to 480) and set plugin-qr-level L|M|Q|H (error correction).

Syntax
line  qr: _  -> qr
A link as a QR code
selfscribe
~~~ selfscribe
line  qr: _  -> qr
~~~
qr: https://example.com
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73

embed plugin

#

Videos, maps and pens from https links. Nothing loads until you click.

A client plugin that shows a web page in a sandboxed frame. Only https: links are accepted. It first shows a card with the site and a Load button: nothing is fetched until you click, unless the site is on your allow list. Known sites (YouTube through youtube-nocookie.com, Vimeo, OpenStreetMap, CodePen, Figma, Loom) are rewritten to their embed address.

The frame runs with its own origin, never the editor's, and cannot navigate the editor. A rule that makes a plain iframe is refused. embed is the supported way.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-embed on in preferences.self). Settings: set plugin-embed-allow HOST … (host names that load without a click) and set plugin-embed-height PX.

Syntax
line  embed: _  -> embed
A map
selfscribe
~~~ selfscribe
line  embed: _  -> embed
~~~
embed: https://www.openstreetmap.org/#map=13/51.5074/-0.1278
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73, D74

html plugin

#

An HTML fragment in a sandboxed frame: no network, no scripts unless allowed.

A client plugin that renders an HTML fragment inside a sandboxed frame with a unique origin and a strict content security policy: nothing can be fetched, and document scripts and on… handlers do not run.

set plugin-html-scripts on also allows inline scripts. They still run in an isolated origin with no network.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-html on in preferences.self). Settings: set plugin-html-scripts on|off.

Syntax
block  <html> ... </html>  -> html  verbatim
A styled box
selfscribe
~~~ selfscribe
block  <html> ... </html>  -> html  verbatim
~~~
<html>
<div style="padding:12px;border-radius:8px;background:#eef"><b>Open today</b> 8:00 to 18:00 · closed on Sundays</div>
</html>
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73, D74

latex plugin

#

Real LaTeX (TikZ, tables, theorems) through your TeX installation.

A client plugin that asks the host to compile LaTeX. The desktop app runs your local TeX installation in a fresh temporary folder, without shell escape, unable to write outside its folder or reach the network, with a 30 second limit. The result is shown as a picture. Results are cached.

Where there is no TeX (the web, or no installation), a body that is only maths is typeset with KaTeX instead, and anything else shows its source with a note. The body can be a fragment or a whole document with \documentclass.

To use it, add this rule to the rules block and switch the plugin on in Settings › Plugins (set plugin-latex on in preferences.self). Settings: set plugin-latex-engine lualatex|pdflatex|xelatex and set plugin-latex-preamble TEXT.

Syntax
block  ``` latex ... ```  -> latex  verbatim
Display maths
selfscribe
~~~ selfscribe
block  ``` latex ... ```  -> latex  verbatim
~~~
```latex
\[ \sum_{k=1}^{n} k = \frac{n(n+1)}{2} \]
```
Rendered

See also Plugin An unknown name after -> preferences.selfSpec 04 §4, D73, D74

Data and views

#

CSV, JSON and records as tables, cards, boards and forms.

Data and views concept

#

Records in plain text (CSV, TSV, JSON, records or a file), shown as tables, cards, boards, calendars and forms.

Write use data in the rules block. A ```data NAME block holds records; its first line names the columns and may type them (due:date, status:choice(todo|doing|done)). A view: line shows a source another way, with options such as as board, sort, filter, columns, page, search and totals.

Every renderer shows a real table or cards. In the editor views are interactive: search, sort, filter chips, editing cells, dragging cards, adding records with a form. Every change goes back into the text as one undo step, so the data stays a plain, human-readable file.

A board and a table of the same records
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as board
title, status:choice(todo|doing|done), due:date
Write the spec, doing, 2026-09-20
Review fixtures, todo, 2026-09-24
```

view: tasks as table sort due
Rendered

See also data view view:Spec 04 §7, D80, D81, D82, D83

view: data

#

A line that shows a data source as a table, cards, a board, a list, a calendar or a form.

view: SOURCE OPTIONS names a data block (or a data file path) and says how to show it. Options can come in any order, each at most once, except when and button, which can come again.

In the editor a view is interactive, and every change you make in it is written back into the text.

Tasks as cards
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as cards sort due
Rendered

See also Data and viewsSpec 04 §7, D80

from data

#

A data block that reads a file of the folder (.csv .tsv .json .jsonl .rec).

```data contacts from ./contacts.csv reads the file through the host, like include: relative to the document, never outside the project, never from the network. The block's body may hold one header line that gives the file's columns types.

A view can also name a file directly: view: ./contacts.csv as table. Edits in the view are written to the file.

A view over a source (a file works the same)
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list columns title, owner
Rendered

See also Data and viewsSpec D80

csv (format) data

#

Comma-separated records: the default format of a data block.

The first line is the header. Each later line is a record. Quote a field that holds a comma: "a, b" ("" is a quote).

CSV records
selfscribe
~~~ selfscribe
use data
~~~
```data people csv
name, born:date
Ada Lovelace, 1815-12-10
Alan Turing, 1912-06-23
```
Rendered

See also Data and viewsSpec D80

tsv (format) data

#

Tab-separated records: pasted from a spreadsheet.

Like CSV with tabs between fields. A body whose first line has a tab is read as TSV even without the word.

TSV records
selfscribe
~~~ selfscribe
use data
~~~
```data people tsv
name	born:date
Grace Hopper	1906-12-09
```
Rendered

See also Data and viewsSpec D80

json (format) data

#

A JSON array of objects as records.

Keys become columns. Numbers and true/false keep their type. Arrays become lists. An optional first line starting with % is a typed header.

JSON records
selfscribe
~~~ selfscribe
use data
~~~
```data people json
[
  {"name": "Ada", "langs": ["en", "fr"]},
  {"name": "Linus", "langs": ["fi"]}
]
```
Rendered

See also Data and viewsSpec D80

jsonl (format) data

#

JSON Lines: one object per line, easy to append to.

Each non-blank line is one JSON object. A bad line is reported and skipped.

JSON Lines
selfscribe
~~~ selfscribe
use data
~~~
```data log jsonl
{"at": "2026-09-01T10:00Z", "event": "start"}
{"at": "2026-09-01T10:05Z", "event": "stop"}
```
Rendered

See also Data and viewsSpec D80

records (format) data

#

field: value lines, one blank line between records, in the style of GNU recutils.

The most readable format for long fields. # lines are comments. A first line starting with % gives types: % title, rating:number.

Records as cards
selfscribe
~~~ selfscribe
use data
~~~
```data books records as cards
% title, author, rating:number
title: The Dispossessed
author: Ursula K. Le Guin
rating: 5

title: Middlemarch
author: George Eliot
rating: 4
```
Rendered

See also Data and viewsSpec D80

Typed header data

#

The first line names the columns and may give each a type: due:date.

NAME:TYPE fields. A column without a type is inferred (number, date or yes/no when every value is one, else text). Bad cells get a warning on the cell, and show as written.

Typed columns
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns title, hours, due
Rendered

See also Data and viewsSpec D80

text (type) data

#

Any text, sorted ignoring case.

The type of a column with no other type.

Sorted by a text column
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns title, owner sort owner
Rendered

See also Data and viewsSpec D80

number (type) data

#

Exact decimal numbers such as 12, -3.50 or 1e3. Totals add up exactly.

At most 15 digits before and after the point. sum keeps the most decimals of its cells.

Numbers and a sum
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns title, hours sort hours desc sum hours
Rendered

See also Data and viewsSpec D80, D82

date (type) data

#

ISO 8601 dates and timestamps: 2026-09-20 or 2026-09-20T15:30+02:00.

Dates sort by the moment they stand for. A calendar puts a record on the day written in the cell. Filters compare dates: due < 2026-10-01.

Sorted by date
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns title, due sort due
Rendered

See also Data and viewsSpec D80

bool (type) data

#

Yes or no: yes no true false y n x 1 0.

Shown as a checkbox. In the editor a click toggles it and the text keeps the spelling it used.

A checklist
selfscribe
~~~ selfscribe
use data
~~~
```data shop
item, bought:bool
Milk, yes
Bread, no
```
Rendered

See also Data and viewsSpec D80

choice(a|b) (type) data

#

One of a fixed list of values, in that order: status:choice(todo|doing|done).

Choices sort in the order written, and a board shows one column per choice.

choice(from clients.name) takes its values from another table instead: the name column of the data block clients (from clients alone uses its first column, and a file works too: from data/clients.csv name). Add a client there and it becomes a choice here, like a relation in a database.

A board by a choice column
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as board
Rendered

See also Data and viewsSpec D80

rating (type) data

#

Stars from 0 to 5 (rating), or to another maximum (rating(10)). stars works too.

A cell holds a whole number, or the stars written out (★★★). Every renderer shows stars. In the editor a click on a star rates, a click on the last lit star takes one away, and the digit keys rate a focused cell. Ratings sort and filter as numbers: filter stars >= 4.

Rated books
selfscribe
~~~ selfscribe
use data
~~~
```data books as table sort stars desc
title, stars:rating
Piranesi, 5
Middlemarch, 3
```
Rendered

See also Data and viewsSpec D109

toggle (type) data

#

Yes or no, drawn as a switch instead of a checkbox.

Everything of bool (the same spellings, the same filters), shown as an on/off switch. A click flips it and the text keeps its spelling.

Switches
selfscribe
~~~ selfscribe
use data
~~~
```data lights
room, on:toggle
Kitchen, yes
Hall, no
```
Rendered

See also Data and viewsSpec D109

suggest(a|b) (type) data

#

Free text with suggestions: the values listed and the ones the column already has.

Unlike choice, any value goes in. The editor offers a searchable list as you type. suggest alone suggests the column's own values, so a list of places or people grows as you use it. A choice with more than twelve values is edited the same way but stays strict.

suggest(from people.name) suggests the values of a column of another table as well (D111).

Suggested values
selfscribe
~~~ selfscribe
use data
~~~
```data trips
place, country:suggest(Portugal|Spain|Italy)
Porto, Portugal
Lyon, France
```
Rendered

See also Data and viewsSpec D109

list data

#

A list type (items separated by commas), and a view kind: one line per record.

As a type, tags:list shows each item as a chip. Quote the cell in CSV. As a view, as list shows the first column and the others after it.

Lists
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list columns title, tags
Rendered

See also Data and viewsSpec D80, D82

url (type) data

#

A link: https:, mailto:, tel: or a relative path (no javascript:).

Shown as a link. Unsafe addresses are flagged and shown as text.

Links
selfscribe
~~~ selfscribe
use data
~~~
```data links
name, site:url
Selfscribe, https://example.com
```
Rendered

See also Data and viewsSpec D80, D43

as data

#

How a view shows its records: table, cards, board, list, calendar, gantt, chart, form or hidden.

A data block without as shows itself as a table.

As a table
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as table
Rendered

See also Data and viewsSpec D80

table (view) data

#

Rows and typed columns. In the editor sortable, searchable and editable, with virtual scrolling for large sources.

Click a cell (or press Enter on it) to edit it. Arrow keys move between cells.

A table
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as table sort due
Rendered

See also Data and viewsSpec D82

cards (view) data

#

A gallery of cards, the first column as the title (gallery works too).

Each card shows the other columns that have a value.

Cards
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as cards
Rendered

See also Data and viewsSpec D82

board (view) data

#

A kanban board grouped by a column (by status, or the first choice column).

Drag a card with the mouse, or press and hold it with a finger, then drop it in another column: the record's cell changes in the text. A drop between two cards keeps that order. Alt+Left and Alt+Right move a focused card to the next column, Alt+Up and Alt+Down move it up or down.

The order is kept in a number column called order, rank or position when the table has one. Without one, the record's line moves in the text.

group owner puts the cards in lanes, one per owner. limit 3 marks a column that holds more than three cards, tone risk colours each card by its risk. The arrow in a column's head folds it shut.

Where a flow follows the column, the columns a card may not go to are dimmed while you drag it. Dropping it there says why.

A board in lanes, with a limit
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as board by status group owner limit doing 2
Rendered

See also Data and viewsSpec D82, D249

limit (view option) data

#

How many cards a board's column should hold: limit 3 for every column, limit doing 2, review 1 for some.

The column's head shows its count against its limit, 3/2, and turns red when it holds more. Cards still go in: the limit is a warning, not a lock.

A board with limits
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as board by status limit 3, doing 1
Rendered

See also Data and viewsSpec D249

tone (view option) data

#

The column that colours records in every view: tone status. Without it, the status column does.

A value has one colour everywhere: a card on a board, an event on a calendar, a bar on a timeline, a step of a flow and a pin on a map. Words such as done, blocked or review get their usual colour (green, red, yellow). Other values take a colour each, in the order of the column's choices.

Each view shows the colours in a legend under it. Press a value there to show only those records, and press it again to show them all.

Cards coloured by status
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as board by owner tone status
Rendered

See also Data and viewsSpec D249, D259

when (view rule) data

#

Colours, bolds, fades or marks the records that pass a test: when due < today and status is not done -> red mark.

Write the test as a filter, with is, is not, is empty and is not empty as well. After -> say what it does: a colour (red, green, #e5484d), bold, faded, strike or mark. Add in total to change only that cell of a table. More rules follow, each after a comma: when … -> red, when … -> bold.

Rules apply in every view of the records: a row, a card, an event, a bar, a step and a pin. A column of a linked table is read through its link: when after.end > due -> red marks a task whose phase ends after it is due. Rules in the view's buttons adds and takes out rules for you. A rule that cannot be read is said under the view.

Late work in red
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as table when due < 2026-09-22 and status is not done -> red mark, when hours > 6 -> bold in hours
Rendered

See also Data and viewsSpec D259

button (view option) data

#

Puts a button in each record of a view that runs an action for it: button Done runs finish.

Write a label, runs, and the name of an action of the folder (actions/finish.self). A table has its buttons in a column at the end, and cards, a board and a list at the foot of each card or line. A calendar, a timeline, a chart and a form draw none.

Pressing one runs the action with that record: each cell under its column's name ({title}, {owner}; a space in a name is written -), and {record} for every cell. The first time, the app shows what the action will do and asks you to allow it. More buttons follow the first, each after a comma. Quote a label that holds a word of the view: button "Sort it" runs tidy.

A static page and other programs show the records without the buttons.

A button in each row
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as table columns title, status button Done runs finish, button Later runs snooze
Rendered

See also Data and views Automations view:Spec D267

flow (view) data

#

Records as the steps of a diagram, joined by arrows: as flow, as flow down or as flow across.

The arrows come from a column of names, after unless link names another. link manager draws a staff list as an org chart, and with as flow down each manager sits centred over the people who report to them. link legs draws one arrow per record of the table legs, from its from to its to, with its label on the arrow.

group puts the steps in lanes and by colours them, the first choice column when there is no by. columns name, role shows the role under each name. A name that is in another table becomes a grey step of its own. A name found nowhere is listed under the diagram.

Click a step to pick its record in every view, and double-click to open it. Join writes an arrow: click the first step, then the second.

An org chart
selfscribe
~~~ selfscribe
use data
~~~
```data people
name, manager, role
Ada, , Owner
Bo, Ada, Chef
Cy, Ada, Host
Di, Bo, Cook
```

view: people as flow down link manager columns name, role
Rendered

See also Data and viewsSpec D222, D250

Where a diagram's arrows come from: a column of names (link manager) or a table of links (link legs).

A table of links has a from and a to column (else its first two columns) and may have a label. Its names are the titles of the records the diagram shows.

Arrows from a table of links
selfscribe
~~~ selfscribe
use data
~~~
```data stops
name
Harbour
Market
Old town
```

```data legs as hidden
from, to, label
Harbour, Market, ferry
Market, Old town, tram
```

view: stops as flow across link legs
Rendered

See also Data and viewsSpec D250

calendar (view) data

#

Records on a calendar by a date column (by due, or the first date column): a month, a week, a day or an agenda.

to end gives each record an end: a record over several days is one bar. A date with a time (2026-09-14T10:00) sits in the hours of the week and the day.

Drag a record to another day or time, or drag its end to change how long it is. Alt and the arrow keys move a picked record. Click an empty day, or an hour, to add a record there. Each change is one step to undo. The week starts on the first day of your week. On a phone the calendar opens as an agenda.

Static pages show every month that has records.

A calendar
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as calendar by due
Rendered

See also Data and viewsSpec D82, D259

gantt (view) data

#

A timeline: a bar per record from its start (by) to its end (to), with group as swimlanes (timeline works too).

A record with only a start is a milestone. In the editor drag a bar to move it, or its ends to change its dates. The text changes with it.

A timeline
selfscribe
~~~ selfscribe
use data
~~~
```data plan as gantt by start to end group team
task, team, start:date, end:date
Research, design, 2026-09-01, 2026-09-12
Build, engine, 2026-09-10, 2026-10-02
Launch, engine, 2026-10-05,
```
Rendered

See also Data and viewsSpec D104

chart (view) data

#

A total per category as a chart: as chart by status sum hours. Add line, area, hbar, pie or donut after chart for another type.

by gives the categories. A date column groups by day, week, month, quarter or year written after it (by due month), and by month alone uses the first date column. The view's sum, avg, min, max or count give the values, count when there is none, and group makes a series per value.

Filters and searches apply first. The chart changes as you edit the records. Point at a bar or move to it with Tab to read its value.

Hours by status
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as chart by status sum hours
Rendered

See also Data and viewsSpec D134

form (view) data

#

A form to add a record, with a field per column and its type.

In the editor it also edits an existing record. The submitted form adds one line to the data.

A form
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as form
Rendered

See also Data and viewsSpec D82

hidden (view) data

#

Shows nothing: a data block that only feeds its views.

The records stay in the text and every view can read them.

A hidden block and its view
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list columns title
Rendered

See also Data and viewsSpec D80

by data

#

The column a board is grouped by, the date a calendar uses, or a chart's categories. For other views, like group.

view: tasks as board by owner.

A board by owner
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as board by owner
Rendered

See also Data and viewsSpec D80

to (view option) data

#

The end date of a range: as calendar by start to end draws a bar across the days. A timeline uses it for its bars.

It must be a date column. A record without an end is one day long.

Date ranges on a calendar
selfscribe
~~~ selfscribe
use data
~~~
```data plan as calendar by start to end
task, team, start:date, end:date
Research, design, 2026-09-01, 2026-09-12
Build, engine, 2026-09-10, 2026-10-02
Launch, engine, 2026-10-05,
```
Rendered

See also Data and viewsSpec D104

group (view option) data

#

Groups records by a column, with a count per group: line items under their order, tasks under their person.

Choice columns group in their order, other values in order of appearance, and empty cells come last as (none).

In the editor each group of a table shows its subtotals (the view's sum, avg, min and max) and a + Add that adds a record already in that group, so one CSV block holds many small collections: view: lines as table group invoice sum amount.

Grouped
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks group status
Rendered

See also Data and viewsSpec D80, D82

sort data

#

Orders records by typed values: sort due, hours desc.

Cells that do not fit their type sort after the others, and empty cells last.

Sorted
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks sort status, hours desc
Rendered

See also Data and viewsSpec D80

columns data

#

Which columns show, in which order: columns title, due.

Cards and lists use the first as the title.

Two columns
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns due, title
Rendered

See also Data and viewsSpec D80

page data

#

Records per page: page 20.

Static pages show the first page and say how many there are. The editor pages through them.

Two per page
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks page 2
Rendered

See also Data and viewsSpec D80, D82

Shows only records containing some text, ignoring case: search spec.

The editor has a search box too.

Searching
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks search spec
Rendered

See also Data and viewsSpec D80

filter data

#

Shows only records that pass a test: filter status != done and due < 2026-10-01.

Comparisons = != < <= > >= and contains, joined with and, or, not and parentheses. A bare column is true when it has a value (not done). a|b means either.

Put the filter last when a later option could be read as a column.

Open tasks over two hours
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter status != done and hours > 2
Rendered

See also Data and viewsSpec D81

title (view option) data

#

A caption for the view: title "Open tasks".

Where a column is also called title, the option goes before the filter.

A titled view
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as cards title "This week"
Rendered

See also Data and viewsSpec D80

plain (view option) data

#

The view as part of the page, like the lines of an invoice: no bar of views, search or buttons, and sums as bare figures.

view: work as table plain sum total. Double-clicking a cell still edits it in the editor.

Part of the page
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as table plain columns title, hours sum hours
Rendered

See also Data and viewsSpec D80

count data

#

The number of records shown (after filter and search).

In a table it goes in the footer. Elsewhere it goes in a line under the view.

Counting
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list count
Rendered

See also Data and viewsSpec D82

sum data

#

The exact sum of a number column: sum hours.

It keeps the most decimals of its cells, so money adds up to the cent.

A total
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns title, hours sum hours
Rendered

See also Data and viewsSpec D82

avg data

#

The average of a number column, two decimals more than its cells.

avg hours.

An average
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list avg hours
Rendered

See also Data and viewsSpec D82

min data

#

The smallest value of a number or date column, as written.

min due gives the earliest date.

The earliest date
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list min due
Rendered

See also Data and viewsSpec D82

max data

#

The largest value of a number or date column, as written.

max hours.

The largest
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks as list max hours
Rendered

See also Data and viewsSpec D82

and (filter) data

#

Both tests must pass. Each part is a filter chip in the editor.

filter status = todo and owner = Ada.

And
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter status = todo and owner = Ada
Rendered

See also Data and viewsSpec D81

or (filter) data

#

Either test may pass.

filter owner = Ada or owner = Bo (or owner = Ada|Bo).

Or
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter owner = Bo or hours > 6
Rendered

See also Data and viewsSpec D81

not (filter) data

#

The test must fail: not done, not (tags contains docs).

A bare column is true when it has a value, so not due finds records without a date.

Not
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter not (tags contains docs)
Rendered

See also Data and viewsSpec D81

contains (filter) data

#

Text containing a value, ignoring case. For a list, an item containing it.

filter tags contains doc.

Contains
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter title contains review
Rendered

See also Data and viewsSpec D81

today (filter) data

#

The reader's date in a filter: due < today, due <= today+2w, today+10wd.

Units: d days (the default), w weeks, m months, y years, wd working days (Monday to Friday, less the holidays of set holidays). The editor uses today's date. Static output applies the test only when the host passes a date.

In a date cell you can type the same short forms: 2w, 10wd, tomorrow, fri, and +2d or -1w to move the cell's own date.

Due within a month
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter due < today+30
Rendered

See also Data and viewsSpec D81

calculated column data

#

A column worked out from the others: total = hours * rate, due = start + 10wd.

Write = and a sum after a column's name in the header. Numbers take + - * / and brackets, exactly. Dates take amounts (3w, 2m, 10wd working days), and one date minus another is the days between. client.email looks through a choice(from clients.name) column.

Functions take values separated by ;: if(hours > 8; 'long'; 'short'), round(price * 1.2; 2), min(…), max(…), abs(x), concat(first; ' '; last), join(' / '; a; b), days(start; due) and today(). Text goes in single quotes. Comparisons (= != < <= > >=), and, or and not give yes or no.

On a clients table, billed = sum(jobs.total), avg(jobs.hours) and count(jobs) total the rows of jobs whose choice(from clients.name) column names this client. For rows kept in a file, name the file in double quotes: points = sum("data/picks.csv".points), where each pick names its player with choice(from data/players.csv).

The records have no field for it. Views show it, sort and filter by it, and never type into it. To keep a helper column out of views, write hidden after the sum: guess = if(a > b; 'home'; 'away') hidden. readonly, help and if work there too.

A total
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks columns title, hours sum hours
Rendered

See also Data and viewsSpec D120, D138

set holidays data

#

The days off that working days (wd) skip: set holidays NAME in the rules block.

NAME is a data block of the document, or a data file (set holidays holidays.csv). Its first date column gives the days, one row a day. A date column called to makes a row a span.

A source that cannot be read gives a warning at the set line, and working days then skip weekends only.

Due within ten working days
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: tasks filter due <= today+10wd
Rendered

See also Data and viewsSpec D119

set merge data

#

Makes the document a template with a copy per row: set merge guests, then {{name}} where a row's value goes.

The rows are a data block of the document (set merge guests), a query or totals (set merge late, set merge bill: a statement per client), a data file (set merge guests.csv), a table of a database (set merge shop.sqlite/clients.csv), or a data block of another document (set merge people.self#guests). The fields need inline {{_}} -> var.

No need to type it: /mail on an empty line opens Mail merge, which asks where the rows are; the Field button over the page, or typing {{, puts a field in.

Arrows over the page step through the rows. File › Export › Mail merge… makes one PDF with a page per row, or a web page, Word file or .self file per row. Outside a merge a field shows the document's own set NAME value.

A letter per task
selfscribe
~~~ selfscribe
use data
set merge tasks
set owner Someone
set hours a few
inline {{_}} -> var
~~~
Dear {{owner}}, {{hours}} hours of work are yours.

```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

Rendered

See also Data and viewsSpec D135

sqlite (reserved) data

#

Reserved for a future read-only database connector. It shows a warning today.

view: sqlite PATH "QUERY" will read a database in the desktop app, with Export to CSV as the way back to plain text.

Reserved
selfscribe
~~~ selfscribe
use data
~~~
```data tasks as hidden
title, status:choice(todo|doing|done), owner, hours:number, due:date, tags:list
Write the spec, doing, Ada, 5, 2026-09-20, "docs, engine"
Review fixtures, todo, Bo, 3, 2026-09-24, tests
Ship v1.3, todo, Ada, 8, 2026-10-01, release
Draft notes, done, Cy, 1.5, 2026-09-12, docs
```

view: sqlite ./crm.db "select * from people"
Rendered

Shows a warning on purpose: “reserved for a future read-only connector”.

See also Data and viewsSpec D80

Editor

#

Modes, the inspector, wizards, preferences.

Page break syntax

#

A line ---page--- (in Markdown documents) starts a new page when printed or exported to PDF.

Any rule whose output has the class self-pagebreak is a page break: printing and PDF export start a new page after it, and on screen it shows as a dashed line. The Markdown rulebook writes it as a line ---page---. Your own rules can use the class too, for example line === _ === -> hr.self-pagebreak.

Export… (Ctrl+Shift+E) makes a web page or a PDF of the document with its style, colours and fonts. Print or save as PDF (Ctrl+P) prints it with page numbers and the title at the top of each page.

Syntax
---page---
Two pages
selfscribe
~~~ selfscribe
use markdown
~~~
# Part one

The first page.

---page---

# Part two

The second page.
Rendered

See also style preferences.selfSpec D94

Pictures, audio and video in folders editor

#

Relative picture links show files of the folder. Paste or drop a picture to save it.

In a document of a folder or a workbook, ![A cat](images/cat.png) shows images/cat.png from next to the document (a leading / starts at the folder's root). The file is read from the folder on your machine. Nothing is uploaded or fetched, and web images keep working. An audio or video file linked the same way gets a player. So does a media line.

Paste or drop a picture into the editor and it is saved in an images/ folder beside the document (audio and video in media/), named after the file, and the link is inserted where you are, as one undo step. Outside a folder there is no folder to save into, so the editor says so and inserts nothing.

See also Folder of documents Workbook mediaSpec D85

Emoji picker editor

#

Search emoji by name and insert them: toolbar, palette, /emoji or Alt-;.

Open the picker from the toolbar, from the palette (Insert emoji…), with /emoji in the slash menu or with Alt-;. Type to search names and keywords, move with the arrow keys and press Enter. Recent emoji come first.

It inserts the character itself, or the short name (:tada:) when the document has an emoji rule and the name is one the engine knows.

See also emojiSpec D92

Source mode mode

#

Plain text with highlighting derived live from the rules.

Source mode shows exactly what is in the file, with line numbers, fold markers and squiggles for problems. The colours come from the document's own rules: change a rule and the highlighting changes on the next parse. There is no second grammar to keep in sync.

See also Hybrid mode Preview mode Split modeSpec 06 §1-2

Hybrid mode mode

#

Every line renders in place, except the one you are editing.

Hybrid mode, the default, is a live preview inside the editor: each block of the document is shown rendered, and the block under the caret shows its source so you can edit it. Move the caret away and it renders again.

Show syntax keeps every line as styled source instead: headings sized, strong text bold, delimiters visible but muted, and a rendered picture only under blocks that are not text (diagrams, images, tables). The choice is stored as set hybrid-syntax hidden|shown in preferences.self.

set rules hide in a document folds its rules block away in hybrid mode and preview.

See also Source mode Preview mode Split mode rulesSpec 06 §1-2, D75

Write mode mode

#

The rendered page, edited in place like a word processor.

Write mode shows the document rendered and lets you type into it. Click a word and type: the text changes in the source at exactly that place, so delimiters, links and formatting stay as they are. Enter continues a list or starts a new paragraph, Backspace at the start of a heading or list item turns it back into a paragraph, and Ctrl+Z undoes, all following the document's own rules.

Click a link or picture to change where it points or its description. Code blocks, tables, diagrams and other blocks that are not plain text open their source in a small editor over the page.

The ⋮⋮ handle beside each block (or Alt-/) opens the block menu. The source is always the truth: switch to source or hybrid mode at any time to see exactly what was written.

See also Hybrid mode Preview mode Block menuSpec 06 §1, D95, D96

Block menu editor

#

Turn a block into any rule of the document. Move, duplicate or delete it.

Point at a block and click the ⋮⋮ handle beside it (in write, hybrid or source mode), or press Alt-/ at the caret. Turn into lists the document's own line and block rules, grouped like the slash menu, with a rendered sample of each: a paragraph becomes a heading, a list, a quote, a callout or a code block, and back to plain text.

Turning reads the words of each line through the rule that matches it, so ## Title, - Title and // ! Title all turn into each other, and a fenced block is unwrapped when you turn it into lines. Move up and down swap the block with its neighbour. Duplicate and delete keep the blank lines tidy. Every change is plain text and one undo step.

See also Write mode Help while you typeSpec D95

Comments editor

#

Comments on a stretch of text, kept in comments.self next to the document.

Select some text and press Alt+Shift+C (or Comment on selection in the Comments panel). A comment is a to-do until you resolve it. A note has nothing to do. Reply, reopen, edit or delete it from the panel. The text is marked in every mode, with a 💬 badge in the margin.

Comments are kept in comments.self in the document's folder, a readable Selfscribe file: one field: value record per comment in a data block, which opens as a board of to-do, done and note cards. A comment remembers the exact text it is on and a few words around it, so it follows the text when lines move or the words are respaced. If its text is deleted it is shown as orphaned until you attach it to a new selection. Your name for comments is set author in preferences.self.

See also preferences.self Write modeSpec D97

Automations editor

#

Buttons, triggers and connectors that make a folder of documents do things, written as files.

To connect a service you already use, open Settings › Automations › Gallery. Stripe payments, Airtable records in and out, a Notion database, a message to a Slack channel, and records sent to Zapier or Make each come ready, with a page that says where to get the key. The key is kept as a secret in this app, never in the folder. Xero invoices, Xero contacts (both ways) and Google Sheets rows sign in instead: see Signing in to a service.

To keep records in step with a service both ways, fetch with {since} and send with tests on steps. {since} is when the connector last fetched everything it asked for, and is empty the first time, so set header If-Modified-Since: {since} asks only for what changed (an empty header is not sent). set step if id is empty then call make-contact and set step if id is set then call update-contact choose by the record; if also takes a test such as total > 500. What a fetch writes is never sent back, and sends that cannot go wait in the log until the service can be reached. Write set write sync id rather than merge: a fetch then goes field by field, so a change made here that is not sent yet is kept, and a field changed on both sides is named in the log. It takes the service’s value, or yours with set write sync id prefer here, and the field waits in Settings › Automations › Run log: Keep mine writes yours back and sends it as a change, Keep theirs keeps the service’s.

A folder can hold actions (actions/NAME.self: steps such as adding a line to a file, a row to a table, or fetching data), connectors (connectors/NAME.self: one web request whose reply is written to a data file) and automations (automations/NAME.self: when something happens, run an action). Each is a Selfscribe file of set KEY VALUE lines with a description under it.

A document runs an action with a button: any rule that gives an element data-self-action=NAME, for example inline [[_|_]] -> span.self-button data-self-action=_2 _1 and then [[Refresh the weather|refresh-weather]]. To run one for a single record, put a button in each row of a view: view: data/plants.csv as table button Watered runs watered, and the action reads the row's cells as {name}, {room}. The first time an action runs you see exactly what it will do and choose to run it once or always allow it. Automations stay off until you switch them on in Settings › Automations, which also has dry runs, the run log, secrets (API keys, kept encrypted outside the folder and used as {secret:NAME}) and ready-made examples such as a home dashboard.

Connector keys: url, method, header Name: value, body, type, field NAME DEFAULT. The reply is read as format json (default), csv, xml (RSS and Atom feeds) or text. pick and map COLUMN PATH choose what becomes a row. where COLUMN OP VALUE (=, !=, >, <, >=, <=, contains, has), sort COLUMN [desc] and limit N shape the rows. output is a .json, .csv, .tsv, .self or .md file, and write append or write merge KEY keep what the file had (a history). A .self or .md output takes row (the line per row, such as - [{title}]({link})) and heading (the lines above them).

Action steps: append FILE TEXT, prepend FILE TEXT, write FILE TEXT (replaces it), create FILE TEXT (only when it is not there yet), add-row FILE a | b | c, call CONNECTOR, copy TEXT, notify TEXT, open FILE. Texts and file names use {today}, {time}, {weekday}, {month-name}, {year} and what the trigger gives (a comment's {body}, a saved {doc} and its {words}, a changed record's cells). \n is a line break. Triggers: when comment added [todo|note], comment resolved, comment replied, file changed FILE, every N minutes, daily at HH:MM, document saved, open, and for a change made in a data view record added [SOURCE], record deleted [SOURCE], record changed [SOURCE [COLUMN [to VALUE]]] (the action gets {source}, {record}, {changed} and each cell by its column name, such as {status}). In the desktop app requests are made by the app itself (any web service works) and secrets live in the system keychain.

See also Comments Folder of documents What reaches the internet Make a flow do the work Signing in to a serviceSpec D98, D99, D103

Make a flow do the work editor

#

Give a flow’s steps an action with do=, its ways a test with if=, and a button or an automation runs it, step by step on the diagram.

Draw the process as a flow, then say what each step does: node send "Send the invoice" do=send-invoice runs the action actions/send-invoice.self there. At a decision, give a way a test: link check -> approve "yes" if="total > 500". The way without a test is the one taken otherwise. Tests are written as in calculated columns: status = 'paid', due < today and not paid.

Name the flow with a line diagram orders. A button whose action is flow:orders runs it, with the button’s data-self-arg-* values as the record: [[Process|flow:orders|900]] with a rule that puts 900 in data-self-arg-total. An automation runs it with set do flow:orders, on the record it heard about: set when record changed data/orders.csv status to placed.

To make a column follow a flow, write set track=orders column=status in it. Its steps are the values a status may have and its links the moves. Change a status in a table to a step the flow can reach, and that step’s do= action runs with the record. Change it to anything else and it is put back, with a notice that says where it can go.

A step can wait. node ok "Approve the leave?" wait=answer stops the run and asks, with one button per way out of the step: the way the person picks is the way the run goes on, and its action gets {answer}. wait=3d (or 30m, 4h, 2w), wait=2026-12-01 (nine in the morning), wait=2026-12-01T14:30 or wait=start (a day in the record’s start column) holds the run until then. Waiting runs are kept for the folder on this computer and go on when their time comes; one due while the app was closed goes on when the folder opens. Settings › Automations › Run log lists them: go on now, or let one go.

A record added with that column set comes in at the flow’s start: added at the start, the start’s action runs; added further along, it is set to the start and you are told why.

A flow kept as a file, flows/orders.flow, runs the same way. Draw it on a page with a flow block from flows/orders.flow and set keep=panel, and that page shows each run moving.

Add set start=in keep=panel to the flow, and a data block panel holds the step it is on: the diagram lights each step as the run reaches it, and its trail shows the way the run went. Each action asks before its first run, as every action does. When a run stops early, the notice says where and why.

See also Automations What reaches the internetSpec D234

What reaches the internet editor

#

Nothing connects that you have not looked at: actions ask first and again when they change, and web pictures wait for a click.

An action asks before its first run, and shows every request it will make with secrets hidden. Always allow keeps that answer for what you read. If the action, or a connector it calls, changes later, by hand, by sync or from someone sharing the folder, it asks again and says it has changed. An automation that changed since you turned it on stays off until you look at it in Settings › Automations.

A picture, sound or video from the web waits as a quiet box that names its server, because loading it would tell that server you opened the document. Click it, or run Load pictures from the web, to load the ones in this document. The notice then offers Always in this folder. To undo it, run Stop loading web pictures in this folder.

In the desktop app, the first time anything connects to a server, or sends a secret to one, the app asks in a window of its own, which no document or plugin can draw. Secrets stay in the keychain: the app writes them into a request itself, so nothing on the page can read one.

Secrets live in your computer’s keychain or the browser’s encrypted store, never in the folder. Web pages in documents load only when you click them. Imports from the web are off. CSS in documents cannot fetch anything. The app looks for updates on GitHub unless you turn Look for updates off in Settings.

See also Automations Keep my computers in step Signing in to a serviceSpec D74, D99, D110, D233

Signing in to a service editor

#

Connectors for Xero, Google and other services that sign you in: press Sign in once, and the app keeps the sign-in fresh.

Some services give no key to copy: you sign in to them. Add set sign-in NAME to the connector, send {secret:NAME} where the service wants its token (usually set header Authorization: Bearer {secret:NAME}), and give set client-id the id of the app you registered with the service.

For xero, google, microsoft, hubspot, quickbooks and github, the name (or set service NAME) is enough: the app knows their addresses. For any other service, add set authorize URL (its sign-in page) and set token-url URL. Services that want a client secret take set client-secret NAME, the name of a secret you saved. set scope, set redirect http://localhost:PORT/callback and set sign-in-param KEY VALUE are there when a service needs them.

In Settings › Automations, the connector’s card shows how the sign-in stands and has a Sign in button, with the return address to register with the service. The app, on a computer or a phone, opens the service’s own page in your browser and keeps what it gets back to itself: in the system keychain on a computer, in the app’s own storage on a phone. It renews the sign-in by itself, and no page ever sees a token. To sign out, remove the secret of that name.

On the web, save an access token from the service as the secret NAME instead. It works until the service lets it run out.

Services often send days as date-times: set map due DueDate|date keeps the day. set first-row names reads a sheet whose first row names its columns.

See also Automations What reaches the internetSpec D99, D233, D235

Preview mode mode

#

The rendered document only.

Preview shows the rendered HTML, with plugins drawn. Click a link to open it in your browser. The size of the preview can be changed separately from the editor's font size.

See also Split mode Hybrid modeSpec 06 §1

Split mode mode

#

Source on the left, preview on the right, scrolled together.

Split mode shows the source and the preview side by side. Scrolling one scrolls the other to the same place, matched through the engine's spans, so the two always line up.

See also Source mode Preview modeSpec 06 §1

Inspector editor

#

Which rule made this, where it came from, and what it replaced.

Put the caret on anything in the body, or click it in the preview, and the Inspector answers in plain words. What it is says whether it is a heading, a list item or a word your rules style, and where it sits. How it looks gives its colours, weight and spacing, and whether they are easy to read. Where it comes from names the document, rulebook or imported file, the other rules it wins over, and any problems at that spot.

Change how it looks… opens the style designer for that rule. More copies a borrowed rule into this document, turns it off here, saves it to a rulebook or opens its line. Details for rule writers shows the exact rule and the CSS it makes.

At the bottom, This document lists what the document says about itself: its rulebooks, look, paper, column, layout, language and plugins, with Page setup and Look buttons to change them.

See also Rule Rule wizardSpec 06 §3, D28

Rule wizard editor

#

Build a rule by example, with a live sample, and get plain rule text.

The rule wizard walks through one rule: the kind (inline, line, block, word), the pattern (type a sample and select the part that varies), what it becomes, options, and a style designer. The sample renders live as you go.

It writes ordinary rule text into your rules block: the short form when the rule fits on one line, the full form otherwise. It keeps no state of its own.

See also Rule rule InspectorSpec 06 §4

Help while you type editor

#

Suggestions, hover cards, colour swatches and inline problems in the rules block.

In the rules block the editor suggests every word you can write there (kinds, what rules become, options, attributes, use names, set settings) and CSS properties as you type (Ctrl+Space asks for them). Hovering a word shows a short card with an Open in dictionary link. F1 opens the word's full entry.

Each colour gets a swatch. Click it to pick a new colour, and the pick edits the text. The swatch beside a palette colour, var(--name), changes the palette entry, so every rule that uses it follows. Typing var(-- offers the palette's names.

Problems appear quietly at the end of their line, such as a colour that is hard to read on a light or a dark page, often with a fix.

See also Keyboard shortcuts Rules blockSpec 06 §2

preferences.self editor

#

The editor's settings, as set lines in an ordinary Selfscribe file.

Everything in Settings is written to preferences.self, a Selfscribe file with a rules block of set KEY VALUE lines. You can open it as text and edit it by hand. Comments and unknown lines are kept.

Keys: theme, theme-light, theme-dark, document-themes (on: the set theme of the open document colours the app), collapse-blocks (on: long code and plugin blocks fold in the middle), collapse-lines (how many lines make a block long), rule-bar (a strip over the editor with the marks and line rules of the document), autocorrect (corrections from snippets.self as you type), vim (Vim keys), key-COMMAND (new keys for a command, or none), prose-font (serif or sans), ui-size, editor-size, preview-scale, line-height, measure, centered (off: Write and Preview full width by default), hybrid-full-width (on: Hybrid uses the whole window), source-full-width (on: Source uses the whole window), update-check (look for new versions, on or off), update-install (close: a downloaded update installs when the app closes, or ask: only when you press Restart), wrap (word wrap on or off), spellcheck (underline misspelt words, on or off), spell-language (auto, en-GB or en-US: the English the right-click menu suggests spellings in), context-menu (app or system: which menu a right click opens), context-menu-layout (grouped or full), context-menu-header and context-menu-quick (on or off: the menu names what was clicked, and has Cut, Copy and Paste as buttons), auto-pair (brackets and quotes close as you type), smart-typography (curly quotes, dashes and the ellipsis as you type), style-check (hints on filler words, wordy phrases and very long sentences),typewriter (in focus mode), typewriter-always (the caret line in the middle all the time), focus-dim, autosave, default-mode (last, source, hybrid, write, preview or split), motion (system, reduced or full), sidebar (left or right), reading-aids (breadcrumbs, time left in the section and a progress line), whole-preview (draw the whole preview at once, for screen readers and find), developer-tools (the Developer panel), outline-auto (open the Outline for long documents), author (the name your comments are signed with), paper (A4 or Letter: the paper of documents that do not choose one), page-layout (scroll, pages or slides: how the preview lays out documents that do not say, see set layout), device (auto, desktop, tablet, phone, eink or eink-colour: the layout of the app itself), daily notes daily-folder (where they go, daily unless you say) and daily-template (default, or the file a new day starts from), quick capture capture-file (the file lines go to, inbox.self unless you say), capture-time (on: each line ends with the date and time) and capture-hotkey (the desktop app's shortcut that works in every app, or none), reminders (on: a notification when a countdown reaches zero, see reminders), hybrid-syntax (hidden or shown), rules-block (shown, collapsed, hidden in hybrid, or auto: a chip until you click into it), ui-style (default, minimal, soft, classic, compact or mono: the shape of the editor, with any theme), app-icon (theme, magenta, blue, teal, green, amber, red or graphite: the colour of the app’s own mark), app-icon-tile (off draws the mark without its tile), illustrations (off hides the small document characters shown where a place is empty), the fonts font-ui, font-editor, font-prose and font-code (default, a font from the gallery such as literata or atkinson-hyperlegible, or custom:NAME for a font installed on the computer), and the view options line-numbers, show-blank-lines, show-whitespace, show-line-endings and indent-guides (on or off).

The toolbar and side rail layout are lines too: set toolbar (items per region, separated by |), set toolbar-hide, set rail and set rail-hide (Customise toolbar… in the ⋯ menu writes them). Other parts of the app keep their keys in the same file: default-rulebook NAME for new documents, and plugin-NAME on|off plus plugin-NAME-KEY VALUE for plugins.

A preferences file
selfscribe
~~~ selfscribe
set theme system
set theme-dark nord
set prose-font sans
set sidebar left
set plugin-chart on
set plugin-mermaid-theme auto
~~~
Rendered

Only a rules block: nothing to render.

See also Plugin Library Hybrid mode View optionsSpec D73, D75, D79

View options editor

#

Show blank lines, whitespace, line endings and indentation guides while you write.

The View options button beside word wrap and full width (the eye) switches marks that make the invisible visible, in source and hybrid mode. They are for you, not for the document: they are saved in preferences.self, never in the text.

  • Line numbers (set line-numbers off hides them): the numbers down the side of Source, and of Hybrid when you turn them on for a document.
  • Show blank lines (set show-blank-lines on): a faint dotted rule on every empty line.
  • Show whitespace (set show-whitespace on): spaces as dots, tabs as arrows, and spaces at the end of a line tinted.
  • Show line endings (set show-line-endings on): a ¬ at the end of each line.
  • Indentation guides (set indent-guides on): a thin line for each level of indentation, a tab or the document's indent width.

Each is also a command in the palette and a switch in Settings. They are drawn only for the lines on screen, so they cost nothing on long documents.

See also preferences.self style indentSpec 06 §9, D79

Ctrl+F finds in the document or the preview. Ctrl+Shift+F searches every file and open tab.

Ctrl+F opens the find bar over the document, in every mode. Its toggles are match case (Alt+C), whole word (Alt+W) and regular expression (Alt+R). It shows how many matches there are and which one you are on ("3 of 120"). Enter and Shift+Enter (or F3 and Shift+F3) go to the next and previous match. The arrow keys bring back earlier searches. Escape closes it.

Ctrl+H adds a replace field. As you type, every match in the text shows crossed out with its replacement beside it, before you change anything. Replace changes the current match and moves on. Replace all changes every match as one step, so one Ctrl+Z puts everything back. With a regular expression the replacement can use $1, $&, $<name> and \n. Preserve case (Alt+P) keeps each match's capitals: replacing ferry with boat turns Ferry into Boat and FERRY into BOAT.

To see every match with its line, press Alt+I. The Search panel opens on This document, with your search, filter and replacement. Click a line to go there. While replacing, each line shows its change, and the button at its end replaces that one alone. Switch to Open documents or Folder at the top to look further.

Drag a line of the Search panel into another document or another app to copy the match. Drag its grip to copy the paragraph, section, table row or record around it. A record arrives in other apps as a small Markdown table. Hold the drag over a tab and that document opens, so you can drop it there.

In the preview and in Write the find bar searches what you read, the rendered text of the whole document, even the parts of a long document that are not on screen yet. Matches are marked on the page, and the bar scrolls to each one. In split mode it searches the side that has the focus. A switch in the bar changes sides. In hybrid mode going to a match shows that block's source.

The Search side panel (Ctrl+Shift+F) searches the open folder or workbook and every open tab, unsaved changes included, with the same toggles, files to include or exclude (*.self, docs/) and a structure filter. Results are grouped by file. Click one to open the file at the match. Replace all there shows every file it would change, with the changed lines, and asks first: open tabs are edited in the editor (one undo step each, not saved), other files are written, and Undo in the panel puts them back.

Searching never freezes the editor, even in a document of several megabytes: it works in small steps between keystrokes.

See also Search filters Build a search pattern in plain words Keyboard shortcutsSpec 06 §8, D78, D230

Build a search pattern in plain words editor

#

Alt+B in the find bar inserts pattern pieces named in words, like "A digit" and "One or more". The pattern is read back in a sentence under the query.

Press Ctrl+F, then Alt+B or the button beside the regular expression toggle. A menu lists pieces by kind: Characters, How many, Where and Groups. Pick A digit, then One or more, and the query finds 7, 42 and 2026. Select part of the query first and a piece wraps it: select ferry, pick Maybe (optional), and the pattern finds the word with or without it.

Under the query, the pattern is read back in one sentence: \d{4} finds "a digit (0-9), exactly 4 times". It reads patterns you type yourself too, so you can check one before you replace with it.

Ready-made in the same menu gives whole patterns for common searches: a date, a time, an email address, a web address, a number, a word said twice, and spaces at the end of a line.

Remember as $1 keeps what a part found for the replacement. Find (\w+), (\w+) and replace with $2 $1 to turn "Moreau, Ana" into "Ana Moreau".

See also Find and replace Search filtersSpec 06 §8, D230

Search filters editor

#

Find only in headings, in code, in what a rule made, inside a section, on open tasks, or in files changed lately.

The funnel button of the find bar (and the Search panel's Structure filter field) takes a filter line. It limits where matches count, using what the engine knows about the document, so it works for any syntax your rules define, not only Markdown.

  • in:heading: only in headings (h1 to h6, whatever rule made them).
  • in:code: only in code (code, pre, kbd, samp, and verbatim rules).
  • in:link, in:quote, in:list, in:table: only in links, quotes, list items or tables.
  • in:rules: only in the rules block.
  • in:plugin: only in blocks a plugin draws, like charts, maps and data blocks. plugin:map keeps one plugin's blocks.
  • in:record: only in the records of data blocks, the lines under the column line.
  • target:NAME: only in text a rule turned into NAME, for example target:h2 or target:mark.
  • rule:NAME: only in text made by the rule named NAME (as NAME), or else by rules with the class NAME.
  • section:TITLE: only inside the section under a heading called TITLE, down to the next heading of the same or a higher level. Quote titles with spaces: section:"Getting started".
  • tag:NAME: only on lines that carry #NAME, for example tag:garden.
  • task:open, task:done, task:due, task:overdue, task:any: only on task lines (- [ ] call Sam), by their state or due date.

In the Search panel, path: and changed: choose files. path:journal/ keeps files whose path matches a glob (*.md), a folder or part of a path. changed: keeps files changed today, yesterday, in the last 7d, 2w or 3m, on a day (2026-10-01), in a month (2026-10), or before or after one (<2026-10-01, >2026-10-01).

A filter needs no search text. Leave the query empty and the Search panel lists what the filter selects: task:open lists every open task in the folder, and changed:today lists the files changed today. To keep a search you use often, press the bookmark button. It keeps the query, toggles, files and filter, and a click runs it again.

Put - before a term to leave that place out: -in:code finds words in the prose but not in code samples. Terms of the same kind add up (in:heading in:code is headings or code). A section: term narrows them (in:code section:Install is code inside the Install section). A heading's own markers, like ##, are not part of it.

In the preview the same filter applies to the rendered page. Filters wait for the document to be parsed, so they are never out of date.

Syntax
in:heading  in:plugin  in:record  target:h2  plugin:NAME  rule:NAME  section:"Title"  tag:NAME  task:open  path:GLOB  changed:7d  -in:code
Try rule:tip, in:heading or section:Setup here
selfscribe
~~~ selfscribe
use markdown
block  ::: tip ... :::  -> aside.tip  { border-left: 3px solid seagreen; padding-left: 0.8em }  as tip
~~~
# Setup

Install the tool, then open the settings.

::: tip
The settings file is plain text.
:::

## Settings

Edit `settings.ini` to change the settings.
Rendered

See also Find and replace Rule asSpec 06 §8, D78

Write [[Name]] to link to another document. The Links panel shows what links here, the Tags panel every #tag.

Write [[Trip plan]] to link to the document Trip plan.self. The name can be a file name or a set title, in any case. [[Trip plan#Budget]] goes to a heading, and [[Trip plan|the plan]] shows other words. In the editor, Ctrl+click a link to open it (Cmd+click on a Mac). In the preview, a click opens it, and in Write a Ctrl+click does.

A link to a document that does not exist yet is dimmed. Click it and choose Create to make the document next to the one you are in.

The Links side panel lists the documents that link to the one you are reading, each with its line, and the links it makes itself. Under Mentioned, not linked are the lines of other documents that name it (its file name, title or alias) without a link: Link turns the name into [[Name]], and Link all does them all. The Tags side panel counts every #tag in the folder. Pick a tag to see the lines that carry it, and pick a line to go there. To search only those lines, add tag:NAME to a search filter.

Typing [[ suggests the documents of the folder, # the tags you already use, and @ the names you mention. Nothing is suggested in the rules block or in code.

Links and tags come from the text itself, so they work in any document. A # needs a space or the start of a line before it and a letter in the name, so # Heading, C# and #1 are not tags. A document whose own rules give [[...]] a meaning, such as a timer or a button, keeps that meaning.

Without a folder, links and tags work between the open tabs. Open a folder to see links across all its files.

See also Folder of documents Find and replace Search filters Graph of links Obsidian vaultsSpec 06 §8

Graph of links editor

#

See how your notes link: each note is a circle, each link a line. Click a note to open it.

Open the Graph side panel. Its Open the graph large button shows it in a big window. Bigger circles have more links, and the note you are in is marked. Hover a note to light up the notes it links with, and click it to open it.

To narrow it down, type in Filter notes or pick a tag. Nested tags count too, so #garden also shows notes tagged #garden/pears. The neighbours button shows only the open note and the notes up to two links away.

Drag to move around, and use the wheel or the zoom buttons to zoom. With the keyboard, the arrow keys move from note to note, Enter opens one, + and − zoom and 0 fits the graph.

The graph is drawn from the same links as the Links panel, [[Name]] and ![[Name]] alike. A big folder settles over a moment, and you can keep typing meanwhile.

See also Links, backlinks and tags Obsidian vaultsSpec 06 §8

Query blocks editor

#

List the open tasks or the notes of the folder on any page, kept up to date: a ```query block.

Write a fenced block whose first word is query, then say what to list: tasks open in:garden/ sort due, or notes #trip sort changed desc. The block shows what it finds as a list, and keeps up as you write in any note.

Tick a task's box in the results and the task is ticked in its own note: in its tab when it is open (unsaved changes stay unsaved), else in the file. Click a task or a note to open it at that line.

A task is a line that starts with a box: [] water the beds, - [ ] book the ferry, [x] done. Give it a date with 📅 2026-11-02 or due:2026-11-02.

  • tasks or notes, then open, done or all for tasks (open is the default).
  • in:garden/ a folder, in:. this note's folder, in:this this note. path:archive/ a path pattern.
  • #garden or tag:garden, @sam, links:"Trip plan", title:lisbon, and plain words or "quoted words".
  • due: and changed: take today, overdue, none, 7d, 2w, 2026-10, 2026-10-28, <2026-11-01 or >=today+7d.
  • - before a filter leaves those out: -in:archive/.
  • sort due, sort changed desc, limit 10, and as table, as cards, as board (open and done columns) or as calendar.

The results are a data view, so its buttons search, sort and filter them. An export shows them as they are when you export. A problem in the query shows above the results, and the rest of the query still runs.

Syntax
```query tasks open #garden due:7d sort due as board

See also Links, backlinks and tags Search filtersSpec D138

Obsidian vaults editor

#

Open an Obsidian vault as a folder: its Markdown notes, links, embeds, properties and callouts work as they are.

Choose File › Open folder… and pick the vault. Its .md notes render as Markdown, and [[links]], [[Note|other words]], [[Note#Heading]] and #tags work, nested tags such as #garden/pears included. The .obsidian settings folder and the .trash folder are left out.

![[Note]] shows that note on the page, and ![[Note#Heading]] just that section, with a link to the note above it. ![[harbour.png]] shows the picture, wherever the vault keeps it, and ![[harbour.png|200]] makes it 200 pixels wide. A note never shows itself inside itself, and embeds stop a few levels deep.

Properties at the top of a note, between two --- lines, show as a small card instead of text. Their tags: count as tags, and aliases: are other names links find the note by.

A quote that starts with [!note] Title is a callout. [!tip]- starts folded, and [!tip]+ can be folded.

Selfscribe writes nothing into the vault except the edits you make. It adds no rules block to your notes. Like every folder, it keeps the open tabs in .selfscribe/state.json inside the vault.

See also Links, backlinks and tags Graph of links Folder of documentsSpec 06 §8

Rule bar editor

#

A strip over the editor made from the rules of the document: its marks, what a line can become, its words.

The rule bar sits on top of the editor in Source, Hybrid and Split. Everything on it comes from the rules of the document, so the marks you invent are one click away, and it follows the rules block as you edit it.

  • The first menu is labelled with what the line under the caret is now, such as Text or Heading 2. It lists the line and block rules of the document, grouped, and turns the lines into the one you pick. Hover a choice to see it drawn with your rules.
  • Each mark (an inline rule) wraps the selected words, or unwraps them when they have it already.
  • Words inserts a word that a word rule styles.
  • Insert opens the gallery of blocks, diagrams, charts and media.

To hide it, press its ×, or turn off View › Show in the editor › Rule bar or Settings › Editing › Rule bar. That writes set rule-bar off in preferences.self.

See also Block menu inline preferences.selfSpec 06 §1

Snippets and autocorrect editor

#

Type /name to insert text you use often. Typos you list are fixed as you type.

Type / and a snippet name at the start of a line, such as /signature, and press Enter. Your snippets come first in the slash menu. Tools › Snippets and autocorrect… opens them in Settings, where you make, rename and delete them, and Insert at the caret inserts one.

A snippet fills in {{date}}, {{time}}, {{weekday}} and {{title}} when it is inserted, and the caret goes to {{cursor}}.

The Autocorrect tab lists what you type and what it becomes, such as teh and the. The word is replaced when you type a space or punctuation after it, never in the rules block or in code, and Ctrl+Z puts it back. Settings › Editing › Correct as you type turns it off (set autocorrect off).

All of it is snippets.self in the storage of the app, plain text you can edit by hand. Each ## name section is a snippet, and the ## autocorrect section holds one wrong -> right line per correction.

See also Help while you type preferences.selfSpec 06 §5

Fold long blocks editor

#

A long code, data or chart block shows its first and last three lines while the caret is elsewhere.

A code block, a data block or any plugin block longer than a dozen lines folds in the middle, with a line such as ⋯ 20 more lines. Click it, or move the caret into the block, and it opens. Leave it and it folds again. Line numbers stay those of the text, so the hidden lines are skipped, not renumbered.

It happens in Source, and in Hybrid while the syntax shows. Where Hybrid draws the page, the block is already a picture.

Settings › Editing › Fold long blocks turns it off (set collapse-blocks off), and Long means more than chooses how many lines make a block long (set collapse-lines 20).

See also Source mode Hybrid mode preferences.selfSpec 06 §9

Today's note editor

#

One note a day, made from a checklist the first time you open it. Alt+T opens today's.

Press Alt+T, or Today on Home, or File › Today's note. It opens daily/2026-09-27.self in the open folder, with the date of your own clock. With no folder open it is kept in the app's own notes, and Ctrl+S saves it there.

A new day starts as a checklist with the rules of the Today tour: [] is a box to tick and [x] a ticked one, a ! makes a line urgent, (9:30) is a time chip, and progress: … counts what is done. A countdown such as ((2026-10-17 09:40 ferry)) can remind you, see reminders.

When the last note left boxes unticked, a message offers to Carry over them. Edit › Carry over unticked items does the same at any time. They go in under your last task, each once, and Ctrl+Z takes them out. The arrows beside the date in the status bar go to the note before or after.

To use your own template, save it as templates/Daily.self in the folder, or name any file with set daily-template templates/day.self in preferences.self. In it, {{date}}, {{isodate}}, {{weekday}} and {{title}} become the note's day, and the caret goes to {{cursor}}. set daily-folder journal puts the notes elsewhere.

See also Note templates Quick capture Recurring tasks Reminders preferences.selfSpec 06 §5

Note templates editor

#

Start a meeting note, a review or a journal page from a template kept in the folder.

A template is any document in a templates/ folder. It serves the folder that holds it and everything under it, so templates/ at the top serves the whole folder and work/templates/ serves work/.

Choose New note from a template… in the palette, or right-click a folder in the Files panel. Pick a template, name the note, and it is made in the folder you are in and opens. The nearest templates come first. A folder with none yet is offered templates/Note.self to start from.

In a template, {{title}} becomes the note's name, {{date}}, {{isodate}}, {{time}} and {{weekday}} the moment it is made, and the caret starts at {{cursor}}. The file name is filled in too: templates/{{isodate}} Meeting.self makes 2026-10-28 Meeting.self. Type a path in the name, such as meetings/Kickoff, to put the note in a folder.

templates/Daily.self is the template of today's note.

See also Today's note Folder of documents Quick captureSpec 06 §5

Quick capture editor

#

Alt+Q opens a small box. Type a line, press Enter, and it goes to the end of inbox.self.

Press Alt+Q (or File › Quick capture…), type what is on your mind and press Enter. The line is added to the end of inbox.self in the open folder, or to the app's own inbox when no folder is open. Esc closes the box.

In a checklist such as the inbox the line becomes a box to tick, in Markdown a list item. Add the time ends it with the date and time, (2026-09-27 14:05). set capture-file notes/ideas.self chooses another file, and set capture-time off leaves the time out.

In the desktop app a shortcut can work from any app: Settings › Editing › Capture from anywhere, such as Ctrl+Shift+Space (set capture-hotkey). It brings Selfscribe forward with the box open. The web app has no such shortcut.

See also Today's note Share to inbox preferences.selfSpec 06 §5

Recurring tasks editor

#

Tasks that come back: [] water the plants every 3d in recurring.self goes into Today's note on its day.

Choose Recurring tasks… in the palette. It opens recurring.self beside the inbox, made with a few examples the first time. Write one task a line, ending in every and how often: [] take out the bins every mon.

How often: every day, every weekday, every weekend, every week, every 3d, every 2 weeks, every mon, every mon wed fri, every month, every month on 1, every month on last, every year.

When Today's note is made or opened, the tasks due go in once, as [] take out the bins ↻. Tick it there and its next: 2026-10-12 in recurring.self moves on. A task you leave unticked stays due, so it comes back tomorrow rather than being carried over.

You can change next: by hand. A ticked line in recurring.self is paused.

See also Today's note Quick captureSpec 06 §5

Share to inbox editor

#

Share a link or some text from another app on your phone, and it goes to the end of inbox.self.

On your phone, press Share in another app and choose Selfscribe. The text or link is added to the inbox the way quick capture adds a line, and Open inbox in the message opens it.

The web app offers this once it is installed from the browser (Add to Home screen). The Android app offers it as it is.

More: the web app receives shares as ?share-title=…&share-text=…&share-url=…, so a link of that shape adds to the inbox too.

See also Quick capture Today's noteSpec 06 §5

Reminders editor

#

A notification when a countdown such as ((2026-10-17 09:40 ferry)) reaches zero.

Turn on Settings › Editing › Reminders (set reminders on). The browser asks once whether the app may show notifications. When a countdown in an open tab or in a document of the open folder reaches zero while the app is open, you get a notification and a message in the app. Open in the message goes to its line, and so does clicking the notification in the browser.

A countdown with a time reminds at that time. One with only a date reminds at nine that morning. The words after the date name it: ((2026-10-17 09:40 ferry)) says "Reminder: ferry".

Only documents whose rules make countdowns count, such as a daily note. The app looks for them when a document is opened or saved, and keeps timers for the next few only.

See also until Today's note preferences.selfSpec 06 §5

Vim keys editor

#

The editor takes the modes and motions of Vim, and the shortcuts of the app still work.

Turn on Settings › Editing › Vim keys (set vim on in preferences.self). The editor then starts in normal mode, with the motions, operators and commands of Vim.

The shortcuts of the app, with Ctrl, Alt or an F key, still run their commands, since the app handles them before the editor sees them.

See also Keyboard shortcuts preferences.selfSpec 06 §1

Themes editor

#

The colours of the app: pick one from the status bar, or let a document choose while it is open.

Click the theme button in the status bar. Every theme shows as a small picture of itself. Point at one to see the whole app in it, click to keep it, and move away to put yours back. Settings › Appearance has the same choice, and Follow system matches the light or dark setting of the computer.

A document can ask for a theme with set theme, such as set theme cyber-dark. The app takes it while you look at the document, and your own comes back when you leave. Exports use it too, unless you choose other Colours in File › Export…. Settings › Appearance › Documents choose the theme turns this off (set document-themes off).

The theme changes the app. The look of the page itself is set style.

See also theme style preferences.selfSpec 06 §9, D132

Keyboard shortcuts

#

Every key the editor knows.

Keyboard shortcuts guide

#

Every key the editor knows, from its command list.

Press ? anywhere outside the text to see every shortcut at a glance (or Keyboard shortcuts at a glance in the palette). What works right now comes first: the keys of the slides, of the editor and the rule keys of the document. Type to find one.

To change the keys of a command there, press its pencil, then the new keys. Backspace removes them, and the arrow beside a changed one brings back the built-in keys. They are kept in preferences.self as set key-COMMAND COMBO, such as set key-view.wrap Alt+Shift+Z or set key-view.present none.

In the editor this page is generated from the command list, so it always shows the keys that are really bound. Every shortcut runs a command, and every command is also in the command palette (Ctrl+K), so you can always search for what you want instead of remembering a key.

F1 opens Help. With the caret on a word in the rules block it opens that word's entry. The Help side panel follows the caret as it moves.

Formatting keys come from the document's own rules: Ctrl+B, Ctrl+I and Ctrl+E apply the document's strong, em and code rules when it has them. Typing / at the start of an empty line opens the slash menu of the document's line and block rules.

See also Help while you type Vim keys key Start hereSpec 06 §1