A TOOL FOR WRITING
Rivit (Finnish for 'lines') is a minimal, line-based markup format meant to stay out of the writer's way.
QUICK REFERENCE
UPPERCASE LINES ARE HEADERS # Lines can be commented out. Lines are individual paragraphs. They can contain *italic*, **bold**, `monospace`, or linked text. Links have special syntax: Internal: {some-page display text} External: [www.some-url.com display text] Styles cannot be combined. - List items start with '-' and have the same styling rules as paragraphs. -- Sub-lists can be created with more dashes. Code blocks are lines with matching indentation: int main(int argc, char* argv[]) { return 0; } Media is embedded with '@': @ path/img.png *optional* alt text @ path/song.wav Page references start with '/': / foo / bar / baz
If you're curious, here's a reference implementation.
BASIC RULES
Each line is considered a separate paragraph and blank lines are ignored. Paragraphs can contain italics, bolds, monospace
, local links, or external links.
*Italic* text **Bold** text `Monospace` text {links Local links} 'links' is expected to be a 'links.riv' file [https://some-url.com External links] They're expected to open a new tab Styles cannot be combined. For example: ***this*** will NOT generate bold-italics [https://foo.bar *this*] will NOT generate an italic link # This is a comment. It will not be included in the output text
HEADERS
Lines containing no lowercase letters are treated as headers. This is different from Markdown where #
gives you control over the size of the header. In Rivit, headers are the same size. However, a small exception is made if the first line output is a header: it will be treated as a title and made larger than subsequent headers.
THIS IS A TITLE Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod... I'M A HEADER Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod...
LISTS
Lines starting with -
are treated as list items. Subsequent lines with an equal number of dashes are considered part of the same list. Subsequent lines with a greater number of dashes are considered sub-lists of the previous.
SHOPPING LIST - *Cleaning* -- Soap -- Mop -- Broom - Cooking -- Vegetables --- Broccoli -- Fruit --- Apples
CODE BLOCKS
Lines with matching indentation are treated as pre-formatted blocks. Rivit has no notion of syntax highlighting.
This is not code. // This is code int main(void) { return 0; } This is also not code.
MEDIA
Lines starting with @
are used to embed external files within the generated document. Rivit has no notion of acceptable media types.
Here's an image: @ img/file-path.png Alt text for the image *(can be excluded)* Here's some music: @ mus/file-path.wav How about a text file? @ txt/file-path.txt
PAGE REFERENCES
Lines starting with /
are used to specify page references. These are local links that won't be included in the generated text. Page references are useful for navigational links or supplemental information not included in the page itself.
/ foo / bar / baz