Skip to content

Commit

Permalink
docs(spec-2.0): add entry about headings
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Aug 17, 2024
1 parent 195a0d8 commit 42275c8
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions 2.0-specification.norg
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,51 @@ 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

* Layers

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

0 comments on commit 42275c8

Please sign in to comment.