Commonly used roles¶
:any:
cross-reference catch-all¶
Link to a different chapter page:
Code:
:any:`/content/001-examples/index`
Rendered:
Intersphinx linking:
Code:
:any:`sphinx:any`
Rendered (TODO: why is styling so messed up):
Mark filenames with :file:
¶
For filenames, use the :file: directive, instead of the generic inline code directive (e.g. double tildes)
Look at :file:`./contents/index.rst`
Look at ./contents/index.rst
Mark keyboard actions with :kbd:
¶
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-kbd
Press :kbd:`Cmd+Tab` to switch apps quickly
Press Cmd+Tab to switch apps quickly
Mark regexes with :regexp:
¶
The pattern :regexp:`\d{4}` matches exactly 4 digits
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-regexp
The pattern d{4}
matches exactly 4 digits