Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Specification 2.0]: Add entry about headings #44

Open
wants to merge 2 commits into
base: push-xvurqtxkusso
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions 2.0-specification.norg
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,54 @@ version: 2.0
Paragraphs are terminated/delimited by some types of {*** line endings} or by the EOF (end of file).
They are also implicitly terminated by other {* block-level items}.

** Titles

A title can be thought of as a one-line paragraph. It's used exclusively for the following constructs:
- {** Headings}
- {** Definitions}
- {** Footnotes}

* Block Syntax

Block-level syntax entails any object that structures the document.

** Paragraphs

Paragraphs are block-level items and act as containers for {* inline syntax}.

** Headings

Headings are a way of delimiting parts of a document based on its content.

Syntax:
@code
<asterisks> <title>
...<content>
@end

Terms:
$ asterisks
An set of consecutive asterisks (`*`).
Headings do not have a limit on the amount of levels.
$ title
A {** titles}[title] object.
$$ content
An arbitrary amount of block-level items.
A heading consumes content until:
- An appropriate {** delimiting modifiers}[delimiting modifier] is found.
- Another heading with a lower level is encountered.
$$

Below are some examples of headings, alongside their HTML representations:
@table
| * Title | <h1>Title</h1> |
| *** Title | <h3>Title</h3> |
| ***** *Bold* and /italic/ | <h5> <b>Title</b> and <i>italic</i> </h5> |
@end

Headings provide structure to the document and therefore can only be placed in the root
of the document.

* Layers

Norg is built up of layers, or in other words a set of features that a parser/tool can support
Expand Down