You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: supplementary_style_guide/style_guidelines/formatting.adoc
+49-7Lines changed: 49 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,47 @@
1
1
[[formatting]]
2
2
= Formatting
3
3
4
+
[[commands-in-code-blocks]]
5
+
== Commands in code blocks
6
+
7
+
Use a single command per code block for each procedure step. This approach helps with readability and makes it possible for the copy button in code blocks to work correctly.
8
+
9
+
By default, use bold formatting for commands in code blocks to visually distinguish the commands from their lead-in sentences and from the command prompts and example outputs. For consistency, use bold formatting for commands even when no command output is shown in the code block.
10
+
11
+
[NOTE]
12
+
====
13
+
To apply formatting in a code block, you must use the `quotes` link:https://docs.asciidoctor.org/asciidoc/latest/subs/apply-subs-to-blocks/[AsciiDoc substitution].
14
+
====
15
+
16
+
.Example AsciiDoc: A command and its output in a code block
17
+
18
+
Verify that the `libvirt` default network is active and configured to start automatically:
19
+
20
+
[subs="+quotes"]
21
+
----
22
+
# *virsh net-list --all*
23
+
Name State Autostart Persistent
24
+
--------------------------------------------
25
+
default active yes yes
26
+
----
27
+
28
+
29
+
This example renders as follows in HTML:
30
+
31
+
====
32
+
Verify that the `libvirt` default network is active and configured to start automatically:
33
+
34
+
[subs="+quotes"]
35
+
----
36
+
# *virsh net-list --all*
37
+
Name State Autostart Persistent
38
+
--------------------------------------------
39
+
default active yes yes
40
+
----
41
+
====
42
+
43
+
For commands and command outputs in code blocks, observe the correct markup for user-replaced values, as described in xref:user-replaced-values[] and xref:user-replaced-values-xml[].
44
+
4
45
[[date-formats]]
5
46
== Date formats
6
47
@@ -121,6 +162,7 @@ Write all titles and headings, including the titles of product documentation gui
121
162
* _Configuring the node port service range_
122
163
* _How to perform an unsupported conversion from a RHEL-derived Linux distribution to RHEL_
123
164
165
+
124
166
[[user-replaced-values]]
125
167
== User-replaced values
126
168
@@ -148,7 +190,7 @@ Ensure that user-replaced values have the following characteristics:
148
190
Create an Ansible inventory file that is named `/_<path>_/inventory/hosts`.
149
191
----
150
192
151
-
This renders as:
193
+
This example renders as follows in HTML:
152
194
153
195
====
154
196
Create an Ansible inventory file that is named `/_<path>_/inventory/hosts`.
@@ -160,15 +202,15 @@ To italicize a user-replaced value in a code block, you must add an attribute to
0 commit comments