Overview of AsciiDoc Markup Elements used in Red Hat Documentation

Note

Some markup examples used in this overview are based on new Asciidoctor features and they are not a part of the standard set of elements. Please, use the :experimental: tag in the header of your document to enable this functionality.

Element Mark-up Example rendered output

Anchor

Note
The {context} variable is recommended for making modules reusable. Example: [id='section-header_{context}']. For details, see the Modular Documentation Reference Guide.
[id='section-header_{variable}']
Section Header

Section Header

Application name

No special markup

The foo application.

Code blocks

[source,java]
----
public class HelloWorld {
   public static void main(String[] args) {
      System.out.println("Hello, World");
   }
}
----
public class HelloWorld {
   public static void main(String[] args) {
      System.out.println("Hello, World");
   }
}

Code - inline

`print("Hello, World!")`

print("Hello, World!")

Command block

----
$ echo "Hello, World!" > hello.txt
----
$ echo "Hello, World!" > hello.txt

Command - inline

Use the [command]`oc get` command to get a list of services.

Use the oc get command to get a list of services.

Emphasis for a term

Use _this_ approach.

Use this approach.

Filenames or directory paths

Edit the [filename]`kubeconfig` file as required and save your changes.

The [filename]`express.conf` configuration file is located in the [filename]`/usr/share/` directory.

Edit the kubeconfig file as required and save your changes.

The express.conf configuration file is located in the /usr/share/ directory.

GUI Text

The web browser displays *404* for an unreachable URL.

The web browser displays 404 for an unreachable URL.

GUI Button

Click btn:[Save As] to save the file under a different name.

Click Save As to save the file under a different name.

GUI Menu

Navigate to menu:File[Import>Import csv] to import a csv file.

Navigate to File  Import  Import csv to import a csv file.

Inline Image

image::image.png[width=25px]
image

Block Image

.Tux
image::image.png[width=100px]
image
Figure 1. Tux

Inline operations and user input

The `GET` operation can be used to do something.

Answer by typing `Yes` or `No` when prompted.

The GET operation can be used to do something.

Answer by typing Yes or No when prompted.

Keyboard shortcuts

kbd:[Ctrl+Alt+Del]

Ctrl+Alt+Del

Link (external)

link:http://www.redhat.com[Red Hat]

Lists

Note
Do not put steps in bold.
.Ordered list

. First item
. Second item
. Third item

.Unordered list

* This
* That
* The other

.Definition or labeled list

Term A:: description
Term B:: description
Ordered list
  1. First item

  2. Second item

  3. Third item

Unordered list
  • This

  • That

  • The other

Definition or labeled list
Term A

description

Term B

description

Literal value

The function returns `true`.

The function returns true.

Package

Install the [package]`iscsi-initiators-utils` package.

Install the iscsi-initiators-utils package.

Product name

No special markup. Use {nbsp} in the company and product names. Example: Red{nbsp}Hat JBoss{nbsp}Data{nbsp}Grid

Red Hat JBoss Data Grid

Reference to Red Hat guides

See the JBoss EAP link:guide-url[_Getting Started Guide_] for more information.

See the JBoss EAP Getting Started Guide for more information.

System or software variable to be replaced by the user

Use the following command to roll back a deployment, specifying the deployment name: `oc rollback _deployment_`.

Use the following command to roll back a deployment, specifying the deployment name: oc rollback deployment.

System or software configuration parameter or environment variable

Use the `_IP_ADDRESS_` environment variable for the server IP address.

Use the IP_ADDRESS environment variable for the server IP address.

System item, daemon, or service

Include the `libfreetype` library.

Stop the `NetworkManager` daemon.

Start the `mysql` service.

Include the libfreetype library.

Stop the NetworkManager daemon.

Start the mysql service.

Additional Resources