nml/docs/references.nml

32 lines
1.2 KiB
Text
Raw Normal View History

2024-08-14 15:27:34 +02:00
@import template.nml
@nav.previous = Sections
%<make_doc({}, "References", "References")>%
#{internal_references} Internal references
Internal references allow you to create references to elements defined within the current document.
2024-10-29 11:08:22 +01:00
Reference the the current section: ``&{internal_reference}`` → &{internal_references}
2024-08-14 15:27:34 +02:00
## Media references
![flower](assets/flower.webm)[caption = Flower]
2024-10-29 11:08:22 +01:00
When you reference a medium from the current document, the reference can be hovered to show the referenced medium: &{flower}.
2024-08-14 15:27:34 +02:00
# External references
You can reference elements from other documents by adding the document's name before the reference name (separated by a ``#``).
The document name refers to the output file (as defined by the variable `compiler.output`) excluding the extension.
2024-10-29 11:08:22 +01:00
* ``&{doc#ref}``: Finds reference named `ref` in document named `doc`.
* ``&{#ref}``: Finds reference named `ref` in all documents.
2024-08-14 15:27:34 +02:00
Note that this will fail if there are multiple documents defining reference `ref`.
For instance:
2024-10-29 11:08:22 +01:00
* ``&{LaTeX#tex_env}[caption=LaTeX environment]`` → &{LaTeX#tex_env}[caption=LaTeX environment]
* ``&{#tex_env}[caption=LaTeX environment]`` → &{#tex_env}[caption=LaTeX environment]
2024-08-14 15:27:34 +02:00
# Properties
* ``caption`` The display caption for the reference