Sphinx distinguishes the following placeholder variables:


Environment variable that also creates a reference to the appropriate envvar directive if it exists.


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.


The name of a make variable


Text example, such as code within which curly braces can be used to indicate a variable part, as in file or in print 1+VARIABLE.

As of Sphinx≥1.8, curly braces can be displayed with a backslash (\).



This role has no special meaning by default. You can therefore use it for anything, for example also for variable names.