((META (EMPTY-STRING title "Encoding of Sz") (WORD role "manual") (TAG-SET tags ("#api" "#manual" "#reference" "#zettelstore")) (WORD syntax "zmk") (ZID-SET backward ("00001012920516" "00001012931400" "00001012931600")) (NUMBER box-number "1") (STRING copyright "(c) 2020-present by Detlef Stern ") (TIMESTAMP created "20230403153903") (ZID-SET forward ("00001006020000" "00001007030000" "00001007040000" "00001007050000" "00001012920516" "00001012930000" "00001012931200" "00001012931400" "00001012931600" "00001012931800")) (WORD lang "en") (EMPTY-STRING license "EUPL-1.2-or-later") (TIMESTAMP modified "20240123120319") (TIMESTAMP published "20240123120319") (WORD visibility "public")) (BLOCK (PARA (TEXT "Zettel in a ") (LINK-ZETTEL () "00001012920516" (TEXT "Sz encoding")) (TEXT " are represented as a ") (LINK-ZETTEL () "00001012930000" (TEXT "symbolic expression")) (TEXT ".") (SOFT) (TEXT "To process these symbolic expressions, you need to know, how a specific part of a zettel is represented by a symbolic expression.")) (PARA (TEXT "Basically, each part of a zettel is represented as a list, often a nested list.") (SOFT) (TEXT "The first element of that list is always an unique symbol, which denotes that part.") (SOFT) (TEXT "The meaning / semantic of all other elements depend on that symbol.")) (HEADING 1 () "zettel" "zettel" (TEXT "Zettel")) (PARA (TEXT "A full zettel is represented by a list of two elements.") (SOFT) (TEXT "The first elements represents the metadata, the second element represents the zettel content.")) (REGION-BLOCK (("" . "syntax")) ((PARA (FORMAT-EMPH () (TEXT "Zettel")) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LITERAL-INPUT () "(") (TEXT " ") (LINK-SELF () "#metadata" (FORMAT-EMPH () (TEXT "Metadata"))) (TEXT " ") (LINK-SELF () "#content" (FORMAT-EMPH () (TEXT "Content"))) (TEXT " ") (LITERAL-INPUT () ")") (TEXT ".")))) (HEADING 1 () "metadata" "metadata" (TEXT "Metadata")) (PARA (TEXT "Metadata is represented by a list, where the first element is the symbol ") (LITERAL-INPUT () "META") (TEXT ".") (SOFT) (TEXT "Following elements represent each metadatum") (ENDNOTE () (FORMAT-QUOTE () (TEXT "Metadatum")) (TEXT " is used as the singular form of metadata.")) (TEXT " of a zettel in standard order.")) (PARA (TEXT "Standard order is: ") (LINK-ZETTEL () "00001006020000#title" (TEXT "Title")) (TEXT ", ") (LINK-ZETTEL () "00001006020000#role" (TEXT "Role")) (TEXT ", ") (LINK-ZETTEL () "00001006020000#tags" (TEXT "Tags")) (TEXT ", ") (LINK-ZETTEL () "00001006020000#syntax" (TEXT "Syntax")) (TEXT ", all other ") (LINK-ZETTEL () "00001006020000" (TEXT "keys")) (TEXT " in alphabetic order.")) (REGION-BLOCK (("" . "syntax")) ((PARA (FORMAT-EMPH () (TEXT "Metadata")) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LITERAL-INPUT () "(META") (TEXT " ") (LINK-ZETTEL () "00001012931200" (FORMAT-EMPH () (TEXT "Metadatum"))) (TEXT " … ") (LITERAL-INPUT () ")") (TEXT ".")))) (HEADING 1 () "content" "content" (TEXT "Content")) (PARA (TEXT "Zettel content is represented by a block.")) (REGION-BLOCK (("" . "syntax")) ((PARA (FORMAT-EMPH () (TEXT "Content")) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LINK-SELF () "#block" (FORMAT-EMPH () (TEXT "Block"))) (TEXT ".")))) (HEADING 2 () "block" "block" (TEXT "Block")) (PARA (TEXT "A block is represented by a list with the symbol ") (LITERAL-INPUT () "BLOCK") (TEXT " as the first element.") (SOFT) (TEXT "All following elements represent a nested ") (LINK-ZETTEL () "00001007030000" (TEXT "block-structured element")) (TEXT ".")) (REGION-BLOCK (("" . "syntax")) ((PARA (MARK "block" "block" "block-1" (FORMAT-EMPH () (TEXT "Block"))) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LITERAL-INPUT () "(BLOCK") (TEXT " ") (LINK-ZETTEL () "00001012931400" (FORMAT-EMPH () (TEXT "BlockElement"))) (TEXT " … ") (LITERAL-INPUT () ")") (TEXT ".")))) (HEADING 2 () "inline" "inline" (TEXT "Inline")) (PARA (TEXT "Both block-structured elements and some metadata values may contain ") (LINK-ZETTEL () "00001007040000" (TEXT "inline-structured elements")) (TEXT ".") (SOFT) (TEXT "Similar, inline-structured elements are represented as follows:")) (REGION-BLOCK (("" . "syntax")) ((PARA (FORMAT-EMPH () (TEXT "Inline")) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LITERAL-INPUT () "(INLINE") (TEXT " ") (LINK-ZETTEL () "00001012931600" (FORMAT-EMPH () (TEXT "InlineElement"))) (TEXT " … ") (LITERAL-INPUT () ")") (TEXT ".")))) (HEADING 2 () "attribute" "attribute" (TEXT "Attribute")) (PARA (LINK-ZETTEL () "00001007050000" (TEXT "Attributes")) (TEXT " may be specified for both block- and inline- structured elements.") (SOFT) (TEXT "Attributes are represented by the following schema.")) (REGION-BLOCK (("" . "syntax")) ((PARA (FORMAT-EMPH () (TEXT "Attribute")) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LITERAL-INPUT () "(") (TEXT " ") (FORMAT-STRONG () (TEXT "[")) (TEXT " ") (LINK-ZETTEL () "00001012931800" (FORMAT-EMPH () (TEXT "AttributeKeyValue"))) (TEXT " … ") (FORMAT-STRONG () (TEXT "]")) (TEXT " ')'.")))) (PARA (TEXT "Either, there are no attributes.") (SOFT) (TEXT "These are specified by the empty list ") (LITERAL-INPUT () "()") (TEXT ".") (SOFT) (TEXT "Or there are attributes.") (SOFT) (TEXT "In this case, the first element of the list must be the symbol ") (LITERAL-INPUT () "quote") (TEXT ": ") (LITERAL-INPUT () "(quote") (TEXT " ") (LITERAL-INPUT () "(") (TEXT " A") (FORMAT-SUB () (TEXT "1")) (TEXT " A") (FORMAT-SUB () (TEXT "2")) (TEXT " … A") (FORMAT-SUB () (TEXT "n")) (TEXT " ") (LITERAL-INPUT () ")") (LITERAL-INPUT () ")") (TEXT ".")) (HEADING 1 () "other" "other" (TEXT "Other")) (PARA (TEXT "A list with ") (LITERAL-INPUT () "UNKNOWN") (TEXT " as its first element signals an internal error during transforming a zettel into the Sz encoding.") (SOFT) (TEXT "It may be ignored, or it may produce an error.")) (REGION-BLOCK (("" . "syntax")) ((PARA (FORMAT-EMPH () (TEXT "Unknown")) (TEXT " ") (FORMAT-STRONG () (TEXT "=")) (TEXT " ") (LITERAL-INPUT () "(UNKNOWN") (TEXT " Object … ") (LITERAL-INPUT () ")") (TEXT ".")))) (PARA (TEXT "The list may only contain the symbol ") (LITERAL-INPUT () "UNKNOWN") (TEXT ", or additionally an unlimited amount of other objects.")) (PARA (TEXT "Similar, any symbol with the pattern ") (LITERAL-INPUT () "**xyz:NOT-FOUND**") (TEXT ", where ") (LITERAL-INPUT () "xyz") (TEXT " is any string, signals an internal error."))))