MkAnnotations
:fa-brands-github: Show source on GitHub
Node containing a list of MkAnnotations.¶
Bases: MkContainer
| Name | Children | Inherits |
|---|---|---|
| MkContainer mknodes.basenodes.mkcontainer A node containing other MkNodes. |
graph TD
3461153190["mkannotations.MkAnnotations"]
835538629["mkcontainer.MkContainer"]
1956333208["mkcontainer.MkContainerBase"]
1359323199["mknode.MkNode"]
2751680898["builtins.object"]
835538629 --> 3461153190
1956333208 --> 835538629
1359323199 --> 1956333208
2751680898 --> 1359323199
/home/runner/work/mknodes/mknodes/src/mknodes/basenodes/mkannotations/metadata.toml
[metadata]
name = "MkAnnotations"
icon = "mdi:alert-box"
[requirements.extension."pymdownx.superfences"]
[examples.python]
python = """
import mknodes as mk
page += mk.MkCode.for_object(mk.MkCode.for_object, extract_body=True)
node = MkAnnotations()
page += node
text = mk.MkText("The MkAnnotations node aggregates annotations(1).")
page += text
info = r"Annotations are numbered and can be set via \\__setitem__."
node[1] = info # (1)
admonition = mk.MkAdmonition("They can also contain other Markdown.")
node[2] = admonition # (2)
text.annotations[1] = "Every MkNode can annotate via the 'annotations' attribute"
page += mk.MkCode(str(node), language="markdown", header="Markdown")
"""
[fragments.annotation]
template = """
{{ node.num }}.{{ 3 - self.num | string | length }}{{ node.get_items() | join("\n\n") | indent }}
"""
[output.markdown]
template = """
{{ node.get_items() | sort(attribute="num") | join }}
"""
| mknodes.basenodes.mkannotations.MkAnnotations | |
|---|---|
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
Page info
Code for this page
Resources
Resources(css=[],
markdown_extensions={'pymdownx.highlight': {'anchor_linenums': True,
'line_spans': '__span',
'pygments_lang_class': True},
'pymdownx.superfences': {'custom_fences': [{'class': 'mermaid',
'format': <function fence_code_format at 0x703933662e50>,
'name': 'mermaid'}]},
'tables': {}},
plugins=[Plugin('mkdocstrings')],
js=[],
assets=[],
packages=[])