Add an example.

This commit is contained in:
Georg Brandl
2010-05-24 13:05:43 +02:00
parent 0238e83013
commit 9d3e02d238
+3 -1
View File
@@ -257,7 +257,9 @@ in a different style:
.. rst:role:: samp
A piece of literal text, such as code. Within the contents, you can use
curly braces to indicate a "variable" part, as in ``:file:``.
curly braces to indicate a "variable" part, as in :rst:dir:`file`. For
example, in ``:samp:`print 1+{variable}```, the part ``variable`` would be
emphasized.
If you don't need the "variable part" indication, use the standard
````code```` instead.