This style guide applies to user documentation for all YottaDB software. Existing documentation predating these standards should be reviewed for compliance on material edits, but not necessarily on minor edits such as fixing typos.
This section focuses on the writing part of the documentation, in regards to the language that must be used.
Use American English, not British.
For example, use suffix
Use Active Voice instead of Passive Voice. This is because active voice conveys a strong, direct and clear tone. When the subject of a sentence performs the verb’s action, we say that the sentence is in active voice. Although the reader is rarely explicitly addressed in our documentation, he/she is considered to be the subject.
> Now boot the three virtual machines. (Active voice) > The three virtual machines should be booted now. (Passive voice)
For a small document the first usage of an acronym should spell out the entire name followed by the acronym in parentheses. The acronym alone may be used in all other instances.
For a large document have a glossary of acronyms with their entire names. Every occurrence of an acronym in the documentation will link to the appropriate entry in the glossary.
Don’t use a full stop after an acronym unless it is the last word in a sentence.
Spell out the numbers 0-9 in full, and use numerals for numbers 10 or greater.
> Shut down the Acculturation Workshop virtual machine cleanly and make three copies of the Acculturation Workshop called Paris.vmdk, Melbourne.vmdk and Santiago.vmdk. > Paris is at transaction 95 or less.
This section focuses on the reStructuredText(rST) elements that are used in the documentation across YottaDB, their syntax and usage.
Text can be underlined or under and overlined to represent a title/heading.
The length of the underline must be at least as long as the title and the length of the under and overline must be identical.
For the purposes of all YottaDB documentation use the second method for representing titles, i.e. both under and overlining the text.
Following examples depict correct titles:
***** Title ***** ######## subtitle ######## ********************** subsubtitle **********************
The structure of the document is determined from the succession of the headings. Unlike headings in HTML and Markdown, rST does not assign heading levels to certain characters. It is up to the writer of the document to maintain the same convention throughout the project.
Use the following convention for titles in all YottaDB documentation:
======, level 1 title (page title) ------, level 2 title ++++++, level 3 title ~~~~~~, level 4 title ^^^^^^, level 5 title
If new information is being added to an existing document, it will be easy to identify the succession of headings.
When starting a document from scratch, keep in mind to provide the reader easy access to all topics and sub-topics. This means creating a thorough navigation tree with the help of titles. Depending on the depth of the navigation tree, use an appropriate value for the
:depth: option of the
.. contents:: directive.
Although there is no special syntax in rST to represent text, there are special characters that can be used to emphasize certain text in the documentation.
To make any text bold in rST, use the following syntax:
E.g., **bold** will be rendered as bold.
The text will not be rendered as intended if it starts or ends with whitespace.
** bold** will be rendered as
** bold** and not bold.
Use bold sparingly to emphasize the text that you want to stand out.
To make any text italic in rST, use the following syntax:
E.g., *italic* will be rendered as italic.
Similar to bold type, text will not be rendered as intended if it starts or ends with whitespace.
*italic * will be rendered as
*italic * and not italic.
Also use italic sparingly.
There is no convention used to decide what text should be emphasized using bold or italic. It is up to the writer of the documentation. But the method used to emphasize text should be consistent throughout the document. If you use bold, stick to using bold throughout that document.
The code role is used to display text as code.
Following is the syntax:
which will be rendered as:
As seen above, the text is highlighted and displayed using a fixed-width font.
The code role syntax should be used to highlight commands, variable names, directory names,file names etc throughout the documentation.
The :code:`tree` program shows the environment sourcing :code:`ydb_env_set` creates.
There also exists a
code-block directive, explained later in this document, which should be used for larger code blocks.
Be careful to not overuse the code role syntax.
To add a bulleted list to the documentation, use the following syntax:
* First bulleted list item. * Second bulleted list item with indentation.
which is rendered as:
First bulleted list item.
Second bulleted list item with indentation.
note in rST when you need to alert the user of some important information, including but not limited to warnings, software behavior under certain circumstances etc.
To add a note to the documentation, use the following syntax :
.. note:: <Text>
To add a code-block to the documentation, use the following syntax :
.. code-block: <language> <code snippet>
A new line is essential between
code-block and the
<code snippet>, otherwise the code-block accepts the code snippet as a parameter.
<language> with the appropriate programming language name. A list of languages supported by the Python syntax highlighter, Pygments, can be found here. If a particular language is not supported replace
Indentation is important is rST. Be sure to use proper indentation when using
Code Block, or
Syntax for a simple table is as follows:
+--------------+---------------+--------------+ |First column |Second column |Third column | +--------------+---------------+--------------+
which will be rendered as:
Syntax for a multicell table is as follows:
+------------+------------+-----------+ | Header 1 | Header 2 | Header 3 | +============+============+===========+ | body row 1 | column 2 | column 3 | +------------+------------+-----------+ | body row 2 | Cells may span columns.| +------------+------------+-----------+ | body row 3 | Cells may | - Cells | +------------+ span rows. | - contain | | body row 4 | | - blocks. | +------------+------------+-----------+
which will be rendered as:
body row 1
body row 2
Cells may span columns.
body row 3
Cells may span rows.
body row 4