Scope values are literal ID suffixes. Save the Markdown as scopes.md and the Python as build.py, then run python build.py with the reviewed code installed.
# Recording guide
Use both guides before recording. Compare [@sec-setup__mic; @sec-setup__camera].
::: {.include scope="__mic"}
# Microphone guide
## Setup {#sec-setup}
Connect the microphone and set the input level.
## Sound check {#sec-check}
Record ten seconds and listen through headphones. Recheck [@sec-setup] if the signal is too quiet.
:::
::: {.include scope="__camera"}
# Camera guide
## Setup {#sec-setup}
Place the camera at eye level and check the framing.
## Picture check {#sec-check}
Record a short clip and inspect the focus. Recheck [@sec-setup] if the picture is soft.
:::
from pathlib import Path
from mdhtml import md2mdhtml
from mdhtml2docx import mdhtml2docx
root = Path(__file__).parent
html = md2mdhtml((root/'scopes.md').read_text())
(root/'scopes.mdhtml').write_text(html)
print(mdhtml2docx(html, root/'scopes.docx', number_headings='decimal'))This is an actual LibreOffice render. The suffix version produces the same visible page as the earlier example; its bookmark names and source use suffixes.

