Basic Inline Text Formatting
Bold & Italic
You can bold and italic entire phrases, a word, and characters in a word.
*bold phrase* & **char**acter**s**
_italic phrase_ & __char__acter__s__
*_bold italic phrase_* & **__char__**acter**__s__**
bold phrase & characters
italic phrase & characters
bold italic phrase & characters
Monospace
You can monospace entire phrases, a word, and characters in a word.
`monospace phrase` & ``char``acter``s``
`*monospace bold phrase*` & ``**char**``acter``**s**``
`_monospace italic phrase_` & ``__char__``acter``__s__``
`*_monospace bold italic phrase_*` &
``**__char__**``acter``**__s__**``
monospace phrase
& char
acters
monospace bold phrase
& char
acters
monospace italic phrase
& char
acters
monospace bold italic phrase
&
char
acters
Highlight
You can highlight entire phrases, a word, and characters in a word.
Let's #highlight this phrase# and part of th##is##.
Let’s highlight this phrase and part of this.
Lists
Admonition styles
An admonition, also known as a notice, helps draw attention to a line or block of text with a special label or icon.
Asciidoctor comes with five built-in styles.
-
NOTE
-
TIP
-
IMPORTANT
-
CAUTION
-
WARNING
Basic admonition
CAUTION: Don't stick forks in electric sockets.
TIP: After someone sticks a fork in a socket, you'll need to reset the circuit in the breaker box in the dark and scary basement.
WARNING: Never go into the basement.
IMPORTANT: A monster lives in the basement.
NOTE: If you go into the basement, see if you can find Kenny's orange parka.
Don’t stick forks in electric sockets. |
After someone sticks a fork in a socket, you’ll need to reset the circuit in the breaker box in the dark and scary basement. |
Never go into the basement. |
A monster lives in the basement. |
If you go into the basement, see if you can find Kenny’s orange parka. |
Complex admonition
[IMPORTANT]
.Optional Title
====
Use an example block to create an admonition that contains complex content, such as (but not limited to):
* Lists
* Multiple paragraphs
* Source code
* Images
====
Optional Title
Use an example block to create an admonition that contains complex content, such as (but not limited to):
|
Sidebar Block
A sidebar can be titled and contain any type of content such as source code and images.
.Optional Title of Sidebar
****
Sidebars are used to visually separate short, auxiliary bits of content that supplement the main text.
****
Links
http://asciidoc.org[AsciiDoc]
link:user-guide.html[user guide]
xref:user-guide.adoc[user guide]
link:{site-url}/assets/mydoc.pdf[get the PDF]
See <<_usage>>.
== Usage
[#usage]
== Usage
. [[step-1]]Download the software
Code/Examples
Special Characters and Symbols
Special character and symbol replacement is built into Asciidoctor.
During conversion, the characters in the table below are replaced with the appropriate character or Unicode entity.
Replacement of special characters and symbols occurs in all inline and block elements except for comments and certain passthroughs.
The three special characters, <
, >
, and &
, are always replaced first.
HTML and XML character entities as well as decimal and hexadecimal Unicode code point references are also recognized and replaced.
For example, to produce the §
symbol you can use §
, §
, or §
.
When the document is processed, the replacements substitution will replace the section symbol reference, regardless of whether it is a character entity reference or a numeric character reference, with §
.
In turn, §
will display as §
.
Special character and symbol syntax
Name | Syntax | Replacement | Rendered | Notes |
---|---|---|---|---|
Ampersand |
& |
& |
& |
|
Apostrophe, curved |
Sam's |
Sam’s |
Sam’s |
The vertical form apostrophe is replaced with the curved form apostrophe. |
Copyright |
(C) |
© |
© |
|
Ellipses |
... |
… |
… |
|
Em dash |
-- |
— |
— |
Only replaced if between two word characters, between a word character and a line boundary, or flanked by spaces. When flanked by space characters (e.g., |
Greater than |
> |
> |
> |
|
Left double arrow |
<= |
⇐ |
⇐ |
|
Left single arrow |
<- |
← |
← |
|
Less than |
< |
< |
||
Registered |
(R) |
® |
® |
|
Right double arrow |
=> |
⇒ |
⇒ |
|
Right single arrow |
-> |
→ |
→ |
|
Trademark |
(TM) |
™ |
™ |
User Interface Macros
Asciidoctor has three user interface (UI) macros:
-
Button
btn:[]
-
Keyboard
kbd:[]
-
Menu
menu:[]
The :experimental: attribute must be set in the document header or globally to enable UI macros.
|
Button
Communicate that a user should press a button with the button macro.
Press the btn:[Submit] button when you are finished the survey.
Select a file in the file navigator and click btn:[Open].
Press the btn:[Submit] button when you are finished the survey.
Select a file in the file navigator and click btn:[Open].
Keyboard
Create keyboard shortcuts with the keyboard macro.
Press kbd:[esc] to exit insert mode.
Use the shortcut kbd:[Ctrl+T] to open a new tab in your browser.
kbd:[Ctrl+Shift+N] will open a new incognito window.
Press kbd:[esc] to exit insert mode.
Use the shortcut kbd:[Ctrl+T] to open a new tab in your browser.
kbd:[Ctrl+Shift+N] will open a new incognito window.
Menu
Show readers how to select a menu item with the menu macro.
To save the file, select menu:File[Save].
Select menu:View[Zoom > Reset] to reset the zoom level to the default setting.
To save the file, select menu:File[Save].
Select menu:View[Zoom > Reset] to reset the zoom level to the default setting.