Commits

sirgazil committed 29bc2f0 Draft

Added cross-references from usage section to Python objects

  • Participants
  • Parent commits 26756d7

Comments (0)

Files changed (1)

File docs/source/usage.rst

 internally to format, color and apply other options to the output displayed
 in text terminals.
 
-Typical usage involves creating an instance of ``colorin.cli.Display`` class,
-and tell it what to do with your text. For example, let's suppose you want to
-print ``"Hello world!"`` in green and ``"Bye world!"`` in red:
+Typical usage involves creating an instance of :py:class:`colorin.cli.Display`
+class, and tell it what to do with your text. For example, let's suppose you
+want to print ``"Hello world!"`` in green and ``"Bye world!"`` in red:
 
 .. sourcecode:: python
 
 --------------------------------
 
 In the code example above, we just specified the foreground color for the
-text. You can use the same method (``Display.color()``) to add a background
-color. The following code will print a white text on a yellow background:
+text. You can use the same method, :py:meth:`Display.color()`, to add a
+background color. The following code will print a white text on a yellow
+background:
 
 .. sourcecode:: python
 
 Bold text
 ---------
 
-There are two methods to print bold strings: ``Display.color()`` and
-``Display.bold()``. Use the former if you want to print a bold colored string,
-and the latter to print a bold string with your terminal's default foreground
-color:
+There are two methods to print bold strings: :py:meth:`Display.color()` and
+:py:meth:`Display.bold()`. Use the former if you want to print a bold colored
+string, and the latter to print a bold string with your terminal's default
+foreground color:
 
 .. sourcecode:: python