Encoding of Sz Block Elements

00001012931400 · Info · (manual) · #api #manual #reference #zettelstore (all)

PARA

Paragraph = (PARA InlineElement).

A paragraph is just a list of inline elements.

HEADING

Heading = (HEADING Number Attributes String1 String2 InlineElement).

A heading consists of a number, which specifies its level (1 – 5), its optional attributes. The first string is a “slug” of the heading text, i.e. transformed it to lower case, replaced space character with minus sign, and some more. The second string is the slug, but made unique for the whole zettel. Then the heading text follows as a sequence of inline elements.

THEMATIC

Thematic = (THEMATIC Attributes ).

ORDERED, UNORDERED, QUOTATION

These three symbols are specifying different kinds of lists / enumerations: an ordered list, an unordered list, and a quotation list. Their structure is the same.

OrderedList = (ORDERED ListElement).

UnorderedList = (UNORDERED ListElement).

QuotationList = (QUOTATION ListElement).

ListElement = Block | Inline.

A list element is either a block or an inline. If it is a block, it may contain a nested list.

DESCRIPTION

Description = (DESCRIPTION DescriptionTerm DescriptionValues DescriptionTerm DescriptionValues).

A description is a sequence of one ore more terms and values.

DescriptionTerm = ( InlineElement).

A description term is just an inline-structured value.

DescriptionValues = (BLOCK Block).

Description values are sequences of blocks.

TABLE

Table = (TABLE TableHeader TableRow).

A table is a table header and a sequence of table rows.

TableHeader = () | ( TableCell).

A table header is either the empty list or a list of table cells.

TableRow = ( TableCell).

A table row is a list of table cells.

CELL, CELL-*

There are four kinds of table cells, one for each possible cell alignment. The structure is the same for all kind.

TableCell = DefaultCell | CenterCell | LeftCell | RightCell.

DefaultCell = (CELL InlineElement).

The cell content, specified by the sequence of inline elements, used the default alignment.

CenterCell = (CELL-CENTER InlineElement).

The cell content, specified by the sequence of inline elements, is centered aligned.

LeftCell = (CELL-LEFT InlineElement).

The cell content, specified by the sequence of inline elements, is left aligned.

RightCell = (CELL-RIGHT InlineElement).

The cell content, specified by the sequence of inline elements, is right aligned.

REGION-*

The following lists specifies different kinds of regions. A region treat a sequence of block elements to be belonging together in certain ways. The have a similar structure.

BlockRegion = (REGION-BLOCK Attributes ( BlockElement) InlineElement).

A block region just treats the block to belong in an unspecified way. Typically, the reason is given in the attributes. The inline describes the block.

QuoteRegion = (REGION-QUOTE Attributes ( BlockElement) InlineElement).

A block region just treats the block to contain a longer quotation. Attributes may further specify the quotation. The inline typically describes author / source of the quotation.

VerseRegion = (REGION-VERSE Attributes ( BlockElement) InlineElement).

A block region just treats the block to contain a verse. Soft line break are transformed into hard line breaks to save the structure of the verse / poem. Attributes may further specify something. The inline typically describes author / source of the verse.

VERBATIM-*

The following lists specifies some literal text of more than one line. The structure is always the same, the initial symbol denotes the actual usage. The content is encoded as a string, most likely to contain control characters that signals the end of a line.

CommentVerbatim = (VERBATIM-COMMENT Attributes String ).

The string contains text that should be treated as an internal comment not to be interpreted further.

EvalVerbatim = (VERBATIM-EVAL Attributes String ).

The string contains text that should be evaluated by an (external) software to produce some derived content.

HTMLVerbatim = (VERBATIM-HTML Attributes String ).

The string contains HTML code.

MathVerbatim = (VERBATIM-MATH Attributes String ).

The string contains text that should be treated as special code to be interpreted as mathematical formulas.

CodeVerbatim = (VERBATIM-CODE Attributes String ).

The string contains text that should be treated as (executable) code.

ZettelVerbatim = (VERBATIM-ZETTEL Attributes String ).

The string contains text that should be treated as (nested) zettel content.

BLOB

BLOB = (BLOB ( InlineElement) String1 String2 ).

A BLOB contains an image in block mode. The inline elements states some description. The first string contains the syntax of the image. The second string contains the actual image. If the syntax is “SVG”, then the second string contains the SVG code. Otherwise the (binary) image data is encoded with base64.

TRANSCLUDE

Transclude = (TRANSCLUDE Attributes Reference ).

A transclude list only occurs for a parsed zettel, but not for a evaluated zettel. Evaluating a zettel also means that all transclusions are resolved.

Reference denotes the zettel to be transcluded.