Sidebars
On this page, you’ll learn:
-
How to mark up a sidebar with AsciiDoc.
A sidebar can contain any type of content, such as quotes, equations, and images. Normal substitutions are applied to sidebar content.
Sidebar style syntax
If the sidebar content is contiguous, the block style sidebar
can be placed directly on top of the text in an attribute list ([]
).
Example 1. Assign sidebar block style to paragraph
[sidebar]
Sidebars are used to visually separate auxiliary bits of content
that supplement the main text.
The result of Example 1 is displayed below.
Delimited sidebar syntax
A delimited sidebar block is delimited by a pair of four consecutive asterisks (****
).
You don’t need to set the style name when you use the sidebar’s delimiters.
Example 2. Sidebar block delimiter syntax
.Optional Title
****
Sidebars are used to visually separate auxiliary bits of content
that supplement the main text.
TIP: They can contain any type of content.
.Source code block in a sidebar
[source,js]
----
const { expect, expectCalledWith, heredoc } = require('../test/test-utils')
----
****
The result of Example 2 is displayed below.