8 Structure and markup #
This chapter contains instructions on using the correct markup to create consistent and legible documents, and structuring the content in the way that it effectively helps readers find answers to their queries.
8.1 Admonitory and advisory paragraphs #
To make readers aware of potential problems and recent changes, or to give them tips, use an admonition element. Avoid using more than one admonition per page of PDF output.
WARNING. Use these elements to warn of security issues, potential loss of data, damage to hardware, or physical hazards. Warnings must always precede the action to which they apply.
IMPORTANT. Use these elements to give vital information.
TIP. Use these elements to introduce guidelines or give tips.
NOTE. Use these elements to highlight software version differences.
Follow these rules when writing admonitions:
Add a title to admonitions. In the title, state the subject of the admonition and, in the case of a warning, also the source of danger.
WARNING or IMPORTANT: In the first paragraph, clearly state possible consequences of ignoring the danger.
WARNING or IMPORTANT: In the second paragraph, explain how to avoid the danger. If there are multiple ways to avoid a danger, use an unordered list. If fewer than five consecutive steps must be taken to avoid a danger, use an ordered list. If more than five consecutive steps need to be taken, use a cross-reference to another part of the documentation.
[WARNING] .Do not interrupt creation of file systems ==== Creating a file system can take multiple hours. Interrupting this process will result in a corrupt file system and an unusable installation. Always wait until formatting has finished. ====
Creating a file system can take multiple hours. Interrupting this process will result in a corrupt file system and an unusable installation.
Always wait until formatting has finished.
8.2 Callouts #
Callouts allow annotating examples, such as configuration files or commands with many options. Add callout elements directly after the part of a verbatim block that you want to annotate. Do not try to align them above the part of a screen to annotate. Do not use more than ten callouts per example.
See also Section 8.6, “Examples”.
[source] ---- color white/blue black/light-gray <1> default 0 <2> ---- <1> Colors of the boot loader menu. <1> Defines the preselected option.
8.3 Command-line input and command-line output #
When dealing with user input and system output shorter than 30 characters,
enclose
it with single backticks (`
). In all other
cases, close the current paragraph and enclose the user input and/or
system output in a verbatim block. See also Section 8.6, “Examples”.
When using a stand-alone command elements outside of a verbatim block, do not use prompt elements before or within them. For more information about prompts, see Section 8.3.3, “Prompts”.
8.3.1 Commands #
Commands can be embedded in running text or presented as part of a
screen environment. In running text, use
backticks (`
)
when referring to
an actual command you would use on a command line:
To start LibreOffice from the command line, use `loffice`.
Where options or subcommands belong with a command, include them within the command itself:
To start LibreOffice Writer from the command line, use `loffice --writer`.
If options or subcommands stand for themselves in a text, wrap them in backticks as well.
To avoid spelling or capitalization errors, whenever possible, try commands before adding them to the documentation.
See also Section 8.3.3, “Prompts”.
8.3.2 File names #
A file name is the name of a file on a local or network disk. Can contain a simple name or include a path or other elements specific to the operating system. See also Section 7.9, “File and directory names”.
Find the log file `configuration.xml` in the directory `/etc/sysconfig`.
To assign standard names to files and images in DocBook and AsciiDoc, follow the naming conventions at https://github.com/SUSE/doc-modular/blob/main/templates/README.md.
8.3.3 Prompts #
When documenting commands entered into Bash with a verbatim block, always prefix them with a prompt marked up this way:
> ls
To avoid making prompts longer than necessary, do not include paths, user or host names, unless this is vital to understanding. The first restricted user must always be named tux. For more information about names of restricted users, see Chapter 4, Names of example items.
Whenever you provide commands in a verbatim block, make it clear if the
user needs regular or elevated privileges. Avoid using root prompts in
your documentation by using the sudo
command where
applicable. If you do need a root prompt, always mark it up as follows:
# yast
When documenting prompts other than the one of Bash, use a custom prompt that is as generic as possible.
For consistency, it is helpful to create entities (attributes) for the prompts used in your documentation. Doc Kit repository contains entities for user, root and sudo prompts. For more information, see Section 9.1, “Entities”.
Verbatim blocks normally do not expand attributes with their values.
To use attributes for prompts in a verbatim block, add
subs="+attributes"
in its header:
[source,subs="+attributes"] ---- {prompt_root}zypper upgrade ----
8.3.4 Verbatim blocks #
Verbatim blocks (“code blocks”) are used to present:
long commands and commands together with their output
system output, such as system messages
code or configuration examples
[source] ---- tux > ls / bin dev lib mnt proc sbin suse usr boot etc lib64 mounts root selinux sys var data home lost+found opt run srv tmp ----
Use screens only where necessary for understanding the documentation. Present longer screens as examples. For more information, see Section 8.6, “Examples”.
Do not add empty lines at the beginning or end of screens. They can be cut away by the SUSE style sheets. However, most other style sheets do not have such functionality.
Lines in a screen must be at most 80 characters long. If you are working in a structure with less available space, such as within a list or within a table, work with appropriate shorter line lengths.
Avoid command output that contains dates, version numbers, or other version-specific information that frequently changes.
To make long shell commands less unwieldy, split them into multiple lines at appropriate positions, such as after the end of an option. At the end of each line but the last, append a
\
. The character\
informs the shell that the command invocation will continue after the end of the line. Splitting commands into lines can also be helpful for aligning callouts with the right option.To work with long output, especially tabular output, use either of the following strategies:
Remove or replace items that are irrelevant to your goal. For example, replace long file names with shorter ones or remove a table column and replace it with
[...]
.
To enable automatic syntax highlighting for programming languages or formats, specify the language in the source definition, for example
[source,html]
. Valid language formats:apache
,bash
,c++
,css
,diff
,html
,xml
,http
,ini
,json
,java
,javascript
,makefile
,nginx
,php
,perl
,python
,ruby
,sql
,crmsh
,dockerfile
,lisp
, andyaml
.Note that syntax highlighting may not be supported in all target formats.
See also Section 8.6, “Examples”, Section 8.3.1, “Commands”, Section 8.3.3, “Prompts”, and Section 8.2, “Callouts”.
8.3.5 Variable names #
To reference to names of variables, use single backticks
(`
):
To select another display manager, start the YaST system configuration editor and change the value of `DISPLAYMANAGER`.
8.4 Cross-references #
Use double angled brackets
<<ID>>
when referring to an appendix, chapter, example,
figure, part, preface, section, table or question and answer set. The
element referenced needs to have an identifier
(ID). Create identifiers to reference from cross-references using the
rules under Section 8.11, “Identifiers”. Note that a cross-reference only
works when it links to documentation within the same set, for example, the
same book or set of books.
Other types of references to resources are described in Section 8.18, “References to other external resources” and Section 8.7, “External links”.
[#sec-cross-reference,reftext=Custom cross reference] === Cross-references Use double angled brackets for xrefs ... See <<sec-cross-reference>>.
Keep in mind the following cases where listing cross-references is discouraged and must be avoided:
Do not insert cross-references into title elements. The title must not be clickable, and a cross-reference in a title can create issues when linking to such a title in a different paragraph.
Do not create references to paragraphs or other elements that have no title. An exception to this rule is the element procedure steps to which you may create references. If a reference to an element without a title is essential to the document, specify a custom label for the cross-reference to assign a title.
Do not prefix or suffix cross-references with text labels such as “appendix,” “chapter,” “table,” or “figure.” Such labels are generated automatically.
8.5 Emphasis #
Where possible, indicate stress with language only. If that is not
possible, surround the phrase with
underscores (_phrase_
) to indicate stress.
Where added emphasis is needed, enclose the phrase in
a single pair of asterisks (*phrase*
). To emphasize
characters within a word, use a pair of double asterisks
(char**act**ers
).
This will be displayed in _italics_. This will be displayed in *bold*.
8.6 Examples #
Use examples to illustrate complex processes. The rules established in Section 8.9.1, “Graphics” also apply to examples.
Examples usually contain source code blocks. Additionally, there can be callouts and explanatory text.
Always give examples a title and an identifier.
For more information about screen environments, see Section 8.3.4, “Verbatim blocks”. For more information about displaying computer input and output, see Section 8.3, “Command-line input and command-line output”. To annotate examples, use callouts. Callouts are described in Section 8.2, “Callouts”.
[#ex-example] .Example of an example ==== [source] ---- tux > ps -xa 5170 ? S 0:00 kdeinit: khotkeys 5172 ? S 0:02 kdeinit: kdesktop 5174 ? S 0:04 kdeinit: kicker ---- ====
8.7 External links #
Information that is relevant within SUSE documentation is often available from other Web sites already. In such cases, choose between linking to these sites or including their content in edited form. Adhere to the following guidelines when selecting sites to link to:
Link to credible sources, such as suse.com, upstream projects or developer sites. Avoid linking to direct competitors of SUSE. Do not link to obvious clickbait sites.
Prefer larger, well-kept sites over blogs that may vanish overnight. If you need to link to smaller blogs, save an archive version of the site at https://web.archive.org/.
Avoid linking to sites that feature controversial or political content.
In certain cases, product managers request avoiding all or selected external links to avoid issues for customers impacted by restrictive firewall rules.
Common URL schemes are automatically detected from the text and converted
into links. To disable this conversion, use a single backlash
(\
) in front of the link
(\https://example.org
). To use a custom link title, use
a URL macro:
Ask questions in the https://example.com[An example title]
Make URLs as short as possible before adding them to documentation. Many
long URLs can be shortened by leaving away non-essential pieces, such as
the _utm
parameters used for marketing purposes. If a
Web site provides a built-in URL shortener, use it.
Do not use third-party URL shorteners, such as bit.ly. Third-party URL shorteners have the following disadvantages:
They obscure the destination a link points to.
They introduce an extra element of uncertainty, as the shortening service may disappear or become unreliable in the future.
The providers of these services usually run Web analytics that may introduce privacy issues.
Do not link to SUSE documentation outside of the current document set. Instead, use the appropriate entity for the book title. Always reference the book itself, as chapter names can change.
For consistency, do not use the article in front of the name of the referenced book or chapter. For example, “The general concept of Podman is described in Containers and Podman.”
Where possible, collect links in a “More information” section at the end of the chapter. This helps readers focus on your documentation instead of leading them immediately to other resources. This is described in Section 5.1, “Books”.
To mark up multiple links, insert them into an unordered list. Do not use a list environment for a single link. If you need to present many links, group them by topic and create a separate list environment for each group. Provide a comprehensive title for each of the groups or an introductory sentence. For more information about creating lists, see Section 8.12.1, “Itemized lists”.
Where possible, provide translators with localized versions of links in the comments of the source file.
Other types of references to resources are described in Section 8.4, “Cross-references” and Section 8.18, “References to other external resources”.
8.8 External links to SUSE documentation #
The SUSE documentation is hosted under
documentation.suse.com
. This is the URL that must be provided
in all documents. The abbreviated URLs such as doc.suse.com
and
docs.suse.com
also work but must be avoided for SEO reasons.
Make sure to use complete URLs instead of entities for an easy copy and paste.
Most links in our documentation that goes to
documentation.suse.com
refer to a specific product and release.
However, sometimes it makes sense to not include the
SP or even the major release. These are so-called SP-independent
links.
The following reasons give you an idea when to use them:
Your linked information is independent from any SP
You cannot or do not need to pick a specific SP
You want to link to the most recent SP without checking which one it is
You want to support SEO where the most prominent SP is more important than previous, older SPs
Make sure to follow this syntax:
documentation.suse.com/<PRODUCT>[/<MAJOR_RELEASE>]/<DEEP_LINK>
The placeholders mean the following:
PRODUCT: the abbreviation of the product, like “sle” for SUSE Linux Enterprise, “sle-ha” for SUSE Linux Enterprise Server High Availability Extension, etc.
MAJOR_RELEASE: an optional major release like 12 or 15. If you omit it, your link will be redirected to use the most recent release.
DEEP_LINK: the link that points to a specific chapter or section within a book
Make sure you use html
and not
single-html
. This is needed for SEO reasons.
For example, the link https://documentation.suse.com/sle-ha/15-SP3/html/SLE-HA-all/article-installation.html#sec-ha-inst-quick-req/ points to the “System requirements” for SUSE Linux Enterprise Server High Availability Extension. To turn this link into an SP-independent link, you need to identify the different components first:
PRODUCT is
sle-ha
MAJOR_RELEASE is 15 (no SP mentioned)
DEEP_LINK is
/html/SLE-HA-all/article-installation.html#sec-ha-inst-quick-req
With the above parts, the redirection rules on our server allow expressing SP-independent links in several ways:
https://documentation.suse.com/sle-ha-15/html/SLE-HA-all/article-installation.html#sec-ha-inst-quick-req
Redirects to the most recent SP for the major release 15
https://documentation.suse.com/sle-ha/html/SLE-HA-all/article-installation.html#sec-ha-inst-quick-req
Redirects to the most recent major release, latest SP available
If IDs have been changed between releases or SPs, this is what happens:
If the hash part (everything after #) is not found, the browser will jump to the beginning of the file.
If the file cannot be found (in our example, article-installation.html), the server will respond with a 404 error (file not found).
8.9 Figures #
Use the image macro to insert an image. Always supply an identifier, title, appropriate width and alternative text to the image.
All referenced image files must have a lowercase alphanumeric file name. When specifying figure names, follow the naming conventions at https://github.com/SUSE/doc-modular/blob/main/templates/README.md.
.An interesting picture [#fig-picture] image::sunset.jpg[Cat chasing Geeko,200]
8.9.1 Graphics #
Keep graphics as simple as possible. Use as little text as possible. To allow for translation, reserve twice as much space for runs of text as the English version of it consumes.
8.9.2 Screenshots #
Use screenshots to illustrate complex situations in which the user cannot easily follow the instructions otherwise.
Be selective. Only illustrate steps in which meaningful user interactions are necessary. Do not create screenshots of progress bars or confirmation windows. Usually, it is unnecessary to create a screenshot of every step of an instruction.
Avoid creating screenshots of verbatim blocks or a terminal screen output. Instead, paste such content in a verbatim block. Find more details in Section 8.3.4, “Verbatim blocks”.
Always create screenshots illustrating the situation right before an action has been taken.
Insert screenshots directly after the textual description of the action.
Make sure screenshots focus on what they are supposed to illustrate. When documenting application windows, create a screenshot of the window only. When documenting Web applications, only reproduce the contents of the tab instead of the entire browser window.
Do not scale screenshots using graphics software. Embed screenshots at their original resolution and use DocBook attributes to scale them appropriately.
Avoid creating screenshots of windows higher or wider than 800 pixels at 96 pixels per inch. When creating screenshots of applications scaled for a higher pixel-per-inch count, apply a proportionally larger maximum window size.
To ensure readability and consistency, scale screenshots with the
width
attribute. Choose the appropriate scaling from the following list:Screenshots of the whole desktop should be scaled to 90–99% page width.
Screenshots of individual application windows should be scaled to 75–99% page width.
Small windows such as message boxes should be scaled to 50–60% page width.
Create screenshots that are recognizable to readers. For example, create screenshots of KDE applications on a KDE desktop with the default KDE theme and disable toolbar modifications you have made.
Use grayscale font antialiasing (default on SUSE operating systems). Subpixel font antialiasing (default on Windows and macOS operating systems) creates colored letter edges when zoomed or printed.
Where applicable, follow the rules in Chapter 4, Names of example items.
Avoid editing screenshots. To anonymize portions of a screenshot, pixelize it. To highlight parts of a screenshot, use rectangles or arrows. Never add callouts, text or freely drawn objects. Always select colors that provide a good contrast with their background.
If possible, avoid screenshots with dates, version numbers, or other version-specific information that frequently changes.
8.10 Glossaries #
An optional glossary contains terms and their definitions. Make sure that the glossary entries are appropriate to the intended audience. Define unfamiliar terms and special jargon.
Define infinitive forms of verbs and singular nouns. Do not start the definition with the term itself. Use lowercase for the term unless it is a proper noun.
To keep definitions consistent, check SUSE's official terminology database called TermWeb (https://suse.termweb.eu/search/terms). It contains company-specific terminology in English and all our supported languages. When defining a term, consult TermWeb first to ensure you are using the approved wording and preferred spelling.
You can include a glossary in an article, book and book part by setting
the glossary
style on a section.
The markup for a glossary entry is shown in Example 8.8, “A typical example of a glossary”.
[glossary] == Glossary [glossary] AsciiDoc:: a lightweight markup language used to write structured documents in plain text. DocBook:: an XML-based markup language designed for writing structured technical documentation.
8.11 Identifiers #
Always use
[#example-identifier]
identifiers in parts, chapters, appendixes, sections, figures, glossaries and examples. Identifiers can be used in other elements as well, for example, block elements, such as tables and procedures.In identifiers, only use lowercase basic Latin alphabetic and numeric characters and
-
(hyphen). Follow the regular expression pattern[\-0-9a-zA-Z]+
. Do not use_
and.
characters, as they may hurt search engine optimization.Identifiers can consist of multiple parts. Join these parts with a
-
(hyphen).Prefix. Signifies the type of XML element. Prefixes aid writers in creating logically named identifiers for elements. Use identifiers in accordance with Table 8.1, “Abbreviations for different elements in identifiers”.
Chapter title label. Shortened version of the title of the parent chapter or parent chapter-level element (preface, appendix, etc.). Do not add a chapter title label to chapters and chapter-level elements themselves. Do not add chapter title identifiers within articles.
Element title label. Shortened version of name of the title of the element itself.
Example 8.9: Examples of identifiers #[#pro-install-sles] [#install-yast] [#tab-install-source]
Use short, memorable, English terms or phrases as title labels. Favor longer terms over non-obvious abbreviations. Always use the singular of nouns and the infinitive of verbs. For example, a section about installing with YaST could be called
install-yast
.A figure in that section showing language selection could use the identifier
fig-install-yast-language
.Keep in mind that section and chapter identifiers are used in the online documentation URLs. Choosing understandable keywords helps readers to understand what the page is about and also improves the search engine ranking.
Do not rework identifiers in existing documentation, instead apply these rules to newly created documentation only.
Element | Prefix |
---|---|
appendix | No prefix |
book | No prefix |
callout | co |
chapter | No prefix |
example | ex |
figure | fig |
glossary | No prefix |
itemized list |
il Only add an identifier when the list has a title. |
list item | li |
ordered list |
ol Only add an identifier when the list has a title. |
part | No prefix |
preface | No prefix |
procedure | pro |
sections | No prefix |
procedure step | st |
table | tab |
topic | No prefix |
description lists | dl |
8.12 Lists #
SUSE documentation uses the following types of lists:
Itemized lists. Also known as bullet lists or unordered lists.
Ordered lists. Also known as numbered lists.
Variable lists. Also known as definition lists or description lists.
Procedures. Also known as step-by-step instructions or step lists. Described in Section 8.15, “Procedures”.
Follow these rules when creating or editing lists:
Always introduce a list in the text. If needed for reference or better coordination with the related text, add a title and an identifier.
A list must contain at least two items. If items are few, short and simple in structure, consider incorporating them in the flowing text instead of creating a list.
If all list items are nouns only, do not capitalize their first letter. Use sentence-style capitalization for list items that are full sentences and for terms in descriptive lists.
Use a period after every list item that is a sentence. Do not use a period after the items that are not complete sentences. Use either all full sentences in your bullet lists or all fragments. Avoid a mix.
Do not use commas and semicolons to end punctuation.
Wherever possible, use parallel phrasing and grammatical construction between list items. This provides a pattern that makes it easier to follow the text.
Lists are visually distinct and can break up text flow. Do not overuse them.
Never nest more than three lists within each other. Instead, restructure the information using a combination of lists and running texts.
To be able to reference untitled lists, insert a label in the cross reference. For more information, see Section 8.4, “Cross-references”.
8.12.1 Itemized lists #
Use itemized lists whenever the order of list items is irrelevant. They are often used to provide an overview of information or to introduce or summarize information.
The following operating systems are supported: * Linux, Kernel 2.4 and newer * FreeBSD 7 and newer
The following operating systems are supported:
Linux, Kernel 2.4 and newer
FreeBSD 7 and newer
8.12.2 Ordered lists #
Use ordered lists when items have a strict order, hierarchy or importance. Do not use ordered lists to describe sequential user actions (step-by-step instructions). For sequential user actions, use a procedure, as described in Section 8.15, “Procedures”. If order is not relevant, use an itemized list or a variable list.
Before installing, make sure of the following: . The network connection of the computer is configured properly. . The latest security updates are installed. . If you are in doubt, run an online update.
Before installing, make sure of the following:
The network connection of the computer is configured properly.
The latest security updates are installed. If you are in doubt, run an online update.
8.12.3 Variable lists #
Use variable lists when defining terms or describing options. Each item of a variable list contains a short term that is then further explained by an explanatory paragraph.
Use sentence-style capitalization for both the term and the list item.
To reference the list, assign it an identifier and add a title. Individual list items may be referenced by assigning an identifier as well. The entry is then identified by the value of the identifier and referenced by the term.
This book consists of several parts: Installation:: Learn about the installation and initial configuration of a Linux system. System:: Get a basic understanding of the system components.
This book consists of several parts:
- Installation
Learn about the installation and initial configuration of a Linux system.
- System
Get a basic understanding of the system components.
8.13 Keys and key combinations #
To enter keys and their combinations in the
text, use the keyboard macro: kbd:[key]
Capitalize all keys as printed on a standard keyboard. Capitalize all
letter keys.
To mark up key combinations, enter multiple keys
concatenated with +
, such as
kbd:[key+key+key+...]
.
If the last key is a backslash (\
), it must be
followed by a space. Otherwise the processor will not recognize the
macro. If one of the keys is a closing square bracket
(]
), it must be preceded by a backslash. Without the
backslash escape, the macro will end prematurely.
To create a screenshot, press kbd:[Print Screen].
To save a file, press kbd:[Ctrl+S]
8.14 Outline levels and sectioning #
Create sections by inserting
=
characters in front of their titles. The number of
=
characters determines the depth of the section in the
document structure. Do not go deeper than section level 3.
Instead, create a flatter structure in which more elements are visible at
a glance.
= Document Title (Level 0) == Level 1 Section Title === Level 2 Section Title ==== Level 3 Section Title == Another Level 1 Section Title
Provide at least one paragraph of introductory information directly within each section.
Do not create lone subsections. A lone subsection is a section that is the only subsection of its parent section.
For more information about writing headlines, see Section 7.10, “Headings”.
8.15 Procedures #
Use procedures to describe sequential tasks. A procedure consists of the following elements and attributes:
An identifier.
A title.
An introductory phrase establishing the purpose of the procedure. If the procedure is otherwise the only element in its section, place the introductory phrase before the procedure.
If there are preconditions or prerequisites, add them as a second paragraph after the introduction.
Short, simple steps and, if necessary, substeps describing the actions to be performed. See also Section 7.18, “Sentence structure”.
Steps may contain a link to an explanatory subsection providing further details on the step.
[#pro-procedure] .Example of a procedure To add a new user to the system, perform the following steps: . In the YaST window, click btn:[User and group management]. . To open the btn:[Add a new user] dialog, click btn:[Add]. . Type in the user name and click btn:[Create].
To add a new user to the system, perform the following steps:
In the YaST window, click .
To open the
dialog, click .Type in the user name and click
.
8.16 Profiling #
Profiling is convenient for the creation of consistent documentation across different products or product lines. This is especially beneficial when similar products share a considerable amount of features, with only a few differences. Instead of maintaining separate documentation for each product, you can share most of the source code and only vary text snippets where necessary. When profiling, you can mark specific elements as conditional and specify which conditions apply to the output when processing the files to generate output. The style sheets will then include or exclude the marked text, according to the conditions.
Profiling allows you to keep both common and product-specific content in one file and select at production time which information to include in the output.
If you need to use profiling in your writing, adhere to the following guidelines:
Identify different variants that you want to apply to the general piece of text and assign clear and short identifiers to them, sticking to lowercase. These identifiers act as “aliases” for longer products or deliverables.
Select one or more profiling attributes and add them to the text snippets that are conditional. The tagged snippets will only be included in the output if all required conditions are fulfilled. In most cases, the attribute to use is
:prof-os:
. For different processor architectures, use:prof-arch:
. The general-purpose attribute is:prof-condition:
.Mark the variants in your text with the relevant identifiers. Any content that is valid for all conditions does not need any profiling attributes. The respective content will always be included in the output formats generated from the sources.
If you are using DC files, create a different DC file for each variant. Add the respective profiling variable and its value to the DC file.
:prof-os:
#[...] ifeval::["{prof-os}" == "sles"] Note that the official update repository is only available after registering your SLES installation. endif::[]
MAIN="MAIN.SLEDS.xml" ROOTID=book-administration ## Profiling PROFOS="sles" ...
MAIN=book.adoc # Profiling PROFOS="sles" ...
8.17 Questions and answers #
Use question and answer sections to present information about troubleshooting or commonly asked questions about a product. Never use question and answer sections to explain trivia, such as how a product got its name. Keep your audience in mind. See also Chapter 2, Writing technical documentation.
Questions must always end in a ?
. Where explanations
longer than three paragraphs are necessary for an answer, add a
cross-reference to an explanation outside of the question and answer
section. See also Section 8.4, “Cross-references”.
[qanda] .Example of a question and answer section How can I check if the product was correctly installed?:: Open the log file. Look for entries starting with `Failed`. Why does the error `N` occur during installation?:: There are less than 4 GB of space available on the selected partition.
Example of a question and answer section (output)
- 1. How can I check if the product was correctly installed?
Open the log file. Look for entries starting with
Failed
.
- 2.
Why does the error
Not enough disk space
occur during installation? There are less than 4 GB of space available on the selected partition.
8.18 References to other external resources #
To reference file names, use a monospaced
`filename`
without the
file://
prefix. To reference e-mail addresses, use the
clickable
mailto:john@example.com[]
macro or unclickable monospaced
`john@example.com`. See also
Section 8.3.2, “File names”.
Reference man pages and info pages in this format:
“the man page of `command`”
“the info page of `command`”
In a situation where the category of the page is needed, append the category in parentheses. For example, use “(`man 9 command`)”.
To learn more about subcommands, see the man page of `command`.
Insert references to external (non-SUSE) physical books in the format “Title by Author (ISBN #00000000).” Inclusion of the ISBN is optional. Place the title in an italics snippet. For example:
_Lorem Ipsum<_ by Dolores S. Amet (ISBN 0-246-52044-7) is a useful guide.
As an author, where possible, provide language-specific references to translators in comments. As a translator, look for corresponding language-specific resources where none have been provided. For URLs, provide only the language-specific version of a site. Use the English version as a fallback. For books, provide the title of the translated version along with the original title if such a translation exists.
Other types of references to resources are described in Section 8.4, “Cross-references” and Section 8.7, “External links”.
8.19 Tables #
Use tables to present many similar facts. Tables are easy to scan and compare. Always keep tables simple enough to not require long explanations, even for readers unfamiliar with the topic.
A table always has a title and should have an identifier.
Typical use cases of tables include:
- Lookup tables for specific information
Whenever users need to check for data that applies to them, create lookup tables. For example, use a table to sum up system requirements.
- Matrix tables
Whenever users need to quickly check whether a specific combination of options works or not. For example, use a matrix table to visualize supported combinations or update options.
As there are use cases for tables, there are cases when not to use tables:
Value and description pairs are better handled by a descriptive list.
Wordy explanations or descriptions should not be used in tables.
Complex layout constructs (screens, code) should not be used in tables.
Some general style tips for tables:
- Structure the table to have more rows than columns
Readers prefer to skim for information that is aligned vertically. When designing tables, consider swapping rows and columns to provide a consistent user experience.
- Narrow down columns
Compress the data in your table as much as you can. Table cells with less content are more easily parsed by readers. Consider using icons, adding repeating words into column titles, or using shorter number formats.
- Use colors to lead the reader's eyes
Use colors to make the information stand out. If you just want to highlight small bits, use bright colors. If you need to color entire cells, use pastels. This option should only be used with matrix type tables.
- Use striped rows
Color every second row in light gray to make sure readers do not accidentally slip between lines. This should be the default for long tables. Do not use striped rows in matrix type tables with additional cell background coloring. You may also consider disabling striped rows for short tables to not confuse readers.
.A table with a title |=== |File System |Maximum File Size |Ext2 (1 kB block size) |16 GB |Ext2 (2 kB block size) |entry |===
File System | Maximum File Size |
---|---|
Ext2 (1 kB block size) | 16 GB |
Ext2 (2 kB block size) | 256 GB |
8.20 User interface items #
To mark up buttons when describing the user interface, use the button macro.
Press the btn:[OK] button to confirm your choice.
To explain how to select a menu item, use the menu macro.
Save the file by selecting menu:File[Save]. Select menu:View[Zoom > Reset] to reset the zoom level to the default setting.