Placeholder¶
Sphinx distinguishes the following placeholder variables:
- :envvar:¶
Environment variable that also creates a reference to the appropriate
envvar
directive if it exists.
- :file:¶
The name of a file or directory. Curly brackets can be used to specify a variable part, for example:
… is installed in :file:`/usr/lib/python3.{x}/site-packages` …
In the generated HTML documentation, the x
is specially marked with em
.pre
and italicised to show that it is to be replaced by the specific Python
version.
- :makevar:¶
The name of a make variable
- :samp:¶
Text example, such as code within which curly braces can be used to indicate a variable part, as in
file
or inprint 1+VARIABLE
.As of Sphinx≥1.8, curly braces can be displayed with a backslash (
\
).
Note
- :content:¶
This role has no special meaning by default. You can therefore use it for anything, for example also for variable names.
See also