this page presents and specifies a few lightweight plaintext formats for creating and managing notes or documents.
the simplest note-taking format. each new entry is added at the top, separated by a boundary, for example an empty line. editing is fast and requires no other syntax.
example:
entry-1 entry-1 entry-2 entry-2
if entries contain empty lines, boundaries become ambiguous. other boundaries can be used:
entry-1 entry-1 --- entry-2 entry-2
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. formatting like this has also been called indented plaintext.
proposed file name extension: .it.
heading
heading
content
content
heading: content content
content
...branches with few leaves can be combined on the same line with the head separated by a colon and space.
benefits
drawbacks
as an example of how this can be processed, a number of tools are available as part of sph-script.
itpn-filter: searches in headings itpn-from-markdown: converts from markdown to itpn itpn-parse: syntax checks and canonicalizes itpn itpn-to-markdown: converts to markdown
the tools take input from standard input, eg "cat input.it | itpn-to-markdown"
Usage: itpn-filter [options] search_string ... -a and -o or -n not -c print child-tree only -d match at depth, examples: 0, or 1-2
a lightweight markup format standardized as commonmark. suitable for structured documents with headings, lists, and emphasis. it is mostly written as stacked blocks.
example:
# heading level 1 ## heading level 2 - bullet point one - bullet point two
benefits
drawbacks
here is an example of an extendable syntax for structured documents. it includes forms that can be evaluated by custom procedures to notate things like lists, tables and more.
it is compatible with other formats like markdown and offers dynamic expression types that allow using plaintext or nested dynamic expressions either inline, for the current line, or for the current block.
a template processor compiling from this to other formats just has to parse the expressions and their arguments and then pass that to custom functions to generate suitable output in the target format.
#(identifier dynamic-expression ...)
#identifier dynamic-expression ... dynamic-expression ... ...
##(identifier plaintext/itm-expression ...)
##identifier plaintext/itm-expression ... plaintext/itm-expression ... ...
#identifier: dynamic-expressions ... ##identifier: plaintext/itm-expressions ...
###identifier plaintext ... plaintext ...
the text is passed as a parsed tree without any nested expressions evaluated. this can be used, for example, to do block escaping
a line before increased indent becomes a heading
this is a heading
this is content
and more example text
a sub-heading
more contenteach empty line, two newlines, creates one line break in the output
example text more text after empty line
inline expression prefixes, colons and backslashes can be escaped with a backslash
\: \# \## \### \\
block escapes
###
content
content
content