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.
heading heading content content heading: content content ...
benefits
drawbacks
proposed file name extension: .it
itpn is short for "indent tree packet notation".
document = {node} ; node = indent heading [":" content] "\n" {child} ; child = deeper_indent node ; heading = text ; content = text ; indent = {unit_indent} ; deeper_indent = indent unit_indent ; unit_indent = " " ; text = ? any non-newline text ? ;
a number of tools are already available (requiring only ruby to be installed):
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. except for nested lists, it is 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 extension syntax for structured documents. it includes forms that can be evaluated by custom procedures to notate things like lists, tables and more.
one of its main strengths beside the minimal syntax are the expression types that allow using plaintext or nested dynamic expressions either inline, for the current line, or for the current block.
#(identifier scheme-expression ...)
#identifier scheme-expression ... scheme-expression ... ...
##(identifier plaintext/itm-expression ...)
##identifier plaintext/itm-expression ... plaintext/itm-expression ... ...
#identifier: scheme-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 content
each 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