openstack-manuals/doc/contributor-guide/source/rst-conv/inline-markups.rst
KATO Tomoyuki ce81edc685 [contributor] Change RST inline markup conventions
:program:` ` markup is not widely used at our docs.
This convention become an inconsistency.
Also, this markup doesn't help translators.

Some discussion on docs mailing list:
http://lists.openstack.org/pipermail/openstack-docs/2015-November/007892.html

Change-Id: I7efd24efc626ebfc5d73a2f23a1ee5e7ddfc00a4
2015-11-22 09:44:46 +00:00

9.2 KiB

Inline elements

Sphinx enables specific pieces of inline text. This is emphasized by semantic markups that format text in a different style.

Use the markups included in this section as consistent with their semantic meaning.

Note

An inline semantic markup has no effect when applied to a piece of text within a code-block element.

To insert a semantic markup into your document, use the syntax below.

Syntax

:markup:`inline text`

Application

A software application within a line of text.

Markup `` (double backticks)
Syntax RabbitMQ
Example of output Configure RabbitMQ.

Code

A fragment of code within a line of text.

Markup `` (double backticks)
Syntax m1.small
Example of output The following command launches an instance with the m1.small flavor.

Command

An inline sub-command for the command-line interfaces and inline command for different operating systems.

Markup :command:
Syntax :command:`nova boot`
Example of output Run the nova boot command to launch an instance.

File name and path

Any part of a path specification, including device name, directory, file name, and extension.

Markup `` (double backticks)
Syntax nova.conf
Example of output By default, the nova.conf configuration file is installed in the /etc/nova folder.

Glossary entry

A term that appears in the glossary.

Markup :term:
Syntax :term:`IaaS or :term:`services <service>``
Example of output OpenStack provides an IaaS solution through a variety of complemental services <service>.

GUI element

Any part of interactive user interface.

Markup :guilabel:
Syntax :guilabel:`Project`
Example of output From the Project tab you can view and manage the resources in a selected project.

Keyboard key combination

A sequence of two or more keystrokes or mouse actions.

Markup `` (double backticks)
Syntax Ctrl+A
Example of output Press Ctrl+A to switch between services.

Menu sequence

An action of navigating a menu to select an item one or more levels down.

Markup :menuselection:
Syntax :menuselection:`Project > Compute`
Example of output Go to the Project > Compute tab.

Parameter

Any parameter for sub-commands for the command-line interfaces.

Markup :option: to mark parameters that start with - or --, `` (double backticks) for any other parameter
Syntax :option:`--template-url, `back end``
Example of output
  • You can specify the URL with the --template-url parameter.
  • Set the back end parameter.

Option

Any option for sub-commands for the command-line interfaces or configuration option.

Markup :option: to mark options that start with - or --, `` (double backticks) for any other parameter
Syntax :option:`--parent, `force_dhcp_release = True``
Example of output
  • The --parent stands for the parent of the project (name or ID).
  • The force_dhcp_release = True option sends a dhcp release on instance termination.

Note

When documenting Boolean configuration options:

  • Explicitly include the truth value
  • Add spaces around the equal sign (=)

Correct usage

force_dhcp_release = True
use_ipv6 = False

Variable

A literal text with a variable part in it wrapped in curly braces.

Markup :samp: to mark variables with curly braces. Do not add any additional formatting to the replaceable text.
Syntax :samp:`--flavor {FLAVOR}`
Example of output Use the --flavor {FLAVOR} parameter to specify the ID or name of the flavor.