title: Zettelmarkup: Inline-mode Transclusion role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk back: 00001006000000 00001007031110 00001007040320 00001007990000 backward: 00001006000000 00001007031110 00001007040320 00001007040350 00001007990000 box-number: 1 copyright: (c) 2020-present by Detlef Stern created: 20210811154251 forward: 00001004020000 00001006020000 00001006050000 00001007000000 00001007030000 00001007030300 00001007031100 00001007040000 00001007040310 00001007040322 00001007040350 00001008010000 00010000000000 lang: en license: EUPL-1.2-or-later modified: 20231222164501 published: 20231222164501 visibility: public Inline-mode transclusion applies to all zettel that are parsed in a non-trivial way, e.g. as structured textual content. For example, textual content is assumed if the [[syntax|00001006020000#syntax]] of a zettel is ""zmk"" ([[Zettelmarkup|00001007000000]]), or ""markdown"" / ""md"" ([[Markdown|00001008010000]]). Since this type of transclusion is at the level of [[inline-structured elements|00001007040000]], the transclude specification must be replaced with some inline-structured elements. First, the referenced zettel is read. If it contains other transclusions, these will be expanded, recursively. When an endless recursion is detected, expansion does not take place. Instead an error message replaces the transclude specification. The result of this (indirect) transclusion is searched for inline-structured elements. * If only an [[zettel identifier|00001006050000]] was specified, the first top-level [[paragraph|00001007030000#paragraphs]] is used. Since a paragraph is basically a sequence of inline-structured elements, these elements will replace the transclude specification. Example: ``{{00010000000000}}`` (see [[00010000000000|00010000000000]]) is rendered as ::You will find the lastest information about Zettelstore at [[https://zettelstore.de|https://zettelstore.de]]. Check that website regulary for [[upgrades|https://zettelstore.de/home/doc/trunk/www/download.wiki]] to the latest version. You should consult the [[change log|https://zettelstore.de/home/doc/trunk/www/changes.wiki]] before upgrading. Sometimes, you have to edit some of your Zettelstore-related zettel before upgrading. Since Zettelstore is currently in a development state, every upgrade might fix some of your problems.::{="example"}. * If a fragment identifier was additionally specified, the element with the given fragment is searched: ** If it specifies a [[heading|00001007030300]], the next top-level paragraph is used. Example: ``{{00010000000000#reporting-errors}}`` is rendered as ::If you have encountered an error, please include the content of the following zettel in your mail (if possible):::{="example"}. ** In case the fragment names a [[mark|00001007040350]], the inline-structured elements after the mark are used. Initial spaces and line breaks are ignored in this case. Example: ``{{00001007040322#spin}}`` is rendered as ::``{{Spinning Emoji|00000000040001}}{title=Emoji width=30}`` is rendered as ::{{Spinning Emoji|00000000040001}}::{="example"}.::{="example"}. ** Just specifying the fragment identifier will reference something in the current page. This is not allowed, to prevent a possible endless recursion. * If the reference is a [[hosted or based|00001007040310#link-specifications]] link / URL to an image, that image will be rendered. Example: ``{{//z/00000000040001}}{alt=Emoji}`` is rendered as ::{{/z/00000000040001}}::{="example"} If no inline-structured elements are found, the transclude specification is replaced by an error message. To avoid an exploding ""transclusion bomb"", a form of a [[billion laughs attack|https://en.wikipedia.org/wiki/Billion_laughs_attack]] (also known as ""XML bomb""), the total number of transclusions / expansions is limited. The limit can be controlled by setting the value [[''max-transclusions''|00001004020000#max-transclusions]] of the runtime configuration zettel. === See also [[Full transclusion|00001007031100]] does not work inside some text, but is used for [[block-structured elements|00001007030000]].