2025-07-18

plaintext note and document formats

a few minimal plaintext formats for creating and managing notes or documents without friction.

newline-separated

the simplest format. each entry is added at the top, separated by an empty line. editing is fast and requires no syntax. if entries contain unescaped empty lines, entry boundaries become ambiguous.

example:

entry-1
entry-1
entry-2
entry-2

itpn (indent tree packet notation)

an indent-based, machine- and human-readable format for titled note blocks. top-level words act as tags or headings. indentation defines structure. no extra syntax needed. a management tool for itpn is included in sph-script.

heading
  content line
    nested or continued line
    nested or continued line
  content line
heading
  content line
  content line

benefits

  • no syntax beyond indentation
  • supports nested structure
  • low friction - just type. compatible with the newline-separated format
  • machine readable and convertible to other formats like markdown, pdf, and html
  • effective with smart indenting editors (example: cycling from forward 1-2 steps and then from the beginning)

markdown

a lightweight markup format standardized as commonmark. suitable for structured documents with headings, lists, and emphasis.

example:

# heading level 1

## heading level 2
- bullet point one
- bullet point two

benefits

  • widely supported and portable
  • readable as plain text
  • machine-readable and can be converted to pdf, html, or other formats

drawbacks

  • still requires markup prefixes (e.g. "#", "-", "*")
  • headings and lists must follow defined patterns
  • multiple alternatives for syntax are specified, for example for bullet points, code blocks, and even the whole heading structure.

neutral

  • structured by stacked blocks, not indent, except in nested lists

indent tree markup - itm

here is an example of an indentation-based syntax for structured documents. it includes forms that can be evaluated by custom procedures to create output like lists, tables and more.

expression properties

scope

  • inline: start and end somewhere on a line
  • indent: include all immediately following further indented lines
  • line: from their start to the end of the line

content interpretation

  • scm: start with # and arguments have to be valid scheme syntax
  • text: start with ## and arguments are plaintext

evaluation phase

  • ascend: itml expressions in arguments have been evaluated
  • descend: itml expressions in arguments have not been evaluated

inline expressions

inline-scm

#(identifier scheme-expression ...)

indent-scm

#identifier scheme-expression ...
  scheme-expression ...
  ...

inline-text

##(identifier plaintext/itml-expression ...)

indent-text

##identifier plaintext/itml-expression ...
  plaintext/itml-expression ...
  ...

line-scm, line-text

#identifier: scheme-expressions ...

##identifier: plaintext/itml-expressions ...

indent-descend

###identifier plaintext ...
  plaintext
  ...

the text is passed as a parsed tree without any nested expressions evaluated. this can be used for example to create block escaping

headings

a line before increased indent becomes a heading

this is a heading
  this is content
  and more example text
  a sub-heading
    more content

line breaks

each empty line, two newlines, creates one line break in the output

example text

more text after empty line

escaping

inline expression prefixes, colons and backslashes can be escaped with a backslash

\:
\#
\##
\###
\\

block escapes

###escape
  content
    content
  content