title: Encoding of Sz Block Elements role: manual tags: #api #manual #reference #zettelstore syntax: zmk === ''PARA'' :::syntax __Paragraph__ **=** ''(PARA'' [[__InlineElement__|00001012931600]] … '')''. ::: A paragraph is just a list of inline elements. === ''HEADING'' :::syntax __Heading__ **=** ''(HEADING'' Number [[__Attributes__|00001012931000#attribute]] String,,1,, String,,2,, [[__InlineElement__|00001012931600]] … '')''. ::: 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'' :::syntax __Thematic__ **=** ''(THEMATIC'' [[__Attributes__|00001012931000#attribute]] '')''. ::: === ''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. :::syntax __OrderedList__ **=** ''(ORDERED'' __ListElement__ … '')''. __UnorderedList__ **=** ''(UNORDERED'' __ListElement__ … '')''. __QuotationList__ **=** ''(QUOTATION'' __ListElement__ … '')''. ::: :::syntax __ListElement__ **=** [[__Block__|00001012931000#block]] **|** [[__Inline__|00001012931000#inline]]. ::: A list element is either a block or an inline. If it is a block, it may contain a nested list. === ''DESCRIPTION'' :::syntax __Description__ **=** ''(DESCRIPTION'' __DescriptionTerm__ __DescriptionValues__ __DescriptionTerm__ __DescriptionValues__ … '')''. ::: A description is a sequence of one ore more terms and values. :::syntax __DescriptionTerm__ **=** ''('' [[__InlineElement__|00001012931600]] … '')''. ::: A description term is just an inline-structured value. :::syntax __DescriptionValues__ **=** ''(BLOCK'' [[__Block__|00001012931000#block]] … '')''. ::: Description values are sequences of blocks. === ''TABLE'' :::syntax __Table__ **=** ''(TABLE'' __TableHeader__ __TableRow__ … '')''. ::: A table is a table header and a sequence of table rows. :::syntax __TableHeader__ **=** ''()'' **|** ''('' __TableCell__ … '')''. ::: A table header is either the empty list or a list of table cells. :::syntax __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. :::syntax __TableCell__ **=** __DefaultCell__ **|** __CenterCell__ **|** __LeftCell__ **|** __RightCell__. ::: :::syntax __DefaultCell__ **=** ''(CELL'' [[__InlineElement__|00001012931600]] … '')''. ::: The cell content, specified by the sequence of inline elements, used the default alignment. :::syntax __CenterCell__ **=** ''(CELL-CENTER'' [[__InlineElement__|00001012931600]] … '')''. ::: The cell content, specified by the sequence of inline elements, is centered aligned. :::syntax __LeftCell__ **=** ''(CELL-LEFT'' [[__InlineElement__|00001012931600]] … '')''. ::: The cell content, specified by the sequence of inline elements, is left aligned. :::syntax __RightCell__ **=** ''(CELL-RIGHT'' [[__InlineElement__|00001012931600]] … '')''. ::: 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. :::syntax __BlockRegion__ **=** ''(REGION-BLOCK'' [[__Attributes__|00001012931000#attribute]] ''('' [[__BlockElement__|00001012931400]] … '')'' [[__InlineElement__|00001012931600]] … '')''. ::: 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. :::syntax __QuoteRegion__ **=** ''(REGION-QUOTE'' [[__Attributes__|00001012931000#attribute]] ''('' [[__BlockElement__|00001012931400]] … '')'' [[__InlineElement__|00001012931600]] … '')''. ::: 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. :::syntax __VerseRegion__ **=** ''(REGION-VERSE'' [[__Attributes__|00001012931000#attribute]] ''('' [[__BlockElement__|00001012931400]] … '')'' [[__InlineElement__|00001012931600]] … '')''. ::: 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. :::syntax __CommentVerbatim__ **=** ''(VERBATIM-COMMENT'' [[__Attributes__|00001012931000#attribute]] String '')''. ::: The string contains text that should be treated as an internal comment not to be interpreted further. :::syntax __EvalVerbatim__ **=** ''(VERBATIM-EVAL'' [[__Attributes__|00001012931000#attribute]] String '')''. ::: The string contains text that should be evaluated by an (external) software to produce some derived content. :::syntax __HTMLVerbatim__ **=** ''(VERBATIM-HTML'' [[__Attributes__|00001012931000#attribute]] String '')''. ::: The string contains HTML code. :::syntax __MathVerbatim__ **=** ''(VERBATIM-MATH'' [[__Attributes__|00001012931000#attribute]] String '')''. ::: The string contains text that should be treated as special code to be interpreted as mathematical formulas. :::syntax __CodeVerbatim__ **=** ''(VERBATIM-CODE'' [[__Attributes__|00001012931000#attribute]] String '')''. ::: The string contains text that should be treated as (executable) code. :::syntax __ZettelVerbatim__ **=** ''(VERBATIM-ZETTEL'' [[__Attributes__|00001012931000#attribute]] String '')''. ::: The string contains text that should be treated as (nested) zettel content. === ''BLOB'' :::syntax __BLOB__ **=** ''(BLOB'' ''('' [[__InlineElement__|00001012931600]] … '')'' String,,1,, String,,2,, '')''. ::: 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'' :::syntax __Transclude__ **=** ''(TRANSCLUDE'' [[__Attributes__|00001012931000#attribute]] [[__Reference__|00001012931900]] '')''. ::: 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.