(((meta ((content . "Zettelmarkup: Inline-mode Transclusion") (name . "title"))) (meta ((content . "manual") (name . "role"))) (meta ((content . "#manual #zettelmarkup #zettelstore") (name . "tags"))) (meta ((content . "zmk") (name . "syntax"))) (meta ((content . "00001006000000 00001007031110 00001007040320 00001007990000") (name . "back"))) (meta ((content . "00001006000000 00001007031110 00001007040320 00001007040350 00001007990000") (name . "backward"))) (meta ((content . "1") (name . "box-number"))) (meta ((content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta ((content . "20210811154251") (name . "created"))) (meta ((content . "00001006050000 00001007000000 00001007030000 00001007030300 00001007031100 00001007040000 00001007040350 00001008010000 00010000000000") (name . "forward"))) (meta ((content . "en") (name . "lang"))) (meta ((content . "EUPL-1.2-or-later") (name . "license"))) (meta ((content . "20251108163237") (name . "modified"))) (meta ((content . "20251108163237") (name . "published"))) (meta ((content . "public") (name . "visibility")))) (p "Inline-mode transclusion is applied to any zettel that is parsed in a non-trivial way, such as when the content is structured text." " " "For instance, this applies to zettel written in " (a ((href . "00001007000000")) "Zettelmarkup") " or " (a ((href . "00001008010000")) "Markdown") ".") (p "Since this type of transclusion involves " (a ((href . "00001007040000")) "inline-structured elements") ", the transclusion specification must be replaced with an appropriate inline-structured content." " " "Specifically, the transclusion specification is replaced with an " (a ((href . "00001007040100#inline-span")) "inline span") " containing the inline-structured content.") (p "The process begins by reading the referenced zettel." " " "If the zettel contains other transclusions, these will be expanded recursively." " " "If an infinite recursion is detected, the expansion is halted, and an error message replaces the transclusion specification.") (p "The result of this (indirect) transclusion is searched for inline-structured elements.") (ul (li (p "If only a " (a ((href . "00001006050000")) "zettel identifier") " was specified, the first top-level " (a ((href . "00001007030000#paragraphs")) "paragraph") " is used." " " "Since a paragraph is basically a sequence of inline-structured elements, these elements will replace the transclude specification.") (p "Example: " (code "{{00010000000000}}") " (see " (a ((href . "00010000000000")) "00010000000000") ") is rendered as " (span ((class . "example")) (span "You will find the latest information about Zettelstore at " (a ((href . "https://zettelstore.de/") (rel . "external")) "https://zettelstore.de/") "." " " "Check its website regularly for " (a ((href . "https://zettelstore.de/home/doc/trunk/www/download.wiki") (rel . "external")) "updates") " to the latest version." " " "You should consult the " (a ((href . "https://zettelstore.de/home/doc/trunk/www/changes.wiki") (rel . "external")) "change log") " before updating." " " "Sometimes, you have to edit some of your Zettelstore-related zettel before updating.")) ".")) (li (p "If a fragment identifier was additionally specified, the element with the given fragment is searched:") (ul (li (p "If it specifies a " (a ((href . "00001007030300")) "heading") ", the next top-level paragraph is used.") (p "Example: " (code "{{00010000000000#reporting-errors}}") " is rendered as " (span ((class . "example")) (span "If you have encountered an error, please include the content of the following zettel in your mail (if possible):")) ".")) (li (p "In case the fragment names a " (a ((href . "00001007040350")) "mark") ", the inline-structured elements after the mark are used." " " "Initial spaces and line breaks are ignored in this case.") (p "Example: " (code "{{00001007040322#spin}}") " is rendered as " (span ((class . "example")) (span (code "{{Spinning Emoji|00000000040001}}{title=Emoji width=30}") " is rendered as " (span ((class . "example")) (img ((alt . "Spinning Emoji") (src . "00000000040001") (title . "Emoji") (width . "30")))) ".")) ".")) (li (p "Just specifying the fragment identifier will reference something on the current page." " " "This is not allowed, to prevent a possible endless recursion.")))) (li (p "If the reference is a " (a ((href . "00001007040310#link-specifications")) "hosted or based") " link / URL to an image, that image will be rendered.") (p "Example: " (code "{{//z/00000000040001}}{alt=Emoji}") " is rendered as " (span ((class . "example")) (img ((alt . "Emoji") (src . "/z/00000000040001"))))))) (p "If no inline-structured elements are found, the transclude specification is replaced by an error message.") (p "To avoid an exploding " (@L (@H "“") "transclusion bomb" (@H "”")) ", a form of " (a ((href . "https://en.wikipedia.org/wiki/Billion_laughs_attack") (rel . "external")) "billion laughs attack") " (also known as " (@L (@H "“") "XML bomb" (@H "”")) "), the total number of transclusions / expansions is limited." " " "The limit can be controlled by setting the value " (a ((href . "00001004020000#max-transclusions")) (kbd "max-transclusions")) " of the runtime configuration zettel.") (h2 ((id . "see-also")) "See also") (p (a ((href . "00001007031100")) "Full transclusion") " does not work inside some text, but is used for " (a ((href . "00001007030000")) "block-structured elements") "."))