Inline Commands
An inline command works inside a sentence. Most shape a run of text, such as emphasis or a code span; the rest build links, cross-references, or pull documentation in from another symbol.
Text formatting
MrDocs reads the usual Markdown spans, with Doxygen and HTML equivalents alongside them:
-
Emphasis:
*text*or_text_. -
Strong:
**text**or__text__. -
Code span:
`text`. -
Strikethrough:
~~text~~. -
Highlight:
==text==.
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/text-formatting.cpp[]
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/text-formatting.adoc[]
Links
A link uses the Markdown form [text](url), with the HTML <a> form available too.
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/link.cpp[]
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/link.adoc[]
Cross-references
@ref links to another symbol by its qualified name; MrDocs resolves it against the corpus and emits a working link. This is the command to reach for whenever one symbol’s documentation should point at another.
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/cross-reference.cpp[]
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/cross-reference.adoc[]
Copying documentation
When two symbols share documentation, @copydoc copies the whole comment from another symbol; @copybrief and @copydetails copy just the brief or just the description. This keeps overloads and wrappers in step with a single source of truth.
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/copydoc.cpp[]
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/copydoc.adoc[]