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:

Text formatting
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/text-formatting.cpp[]
Preview

Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/text-formatting.adoc[]

A link uses the Markdown form [text](url), with the HTML <a> form available too.

Links
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/link.cpp[]
Preview

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.

Cross-references
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/cross-reference.cpp[]
Preview

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.

Copying documentation
Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/copydoc.cpp[]
Preview

Unresolved include directive in modules/ROOT/pages/commands/inlines.adoc - include::example$snippets/commands/copydoc.adoc[]