SpecificationExample

Blockdown Specification v0.1.0

Blockdown is a superset of Markdown, which is a plain-text formatting syntax. Blockdown adds three new primitives, the block, thread and inline footnote primitives.

1.0 Motivation

As computers and digital screens are becoming the dominant medium in which writing is being consumed, the constraints in which how text can be formatted changes. When printing text on paper using ink, interactive elements are effectively impossible, but this is not the case with computers.

Hypertext is an example of written text that is outside of the previous constraints, and is only possible on a computer. While this is one instance of advancement in rendering and interactivity of written text, by no means is it the last.

Blockdown aims to re-think how written text is rendered on a screen, where the excess cost of additional formatting is zero. In other words, pixels rendered on a screen are treated the same regardless of color used, which is not the case with paper and ink.

2.0 Primitives

Blockdown introduces three primitives. The block, thread and inline footnotes.

2.1 The existing primitives

Text today, can be broken down in the following way, where the paragraph is the highest-order structure at the written level (does not include chapters, sections or books). This implies that the level of depth for sentences is 2. With blocks and paragraphs, the level of depth increases to 4.

Paragraph
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis, elit vitae lacinia vestibulum, odio eros fringilla metus, in placerat diam magna non nibh.
Sentence
The quick brown fox jumps over the lazy dog.
Token
The
quick
brown
fox
jumps
over
the
lazy
dog.
Character
T
h
e
q
u
i
c
k
b
r
o
w
n
f
o
x
j
u
m
p
s
o
v
e
r
t
h
e
l
a
z
y
d
o
g
.
Figure 1: Existing primitives in text

2.2 The block and thread primitives

The core primitive of Blockdown is the block. A block is a higher-order structure that wraps paragraphs, and a thread is a higher-order structure that wraps blocks.

For example, the block can delimit a thought, making it clear to the reader when the thought begins and ends. A thread, can be used to group the blocks together, to form making the reading structure more cohesive. A reader does not have to interpret or assume structure about the text as the Blockdown syntax makes it more explicit.

Thread
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac blandit turpis.

Quisque malesuada dolor id nunc efficitur iaculis nec eget massa.
Etiam faucibus erat id dolor placerat gravida non et dolor.

Quisque at eros enim.

Donec nulla lectus, vehicula in accumsan in, fringilla sit amet est. Aliquam ultricies, dolor id mollis pretium, ligula tortor imperdiet nisl, eu tempor lectus quam quis libero.
Maecenas gravida sem quis dolor sodales sollicitudin. Nulla laoreet ipsum vitae lectus tristique sodales.
Block
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lobortis, elit vitae lacinia vestibulum, odio eros fringilla metus, in placerat diam magna non nibh.

Ut ultricies in urna sit amet ullamcorper.
Figure 2: The block and thread primitives which Blockdown introduces

2.3 The inline footnote primitive

An inline footnote is a footnote that exists inside of a block, with the anchor being a substring of the text, and the footnote placed at the end of the text.

Footnote
Quisque at eros enim.

Donec nulla lectus, vehicula in accumsan in1, fringilla sit amet est. Aliquam ultricies, dolor id mollis pretium, ligula tortor imperdiet nisl, eu tempor lectus quam quis libero.
1. Phasellus laoreet massa rhoncus, posuere purus sed.
Figure 3: The inline footnote, which has a hover effect

3.0 Syntax

Blockdown implements all of Markdown's syntax, and extends it with the three primitives introduced in the previous section. Blockdown also generally follows Markdown's conventions for syntax, as will be demonstrated in the following section.

3.1 Rendering a block

Syntax:

////
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nam ac blandit turpis.

Quisque malesuada dolor id nunc efficitur iaculis nec eget massa.
////

Rendered:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac blandit turpis.

Quisque malesuada dolor id nunc efficitur iaculis nec eget massa.

3.2 Rendering a thread

Syntax:

////
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nam ac blandit turpis.

Quisque malesuada dolor id nunc efficitur iaculis nec eget massa.
///
Donec pretium dui at nisl mollis sagittis. Nam diam nulla, blandit sit amet ligula ac, consectetur convallis mauris.
Etiam mollis risus ligula.
///
Morbi est neque, efficitur sed lobortis non, accumsan in lacus.

Duis egestas nulla at imperdiet bibendum. Donec eros mauris, bibendum in imperdiet lacinia, pellentesque sed arcu.
////

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac blandit turpis.

Quisque malesuada dolor id nunc efficitur iaculis nec eget massa.

Donec pretium dui at nisl mollis sagittis. Nam diam nulla, blandit sit amet ligula ac, consectetur convallis mauris. Etiam mollis risus ligula.

Morbi est neque, efficitur sed lobortis non, accumsan in lacus.

Duis egestas nulla at imperdiet bibendum. Donec eros mauris, bibendum in imperdiet lacinia, pellentesque sed arcu.

3.3 Rendering an inline footnote

Syntax:

////
Lorem ipsum (dolor sit amet)[*1], consectetur adipiscing elit.
Sed lobortis, elit vitae lacinia vestibulum, odio eros fringilla metus, in placerat diam magna non nibh.

[*1]: Phasellus laoreet massa rhoncus, posuere purus sed.
////

Rendered:

Lorem ipsum dolor sit amet1, consectetur adipiscing elit. Sed lobortis, elit vitae lacinia vestibulum, odio eros fringilla metus, in placerat diam magna non nibh.

1 Phasellus laoreet massa rhoncus, posuere purus sed.

License

This project is licensed under the MIT License.
See the LICENSE file for details.