AsciiDoctor Version

2.0.20

Document Type

article

Document Attributes

Display Document Attributes

HTML display and AsciiDoc code may have different section levels. This is due to the leveloffset of the include macro.

Sections

Document Title

Level 1

Level 2

Level 3

Level 4
Level 5
AsciiDoc Code
:temp_leveloffset: {leveloffset}

:leveloffset: 0

= Document Title

== Level 1

=== Level 2

==== Level 3

===== Level 4

====== Level 5

:leveloffset: {temp_leveloffset}

Section Attributes

Enable

Let’s focus on section.

AsciiDoc Code
:sectids:
:sectlinks:
:sectanchors:

=== `sectids` , `sectlinks` and `sectanchors` is enable
Disable

Let’s focus on section.

sectids is disable, sectlinks and sectanchors is enable
AsciiDoc Code
:!sectids:

=== `sectids` is disable, `sectlinks` and `sectanchors` is enable

:sectids:
:!sectlinks:
:!sectanchors:

=== `sectids` is enable, `sectlinks` and `sectanchors` is disable

Section Number

References

Section Numbers

Enable

Document Title

1. Level 1

1.1. Level 2

1.1.1. Level 3

1.1.1.1. Level 4
1.1.1.1.1. Level 5
AsciiDoc Code
:sectnums:
:sectnumlevels: 5

:temp_leveloffset: {leveloffset}

:leveloffset: 0

= Document Title

== Level 1

=== Level 2

==== Level 3

===== Level 4

====== Level 5

:leveloffset: {temp_leveloffset}
Disable
sectnums is disable

Document Title

Level 1

Level 2

Level 3

Level 4
Level 5
AsciiDoc Code
:!sectnums:

:temp_leveloffset: {leveloffset}

:leveloffset: 0

= Document Title

== Level 1

=== Level 2

==== Level 3

===== Level 4

====== Level 5

:leveloffset: {temp_leveloffset}
sectnums is enable, sectnumlevels is 0

Document Title

Level 1

Level 2

Level 3

Level 4
Level 5
AsciiDoc Code
:sectnums:
:sectnumlevels: 0

:temp_leveloffset: {leveloffset}

:leveloffset: 0

= Document Title

== Level 1

=== Level 2

==== Level 3

===== Level 4

====== Level 5

:leveloffset: {temp_leveloffset}

Section Styles

Article section styles
  • abstract

  • appendix

  • glossary

  • bibliography

Abstract

Abstract Block

Block Style

AsciiDoc Code
[abstract]
.Abstract Block
--
Block Style
--

Appendix

References

Appendix

Appendix A: Appendix
Section 1
Section 2
Section 3
Appendix B: Number Appendix
1...B.1. Number Section 1
1...B.2. Number Section 2
1...B.3. Number Section 3
AsciiDoc Code
[appendix]
=== Appendix

==== Section 1

==== Section 2

==== Section 3

:sectnums:
:sectnumlevels: 5

[appendix]
=== Number Appendix

==== Number Section 1

==== Number Section 2

==== Number Section 3

Glossary

References

Glossary

Word

Description

AsciiDoc Code
[glossary]
Word:: Description

Bibliography

References

Bibliography

  • xreftext on double angled brackets xref bibliography entries
    (<<double_angled_brackets, bibliography entries>>)

AsciiDoc Code
:double_angled_brackets: <<double_angled_brackets>>
- Double angled brackets xref
  {double_angled_brackets} +
  (`pass:a[{double_angled_brackets}]`)

:inter_document_xref: xref:{docname}{docfilesuffix}#inter_document_xref[]
- inter-document xref
  {inter_document_xref} +
  (`pass:a[{inter_document_xref}]`)

:double_angled_brackets_xreftext: <<double_angled_brackets, bibliography entries>>
- xreftext on double angled brackets xref
  {double_angled_brackets_xreftext} +
  (`pass:a[{double_angled_brackets_xreftext}]`)

:inter_document_xref_xreftext: xref:{docname}{docfilesuffix}#inter_document_xref[bibliography entries]
- xreftext on inter-document xref
  {inter_document_xref_xreftext} +
  (`pass:a[{inter_document_xref_xreftext}]`)

- xreftext on the bibliography anchor
  <<label_xreftext>>
- Number on the bibliography anchor
  <<label_number>>
Bibliography Enable
  • [double_angled_brackets] <<double_angled_brackets>>

  • [inter_document_xref] [[[inter_document_xref]]]

  • [xreftext] [[[label_xreftext, xreftext]]]

  • [1] [[[label_number, 1]]]

AsciiDoc Code
[bibliography]
=== Bibliography Enable


:double_angled_brackets_entry: [[[double_angled_brackets]]]
:inter_document_xref_entry: [[[inter_document_xref]]]
:xreftext_entry: [[[label_xreftext, xreftext]]]
:number_entry: [[[label_number, 1]]]
* {double_angled_brackets_entry} `pass:a[{double_angled_brackets}]`
* {inter_document_xref_entry} `pass:a[{inter_document_xref_entry}]`
* {xreftext_entry} `pass:a[{xreftext_entry}]`
* {number_entry} `pass:a[{number_entry}]`
Bibliography Disable
  • [] <<double_angled_brackets>>

  • [] [[[inter_document_xref]]]

  • [] [[[label_xreftext, xreftext]]]

  • [] [[[label_number, 1]]]

AsciiDoc Code
=== Bibliography Disable


:double_angled_brackets_entry: [[[double_angled_brackets]]]
:inter_document_xref_entry: [[[inter_document_xref]]]
:xreftext_entry: [[[label_xreftext, xreftext]]]
:number_entry: [[[label_number, 1]]]
* {double_angled_brackets_entry} `pass:a[{double_angled_brackets}]`
* {inter_document_xref_entry} `pass:a[{inter_document_xref_entry}]`
* {xreftext_entry} `pass:a[{xreftext_entry}]`
* {number_entry} `pass:a[{number_entry}]`

Discrete

References

Discrete Headings

Discrete headings are closest to headings in other markup languages.

Discrete headings are not included in the table of contents.

Document Title

Level 1

Level 2

Level 3

Level 4
Level 5
AsciiDoc Code
:temp_leveloffset: {leveloffset}

:leveloffset: 0

[discrete]
= Document Title

[discrete]
== Level 1

[discrete]
=== Level 2

[discrete]
==== Level 3

[discrete]
===== Level 4

[discrete]
====== Level 5

:leveloffset: {temp_leveloffset}

Paragraphs

References

Paragraphs

Simply type and it will be generated as a paragraph. No special markup or attributes need to be used.

AsciiDoc Code
Simply type and it will be generated as a paragraph.
No special markup or attributes need to be used.

Hard Line Breaks

References

Hard Line Breaks

Inline

inline line break is
used +.

AsciiDoc Code
.Inline
inline line break is +
used `+`.
hardbreaks block option

hardbreaks option is
used [%hardbreaks].

AsciiDoc Code
.hardbreaks block option
[%hardbreaks]
hardbreaks option is
used `[%hardbreaks]`.
hardbreaks-option attribute

hardbreaks option attribute is
enabled with :hardbreaks-option:.
disabled with :!hardbreaks-option:.

AsciiDoc Code
:hardbreaks-option:

.hardbreaks-option attribute
hardbreaks option attribute is
enabled with `:hardbreaks-option:`.
disabled with `:!hardbreaks-option:`.

:!hardbreaks-option:

Hard line breaks can be used in lists and tables.

Lead

Normal style.

Lead style.

Lead style with role attribute.

AsciiDoc Code
Normal style.

[.lead]
Lead style.

[role="lead"]
Lead style with `role` attribute.

Alignment

text-left

text-left

text-center

text-center

text-right

text-right

text-justify

text-justify

AsciiDoc Code
:alignment: left


.text-{alignment}
[.text-{alignment}]
text-{alignment}


:alignment: center

.text-{alignment}
[.text-{alignment}]
text-{alignment}


:alignment: right

.text-{alignment}
[.text-{alignment}]
text-{alignment}


:alignment: justify

.text-{alignment}
[.text-{alignment}]
text-{alignment}

[.text-<ALIGNMENT>] is same as [role="text-<ALIGNMENT>"]

Document Attributes

Define an Document Attribute
:attribute_name: attribute value
Reference an Document Attribute

{attribute_name} is attribute value.

AsciiDoc Code
:attribute_name: attribute value
.Reference an Document Attribute
`\{attribute_name}` is {attribute_name}.
Use an Document Attribute to Define an Document Attribute
:helix_org: helix-editor.com
:helix_docs_url: https://docs.{helix_org}
Unset an Document Attribute
:!attribute_name:
Escape an Attribute Reference
Normal

https://console.dev/tools

Backslash (\)

https://{console_domain}/tools

Passthrough (+ or pass:[])

https://{console_domain}/tools

AsciiDoc Code
.Escape an Attribute Reference
:console_domain: console.dev
[horizontal]
Normal::
  https://{console_domain}/tools
Backslash (`\`)::
  https://\{console_domain}/tools
Passthrough (`+` or `\pass:[]`)::
  +https://{console_domain}/tools+

Wrap

Soft Wrap

{soft_wrap} is soft wrap.

AsciiDoc Code
:soft_wrap: soft \
            wrap
.Soft Wrap
`\{soft_wrap}` is {soft_wrap}.
Hard Wrap

{hard_wrap} is hard
wrap.

AsciiDoc Code
:hard_wrap: hard + \
            wrap
.Hard Wrap
`\{hard_wrap}` is {hard_wrap}.

When to change value

Change value on define value. As a result, displays first foods document attribute as apple cacao the following AsciiDoc.

{foods} is apple cacao.

{foods} is banana cacao.

AsciiDoc Code
:fruit: apple
:foods: {fruit} cacao
:fruit: banana

`\{foods}` is {foods}.

:foods: {fruit} cacao
`\{foods}` is {foods}.

Breaks

References

Breaks

Thematic breaks

Markdown-style thematic breaks




AsciiDoc Code
.Thematic breaks
--
'''
--

.Markdown-style thematic breaks
--
---

- - -

***

* * *
--

Text Formatting and Punctuation

  • Bold (type: strong) (*)

  • Italic (type: emphasis) (_)

  • Monospace (type: monospaced) (`)

  • Highlight (type: mark) (#)

  • Styled phrase (type: unquoted) ([.<ROLE>]#)

  • Subscript (type: subscript) (^)

  • Superscript (type: superscript) (~)

  • Curved quotation marks

    • ‘Single’ (type: single) ('<WORD>')

    • “Double” (type: double) (“<WORD>”)

  • Apostrophes sing’s (type: single) (')

AsciiDoc Code
* *Bold* (type: strong) (`*`)
* _Italic_ (type: emphasis) (`_`)
* `Monospace` (type: monospaced) (```)
* #Highlight# (type: mark) (`#`)
* [.line-through]#Styled phrase# (type: unquoted) (`[.<ROLE>]#`)
* ^Subscript^ (type: subscript) (`^`)
* ~Superscript~ (type: superscript) (`~`)
* Curved quotation marks
** '`Single`' (type: single) (`'``<WORD>``'`)
** "`Double`" (type: double) (`"`<WORD>`"`)
* Apostrophes sing's (type: single) (`'`)
Unconstrained formatting pair

If the text does not begin or end with a space character, use an unconstrained text pair consisting of a double start mark and a double end mark around the text to be styled.
Japanese(日本)

AsciiDoc Code
.Unconstrained formatting pair
If the text does not begin or end with a space character,
use an unconstrained text pair consisting of
a double start mark and a double end mark around the text to be styled. +
##J##apan__ese__(**日本**``語``)
Mixed Formatting
  • bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

  • bold italic mono Highlight Red ‘Single’ “Double”

  • bold italic mono Highlight Red ‘Single’ “Double”

AsciiDoc Code
.Mixed Formatting
* *bold _italic_ `mono` #Highlight# [.red]#Red# H~2~o 2^10^ '`Single`' "`Double`"*
* **bold _italic ``mono #Highlight [.red]##Red '`Single`' "`Double`"###``_**
* `**bold _italic mono #Highlight [.red]##Red '`Single`' "`Double`"###**_`

Built-in Roles and Custom Inline Styles

Line
  • underline

  • overline

  • line-through

AsciiDoc Code
.Line
--
:style: underline
* [.{style}]#{style}#

:style: overline
* [.{style}]#{style}#

:style: line-through
* [.{style}]#{style}#
--
Size
  • big

  • small

AsciiDoc Code
.Size
--
:style: big
* [.{style}]#{style}#

:style: small
* [.{style}]#{style}#
--
white-space
  • pre-wrap space

  • nobreak 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

AsciiDoc Code
:long_string: 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
.white-space
--
:style: pre-wrap
* [.{style}]#{style}               space#

:style: nobreak
* [.{style}]#{style} {long_string}#
--
word-wrap
  • nowrap 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

AsciiDoc Code
.word-wrap
:style: nowrap
* [.{style}]#{style} {long_string}#

Colors

red
  • red

  • red-background

blue
  • blue

  • blue-background

yellow
  • yellow

  • yellow-background

green
  • green

  • green-background

aqua
  • aqua

  • aqua-background

fuchsia
  • fuchsia

  • fuchsia-background

lime
  • lime

  • lime-background

maroon
  • maroon

  • maroon-background

purple
  • purple

  • purple-background

navy
  • navy

  • navy-background

olive
  • olive

  • olive-background

teal
  • teal

  • teal-background

gray
  • gray

  • gray-background

silver
  • silver

  • silver-background

white
  • white

  • black white-background background

black
  • black

  • black-background

AsciiDoc Code
:color: red


.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: blue

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: yellow

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: green

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: aqua

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: fuchsia

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: lime

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: maroon

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: purple

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: navy

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: olive

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: teal

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: gray

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: silver

.{color}
* [.{color}]#{color}#
* [.{color}-background]#{color}-background#


:color: white
.{color}
* [.{color}]#{color}#
* [.black-background.white]#black [.white-background]##{color}-background## background#

:color: black
.{color}
* [.{color}]#{color}#
* [.black-background.white]#{color}-background#

Emoji

Eve

🐑

Raw

🐏

Japanese Castle

🏯

Mount Fuji

🗻

Shinto Shrine

AsciiDoc Code
[horizontal]
Eve:: &#x1f411;
Raw:: &#x1f40f;
Japanese Castle:: &#x1f3ef;
Mount Fuji:: &#x1f5fb;
Shinto Shrine:: &#x26e9;

Lists

Unordered
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

            • Level 6

              • Level 7

                • Level 8

                  • Level 9

                    • Level 10

  • Level 1

AsciiDoc Code
.Unordered
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5
****** Level 6
******* Level 7
******** Level 8
********* Level 9
********** Level 10
* Level 1
Ordered
  1. Level 1

    1. Level 2

      1. Level 3

        1. Level 4

          1. Level 5

            1. Level 6

              1. Level 7

                1. Level 8

                  1. Level 9

                    1. Level 10

  2. Level 1

    1. Level 2

      1. Level 3

      2. Level 3

    2. Level 2

      1. Level 3

AsciiDoc Code
.Ordered
. Level 1
.. Level 2
... Level 3
.... Level 4
..... Level 5
...... Level 6
....... Level 7
........ Level 8
......... Level 9
.......... Level 10
. Level 1
.. Level 2
... Level 3
... Level 3
.. Level 2
... Level 3
Mixed List
  • Unordered Level 1

    • Unordered Level 2

      1. Ordered Level 3

        1. Ordered Level 4

          • Unordered Level 5

            1. Ordered Level 6

              1. Ordered Level 7

                1. Ordered Level 8

                  • Unordered Level 9

                    1. Ordered Level 10

                    2. Ordered Level 10

                    3. Ordered Level 10

                2. Ordered Level 8

                3. Ordered Level 8

                4. Ordered Level 8

              2. Ordered Level 7

              3. Ordered Level 7

              4. Ordered Level 7

            2. Ordered Level 6

            3. Ordered Level 6

        2. Ordered Level 4

        3. Ordered Level 4

      2. Ordered Level 3

        1. Ordered Level 4

        2. Ordered Level 4

      3. Ordered Level 3

        1. Ordered Level 4

    • Unordered Level 2

      1. Ordered Level 3

      2. Ordered Level 3

  • Unordered Level 1

    1. Ordered Level 2

AsciiDoc Code
.Mixed List
* Unordered Level 1
** Unordered Level 2
. Ordered Level 3
.. Ordered Level 4
*** Unordered Level 5
... Ordered Level 6
.... Ordered Level 7
..... Ordered Level 8
**** Unordered Level 9
...... Ordered Level 10
...... Ordered Level 10
...... Ordered Level 10
..... Ordered Level 8
..... Ordered Level 8
..... Ordered Level 8
.... Ordered Level 7
.... Ordered Level 7
.... Ordered Level 7
... Ordered Level 6
... Ordered Level 6
.. Ordered Level 4
.. Ordered Level 4
. Ordered Level 3
.. Ordered Level 4
.. Ordered Level 4
. Ordered Level 3
.. Ordered Level 4
** Unordered Level 2
. Ordered Level 3
. Ordered Level 3
* Unordered Level 1
. Ordered Level 2

Unordered

Marks

References

Marks

Default
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

square
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

circle
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

disc
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

no-bullet
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

none
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

unstyled
  • Level 1

    • Level 2

      • Level 3

        • Level 4

          • Level 5

AsciiDoc Code
.Default
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5

:mark_style: square


.{mark_style}
[{mark_style}]
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5


:mark_style: circle

.{mark_style}
[{mark_style}]
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5


:mark_style: disc

.{mark_style}
[{mark_style}]
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5


:mark_style: no-bullet

.{mark_style}
[{mark_style}]
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5


:mark_style: none

.{mark_style}
[{mark_style}]
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5


:mark_style: unstyled

.{mark_style}
[{mark_style}]
* Level 1
** Level 2
*** Level 3
**** Level 4
***** Level 5

Ordered

Number Styles

References

Number styles

Default
  1. Level 1

    1. Level 2

      1. Level 3

        1. Level 4

          1. Level 5

            1. Level 6

              1. Level 7

arabic
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

decimal
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

loweralpha
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

upperalpha
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

lowerroman
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

upperroman
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

lowergreek
  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

AsciiDoc Code
.Default
. Level 1
.. Level 2
... Level 3
.... Level 4
..... Level 5
...... Level 6
....... Level 7

:number_style: arabic


.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2


:number_style: decimal

.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2


:number_style: loweralpha

.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2


:number_style: upperalpha

.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2


:number_style: lowerroman

.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2


:number_style: upperroman

.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2


:number_style: lowergreek

.{number_style}
[{number_style}]
. Level 1
. Level 1
. Level 1
.. Level 2
Mixed Number Style
  1. default

  2. default

    1. arabic

    2. arabic

      1. decimal

      2. decimal

        1. loweralpha

        2. loweralpha

          1. upperalpha

          2. upperalpha

            1. lowerroman

            2. lowerroman

              1. upperroman

              2. upperroman

                1. lowergreek

                2. lowergreek

AsciiDoc Code
.Mixed Number Style
. default
. default
[arabic]
.. arabic
.. arabic
[decimal]
... decimal
... decimal
[loweralpha]
.... loweralpha
.... loweralpha
[upperalpha]
..... upperalpha
..... upperalpha
[lowerroman]
...... lowerroman
...... lowerroman
[upperroman]
....... upperroman
....... upperroman
[lowergreek]
........ lowergreek
........ lowergreek

Offset Number

  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

    2. Level 2

    3. Level 2

      1. Level 3

      2. Level 3

      3. Level 3

        1. Level 4

        2. Level 4

        3. Level 4

          1. Level 5

          2. Level 5

          3. Level 5

AsciiDoc Code
[start=2]
. Level 1
. Level 1
. Level 1
.. Level 2
.. Level 2
.. Level 2
[start=10]
... Level 3
... Level 3
... Level 3
[start=5]
.... Level 4
.... Level 4
.... Level 4
[arbic, start=0]
..... Level 5
..... Level 5
..... Level 5

Reverse

  1. Level 1

  2. Level 1

  3. Level 1

    1. Level 2

    2. Level 2

    3. Level 2

      1. Level 3

      2. Level 3

      3. Level 3

        1. Level 4

        2. Level 4

        3. Level 4

          1. Level 5

          2. Level 5

          3. Level 5

AsciiDoc Code
[%reversed]
. Level 1
. Level 1
. Level 1
.. Level 2
.. Level 2
.. Level 2
[options=reversed, start=10]
... Level 3
... Level 3
... Level 3
[%reversed, start=5]
.... Level 4
.... Level 4
.... Level 4
[decimal, options=reversed, start=7]
..... Level 5
..... Level 5
..... Level 5
start=0
  1. Number style is default

  2. Number style is default

  3. Number style is default

    1. Number style is decimal

    2. Number style is decimal

    3. Number style is decimal

      1. Number style is upperalpha

      2. Number style is upperalpha

      3. Number style is upperalpha

AsciiDoc Code
.`start=0`
[start=0, options=reversed]
. Number style is default
. Number style is default
. Number style is default
[decimal, start=0, options=reversed]
.. Number style is `decimal`
.. Number style is `decimal`
.. Number style is `decimal`
[upperalpha, start=0, options=reversed]
... Number style is `upperalpha`
... Number style is `upperalpha`
... Number style is `upperalpha`

Checklists

References

Checklists

  • Check with *

  • Check with x

  • Not checked

  • Not a checklist

AsciiDoc Code
* [*] Check with `*`
* [x] Check with `x`
* [ ] Not checked
* Not a checklist
interactive([%interactive] or [options=interactive])
  • Check with *

  • Check with x

  • Not checked

  • Not a checklist

AsciiDoc Code
.interactive(`[%interactive]` or `[options=interactive]`)
[%interactive]
* [*] Check with `*`
* [x] Check with `x`
* [ ] Not checked
* Not a checklist

Separating Lists

References

Separating Lists

Not separate
  1. List 1

  2. List 1

  3. List 1

  4. List 1

AsciiDoc Code
.Not separate
[%reversed]
. List 1
. List 1

. List 1
. List 1
Separate with //-
  1. List 1

  2. List 1

  1. List 2

  2. List 2

AsciiDoc Code
.Separate with `//-`
[%reversed]
. List 1
. List 1

//-
. List 2
. List 2
Separate with []
  1. List 1

  2. List 1

  1. List 2

  2. List 2

AsciiDoc Code
.Separate with `[]`
[%reversed]
. List 1
. List 1

[]
. List 2
. List 2

Complex List Items

Multi line Principal Text

  • line 1 line 2

  • apple ba nana

  • line 1 line 2 line 3

  • line 1 line 2

    line 3
  • line 1 line 2

This point that list end. Because a empty line after a list item is followed by the beginning of a block, such as a paragraph or a delimited block, rather than another list item.

AsciiDoc Code
* line 1
line 2
* apple ba
nana
* line 1
  line 2
  line 3
* line 1
  line 2

  line 3

* line 1
line 2

This point that list end.
Because a empty line after a list item is followed by the beginning of a block,
such as a paragraph or a delimited block, rather than another list item.

Attach Blocks Using a List Continuation

list continuation
  1. Item 1
    newline

    The attach block

  2. Item 2

AsciiDoc Code
.list continuation
. Item 1 +
  newline
+
The attach block
. Item 2
Attach a one block
  1. Item 1

    Source Code
    Item 1 Code
  2. Item 2

    Source Code
    Item 2 Code

    Item 2 content

  3. Item 3

    Source Code
    Item 3 Code

    Item 3 content

AsciiDoc Code
.Attach a one block
. Item 1
+
.Source Code
[source, AsciiDoc]
----
Item 1 Code
----
. Item 2
+
.Source Code
[source, AsciiDoc]
----
Item 2 Code
----
Item 2 content
. Item 3
+
.Source Code
[source, AsciiDoc]
----
Item 3 Code
----
+
Item 3 content
Attach blocks
  1. Item 1

    Sidebar
    Discrete Heading
    Source Code
    Example 1. Example

    Example Block

    NOTE Block

    Sheep, Scotland, Highlands

    Item 1 content

  2. Item 2

    Open Block
    Discrete Heading
    Source Code
    Example 2. Example

    Example Block

    NOTE Block

    Sheep, Scotland, Highlands

    Item 2 content

Image by M V from Pixabay

AsciiDoc Code
.Attach blocks
. Item 1
+
.Sidebar
****

[discrete]
==== Discrete Heading

[source, AsciiDoc]
----
Source Code
----

.Example
====
Example Block

[NOTE]
======
NOTE Block
======
====

image:complex_list_item_image.webp[
'Sheep, Scotland, Highlands', width=128, height=128]

****
Item 1 content
. Item 2
+
.Open Block
--

[discrete]
==== Discrete Heading

[source, AsciiDoc]
----
Source Code
----

.Example
====
Example Block

[NOTE]
======
NOTE Block
======
====

image:complex_list_item_image.webp[
'Sheep, Scotland, Highlands', width=128, height=128]

--
+
Item 2 content

Drop the Principal Text

Image
  1. Use {empty}

    Sheep, Scotland, Highlands

  2. Inline image Sheep, Scotland, Highlands .

    {empty} document attribute is not used

    Sheep, Scotland, Highlands

Image by M V from Pixabay

AsciiDoc Code
.Image
. {empty}
+
.Use `\{empty}`
--
{image_content}
--
. Inline image {image_content}
.
+
.`\{empty}` document attribute is not used
--
{image_content}
--
Block
  1. Side Bar

    Use {empty}

    .

    Side Bar

    {empty} document attribute is not used

AsciiDoc Code
.Block
. {empty}
+
.Side Bar
****
Use `\{empty}`
****
.
+
.Side Bar
****
`\{empty}` document attribute is not used
****

Attach Blocks to an Ancestor List

Normal
  1. Level 1

    1. Level 2

      1. Level 3 Level 3 content

  2. Level 1

AsciiDoc Code
.Normal
. Level 1
.. Level 2
... Level 3
    Level 3 content
. Level 1
Enclose in open block (Use + and --)
  1. Level 1 Item 1

    1. Level 2

      1. Level 3

    Level 1 Item 1 content

  2. Level 1 Item 2

AsciiDoc Code
.Enclose in open block (Use `+` and `--`)
. Level 1 Item 1
+
--
.. Level 2
... Level 3
--
+
Level 1 Item 1 content
. Level 1 Item 2
Ancestor list continuation(Use + and empty line)
  1. Level 1 Item 1

    1. Level 2

      1. Level 3

    Level 1 Item 1 content

  2. Level 1 Item 2

    1. Level 2

      1. Level 3

        Since no blank line is inserted, it becomes Level 3 content.

  3. Level 1 Item 3

    1. Level 2

      1. Level 3

Since no + is inserted, it becomes paragraph. . Level 1 Item 4

AsciiDoc Code
.Ancestor list continuation(Use `+` and empty line)
. Level 1 Item 1
.. Level 2
... Level 3

+
Level 1 Item 1 content
. Level 1 Item 2
.. Level 2
... Level 3
+
Since no blank line is inserted, it becomes Level 3 content.
. Level 1 Item 3
.. Level 2
... Level 3

Since no `+` is inserted, it becomes paragraph.
. Level 1 Item 4

Description Lists

References

Description Lists

Word 1

Description 1

Word 2

Description 2

Word 3

Description 3

AsciiDoc Code
Word 1:: Description 1
Word 2:: Description 2
Word 3:: Description 3
Nest
Level 1

Level 1 Description

Level 2

Level 2 Description

Level 3

Level 3 Description

Level 4

Level 4 Description

Level 5:

Level 5 Description

Level 6::

Level 6 Description

AsciiDoc Code
.Nest
Level 1:: Level 1 Description
Level 2::: Level 2 Description
Level 3:::: Level 3 Description
Level 4;; Level 4 Description
Level 5::::: Level 5 Description
Level 6:::::: Level 6 Description
Mixed
Level 1

Level 1 Description 1

  • Level 2 Unordered List Item 1

    1. Level 3 ordered List Item 1

    2. Level 3 ordered List Item 2

      Level 4

      Level 4 Description 1

      Level 4

      Level 4 Description 2

  • Level 2 Unordered List Item 2

    Level 3

    Level 3 Description 1

Level 1

Level 1 Description 2

  • Level 2 Unordered List Item 1

    • Level 3 Unordered List Item 1

      • Level 4 Unordered List Item 1

      • Level 4 Unordered List Item 2

        1. Level 5 ordered List Item 1

        2. Level 5 ordered List Item 2

          1. Level 6 ordered List Item 1

          2. Level 6 ordered List Item 2

    • Level 3 Unordered List Item 2

      1. Level 4 ordered List Item 1

      2. Level 4 ordered List Item 2

        Level 5

        Level 5 Description 1

        1. Level 6 ordered List Item 1

        2. Level 6 ordered List Item 2

  • Level 2 Unordered List Item 2

    1. Level 3 ordered List Item 1

AsciiDoc Code
.Mixed
Level 1:: Level 1 Description 1
* Level 2 Unordered List Item 1
. Level 3 ordered List Item 1
. Level 3 ordered List Item 2
Level 4::: Level 4 Description 1
Level 4::: Level 4 Description 2
* Level 2 Unordered List Item 2
Level 3::: Level 3 Description 1
Level 1:: Level 1 Description 2
* Level 2 Unordered List Item 1
** Level 3 Unordered List Item 1
*** Level 4 Unordered List Item 1
*** Level 4 Unordered List Item 2
. Level 5 ordered List Item 1
. Level 5 ordered List Item 2
.. Level 6 ordered List Item 1
.. Level 6 ordered List Item 2
** Level 3 Unordered List Item 2
. Level 4 ordered List Item 1
. Level 4 ordered List Item 2
Level 5::: Level 5 Description 1
.. Level 6 ordered List Item 1
.. Level 6 ordered List Item 2
* Level 2 Unordered List Item 2
. Level 3 ordered List Item 1

HTML converter isn’t support Description Lists With Marker.

Horizontal

Level 1

description 1

Level 1

description 2

Level 1

description 3

Level 2

description 1

Level 3

description 1

Level 3

description 2

Level 3

description 3

AsciiDoc Code
[horizontal]
Level 1:: description 1
Level 1:: description 2
Level 1:: description 3
Level 2::: description 1
+
[horizontal]
Level 3:::: description 1
Level 3:::: description 2
Level 3:::: description 3
Horizontal Width(Number is unitless percentage %)
label

item

label

item

label

item

Level 2

item

Level 3

item 1

Level 3

item 2

Level 3

item 3

AsciiDoc Code
.Horizontal Width(Number is unitless percentage `%`)
[horizontal, labelwidth=65, itemwidth=35]
label:: item
label:: item
label:: item
Level 2::: item
+
[horizontal, labelwidth=10]
Level 3:::: item 1
Level 3:::: item 2
Level 3:::: item 3
Nest
Level 1

Item

Level 2

Item

Level 2

Item

Level 3

Item

Level 3

Item

Level 4:

Item

Level 4:

Item

Level 1

Item

AsciiDoc Code
.Nest
[horizontal]
Level 1:: Item
Level 2::: Item
Level 2::: Item
+
--
[horizontal, labelwidth=55]
Level 3:::: Item
Level 3:::: Item
Level 4::::: Item
Level 4::::: Item
--
Level 1:: Item

Q & A

  1. Question 1

    Answer.

  2. Question 2

    Question 3

    Answer.

  3. Question 4

    Answer.

AsciiDoc Code
[qanda]
Question 1::
Answer.

Question 2::
Question 3::
Answer.

Question 4::
Answer.
Nest
  1. Level 1

    Answer

    Level 2

    Item

    1. Level 3

      Answer

  2. Level 1

    Answer

AsciiDoc Code
.Nest
[qanda]
Level 1:: Answer
Level 2::: Item
+
--
[qanda]
Level 3:::: Answer
--
Level 1:: Answer
AsciiDoc Code
.Autolink
[horizontal]
https:: {empty}
* https://asciidoctor.org
* https://asciidoctor.org/#sponsors
mali:: test@example.com
ftp:: ftp://localhost/index.html
irc:: irc://localhost
file:: file://index.html
URL Macro
AsciiDoc Code
.URL Macro
* In "https://asciidoctor.org[]" with URL macro (`<URL>[]`), autolink is enabled +
  In "https://asciidoctor.org", autolink is disabled
* https://asciidoctor.org[Custom link text]
* https://asciidoctor.org[
  "window=_blank (shorthand `<URL>[^\]`)",
  window=_blank]
Link Macro
AsciiDoc Code
.Link Macro
* link:https://asciidoctor.org[]
* link:./index.html[]
* link:./index.html#sections[]
* link:file:./index.html[]
* link:./index.html[Custom link text] +
  Macro attributes such as `window=_blank` are the same as URL macro.
For relative links to AsciiDoc files

Use the cross references(<<anchor>> or xref:<anchor>[]) instead of the link macro for relative links to AsciiDoc files.

References

Custom link text

AsciiDoc Code
:example_url: https://asciidoctor.org

* {example_url}[
  Custom Link Text]
* {example_url}[
  "Quote quotes when using ="]
* {example_url}[
  "Quote quotes when using , and attributes", id=example]
AsciiDoc Code
.Text Formatting Style
* {example_url}[
  *Bold*]
* {example_url}[
  _italic_]
* {example_url}[
  [.big]#Big#]
* {example_url}[
  `Monospace`]
* {example_url}[
  "`Curved quotation marks`"]
AsciiDoc Code
.Color
* {example_url}[
  #Highlight#]
* {example_url}[
  [.black]#Black#]
* {example_url}[
  [.black-background]#Black Background#]
AsciiDoc Code
.Line
* {example_url}[
  [.underline]#underline#]
* {example_url}[
  [.overline]#overline#]
* {example_url}[
  [.line-through]#line-through#]
AsciiDoc Code
:example_url: https://asciidoctor.org

.ID
* {example_url}[
  'id=<ID> = <a ... id="<ID>" ... </a>', id=id_example]
AsciiDoc Code
:text_color_role: role=red
:background_color_role: role=red-background
:line_role: role=line-through
:size_role: role=big
:float_role: role=right
.Role
* {example_url}[
  "{text_color_role}", {text_color_role}]
* {example_url}[
  "{background_color_role}", {background_color_role}]
* {example_url}[
  "{line_role}", {line_role}]
* {example_url}[
  "{size_role}", {size_role}]
* {example_url}[
  "{float_role}", {float_role}]
AsciiDoc Code
.Title
* {example_url}[
  'title=<title> = <a ... title="<title>" ... </a>, Show it with tooltip',
  title=title example]
AsciiDoc Code
.Where to display the linked URL(`window`)
* {example_url}[
  New tab (`window=_blank`), window=_blank]
* {example_url}[
  New tab alias (Use `\^`)^]
* {example_url}[
  Read Later (`window=read-later`), window=read-later]
AsciiDoc Code
:no_follow_rel: options=nofollow
:no_opener_rel: options=noopener
.`rel` attribute(`options`)
* {example_url}[
  '{no_follow_rel} = <a ... rel="nofollow" ... </a>',
  {no_follow_rel}]
* {example_url}[
  '{no_opener_rel} = <a ... rel="noopener" ... </a>',
  {no_opener_rel},
  window=read-later]
Add a backslash(/) to beginning
https

https://asciidoctor.org

mali

test@example.com

ftp

ftp://localhost/index.html

irc

irc://localhost

file

file://index.html

AsciiDoc Code
.Add a backslash(`/`) to beginning
[horizontal]
https:: \https://asciidoctor.org
mali:: \test@example.com
ftp:: \ftp://localhost/index.html
irc:: \irc://localhost
file:: \file://index.html
Document Attribute
Autolink

https://asciidoctor.org

Escape (Use pass:a[<ATTRIBUTE>])

https://asciidoctor.org

AsciiDoc Code
:url_attribute: https://asciidoctor.org
.Document Attribute
[horizontal]
Autolink:: {url_attribute}
Escape (Use `\pass:a[<ATTRIBUTE>]`):: pass:a[{url_attribute}]
Paragraphs

Use subs=-macro for escaping.
Literal is https://asciidoctor.org
Attribute is https://asciidoctor.org

AsciiDoc Code
.Paragraphs
[subs=-macros]
Use `subs=-macro` for escaping. +
Literal is https://asciidoctor.org +
Attribute is {url_attribute}
Default Autolink
  • Enable

    • Admonitions

      • [NOTE]

      • [TIP]

      • [WARNING]

    • Side bar (****)

    • Quote (____)

    • Verses (____)

  • Disable

    • Source Code (----)

    • Listing (----)

    • Literal (....)

    • Passthrough (++++)

Use subs="+macros" block attributes to enable autolink.

AsciiDoc Code
.Source Code
[source, AsciiDoc, subs="+macros"]
----
https://asciidoctor.org
https://asciidoctor.org[AsciiDoctor^]
----

E-mail Macro

References

Mailto Macro

AsciiDoc Code
:example_mail_address: test@example.com

* mailto:{example_mail_address}[]
* mailto:{example_mail_address}[
  Custom Link Text]
* mailto:{example_mail_address}[
  Set Subject,
  Subject]
* mailto:{example_mail_address}[
  Set Subject and Body,
  Subject,
  Body]
* mailto:{example_mail_address}[
  Set Body Only,
  '',
  Body]

Hide URI Scheme

AsciiDoc Code
:!hide-uri-scheme:

.`:!hide-uri-scheme:`
[horizontal]
https:: https://asciidoctor.org
mali:: test@example.com
ftp:: ftp://localhost/index.html
irc:: irc://localhost
file:: file://index.html
:hide-uri-scheme:
https

asciidoctor.org

mali

test@example.com

ftp

localhost/index.html

irc

localhost

file

index.html

AsciiDoc Code
:hide-uri-scheme:

.`:hide-uri-scheme:`
[horizontal]
https:: https://asciidoctor.org
mali:: test@example.com
ftp:: ftp://localhost/index.html
irc:: irc://localhost
file:: file://index.html

Cross References

References

Cross References

Double Angled Brackets(<<ANCHOR>>)
Minimum

Sections

Custom Link Text

Custom link text

Natural Cross Reference

Sections

AsciiDoc Code
.Double Angled Brackets(`\<<ANCHOR>>`)
[horizontal]
Minimum:: <<_sections>>
Custom Link Text:: <<_sections, Custom link text>>
Natural Cross Reference:: <<Sections>>
xref macro(xref:<ANCHOR>[])
Minimum

Sections

Custom Link Text

Custom link text

Natural Cross Reference

Sections

Inter Document Cross References

link_to_file.html

AsciiDoc Code
.xref macro(`xref:<ANCHOR>[]`)
[horizontal]
Minimum:: xref:_sections[]
Custom Link Text:: xref:_sections[Custom link text]
Natural Cross Reference:: xref:Sections[]
Inter Document Cross References:: xref:link_to_file.adoc[]
Validate Cross References
How to validate
CLI

-v, --verbose

API

$VERBOSE variable to true

Use CLI
$ asciidoctor --verbose <PATH>
asciidoctor: INFO: possible invalid reference: apple
AsciiDoc Code
See xref:apple[].

== Banana

Default Styling

reftext test

Double Angled Brackets

set reftext

xref macro

set reftext

AsciiDoc Code
[reftext="set `reftext`"]
== reftext test

Double Angled Brackets:: <<_reftext_test>>
xref macro:: xref:_reftext_test[]

xrefstyle Attribute

Default and :!xrefstyle: are sames as :xrefstyle: basic

..1. xrefstyle Attribute Test Section

Sheep, Coast, Mountain
Figure 1. xrefstyle Attribute Test Image Block

Image by Monika from Pixabay

AsciiDoc Code
:sectnums:
:sectnumlevels: 6

== xrefstyle Attribute Test Section

:!sectnums:
:sectnumlevels:

[[cross_reference_image_block_test]]
.xrefstyle Attribute Test Image Block
image::cross_reference_attribute_test_image.webp['Sheep, Coast, Mountain', width=128, height=128]
Default
Section
Image Block(image::<PATH>[])
AsciiDoc Code
:block_title: Default


.{block_title}
Section::
+
[horizontal]
Double Angled Brackets::: <<_xrefstyle_attribute_test_section>>
xref macro::: xref:_xrefstyle_attribute_test_section[]
Natural Cross Reference::: <<xrefstyle Attribute Test Section>>
Image Block(`image::<PATH>[]`)::
+
[horizontal]
Double Angled Brackets ::: <<cross_reference_image_block_test>>
xref macro::: xref:cross_reference_image_block_test[]
Natural Cross Reference::: <<xrefstyle Attribute Test Image Block>>
AsciiDoc Code
:xrefstyle: full
:block_title: {xrefstyle}

.{block_title}
Section::
+
[horizontal]
Double Angled Brackets::: <<_xrefstyle_attribute_test_section>>
xref macro::: xref:_xrefstyle_attribute_test_section[]
Natural Cross Reference::: <<xrefstyle Attribute Test Section>>
Image Block(`image::<PATH>[]`)::
+
[horizontal]
Double Angled Brackets ::: <<cross_reference_image_block_test>>
xref macro::: xref:cross_reference_image_block_test[]
Natural Cross Reference::: <<xrefstyle Attribute Test Image Block>>
short
Section
Double Angled Brackets

Section ..1

xref macro

Section ..1

Natural Cross Reference

Section ..1

Image Block(image::<PATH>[])
Double Angled Brackets

Figure 1

xref macro

Figure 1

Natural Cross Reference

Figure 1

AsciiDoc Code
:xrefstyle: short
:block_title: {xrefstyle}

.{block_title}
Section::
+
[horizontal]
Double Angled Brackets::: <<_xrefstyle_attribute_test_section>>
xref macro::: xref:_xrefstyle_attribute_test_section[]
Natural Cross Reference::: <<xrefstyle Attribute Test Section>>
Image Block(`image::<PATH>[]`)::
+
[horizontal]
Double Angled Brackets ::: <<cross_reference_image_block_test>>
xref macro::: xref:cross_reference_image_block_test[]
Natural Cross Reference::: <<xrefstyle Attribute Test Image Block>>
basic
Section
Image Block(image::<PATH>[])
AsciiDoc Code
:xrefstyle: basic
:block_title: {xrefstyle}

.{block_title}
Section::
+
[horizontal]
Double Angled Brackets::: <<_xrefstyle_attribute_test_section>>
xref macro::: xref:_xrefstyle_attribute_test_section[]
Natural Cross Reference::: <<xrefstyle Attribute Test Section>>
Image Block(`image::<PATH>[]`)::
+
[horizontal]
Double Angled Brackets ::: <<cross_reference_image_block_test>>
xref macro::: xref:cross_reference_image_block_test[]
Natural Cross Reference::: <<xrefstyle Attribute Test Image Block>>
:!xrefstyle:
Section
Image Block(image::<PATH>[])
AsciiDoc Code
:!xrefstyle:
:block_title: :!xrefstyle:

.{block_title}
Section::
+
[horizontal]
Double Angled Brackets::: <<_xrefstyle_attribute_test_section>>
xref macro::: xref:_xrefstyle_attribute_test_section[]
Natural Cross Reference::: <<xrefstyle Attribute Test Section>>
Image Block(`image::<PATH>[]`)::
+
[horizontal]
Double Angled Brackets ::: <<cross_reference_image_block_test>>
xref macro::: xref:cross_reference_image_block_test[]
Natural Cross Reference::: <<xrefstyle Attribute Test Image Block>>

Footnotes

References

Footnotes

Syntax

Footnote syntax is footnote:[footnote text].[1]

AsciiDoc Code
.Syntax
Footnote syntax is `\footnote:[footnote text]`.footnote:[Footnote syntax test]
Reuse a footnote
  1. Set a ID[2]

  2. How to reuse footnote is footnote:<ID>[].[2]

AsciiDoc Code
.Reuse a footnote
. Set a IDfootnote:reuse_footnote[Reuse footnote test]
. How to reuse footnote is `footnote:<ID>[]`.footnote:reuse_footnote[]
Blank
  • Blank spaces are not deleted

    • There is not a space between footnote macro[3]

    • There is a space between footnote macro [3]

  • apple{empty}footnote:[] is same as applefootnote:[][4]

AsciiDoc Code
.Blank
* Blank spaces are not deleted
** There is not a space between footnote macrofootnote:blank_test[There is a space between footnote macro]
** There is a space between footnote macro footnote:blank_test[]
* `apple\{empty}footnote:[]` is same as `applefootnote:[]`{empty}footnote:[Use empty attribute]
Text Formatting
  • Bold[5]

  • Italic[6]

  • Monospace[7]

  • Highlight[8]

  • Styled phrase[9]

  • Subscript[10]

  • Superscript[11]

  • Curved quotation marks

    • Single[12]

    • Double[13]

AsciiDoc Code
.Text Formatting
* Bold{empty}footnote:[*Bold*]
* Italic{empty}footnote:[*Italic*]
* Monospace{empty}footnote:[`Monospace`]
* Highlight{empty}footnote:[#Highlight#]
* Styled phrase{empty}footnote:[[.line-through]#Styled phrase#]
* Subscript{empty}footnote:[^Subscript^]
* Superscript{empty}footnote:[~Superscript~]
* Curved quotation marks
** Single{empty}footnote:['`Single`']
** Double{empty}footnote:["`Double`"]
Make it easy to read
  • Use document attributes to make footnotes easier to read[14]

  • If use text formatting to footnote text, use pass macro[15]

AsciiDoc Code
.Make it easy to read
:fn_attribute_test: footnote:[use attribute]
:fn_attribute_test_for_text_formatting: pass:q[footnote:[*bold* _italic_ #highlight#]]
* Use document attributes to make footnotes easier to read{fn_attribute_test}
* If use text formatting to footnote text, use `pass` macro{fn_attribute_test_for_text_formatting}

Images

References

Images

block image
Figure 2. Block (two colons ::)
AsciiDoc Code
.Block (two colons `::`)
image::block_image.webp[]
Inline (one colon :)

For inline images, one colon. inline image

AsciiDoc Code
.Inline (one colon `:`)
For inline images, one colon. image:inline_image.webp[]
Link (Let’s click on the image)

example

AsciiDoc Code
:example_image_content_id: 197160
:example_image_url: {pixabay_url}/photos/lawn-green-meadow-pasture-animal-{example_image_content_id}/
.Link (Let's click on the image)
image:example.webp[
link={example_image_url},
window=_blank]
Alt Text
Position Attribute

Position Alt Text

Named Attribute

Attribute Alt Text

AsciiDoc Code
.Alt Text
[horizontal]
Position Attribute:: image:alt_text.webp[Position Alt Text]
Named Attribute:: image:alt_text.webp[alt=Attribute Alt Text]
Read a image from any URL

Can reference image served from any URL. image:<URL>[]

Size

Default

example

Positional Attribute

Use positional

Named Attribute

Use width and height attributes

AsciiDoc Code
.Default
image:example.webp[]

:width: 80
:height: 45
[horizontal]
Positional Attribute:: image:example.webp[Use positional, {width}, {height}]
Named Attribute:: image:example.webp[Use width and height attributes, height={height}, width={width}]

Title

References

Images Reference

Block Image

For block image, display text under the image.

Use Positional Attribute
Figure 3. Use title Attribute
Use Block Title
Figure 4. Use Block Title
AsciiDoc Code
image::example.webp[Use Positional Attribute, {width}, {height}, title='Use `title` Attribute']

.Use Block Title
image::example.webp[Use Block Title, {width}, {height}]

Inline Image

For Inline image, title attribute used tooltip.

Let’s Focus on Image

set tooltip

AsciiDoc Code
.Let's Focus on Image
image:example.webp[set tooltip, {width}, {height}, title='tooltip']

Position

Align

Only block image can be used.

Default
Figure 5. Default
Text Align Left
Figure 6. Left
Text Align Right
Figure 7. Right
Text Align Center
Figure 8. Center
AsciiDoc Code
.Default
image::example.webp[Default]

.Left
image::example.webp[Text Align Left, {width}, {height}, align=left]

.Right
image::example.webp[Text Align Right, {width}, {height}, align=right]

.Center
image::example.webp[Text Align Center, {width}, {height}, align=center]

Float

Can be used for both block and inline images.

Float
Float Right Image
Figure 9. Float Right
Float Left Image
Figure 10. Float Left

Images (left, right) by Kev from Pixabay

AsciiDoc Code
.Float
[.float-group]
--
:float_image_size: width=320, height=180
.Float Right
image::float_right_image.webp[Float Right Image, float=right, {float_image_size}]

.Float Left
image::float_left_image.webp[Float Left Image, float=left, {float_image_size}]
--

Frame

Default

default

Frame(thumb, th)

add frame

AsciiDoc Code
:width: 80
:height: 45
[horizontal]
Default::
  image:example.webp[default, {width}, {height}]
Frame(`thumb`, `th`)::
  image:example.webp[add frame, {width}, {height}, role=thumb]

Block Image Only Attributes

References

Images Reference

example
Figure 11. ID(id=<ID>)
example
change caption Caption(caption='change caption ')
AsciiDoc Code
:width: 80
:height: 45
.ID(`id=<ID>`)
image::example.webp[id=image_id_test, {width}, {height}]

.Caption(`caption='change caption '`)
image::example.webp[caption='change caption ', {width}, {height}]
How to disable caption for all the image blocks

Unset figure-caption document attribute. (i.e. :!figure-caption:)

SVG

References

SVG Image

Change Size

change size

The External Object Element object (options=interactive)

options=interactive

Embedded (options=inline)

AsciiDoc Code
:svg_size: 100
Change Size::
  image:example.svg['change size', {svg_size}]
The External Object Element `object` (`options=interactive`)::
  image:example.svg['options=interactive', {svg_size}, options=interactive]
Embedded (`options=inline`)::
  image:example.svg['options=inline', {svg_size}, options=inline]

Audio

Default
Start Stop
Loop

Sound Effect (long, short) from Pixabay

AsciiDoc Code
.Default
audio::sheep_bleating.mp3[]

.Start Stop
audio::sheep_bleating.mp3[start=10, end=15]

.Loop
audio::baby_lamb_calling_his_mother.mp3[options='loop']
Read a audio from any URL

Can reference audio served from any URL. audio::<URL>[]

Use imagesdir attribute

audio::<PATH>[] is read audio file on {imagesdir}/<PATH>.

Video

Local
AsciiDoc Code
.Local
video::example.mp4[]
URL
AsciiDoc Code
.URL
video::https://storage.googleapis.com/things-roomsxyz-assets/home-page/rooms.webm[]
Youtube Embedded
AsciiDoc Code
.Youtube Embedded
video::9NG7cFc-ddQ[youtube]
Change Size
Start Stop
Change Thumbnail
AsciiDoc Code
.Change Size
video::example.mp4[800, 450]

.Start Stop
video::example.mp4[start=20, end=25]

.Change Thumbnail
video::example.mp4[thumbnail.webp]
Use imagesdir attribute

video::<PATH>[] is read video file on {imagesdir}/<PATH>.

Youtube

Change Size
Hide Youtube Logo
AsciiDoc Code
.Change Size
video::9NG7cFc-ddQ[youtube, 800, 450]

.Hide Youtube Logo
video::9NG7cFc-ddQ[youtube, options='modest']
Dynamic Playlist(Add playlist icon right top)
Playlist(Add playlist icon right top)
AsciiDoc Code
.Dynamic Playlist(Add playlist icon right top)
video::,9NG7cFc-ddQ,mfKx4j-C6nI,WPPFnHQWwFk,oXbB0H5a_r4,8vSGjhTHZqA,ZeFuwlxnyFU[youtube]

.Playlist(Add playlist icon right top)
video::NnmRVY22Lq8[youtube, list=PLx2ksyallYzVI8CN1JMXhEf62j2AijeDa]

Icons

Icon use Font Awesome. Set icons document attribute to font (i.e. :icons: font).

Default

AsciiDoc Code
:icons: font

.Default
icon:soundcloud[]
Link (Let’s Click on Icon)

AsciiDoc Code
:fontawesome_icon_url: {fontawesome_v4_url}/icon/font-awesome
.Link (Let's Click on Icon)
icon:font-awesome[
link={fontawesome_icon_url},
window=_blank]
Color
Icon

Background

AsciiDoc Code
.Color
[horizontal]
Icon:: icon:bandcamp[role="aqua"]
Background:: icon:bandcamp[role="aqua-background"]

Icon Macro Attributes

Font Mode Only

On :icons: font only.

Size
Default

fw

lg

2x

3x

4x

5x

AsciiDoc Code
:icons: font

.Size
[horizontal]
Default:: icon:github[]
fw:: icon:github[fw]
lg:: icon:github[lg]
2x:: icon:github[2x]
3x:: icon:github[3x]
4x:: icon:github[4x]
5x:: icon:github[5x]
Rotate

AsciiDoc Code
.Rotate
icon:linux[rotate=90]
Flip

AsciiDoc Code
.Flip
icon:steam[flip=vertical]

Image Mode Only

On :icons: image only.

Width

tea

Alt Text

Alt Text

AsciiDoc Code
:icons: image
:icontype: svg

.Width
icon:tea[width=128]

.Alt Text
icon:alt[alt=Alt Text]

Keyboard

References

Keyboard Macro

To use keyboard macros, you need to set experimental document attribute. (i.e. :experimental:)

Alphabet
  • a

  • h

  • H

AsciiDoc Code
:experimental:

.Alphabet
* kbd:[a]
* kbd:[h]
* kbd:[H]
Number
  • 0

  • 8

  • 1

AsciiDoc Code
.Number
* kbd:[0]
* kbd:[8]
* kbd:[1]
Sign
  • _

  • +

  • [

  • ]

  • \

AsciiDoc Code
.Sign
* kbd:[_]
* kbd:[+]
* kbd:[[]
* kbd:[\]]
* kbd:[\ ]
Modifier Key
SHIFT
  • SHIFT+h

  • SHIFT+H

CTRL

CTRL+h

ALT

ALT+h

Win

Win+h

Cmd

Cmd+h

Super

Super+h

Hyper

Hyper+h

Meta

Meta+h

Two Modifier
  • CTRL+SHIFT+h

  • CTRL+ALT+h

  • CTRL+Win++

  • CTRL+SHIFT+,

  • CTRL+ALT+,

AsciiDoc Code
.Modifier Key
[horizontal]
SHIFT::
  * kbd:[SHIFT+h]
  * kbd:[SHIFT+H]
CTRL:: kbd:[CTRL+h]
ALT:: kbd:[ALT+h]
Win:: kbd:[Win+h]
Cmd:: kbd:[Cmd+h]
Super:: kbd:[Super+h]
Hyper:: kbd:[Hyper+h]
Meta:: kbd:[Meta+h]
Two Modifier::
  * kbd:[CTRL+SHIFT+h]
  * kbd:[CTRL+ALT+h]
  * kbd:[CTRL+Win++]
  * kbd:[CTRL,SHIFT,,]
  * kbd:[CTRL,ALT,,]
Function
  • F1

  • F10

  • F15

AsciiDoc Code
.Function
* kbd:[F1]
* kbd:[F10]
* kbd:[F15]
Arrow
i > -> > ESC

i > -> > ESC

i->ESC

i → -> → ESC

i=>ESC

i ⇒ => ⇒ ESC

AsciiDoc Code
.Arrow
[horizontal]
kbd:[i] > kbd:[\->] > kbd:[ESC]:: kbd:[i > \-> > ESC]
kbd:[i] -> kbd:[\->] -> kbd:[ESC]:: kbd:[i -> \-> -> ESC]
kbd:[i] => kbd:[\=>] => kbd:[ESC]:: kbd:[i => \=> => ESC]
Space
  • h j k l

AsciiDoc Code
.Space
* kbd:[h j k l]

UI

To use UI macros, you need to set experimental document attribute. (i.e. :experimental:)

Button
  • OK

  • Cancel

  • Open

AsciiDoc Code
:experimental:

.Button
* btn:[OK]
* btn:[Cancel]
* btn:[Open]
Menu
  • Home

  • Home  Open File

  • Home  File  Save

  • Emoji  🐑  🐏

  • Shorthand  🐑  🐏

AsciiDoc Code
.Menu
* menu:Home[]
* menu:Home[Open File]
* menu:Home[File > Save]
* menu:Emoji[&#x1f411; > &#x1f40f;]
* "Shorthand > &#x1f411; > &#x1f40f;"

Admonitions

References

Admonitions

Display a label when icons document attribute is not set. (:!icons:)

Note
NOTE
Tip
TIP
Important
IMPORTANT
Caution
CAUTION
Warning
WARNING
AsciiDoc Code
:!icons:


NOTE: NOTE

TIP: TIP

IMPORTANT: IMPORTANT

CAUTION: CAUTION

WARNING: WARNING
Note
Admonition Block

Delimit by four equal signs (=).

List
  • Item 1

Example 3. Example

Example Block

AsciiDoc Code
.Admonition Block
[NOTE]
====
Delimit by four equal signs (`=`).

.List
* Item 1

.Example
======
Example Block
======
====

Emoji

Use <LABEL>-caption document attributes to change label displayed. (:note-caption: Note)

NOTE
💡
TIP
IMPORTANT
🔥
CAUTION
WARNING
AsciiDoc Code
:!icons:

:note-caption: pass:[&#x2139;]
:tip-caption: pass:[&#x1f4a1;]
:important-caption: pass:[&#x2757;]
:caution-caption: pass:[&#x1f525;]
:warning-caption: pass:[&#x26a0;]


NOTE: NOTE

TIP: TIP

IMPORTANT: IMPORTANT

CAUTION: CAUTION

WARNING: WARNING
💡

On GitHub, you can also write :tip-caption: :bulb:.

Font

Display a icon of Font Awesome when icons document attribute is font. (:icons: font)

NOTE
TIP
IMPORTANT
CAUTION
WARNING
AsciiDoc Code
:icons: font


NOTE: NOTE

TIP: TIP

IMPORTANT: IMPORTANT

CAUTION: CAUTION

WARNING: WARNING

Images

Display a image when icons document attribute is image. (:icons: image)

💡 Used {iconsdir}/tip.{icontype}
AsciiDoc Code
:icons: image
:icontype: svg

TIP: Used `\{iconsdir}/tip.\{icontype}`

Sidebars

References

Sidebars

sidebar attribute
[sidebar]
AsciiDoc Code
.sidebar attribute
[sidebar]
`[sidebar]`
Sidebar Block

Delimit by four asterisks (*).

List
  • Item 1

Source Code
[supported]
TOML = highlight
AsciiDoc Code
.Sidebar Block
****
Delimit by four asterisks (`*`).

.List
* Item 1

.Source Code
[source, TOML]
----
[supported]
TOML = highlight
----
****

Example Blocks

References

Example Blocks

Example 4. example attribute
[example]
AsciiDoc Code
.example attribute
[example]
`[example]`
Example 5. Example Block

Delimit by four equal signs (=).

List
  • Item 1

Source Code
println("Hello World")
AsciiDoc Code
.Example Block
====
Delimit by four equal signs (`=`).

.List
* Item 1

.Source Code
[source, julia]
----
println("Hello World")
----
====

Caption

Change example catpionChange caption
Use caption option.
AsciiDoc Code
.Change caption
[example, caption="Change example catpion"]
Use `caption` option.
Disable caption

[caption=]

AsciiDoc Code
.Disable caption
[caption=]
====
`[caption=]`
====

Quote single quotation mark (')

AsciiDoc Code
:attribute_substitutions_link: {asciidoc_docs_url}/attributes/positional-and-named-attributes/#substitutions[ \
Substitutions - Positional and Named Attributes^]
.Link Caption
[caption='{attribute_substitutions_link}']
====
Quote single quotation mark (`'`)
====
How to disable caption for all the examples

Unset example-caption document attribute (i.e. :!example-caption:).

Block Quotes

References

Blockquotes

quote attribute
Quote or excerpt text
— attribution
citation title and information
AsciiDoc Code
.quote attribute
[quote,attribution,citation title and information]
Quote or excerpt text
Quoted Paragraph
Quote or excerpt text
— attribution
citation title and information
AsciiDoc Code
.Quoted Paragraph
"Quote or
excerpt text"
-- attribution, citation title and information
Quote Block

Delimit by four underscores (_).

List
  • Item 1

Source Code
const std = @import("std");

pub fn main() void {
    std.debug.print("Hello, {s}!\n", .{"World"});
}
Nest

Nest

— attribution
citation title and information
— attribution
citation title and information
AsciiDoc Code
.Quote Block
[quote,attribution,citation title and information]
____
Delimit by four underscores (`_`).

.List
* Item 1

.Source Code
[source, Zig]
----
const std = @import("std");

pub fn main() void {
    std.debug.print("Hello, {s}!\n", .{"World"});
}
----

.Nest
[quote,attribution,citation title and information]
______
Nest
______
____
quote attribute
Quote or excerpt text
Quoted Paragraph
Quote or excerpt text
AsciiDoc Code
:attribution_link: {block_quotes_url}[attribution_link]
:title_link: {block_quotes_url}[citation title and information]
.quote attribute
[quote, '{attribution_link}' , '{title_link}']
Quote or excerpt text

.Quoted Paragraph
"Quote or
excerpt text"
-- {attribution_link}, {title_link}

Markdown Style

Markdown Style

Quote or excerpt text

Nest

— attribution
citation title and information
AsciiDoc Code
.Markdown Style
> Quote or
> excerpt text
>
> > Nest
>
> -- attribution, citation title and information

Verses

References

Verses

verse attribute
Paragraph
— author
title
AsciiDoc Code
.verse attribute
[verse,author,title]
Paragraph
Verse Block
First Block

Second Block
— author
title
AsciiDoc Code
.Verse Block
[verse,author,title]
____
First Block

Second Block
____
Link
Quote single quotation mark (')
AsciiDoc Code
:attribute_substitutions_url: {asciidoc_docs_url}/attributes/positional-and-named-attributes/#substitutions
:author_link: {attribute_substitutions_url}[author]
:title_link: {attribute_substitutions_url}[title]
.Link
[verse,'{author_link}','{title_link}']
____
Quote single quotation mark (')
____

Source Code Blocks

Source Code
#!/usr/bin/env bash

set -o nounset

function hello() {
  printf "Hello World!!"
}

hello
AsciiDoc Code
.Source Code
[source, bash]
----
#!/usr/bin/env bash

set -o nounset

function hello() {
  printf "Hello World!!"
}

hello
----
Shorthand
$ echo "Hello World"
Hello World
$ asciidoctor --version
Asciidoctor 2.0.20 [https://asciidoctor.org]
Runtime Environment (ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
AsciiDoc Code
.Shorthand
[, console]
----
$ echo "Hello World"
Hello World
$ asciidoctor --version
Asciidoctor 2.0.20 [https://asciidoctor.org]
Runtime Environment (ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
----
Use Attributes
{hello} is Hello World
Set the subs attribute on a block to attributes.
AsciiDoc Code
:hello: Hello World
.Use Attributes
[source, AsciiDoc, subs="+attributes"]
----
\{hello} is {hello}
Set the subs attribute on a block to attributes.
----

Highlighter

Source highlight is disabled by default

Source highlight is enabled to set source-highlighter document attribute in document header or CLI.

Supported highlighter

Highlighter Setup

Will need install appropriate library?
No
  • highlight.js
    Generated HTML loads highlighter.js from CDN.

YES
  • Rouge

  • Paygents

  • CodeRay

Set highlighter

Use source-highlighter document attribute. For example, write :source-highlighter: highlighter.js, when use highlighter.js.

Line

Supported highlighter
  • rouge

  • coderay

  • pygments

Display Line Number

Add linenums attribute.

Example
  • [source, AsciiDoc, linenums]
  • [%linenums, AsciiDoc]

Highlight Line

Add highlight=<LINE_NUMBER> attribute. For Example [source, AsciiDoc, highlight='2,4..10']

Example of line number entry
  • 1

  • 4..10

  • '2,4,6'

  • '2,4..10'

For coderay

You need to supply CSS, when highlight is coderay (i.e. :source-highlighter: rouge).

docinfo can help to provide CSS.

AsciiDoc
= Document Title
:source-highlighter: rouge
:docinfo: shared
docinfo.html
<style>
pre.rouge .hll {
    background-color: #ffc;
}
pre.rouge .hll * {
    background-color: initial;
}
</style>

Default Language

Setting source-language document attribute as the default language of source code block.

Set AsciiDoc to source-language document attribute makes [source] same as [source, AsciiDoc].

source-language document attribute is set, implicit listing block becomes a source code block.

source-language document attribute is bash.

Source Code Block
printf "Hello World!!"
AsciiDoc Code
:source-language: bash

`source-language` document attribute is {source-language}.

.Source Code Block
----
printf "Hello World!!"
----

source-language document attribute is unset.

Listing Block
printf "Hello World!!"
AsciiDoc Code
:!source-language:

`source-language` document attribute is unset.

.Listing Block
----
printf "Hello World!!"
----
How to use linenums or highlight on implicit source code block
linenums
[options=linenums]
----
source code
----

[%linenums]
----
source code
----
highlight
[highlight=1]
----
source code
----

Listing Blocks

References

Listing Blocks

listing attribute
`[listing]`
AsciiDoc Code
.listing attribute
[listing]
`[listing]`
Listing Block
Delimit by four hyphen signs (`-`).

.List
* Item 1

.Source Code
[source, jesth]
------
name = 'jesth'
------
AsciiDoc Code
.Listing Block
----
Delimit by four hyphen signs (`-`).

.List
* Item 1

.Source Code
[source, jesth]
------
name = 'jesth'
------
----
Use document attributes
$ asciidoctor index.adoc
AsciiDoc Code
.Use document attributes
[listing, subs=+attributes]
$ asciidoctor {docname}{docfilesuffix}
listing
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
!@#$%^&*_+-=
(){}[]|\:;"'<>,.?/
*bold* _italic_
{docname}{docfilesuffix}
(C) -> <- => <=
あいうえお アイウエオ
かきくけこ カキクケコ
がぎぐげご ガギゴゲゴ
さしすせそ サシスセソ
ざじずぜぞ ザジズゼゾ
たちつてと タチツテト
だぢづでど ダヂヅデド
はひふへほ ハヒフヘホ
ばびぶべぼ バビブベボ
ぽぴぷぺぽ パピプペポ

Literal Blocks

References

Literal Blocks

Indent (add a space)
~/.config -> ~/dotfiles/config
AsciiDoc Code
.Indent (add a space)
 ~/.config -> ~/dotfiles/config
literal attribute
`[literal]`
AsciiDoc Code
.literal attribute
[literal]
`[literal]`
Literal Block
Delimit by four periods (`.`).

.List
* Item 1

.Source Code
[source, cue]
----
typesAreValues: {
  name: string
}
----
AsciiDoc Code
.Literal Block
....
Delimit by four periods (`.`).

.List
* Item 1

.Source Code
[source, cue]
----
typesAreValues: {
  name: string
}
----
....
Use document attributes
$ asciidoctor index.adoc
AsciiDoc Code
.Use document attributes
[literal, subs=+attributes]
$ asciidoctor {docname}{docfilesuffix}
Example
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
!@#$%^&*_+-=
(){}[]|\:;"'<>,.?/
*bold* _italic_
{docname}{docfilesuffix}
(C) -> <- => <=
あいうえお アイウエオ
かきくけこ カキクケコ
がぎぐげご ガギゴゲゴ
さしすせそ サシスセソ
ざじずぜぞ ザジズゼゾ
たちつてと タチツテト
だぢづでど ダヂヅデド
はひふへほ ハヒフヘホ
ばびぶべぼ バビブベボ
ぽぴぷぺぽ パピプペポ

Callouts

References

Callouts

Supported Block
  • Source Code

  • Listing

  • Literal

:!icons:
Callout numbers are text (1)
  1. <1>

:icons: font
Callout numbers are icon of Font-Awesome (1)
1 <1>
AsciiDoc Code
:!icons:

.`:!icons:`
 Callout numbers are text <1>

<1> `<1>`

:icons: font

.`:icons: font`
 Callout numbers are icon of Font-Awesome <1>

<1> `<1>`
Block
one two (1) (2)
three (3)
four five (4)(5)
  1. <1>

  2. <2>

  3. <3>

  4. <4>

  5. <5>

AsciiDoc Code
.Block
----
one two <1> <2>
three <3>
four five <4><5>
----
<1> `<1>`
<2> `<2>`
<3> `<3>`
<4> `<4>`
<5> `<5>`
Display callout number used local icon.

Use {iconsdir}/<NUMBER>svg (e.g. ./icons/1.svg), when set icons document attribute to image (i.e. :icons: image)

Text Formatting & Block

formatting test (1)(2)
1 bold italic monospace highlight
2
  • unordered list 1

    • unordered list 2

      1. ordered list 1

        1. ordered list 2

AsciiDoc Code
AsciiDoc Code
 formatting test <1><2>

<1> *bold* _italic_ `monospace` #highlight#
<2> {empty}
    * unordered list 1
    ** unordered list 2
    . ordered list 1
    .. ordered list 2

+
[source, AsciiDoc]
----
AsciiDoc Code
----

Line Comment

:!icons:
line-comment // (1)
:icons: font
line-comment (1)
AsciiDoc Code
:!icons:

.`:!icons:`
 line-comment // <1>

:icons: font

.`:icons: font`
 line-comment // <1>
Supported Comments
C code (1)
Bash code (2)
Lua code (3)
Common Lisp code (4)
HTML code (5)
1 //
  • AsciiDoc

  • Go

  • Rust

  • Zig

  • CUE

2 #
  • Bash

  • Julia

  • TOML

  • Nix

  • Jesth

3 --
  • Lua

  • Haskell

  • SQL

4 ;;
  • Common Lisp

  • Clojure

  • Scheme

5 <!--
  • HTML

AsciiDoc Code
.Supported Comments
----
C code // <1>
Bash code # <2>
Lua code -- <3>
Common Lisp code ;; <4>
HTML code <!--5-->
----
<1> `//`
    * AsciiDoc
    * Go
    * Rust
    * Zig
    * CUE
<2> `#`
    * Bash
    * Julia
    * TOML
    * Nix
    * Jesth
<3> `--`
    * Lua
    * Haskell
    * SQL
<4> `;;`
    * Common Lisp
    * Clojure
    * Scheme
<5> `<!--`
    * HTML
Change Line Comment
C code // (1)
Bash code # (2)
Lua code -- (3)
Common Lisp code ;; (4)
HTML code <!--5-->
line-comment=$ (6)
AsciiDoc Code
.Change Line Comment
[line-comment=$]
----
C code // <1>
Bash code # <2>
Lua code -- <3>
Common Lisp code ;; <4>
HTML code <!--5-->
line-comment=$ $ <6>
----
Disable Line Comment
C code // (1)
Bash code # (2)
Lua code -- (3)
Common Lisp code ;; (4)
HTML code <!--5-->
AsciiDoc Code
.Disable Line Comment
[line-comment=]
----
C code // <1>
Bash code # <2>
Lua code -- <3>
Common Lisp code ;; <4>
HTML code <!--5-->
----

Wrap Block Attribute

Supported Block
  • Source Code

  • Listing

  • Literal

Enable

Source Code
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Listing
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Literal
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
AsciiDoc Code
:wrap_option: wrap


.Source Code
[source, console, options={wrap_option}, subs=+attributes]
----
{long_string}
----

.Listing
[options={wrap_option}, subs=+attributes]
----
{long_string}
----

.Literal
[options={wrap_option}, subs=+attributes]
....
{long_string}
....

Disable

Source Code
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Listing
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Literal
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
AsciiDoc Code
:wrap_option: nowrap

.Source Code
[source, console, options={wrap_option}, subs=+attributes]
----
{long_string}
----

.Listing
[options={wrap_option}, subs=+attributes]
----
{long_string}
----

.Literal
[options={wrap_option}, subs=+attributes]
....
{long_string}
....

Indent Block Attribute

Supported Block
  • Source Code

  • Listing

  • Literal

Default
    function hello_world()
      run(Cmd(["echo", "Hello World"]))
    end

    hello_world()
AsciiDoc Code
.Default
[source, Julia]
----
    function hello_world()
      run(Cmd(["echo", "Hello World"]))
    end

    hello_world()
----
indent=0
function hello_world()
  run(Cmd(["echo", "Hello World"]))
end

hello_world()
AsciiDoc Code
.`indent=0`
[source, Julia, indent=0]
----
    function hello_world()
      run(Cmd(["echo", "Hello World"]))
    end

    hello_world()
----
indent=2
  function hello_world()
    run(Cmd(["echo", "Hello World"]))
  end

  hello_world()
AsciiDoc Code
.`indent=2`
[source, Julia, indent=2]
----
    function hello_world()
      run(Cmd(["echo", "Hello World"]))
    end

    hello_world()
----
indent=10
          function hello_world()
            run(Cmd(["echo", "Hello World"]))
          end

          hello_world()
AsciiDoc Code
.`indent=10`
[source, Julia, indent=10]
----
    function hello_world()
      run(Cmd(["echo", "Hello World"]))
    end

    hello_world()
----

Tables

Table 1. Table block delimiter is |===

row 1

row 2

AsciiDoc Code
.Table block delimiter is `|===`
|===
|row 1
|row 2
|===
Table 2. Add Header
Column 1 Header Column 2 Header

Column 1 row 1

Column 2 row 1

Column 1 row 2

Column 2 row 2

AsciiDoc Code
.Add Header
|===
|Column 1 Header |Column 2 Header

|Column 1 row 1  |Column 2 row 1
|Column 1 row 2  |Column 2 row 2
|===
Table 3. Add Footer

Column 1 row 1

Column 2 row 1

Column 1 row 2

Column 2 row 2

Column 1 Footer

Column 2 Footer

AsciiDoc Code
.Add Footer
[options="footer"]
|===
|Column 1 row 1  |Column 2 row 1
|Column 1 row 2  |Column 2 row 2

|Column 1 Footer |Column 2 Footer
|===
Table 4. Span Columns and Rows

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 & 2 row 2

Column 3 row 2

Column 1 row 3 & 4

Column 2 row 3

Column 3 row 3

Column 2 row 4

Column 3 row 4

Column 1 & 2 row 5 & 6

Column 3 row 5

Column 3 row 6

AsciiDoc Code
.Span Columns and Rows
|===
|Column 1 row 1        |Column 2 row 1 |Column 3 row 1
2+|Column 1 & 2 row 2                  |Column 3 row 2
.2+|Column 1 row 3 & 4 |Column 2 row 3 |Column 3 row 3
                       |Column 2 row 4 |Column 3 row 4
2.2+|Column 1 & 2 row 5 & 6            |Column 3 row 5
                                       |Column 3 row 6
|===

Caption

Change

Change caption: Caption attribute on block attribute

column 1

column 2

Change caption: Add caption attribute into cols attribute

column 1

column 2

AsciiDoc Code
[caption="Change caption: "]
.Caption attribute on block attribute
|===
|column 1 |column 2
|===

.Add caption attribute into cols attribute
[cols="1,1", caption="Change caption: "]
|===
|column 1 |column 2
|===

Disable

Caption attribute on block attribute

column 1

column 2

Add caption attribute into cols attribute

column 1

column 2

AsciiDoc Code
[caption=]
.Caption attribute on block attribute
|===
|column 1 |column 2
|===

.Add caption attribute into cols attribute
[cols="1,1", caption=]
|===
|column 1 |column 2
|===
How to disable caption for all the tables

Unset table-caption document attribute (i.e. :!table-caption:).

Table Title is Caption Only

Use {empty} or title block attribute.

Table 5.

column 1

column 2

Table 6

column 1

column 2

AsciiDoc Code
.{empty}
|===
|column 1 |column 2
|===

[caption=,title="{table-caption} {counter:table-number}"]
|===
|column 1 |column 2
|===

Columns

There are two ways to specify the number of columns in a table.

Table 7. The number of cells in the first non-empty line

1

2

3

4

5

6

AsciiDoc Code
|===
|1|2
|3|4
|5|6
|===
Table 8. cols block attribute

1

2

3

4

5

6

AsciiDoc Code
.`cols` block attribute
[cols="3"]
|===
|1|2
|3|4
|5|6
|===

Column Specifiers

Use column specifier on cols block attribute.

The column specifier defines elements
Width
  • 3

  • 30%

Align
  • ^

  • .^

Format Content
  • s

  • a

Number of Columns
  • 2*

  • 5*

Width

The column width is determined by the percentage or integer of the cols attribute.

Table 9. Percentage

30%

10%

60%

AsciiDoc Code
.Percentage
[cols="30%, 10%, 60%"]
|===
|30%
|10%
|60%
|===
Table 10. Integer

Proportional width 3

Proportional width 1

Proportional width 6

AsciiDoc Code
.Integer
[cols="3,1,6"]
|===
|Proportional width 3
|Proportional width 1
|Proportional width 6
|===
Align
Table 11. Horizontal
Default Flush Left Center Flush Right

Default

<

^

>

AsciiDoc Code
.Horizontal
[cols=",<,^,>"]
|===
|Default |Flush Left |Center |Flush Right

|Default |`<`        |`^`    |`>`
|===
Table 12. Vertical

Default

Flush Top

Center

Flush Bottom

Default

.<

.^

.>

1
2
3
4
5

1
2
3

1
2
3

1
2
3

AsciiDoc Code
.Vertical
[cols=",.<,.^,.>"]
|===
|Default
|Flush Top
|Center
|Flush Bottom

|Default
|`.<`
|`.^`
|`.>`

|1 +
2 +
3 +
4 +
5
|1 +
2 +
3
|1 +
2 +
3
|1 +
2 +
3
|===
Table 13. Horizontal and Vertical

Default

Left and Top

Center

Right and Bottom

Default

<.<

^.^

>.>

1
2
3
4
5

1
2
3

1
2
3

1
2
3

AsciiDoc Code
.Horizontal and Vertical
[cols=",<.<,^.^,>.>"]
|===
|Default
|Left and Top
|Center
|Right and Bottom

|Default
|`<.<`
|`\^.^`
|`>.>`

|1 +
2 +
3 +
4 +
5
|1 +
2 +
3
|1 +
2 +
3
|1 +
2 +
3
|===
Format Content

cols block attribute sets the style of the column content.

Default Bold Italic Monospace

The cols block attribute is cols="d,s,e,m".

Table 14. Text

Default

Bold (strong)

Italic (emphasis)

Monospace

Normal

Normal

Normal

Normal

Bold

Bold

Bold

Bold

italic

italic

italic

italic

Monospace

Monospace

Monospace

Monospace

Highlight

Highlight

Highlight

Highlight

Red

Red

Red

Red

Aqua Background

Aqua Background

Aqua Background

Aqua Background

H2o

H2o

H2o

H2o

210

210

210

210

‘Single’

‘Single’

‘Single’

‘Single’

“Double”

“Double”

“Double”

“Double”

AsciiDoc Code
.Text
[cols="d,s,e,m"]
|===
|Default
|Bold (``s``trong)
|Italic (``e``mphasis)
|Monospace

4*|Normal

4*|*Bold*

4*|_italic_

4*|`Monospace`

4*|#Highlight#

4*|[.red]#Red#

4*|[.aqua-background]#Aqua Background#

4*|H~2~o

4*|2^10^

4*|'`Single`'

4*|"`Double`"
|===
Table 15. List

* Item 1 * Item 2 ** Item 3

* Item 1 * Item 2 ** Item 3

* Item 1 * Item 2 ** Item 3

* Item 1 * Item 2 ** Item 3

. Item 1 . Item 2 .. Item 3

. Item 1 . Item 2 .. Item 3

. Item 1 . Item 2 .. Item 3

. Item 1 . Item 2 .. Item 3

Item:: 1 Item:: 2 Item::: 3

Item:: 1 Item:: 2 Item::: 3

Item:: 1 Item:: 2 Item::: 3

Item:: 1 Item:: 2 Item::: 3

AsciiDoc Code
.List
[cols="d,s,e,m"]
|===
4*|
* Item 1
* Item 2
** Item 3

4*|
. Item 1
. Item 2
.. Item 3

4*|
Item:: 1
Item:: 2
Item::: 3
|===
Table 16. Nest

[cols="1,1"] !=== !Nest Table

!Nest Table Column 1 row 1 !Nest Table Column 2 row 1 !Nest Table Column 1 row 2 !Nest Table Column 2 row 2 !===

[cols="1,1"] !=== !Nest Table

!Nest Table Column 1 row 1 !Nest Table Column 2 row 1 !Nest Table Column 1 row 2 !Nest Table Column 2 row 2 !===

[cols="1,1"] !=== !Nest Table

!Nest Table Column 1 row 1 !Nest Table Column 2 row 1 !Nest Table Column 1 row 2 !Nest Table Column 2 row 2 !===

[cols="1,1"] !=== !Nest Table

!Nest Table Column 1 row 1 !Nest Table Column 2 row 1 !Nest Table Column 1 row 2 !Nest Table Column 2 row 2 !===

AsciiDoc Code
.Nest
[cols="d,s,e,m"]
|===
4*|
[cols="1,1"]
!===
!Nest Table

!Nest Table Column 1 row 1  !Nest Table Column 2 row 1
!Nest Table Column 1 row 2  !Nest Table Column 2 row 2
!===
|===
Table 17. Block

[source, AsciiDoc] ---- Source Code ----

[source, AsciiDoc] ---- Source Code ----

[source, AsciiDoc] ---- Source Code ----

[source, AsciiDoc] ---- Source Code ----

[NOTE] ==== Admonitions Block ====

[NOTE] ==== Admonitions Block ====

[NOTE] ==== Admonitions Block ====

[NOTE] ==== Admonitions Block ====

[example] ==== Example Block ====

[example] ==== Example Block ====

[example] ==== Example Block ====

[example] ==== Example Block ====

---- Listing Block ----

---- Listing Block ----

---- Listing Block ----

---- Listing Block ----

…​. Literal Block …​.

…​. Literal Block …​.

…​. Literal Block …​.

…​. Literal Block …​.

AsciiDoc Code
.Block
[cols="d,s,e,m"]
|===
4*|
[source, AsciiDoc]
----
Source Code
----

4*|
[NOTE]
====
Admonitions Block
====

4*|
[example]
====
Example Block
====

4*|
----
Listing Block
----

4*|
....
Literal Block
....
|===
Table 18. Document Attributes

{doctitle} is AsciiDoctor Cheatsheets

{doctitle} is AsciiDoctor Cheatsheets

{doctitle} is AsciiDoctor Cheatsheets

{doctitle} is AsciiDoctor Cheatsheets

AsciiDoc Code
.Document Attributes
[cols="d,s,e,m"]
|===
4*|`{doctitle}` is AsciiDoctor Cheatsheets
|===
Table 19. include

The cols block attribute is cols="d,s,e,m".

The cols block attribute is cols="d,s,e,m".

The cols block attribute is cols="d,s,e,m".

The cols block attribute is cols="d,s,e,m".

AsciiDoc Code
.include
[cols="d,s,e,m"]
|===
4*|{empty}
include::./format_content.adoc[tag=cols_attribute]
|===
Default AsciiDoc Header Literal
Table 20. Text

Default

AsciiDoc

Header

Literal

Normal

Normal

Normal

Normal

Bold

Bold

Bold

*Bold*

italic

italic

italic

_italic_

Monospace

Monospace

Monospace

`Monospace`

Highlight

Highlight

Highlight

#Highlight#

Red

Red

Red

[.red]#Red#

Aqua Background

Aqua Background

Aqua Background

[.aqua-background]#Aqua Background#

H2o

H2o

H2o

H~2~o

210

210

210

2^10^

‘Single’

‘Single’

‘Single’

'`Single`'

“Double”

“Double”

“Double”

"`Double`"
AsciiDoc Code
.Text
[cols=",a,h,l"]
|===
|Default
|Bold (``s``trong)
|Italic (``e``mphasis)
|Monospace

4*|Normal

4*|*Bold*

4*|_italic_

4*|`Monospace`

4*|#Highlight#

4*|[.red]#Red#

4*|[.aqua-background]#Aqua Background#

4*|H~2~o

4*|2^10^

4*|'`Single`'

4*|"`Double`"
|===
Table 21. List

* Item 1 * Item 2 ** Item 3

  • Item 1

  • Item 2

    • Item 3

* Item 1 * Item 2 ** Item 3

* Item 1
* Item 2
** Item 3

. Item 1 . Item 2 .. Item 3

  1. Item 1

  2. Item 2

    1. Item 3

. Item 1 . Item 2 .. Item 3

. Item 1
. Item 2
.. Item 3

Item:: 1 Item:: 2 Item::: 3

Item

1

Item

2

Item

3

Item:: 1 Item:: 2 Item::: 3

Item:: 1
Item:: 2
Item::: 3
AsciiDoc Code
.List
[cols=",a,h,l"]
|===
4*|
* Item 1
* Item 2
** Item 3

4*|
. Item 1
. Item 2
.. Item 3

4*|
Item:: 1
Item:: 2
Item::: 3
|===
Table 22. Nest

[cols="1,1"] !=== !Nest Table

!Nest Table Column 1 row 1 !Nest Table Column 2 row 1 !Nest Table Column 1 row 2 !Nest Table Column 2 row 2 !===

Nest Table Nest Table Column 1 row 1

Nest Table Column 2 row 1

Nest Table Column 1 row 2

[cols="1,1"] !=== !Nest Table

!Nest Table Column 1 row 1 !Nest Table Column 2 row 1 !Nest Table Column 1 row 2 !Nest Table Column 2 row 2 !===

[cols="1,1"]
!===
!Nest Table

!Nest Table Column 1 row 1  !Nest Table Column 2 row 1
!Nest Table Column 1 row 2  !Nest Table Column 2 row 2
!===
AsciiDoc Code
.Nest
[cols=",a,h,l"]
|===
4*|
[cols="1,1"]
!===
!Nest Table

!Nest Table Column 1 row 1  !Nest Table Column 2 row 1
!Nest Table Column 1 row 2  !Nest Table Column 2 row 2
!===
|===
Table 23. Block

[source, AsciiDoc] ---- Source Code ----

Source Code

[source, AsciiDoc] ---- Source Code ----

[source, AsciiDoc]
----
Source Code
----

[NOTE] ==== Admonitions Block ====

Admonitions Block

[NOTE] ==== Admonitions Block ====

[NOTE]
====
Admonitions Block
====

[example] ==== Example Block ====

Example Block

[example] ==== Example Block ====

[example]
====
Example Block
====

---- Listing Block ----

Listing Block

---- Listing Block ----

----
Listing Block
----

…​. Literal Block …​.

Literal Block

…​. Literal Block …​.

....
Literal Block
....
AsciiDoc Code
.Block
[cols=",a,h,l"]
|===
4*|
[source, AsciiDoc]
----
Source Code
----

4*|
[NOTE]
====
Admonitions Block
====

4*|
[example]
====
Example Block
====

4*|
----
Listing Block
----

4*|
....
Literal Block
....
|===
Table 24. Document Attributes

{doctitle} is AsciiDoctor Cheatsheets

{doctitle} is {doctitle}

{doctitle} is AsciiDoctor Cheatsheets

`\{doctitle}` is {doctitle}
AsciiDoc Code
.Document Attributes
[cols=",a,h,l"]
|===
4*|`{doctitle}` is AsciiDoctor Cheatsheets
|===
Table 25. include

The cols block attribute is cols=",a,h,l".

The cols block attribute is cols=",a,h,l".

The cols block attribute is cols=",a,h,l".

{empty}

The `cols` block attribute is `{cols_attribute}`.
AsciiDoc Code
.include
[cols=",a,h,l"]
|===
4*|{empty}
include::./format_content.adoc[tag=cols_attribute]
|===
Multiplier

Column multipliers allow you to define consecutive same columns in a table.

Syntax is <NUMBER_OF_COLUMNS>*<HORIZONTAL ALIGN><VERTICAL ALIGN><WIDTH><CONTENT_FORMAT>. For Example 3*.30%s.

Table 26. Simple

One

Two

Three

AsciiDoc Code
.Simple
[cols="3*"]
|===
|One |Two |Three
|===
Table 27. Content Format

One

Two

Three

AsciiDoc Code
.Content Format
[cols="3*s"]
|===
|One |Two |Three
|===
Table 28. Horizontal

One

Two

Three

AsciiDoc Code
.Horizontal
[cols="3*^"]
|===
|One |Two |Three
|===
Table 29. Vertical

One

One

Two

One

Two

Three

AsciiDoc Code
.Vertical
[cols="3*.^"]
|===
|One
|One

Two
|One

Two

Three
|===
Table 30. Horizontal and Vertical (Must delimiter double quote)

One

One

Two

One

Two

Three

AsciiDoc Code
.Horizontal and Vertical (Must delimiter double quote)
[cols="3*^.^"]
|===
|One
|One

Two
|One

Two

Three
|===
Table 31. Align & Format (Must delimiter double quote)

One

One

Two

One

Two

Three

AsciiDoc Code
.Align & Format (Must delimiter double quote)
[cols="3*^.^s"]
|===
|One
|One

Two
|One

Two

Three
|===
Table 32. Proportional

Proportional 2

Proportional 6

Proportional 6

Proportional 6

AsciiDoc Code
.Proportional
[cols="2,3*6"]
|===
|Proportional 2
3*|Proportional 6
|===
Table 33. Percentage

10%

30%

30%

30%

AsciiDoc Code
.Percentage
[cols="10%,3*30%"]
|===
|10%
3*|30%
|===
Table 34. All

One

One

Two

One

Two

Three

AsciiDoc Code
.All
[cols="2,2*>.>4e"]
|===
|One
|One

Two
|One

Two

Three
|===
Table 35. Mix

Proportional width 3 Default

Multiplier Proportional width 6 Literal Horizontal and Vertical Center
Multiplier Proportional width 6 Literal Horizontal and Vertical Center

Proportional width 2 Bold

  • Multiplier

    1. Proportional Width 5

      AsciiDoc

      Content

Multiplier

Proportional Width 5

AsciiDoc Content
AsciiDoc Code
.Mix
[cols="3,2*>.>6l,2s,2*5a"]
|===
|Proportional width 3 Default
|Multiplier Proportional width 6 Literal Horizontal and Vertical Center
|Multiplier Proportional width 6 Literal Horizontal and Vertical Center
|Proportional width 2 Bold
|
* Multiplier
. Proportional Width 5
[horizontal]
AsciiDoc:: Content
|
[NOTE]
====
Multiplier
====
****
Proportional Width 5
****
[source, AsciiDoc]
----
AsciiDoc Content
----
|===

Cell Specifiers

The cell specifiers are almost same to column specifier.

Same point between cell specifier and column specifier
Align
  • ^

  • .^

Format Content
  • s

  • a

Number of Cells
  • 2*

  • 5*

Align

Table 36. Horizontal
Default Flush Left Center Flush Right

Default

<

^

>

AsciiDoc Code
.Horizontal
[cols="4"]
|===
|Default <|Flush Left ^|Center >|Flush Right

|Default <|`<`        ^|`^`    >|`>`
|===
Table 37. Vertical

Default

Flush Top

Center

Flush Bottom

Default

.<

.^

.>

1
2
3
4
5

1
2
3

1
2
3

1
2
3

AsciiDoc Code
.Vertical
[cols="4"]
|===
|Default
.<|Flush Top
.^|Center
.>|Flush Bottom

|Default
.<|`.<`
.^|`.^`
.>|`.>`

|1 +
2 +
3 +
4 +
5
.<|1 +
2 +
3
.^|1 +
2 +
3
.>|1 +
2 +
3
|===
Table 38. Horizontal and Vertical

Default

Left and Top

Center

Right and Bottom

Default

<.<

^.^

>.>

1
2
3
4
5

1
2
3

1
2
3

1
2
3

AsciiDoc Code
.Horizontal and Vertical
[cols="4"]
|===
|Default
<.<|Left and Top
^.^|Center
>.>|Right and Bottom

|Default
<.<|`<.<`
^.^|`\^.^`
>.>|`>.>`

|1 +
2 +
3 +
4 +
5
<.<|1 +
2 +
3
^.^|1 +
2 +
3
>.>|1 +
2 +
3
|===

Format Content

Default Bold Italic Monospace

Default Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

Bold Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

Italic Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

Monospace Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

[NOTE] ==== AsciiDoc Content ====

[NOTE] ==== AsciiDoc Content ====

[NOTE] ==== AsciiDoc Content ====

[NOTE] ==== AsciiDoc Content ====

AsciiDoc Code
:format_content_example: pass:n[Normal *bold* _italic_ `mono` #Highlight# [.red]#Red# H~2~o 2^10^ '`Single`' "`Double`"]

[cols="4"]
|===
|Default {format_content_example}
s|Bold {format_content_example}
e|Italic {format_content_example}
m|Monospace {format_content_example}

|
[NOTE]
====
AsciiDoc Content
====

s|
[NOTE]
====
AsciiDoc Content
====

e|
[NOTE]
====
AsciiDoc Content
====

m|
[NOTE]
====
AsciiDoc Content
====
|===
Default AsciiDoc Header Literal

Default Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

AsciiDoc Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

Header Normal bold italic mono Highlight Red H2o 210 ‘Single’ “Double”

Literal {format_content_example}

[NOTE] ==== AsciiDoc Content ====

AsciiDoc Content

[NOTE] ==== AsciiDoc Content ====

[NOTE]
====
AsciiDoc Content
====
AsciiDoc Code
:format_content_example: pass:n[Normal *bold* _italic_ `mono` #Highlight# [.red]#Red# H~2~o 2^10^ '`Single`' "`Double`"]

[cols="4"]
|===
|Default {format_content_example}
a|AsciiDoc {format_content_example}
h|Header {format_content_example}
l|Literal {format_content_example}

|
[NOTE]
====
AsciiDoc Content
====

a|
[NOTE]
====
AsciiDoc Content
====

h|
[NOTE]
====
AsciiDoc Content
====

l|
[NOTE]
====
AsciiDoc Content
====
|===

Span

Span allow you to merge cells.

Syntax is <NUMBER_OF_CELLS><SPAN_FACTOR><HORIZONTAL_ALIGN><VERTICAL_ALIGN><CONTENT_FORMAT>`. For Example `4^.^.s.

Table 39. Column span

Column 1 & 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Column span
|===
2+|Column 1 & 2 row 1           |Column 3 row 1
|Column 1 row 2 |Column 2 row 2 |Column 3 row 2
|===
Table 40. Row span

Column 1 & 2 row 1

Column 3 row 1

Column 3 row 2

AsciiDoc Code
.Row span
|===
.2+|Column 1 & 2 row 1 |Column 3 row 1
                       |Column 3 row 2
|===
Table 41. Block span

Column 1 & 2 row 1 & 2

Column 3 row 1

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

AsciiDoc Code
.Block span
|===
2.2+|Column 1 & 2 row 1 & 2     |Column 3 row 1
                                |Column 3 row 2
|Column 1 row 3 |Column 2 row 3 |Column 3 row 3
|===
Table 42. Content Format

Column 1 & 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Content Format
|===
2+s|Column 1 & 2 row 1           |Column 3 row 1
|Column 1 row 2 |Column 2 row 2  |Column 3 row 2
|===
Table 43. Horizontal

Column 1 & 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Horizontal
|===
2+>|Column 1 & 2 row 1           |Column 3 row 1
|Column 1 row 2 |Column 2 row 2  |Column 3 row 2
|===
Table 44. Vertical

One

Two

Three

One

Two

Three

Four

Five

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Vertical
[cols="3"]
|===
2+.>|
One

Two

Three
|One

Two

Three

Four

Five
|Column 1 row 2 |Column 2 row 2 |Column 3 row 2
|===
Table 45. Horizontal and Vertical

One

Two

Three

One

Two

Three

Four

Five

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Horizontal and Vertical
[cols="3"]
|===
2+^.^|
One

Two

Three
|One

Two

Three

Four

Five
|Column 1 row 2 |Column 2 row 2 |Column 3 row 2
|===
Table 46. Align & Format

One

Two

Three

One

Two

Three

Four

Five

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Align & Format
[cols="3"]
|===
2+^.^e|
One

Two

Three
|One

Two

Three

Four

Five
|Column 1 row 2 |Column 2 row 2 |Column 3 row 2
|===

Duplicate

References

Duplicate Cells

Cell duplicate allow you to define consecutive same cells in a table.

Syntax is <NUMBER_OF_CELLS>*<HORIZONTAL_ALIGN><VERTICAL_ALIGN><CONTENT_FORMAT>. For Example 4*.l.

Only one of the duplicate (*) and span (+) can be used.

Table 47. Simple

One

One

One

AsciiDoc Code
.Simple
|===
3*|One
|===
Table 48. Content Format

One

One

One

AsciiDoc Code
.Content Format
|===
3*s|One
|===
Table 49. Horizontal

One

One

One

AsciiDoc Code
.Horizontal
|===
3*^|One
|===
Table 50. Vertical

One

Two

Three

One

One

AsciiDoc Code
.Vertical
[cols="3"]
|===
|One

Two

Three
2*.>|One
|===
Table 51. Horizontal and Vertical

One

Two

Three

One

One

AsciiDoc Code
.Horizontal and Vertical
[cols="3"]
|===
|One

Two

Three
2*>.>|One
|===
Table 52. Align & Format

One

Two

Three

One

One

AsciiDoc Code
.Align & Format
[cols="3"]
|===
|One

Two

Three
2*>.>s|One
|===

Width

References

Table Width

Table 53. Default
Column 1 Header Column 2 Header Column 3 Header long width

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Default
|===
|Column 1 Header |Column 2 Header |Column 3 Header long width

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|===
Table 54. Fixed Width
Column 1 Header Column 2 Header Column 3 Header long width

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Fixed Width
[width=30%]
|===
|Column 1 Header |Column 2 Header |Column 3 Header long width

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|===
Table 55. Auto width ([%autowidth], [options=autowidth])
Column 1 Header Column 2 Header Column 3 Header long width

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Auto width (`[%autowidth]`, `[options=autowidth]`)
[options=autowidth]
|===
|Column 1 Header |Column 2 Header |Column 3 Header long width

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|===
Table 56. Stretch
Column 1 Header Column 2 Header Column 3 Header long width

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Stretch
[.stretch]
|===
|Column 1 Header |Column 2 Header |Column 3 Header long width

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|===

role=stretch or [.stretch] is same as width=100%.

Table 57. Mix fixed and autowidth columns
Column 1 Header Column 2 Header Column 3 Header long width

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

AsciiDoc Code
.Mix fixed and autowidth columns
[cols="~,~,75"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header long width

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|===

Borders

Frame

Table 58. frame=all (Default)
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:frame_value: all


.`frame={frame_value}` {table_title_suffix}
[frame={frame_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 59. frame=ends
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:frame_value: ends


.`frame={frame_value}` {table_title_suffix}
[frame={frame_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 60. frame=sides
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:frame_value: sides


.`frame={frame_value}` {table_title_suffix}
[frame={frame_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 61. frame=none
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:frame_value: none


.`frame={frame_value}` {table_title_suffix}
[frame={frame_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===

Grid

Table 62. grid=all (Default)
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: all


.`grid={grid_value}` {table_title_suffix}
[grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 63. grid=cols
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: cols


.`grid={grid_value}` {table_title_suffix}
[grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 64. grid=rows
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: rows


.`grid={grid_value}` {table_title_suffix}
[grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 65. grid=none
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: none


.`grid={grid_value}` {table_title_suffix}
[grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===

Frame and grid combination

Frame is all
Table 66. frame=all grid=all (Default)
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: all


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 67. frame=all grid=cols
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: cols


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 68. frame=all grid=rows
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: rows


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 69. frame=all grid=none
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: none


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Frame is ends
Table 70. frame=ends grid=all
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: all


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 71. frame=ends grid=cols
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: cols


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 72. frame=ends grid=rows
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: rows


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 73. frame=ends grid=none
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: none


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Frame is sides
Table 74. frame=sides grid=all
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: all


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 75. frame=sides grid=cols
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: cols


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 76. frame=sides grid=rows
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: rows


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 77. frame=sides grid=none
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: none


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Frame is none
Table 78. frame=none grid=all
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: all


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 79. frame=none grid=cols
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: cols


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 80. frame=none grid=rows
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: rows


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 81. frame=none grid=none
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:grid_value: none


.`frame={frame_value} grid={grid_value}` {table_title_suffix}
[frame={frame_value}, grid={grid_value}, options="header, footer, autowidth"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===

Striping

References

Table Striping

stripe block attribute

Table 82. stripes=none (Default)
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:stripe_value: none


.pass:a,n[{table_title}]
.`stripes={stripe_value}` {table_title_suffix}
[stripes={stripe_value}, options="header, footer, autowidth", role="aqua-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 83. stripes=even
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:stripe_value: even


.pass:a,n[{table_title}]
.`stripes={stripe_value}` {table_title_suffix}
[stripes={stripe_value}, options="header, footer, autowidth", role="aqua-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 84. stripes=odd
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:stripe_value: odd


.pass:a,n[{table_title}]
.`stripes={stripe_value}` {table_title_suffix}
[stripes={stripe_value}, options="header, footer, autowidth", role="aqua-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 85. stripes=all
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:stripe_value: all


.pass:a,n[{table_title}]
.`stripes={stripe_value}` {table_title_suffix}
[stripes={stripe_value}, options="header, footer, autowidth", role="aqua-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 86. stripes=hover (Let’s focus on cell)
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:stripe_value: hover
:table_title_suffix: (Let's focus on cell)


.pass:a,n[{table_title}]
.`stripes={stripe_value}` {table_title_suffix}
[stripes={stripe_value}, options="header, footer, autowidth", role="aqua-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===

table-stripes document attribute

Use table-stripes document attribute to change stripe on table for all the tables.

Table 87. table-stripes=even
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:table-stripes: even
:table_title: `table-stripes={table-stripes}`


.pass:a,n[{table_title}]
[options="header, footer, autowidth", role="lime-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 88. table-stripes=all
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:table-stripes: all
:table_title: `table-stripes={table-stripes}`


.pass:a,n[{table_title}]
[options="header, footer, autowidth", role="lime-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 89. :!table-stripes:
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
:!table-stripes:
:table_title: `:!table-stripes:`


.pass:a,n[{table_title}]
[options="header, footer, autowidth", role="lime-background"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===

Role

Table 90. Frame
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
.Frame
[.thumb]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===
Table 91. Change background
Column 1 Header Column 2 Header Column 3 Header

Column 1 row 1

Column 2 row 1

Column 3 row 1

Column 1 row 2

Column 2 row 2

Column 3 row 2

Column 1 row 3

Column 2 row 3

Column 3 row 3

Column 1 row 4

Column 2 row 4

Column 3 row 4

Column 1 Footer

Column 2 Footer

Column 3 Footer

AsciiDoc Code
.Change background
[role="aqua-background", options="footer"]
|===
|Column 1 Header |Column 2 Header |Column 3 Header

|Column 1 row 1  |Column 2 row 1  |Column 3 row 1
|Column 1 row 2  |Column 2 row 2  |Column 3 row 2
|Column 1 row 3  |Column 2 row 3  |Column 3 row 3
|Column 1 row 4  |Column 2 row 4  |Column 3 row 4

|Column 1 Footer |Column 2 Footer |Column 3 Footer
|===

Nesting

References

Nesting Tables

Table 1 Column 1 Header Table 1 Column 2 Header

Table 1 Column 1 row 1

Table 1 Column 2 row 1

Table 1 Column 1 row 2

Table 1 Column 2 row 2

Table 92. Table 2
Table 2 Column 1 Header Table 2 Column 2 Header

Table 2 Column 1 row 1

Table 2 Column 2 row 1

Table 2 Column 1 row 2

Table 2 Column 2 row 2

AsciiDoc Code
[cols="n,a"]
|===
|Table 1 Column 1 Header |Table 1 Column 2 Header

|Table 1 Column 1 row 1  |Table 1 Column 2 row 1
|Table 1 Column 1 row 2  |Table 1 Column 2 row 2

.Table 2
!===
!Table 2 Column 1 Header !Table 2 Column 2 Header

!Table 2 Column 1 row 1  !Table 2 Column 2 row 1
!Table 2 Column 1 row 2  !Table 2 Column 2 row 2
!===
|===

Data Format

Name

PSV (Default)

Nest PSV

CSV

TSV

DSV

Prefix-Separated Values

Nest Prefix-Separated Values

Comma-Separated Values

Tab-Separated Values

Delimited Data Values

The table block delimiter

|===

!===

,===

None

:===

Default Data separator

|

!

,

Tab

:

Table 93. PSV

Prefix

Separated

Values

AsciiDoc Code
.PSV
|===
|Prefix | Separated | Values
|===
Table 94. CSV

Comma

Separated

Values

AsciiDoc Code
.CSV
,===
Comma, Separated, Values
,===
Table 95. TSV

Tab

Separated

Values

AsciiDoc Code
.TSV
[format=tsv]
|===
Tab	Separated	Values
|===
Table 96. DSV

Delimited

Data

Values

AsciiDoc Code
.DSV
:===
Delimited: Data: Values
:===
Read table data from file with include directive
Create table from CSV file
[format=csv]
|===
include::<CSV_FILE_PATH>[]
|===
The cell specifier can only be used in PSV
Correct
|===
|PSV 2*^.^s|Correct
|===
Incorrect
,===
CSV 2*^.^,Incorrect
,===

Change data format

The format block option allow you to change data format in the table.

Table 97. PSV

Prefix

Separated

Values

Table 98. CSV(format=csv)

Comma

Separated

Values

AsciiDoc Code
.PSV
|===
|Prefix | Separated | Values
|===

.CSV(`format=csv`)
[format=csv]
|===
Comma, Separated, Values
|===

Cell Separator

Change cell separator

The separator block attribute allow you to change separator.

Table 99. Default

1

2

3

Table 100. Change separator to $

1

2

3

AsciiDoc Code
.Default
|===
|1|2|3
|===

.Change separator to `$`
[separator="$"]
|===
$1$2$3
|===

Escape bar in a Table

There are three ways to display bar (|) in a table.

Table 101. Escape (\|)

|

Table 102. Change separator

|

Table 103. Use {vbar} attribute

|

AsciiDoc Code
.Escape (`\|`)
|===
|\|
|===

.Change separator
[separator="$"]
|===
$|
|===

.Use `\{vbar}` attribute
|===
|{vbar}
|===

Position

Float

float right

float left

float center

AsciiDoc Code
.Float
[.float-group]
--
:float_value: right

[float={float_value},width=5%]
|===
|float {float_value}
|===

:float_value: left
[float={float_value},width=5%]
|===
|float {float_value}
|===

:float_value: center
[float={float_value},width=5%]
|===
|float {float_value}
|===
--

[role=<left,center,right>] is same as [.<left,center,right>].

Equations and Formulas (STEM)

Supported Math Notation

To enable equation and formula support, you need to set stem document attribute.

:stem: is same as :stem: asciimath.

Inline

\$sqrt(256)\$ is 16.

AsciiDoc Code
.Inline
stem:[sqrt(256)] is 16.
Block
\$sqrt(256)\$
AsciiDoc Code
.Block
[stem]
++++
sqrt(256)
++++

Inline Macro

Tex and Latex Math Notation

\(sqrt(4) = 2\)

AsciiDoc Code
:stem_example: sqrt(4) = 2

.Tex and Latex Math Notation
latexmath:[pass:n[{stem_example}]]
AsciiMath Math Notation

\$sqrt(4) = 2\$

AsciiDoc Code
.AsciiMath Math Notation
asciimath:[pass:n[{stem_example}]]

{stem} is asciimath.

Math Notation for Value of stem Document Attribute

\$sqrt(4) = 2\$

AsciiDoc Code
.Math Notation for Value of `stem` Document Attribute
stem:[pass:n[{stem_example}]]

Block Content

Tex and Latex Math Notation
\[\begin{bmatrix} a & b \\ \alpha & \beta \\ \end{bmatrix} \begin{pmatrix} x \\ y \\ \end{pmatrix}\]
AsciiDoc Code
.Tex and Latex Math Notation
[latexmath]
++++
\begin{bmatrix}
a & b \\
\alpha & \beta \\
\end{bmatrix}
\begin{pmatrix}
x \\
y \\
\end{pmatrix}
++++
AsciiMath Math Notation
\$[[a,b],[\alpha,\beta]]((x),(y))\$
AsciiDoc Code
.AsciiMath Math Notation
[asciimath]
++++
[[a,b],[\alpha,\beta]]((x),(y))
++++

{stem} is asciimath.

Math Notation for Value of stem Document Attribute
\$[[a,b],[\alpha,\beta]]((x),(y))\$
AsciiDoc Code
.Math Notation for Value of `stem` Document Attribute
[stem]
++++
[[a,b],[\alpha,\beta]]((x),(y))
++++

Open Block

References

Open Blocks

Anonymous

Anonymous

AsciiDoc Code
.Anonymous
--
Anonymous
--

Supported Blocks

Sidebar

Sidebar

AsciiDoc Code
[sidebar]
--
Sidebar
--

Admonition

Admonition

AsciiDoc Code
[NOTE]
--
Admonition
--

Verse

Verse
AsciiDoc Code
[verse]
--
Verse
--

Quote

Quote

AsciiDoc Code
[quote]
--
Quote
--

Source Code

Source Code
AsciiDoc Code
[source, AsciiDoc]
--
Source Code
--

Listing

Listing
AsciiDoc Code
[listing]
--
Listing
--

Literal

Literal
AsciiDoc Code
[literal]
--
Literal
--

Passthrough

Passthrough
AsciiDoc Code
[pass]
--
<u>Passthrough</u>
--

Collapsible Blocks

Details

Collapsible Blocks.

AsciiDoc Code
[%collapsible]
====
Collapsible Blocks.
====

[%collapsible] is same as [options="collapsible"].

Details
Collapsible Paragraph
AsciiDoc Code
[example%collapsible]
Collapsible Paragraph
Details

discrete Heading

  • Unordered List

    • Unordered List

      1. Ordered List

        1. Ordered List

          Description

          List

admonitions

hello:
  echo 'World'
AsciiDoc Code
[%collapsible]
====
[discrete]
== discrete Heading

* Unordered List
** Unordered List
. Ordered List
.. Ordered List
Description:: List

[NOTE]
======
admonitions
======

[source, justfile]
----
hello:
  echo 'World'
----
====

Change Toggle Text

Change Toggle Text for Block

Change Toggle Text

AsciiDoc Code
.Change Toggle Text for Block
[%collapsible]
====
Change Toggle Text
====
Change Toggle Text for Paragraph
Collapsible Paragraph
AsciiDoc Code
.Change Toggle Text for Paragraph
[example%collapsible]
Collapsible Paragraph

Default to Open

Details

Open by Default

AsciiDoc Code
[%collapsible%open]
====
Open by Default
====
Details
Open by Default
AsciiDoc Code
[example%collapsible%open]
Open by Default

Comments

Comment Line

Comment

Line

AsciiDoc Code
Comment

// Comment Line

Line

Comment Block

Comment

Block

AsciiDoc Code
Comment

////
Comment

Block
////

Block

Use Open Block

Comment Block

Use [comment].

AsciiDoc Code
Comment Block

[comment]
--
Comment

Block
--

Use `[comment]`.

Comment Paragraph

Comment

Paragraph

AsciiDoc Code
Comment

[comment]
Comment
Paragraph

Paragraph

In List

  1. Item 1

  2. Item 2

AsciiDoc Code
. Item 1
+
////
Comment

in

a list
////
. Item 2

In Table

Normal

//// Comment

in

a Table ////

AsciiDoc

AsciiDoc Code
|===
|Normal

// Comment Line

////
Comment

in

a Table
////
a|AsciiDoc

// Comment Line

////
Comment

in

a table
////
|===

Includes

Use include directive (include::<FILE>[]) to you can include content from another files.

Read a Content from any URI

Can reference file served from any URI. include::<URI>[]

Include Content form paragraph.adoc File

paragraph in paragraph.adoc file.

AsciiDoc Code
include::./paragraph.adoc[]
Include Content in a List

paragraph in paragraph.adoc file.

AsciiDoc Code
* {blank}
--
include::./paragraph.adoc[]
--

How to change section level

Use leveloffset element attribute to change section level offset.

AsciiDoc Code to be Include (leveloffset_test.adoc)
`\{leveloffset}` is {leveloffset}.

=== Section

Check HTML headings (`h1` - `h6`) element on above section.

Default

{leveloffset} is 2.

Section

Check HTML headings (h1 - h6) element on above section.

AsciiDoc Code
include::./leveloffset_test.adoc[]

Change Offset Section Level

{leveloffset} is 3.

Section

Check HTML headings (h1 - h6) element on above section.

AsciiDoc Code
include::./leveloffset_test.adoc[leveloffset=+1]

How to change indent

Use indent element attribute to change indent.

Nix Code to be Include (hello.nix)
    { pkgs ? import <nixpkgs> {} }:

    let
      hello = "Hello World";
    in
    pkgs.writeText "hello.txt" hello
AsciiDoc Code
[source, Nix]
----
include::./hello.nix[]
----
indent=0
{ pkgs ? import <nixpkgs> {} }:

let
  hello = "Hello World";
in
pkgs.writeText "hello.txt" hello
AsciiDoc Code
.`indent=0`
[source, Nix]
----
include::./hello.nix[indent=0]
----
indent=2
  { pkgs ? import <nixpkgs> {} }:

  let
    hello = "Hello World";
  in
  pkgs.writeText "hello.txt" hello
AsciiDoc Code
.`indent=2`
[source, Nix]
----
include::./hello.nix[indent=2]
----
indent=10
          { pkgs ? import <nixpkgs> {} }:

          let
            hello = "Hello World";
          in
          pkgs.writeText "hello.txt" hello
AsciiDoc Code
.`indent=10`
[source, Nix]
----
include::./hello.nix[indent=10]
----

Selection of Include Ranges

The include directive allows selection of included ranges.

Tag

AsciiDoc
AsciiDoc Code to be Include (tags.adoc)
1

// tag::a[]

a

// tag::b[]

b

// end::b[]

2

// tag::c[]

c

// end::c[]

A

// end::a[]

3

// tag::d[]

d

// end::d[]
AsciiDoc Code
[source, AsciiDoc]
----
include::./tags.adoc[]
----
tags="a"
a


b


2


c


A
AsciiDoc Code
.`tags="a"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="a"]
----
tags="b"
b
AsciiDoc Code
.`tags="b"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="b"]
----
tags="c"
c
AsciiDoc Code
.`tags="c"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="c"]
----
tags="b,c"
b


c
AsciiDoc Code
.`tags="b,c"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="b,c"]
----
tags="*"
a


b


2


c


A


d
AsciiDoc Code
.`tags="*"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="*"]
----
tags="!*"
1


3
AsciiDoc Code
.`tags="!*"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="!*"]
----
tags="!b"
1


a


2


c


A


3


d
AsciiDoc Code
.`tags="!b"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="!b"]
----
tags="a,!b"
a


2


c


A
AsciiDoc Code
.`tags="a,!b"`
[source, AsciiDoc]
----
include::./tags.adoc[tags="a,!b"]
----
Other than AsciiDoc

Tag can be used other than AsciiDoc.

Lua Code to be Include (tags.lua)
-- tag::hello[]
print('Hello World')
-- end::hello[]

print('AsciiDoc Test')
AsciiDoc Code
[source, AsciiDoc]
----
include::./tags.lua[]
----
tags="hello"
print('Hello World')
AsciiDoc Code
.`tags="hello"`
[source, Lua]
----
include::./tags.lua[tags="hello"]
----

Lines

AsciiDoc Code to be Include (lines.adoc)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
AsciiDoc Code
[source, AsciiDoc]
----
include::./lines.adoc[]
----
lines="10"
10
AsciiDoc Code
.`lines="10"`
[source, AsciiDoc]
----
include::./lines.adoc[lines="10"]
----
lines="5..10"
5
6
7
8
9
10
AsciiDoc Code
.`lines="5..10"`
[source, AsciiDoc]
----
include::./lines.adoc[lines="5..10"]
----
lines="1,7,15"
1
7
15
AsciiDoc Code
.`lines="1,7,15"`
[source, AsciiDoc]
----
include::./lines.adoc[lines="1,7,15"]
----
lines="3..5,7..9,14"
3
4
5
7
8
9
14
AsciiDoc Code
.`lines="3..5,7..9,14"`
[source, AsciiDoc]
----
include::./lines.adoc[lines="3..5,7..9,14"]
----

The lines element attribute can be used other than AsciiDoc.

Conditionals

ifdef and ifndef

Single Line

ifdef
ifdef::hello[world]

Define hello document attribute.

Hello World

Unset hello document attribute.

Define hello document attribute.

Hello World

AsciiDoc Code
Define `hello` document attribute.

:hello:
// tag::single_line_ifdef[]
ifdef::hello[Hello World]
// end::single_line_ifdef[]

Unset `hello` document attribute.

:!hello:
include::./single_line.adoc[tag=single_line_ifdef]

Define `hello` document attribute.

:hello:
include::./single_line.adoc[tag=single_line_ifdef]
ifndef
ifndef::hello[world]

Define hello document attribute.

Unset hello document attribute.

Hello World

Define hello document attribute.

AsciiDoc Code
Define `hello` document attribute.

:hello:
// tag::single_line_not_ifdef[]
ifndef::hello[Hello World]
// end::single_line_not_ifdef[]

Unset `hello` document attribute.

:!hello:
include::./single_line.adoc[tag=single_line_not_ifdef]

Define `hello` document attribute.

:hello:
include::./single_line.adoc[tag=single_line_not_ifdef]

Long Form

Block
ifdef::hello[]
Hello
World

[NOTE]
====
Admonitions
====
endif::[]

ifndef::hello[]
Also use can ifndef.
endif::[]

Define hello document attribute.

Hello World

Admonitions

Unset hello document attribute.

Define hello document attribute.

Hello World

Admonitions

AsciiDoc Code
Define `hello` document attribute.

:hello:
// tag::block_ifdef[]
ifdef::hello[]
Hello
World

[NOTE]
====
Admonitions
====
endif::[]
// end::block_ifdef[]

Unset `hello` document attribute.

:!hello:
include::./long_form.adoc[tag=block_ifdef]

Define `hello` document attribute.

:hello:
include::./long_form.adoc[tag=block_ifdef]

Multiple Attributes

ifdef::hello,world[OR]
ifdef::hello+world[AND]

ifdef::hello,world[]
OR
endif::[]

ifdef::hello+world[]
AND
endif::[]
Document Attributes
hello

Set

world

Set

OR

AND

AsciiDoc Code
.Document Attributes
[horizontal]
hello:: Set
world:: Set

:hello:
:world:
// tag::multiple[]
ifdef::hello,world[OR]

ifdef::hello+world[AND]

ifndef::hello,world[NOT OR]

ifndef::hello+world[NOT AND]
// end::multiple[]
Document Attributes
hello

Unset

world

Unset

NOT OR

NOT AND

AsciiDoc Code
.Document Attributes
[horizontal]
hello:: Unset
world:: Unset

:!hello:
:!world:
include::./multiple_attributes.adoc[tag=multiple]
Document Attributes
hello

Set

world

Unset

OR

NOT AND

AsciiDoc Code
.Document Attributes
[horizontal]
hello:: Set
world:: Unset

:hello:
:!world:
include::./multiple_attributes.adoc[tag=multiple]
Document Attributes
hello

Unset

world

Set

OR

NOT AND

AsciiDoc Code
.Document Attributes
[horizontal]
hello:: Unset
world:: Set

:!hello:
:world:
include::./multiple_attributes.adoc[tag=multiple]

ifeval

References

ifeval Directive

String
:hello: world

ifeval::["{hello}" == "world"]
Two values are equal
endif::[]

ifeval::["{hello}" != "world"]
Two values are not equal
endif::[]

Two values are equal

Number
:number: 1.5

ifeval::[{number} == 1.5]
Two values are equal
endif::[]

ifeval::[{number} != 1.5]
Two values are not equal
endif::[]

ifeval::[{number} < 4.5]
The left-hand side is less
endif::[]

ifeval::[{number} <= 1.5]
The left-hand side is less than or equal
endif::[]

ifeval::[{number} > 0.5]
The left-hand side is greater
endif::[]

ifeval::[{number} >= 1.5]
The left-hand side is greater than or equal
endif::[]

Two values are equal

The left-hand side is less

The left-hand side is less than or equal

The left-hand side is greater

The left-hand side is greater than or equal

Passthroughs

Inline Passthroughs

Plus Signs

Single and Double Plus

Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com

Triple Plus

Normal *bold* {hello} Highlight < > & 📛 (C) https://console.substack.com

AsciiDoc Code
:hello: World

.Single and Double Plus
+Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com+

.Triple Plus
+++Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com+++

pass macro

pass:[]

Normal *bold* {hello} Highlight < > & 📛 (C) https://console.substack.com

AsciiDoc Code
:hello: World
.`\pass:[]`
pass:[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
pass:<normal|n>[]

Normal bold World <mark>Highlight</mark> < > & 📛 © https://console.substack.com

AsciiDoc Code
.`pass:<normal|n>[]`
pass:normal[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
pass:<verbatim|v>[]

Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com

AsciiDoc Code
.`pass:<verbatim|v>[]`
pass:verbatim[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
pass:<specialchars|c>[]

Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com

AsciiDoc Code
.`pass:<specialchars|c>[]`
pass:specialchars[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
pass:<attributes|a>[]

Normal *bold* World Highlight < > & 📛 (C) https://console.substack.com

AsciiDoc Code
.`pass:<attributes|a>[]`
pass:attributes[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
pass:<replacements|r>[]

Normal *bold* {hello} Highlight < > & 📛 © https://console.substack.com

AsciiDoc Code
.`pass:<replacements|r>[]`
pass:replacements[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
pass:<macros|m>[]

Normal *bold* {hello} Highlight < > & 📛 (C) https://console.substack.com

AsciiDoc Code
.`pass:<macros|m>[]`
pass:macros[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]
Multiple Substitution pass:attributes,macros,specialchars[]

Normal *bold* World <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) <a href="https://console.substack.com" class="bare">https://console.substack.com</a>

AsciiDoc Code
.Multiple Substitution `\pass:attributes,macros,specialchars[]`
pass:attributes,macros,specialchars[Normal *bold* {hello} <mark>Highlight</mark> &lt; &gt; &amp; &#x1f4db; (C) https://console.substack.com]

Passthrough Blocks

Default
Normal _italic_ {friut} line-through < > & 🎑 (TM) https://dotfiles.substack.com
Change Substitutions
Normal italic apple <s>line-through</s> < > & 🎑 ™ https://dotfiles.substack.com
AsciiDoc Code
:friut: apple

.Default
--
++++
Normal _italic_ {friut} <s>line-through</s> &lt; &gt; &amp; &#x1f391; (TM) https://dotfiles.substack.com
++++
--

.Change Substitutions
--
[subs=normal]
++++
Normal _italic_ {friut} <s>line-through</s> &lt; &gt; &amp; &#x1f391; (TM) https://dotfiles.substack.com
++++
--
AsciiDoc Code
:repository_name: hituzi-no-sippo/asciidoctor-cheatsheets
[subs="attributes+"]
++++
<a href="https://github.com/{repository_name}" target="_blank" rel="noopener">
  <img src="https://github-link-card.s3.ap-northeast-1.amazonaws.com/{repository_name}.png" width="460px">
</a>
++++

On GitHub

Display Document Attributes

Example
<ATTRIBUTE>

The attribute value.
Display <ATTRIBUTE> if unset attribute. (For Example :!toc:)

Compliance

Attribute
attribute-missing

skip

attribute-undefined

drop-line

Button and Menu UI, Keyboard Macros
experimental

Revision date (revdate) on footer
reproducible

{reproducible}

Front-matter
skip-front-matter

{skip-front-matter}

Localization and Numbering

Admonitions
note-caption

tip-caption

💡

important-caption

warning-caption

caution-caption

🔥

Table
table-caption

Table

table-number

103

Example
example-caption

Example

example-number

5

Figure
figure-caption

Figure

figure-number

10

Listing
listing-caption

{listing-caption}

listing-number

{listing-number}

Cross-Reference
section-refsig

Section

Footnote
footnote-number

15

Revision
last-update-label

Last updated

version-label

Version

Table of Contents
toc-title

Table of Contents

Appendix
appendix-caption

Appendix

appendix-number

{appendix-number}

appendix-refsig

Appendix

Title
untitled-label

Untitled

Lang
lang

{lang}

nolang

{nolang}

Book Doctype Only

Part
part-refsig

Part

part-signifier

{part-signifier}

Chapter
chapter-number

{chapter-number}

chapter-refsig

Chapter

chapter-signifier

{chapter-signifier}

Title
preface-title

{preface-title}

Document metadata

Revision
revnumber

v1.0.0

revdate

2023-07-09T13:38:38+09:00

revremark

add GitHub

Author
author

hituzi no sippo

authors

hituzi no sippo

authorcount

1

authorinitials

hns

Author Name
firstname

hituzi

lastname

sippo

middlename

no

Author E-Mail
email

dev@hituzi-no-sippo.me

Title
doctitle

AsciiDoctor Cheatsheets

title

{title}

HTML meta element
copyright

Copyright © 2023 hituzi no sippo

description

{description}

keywords

{keywords}

app-name

{app-name}

Front-matter
front-matter

{front-matter}

DocBook
orgname

{orgname}

Section

ID
sectids

idprefix

{idprefix}

idseparator

{idseparator}

Anchor
sectanchors

{sectanchors}

sectlinks

{sectlinks}

Number
sectnums

{sectnums}

sectnumlevels

Level
leveloffset

2

Fragment
fragment

{fragment}

Book Doctype Only

Part
partnums

{partnums}

Document Title

Subtitle
title-separator

{title-separator}

Table of Contents

Location
toc

toc-position

right

Display Section Level
toclevels

{toclevels}

General Content and Formatting

Cross-Reference
xrefstyle

{xrefstyle}

relfileprefix

{relfileprefix}

relfilesuffix

{relfilesuffix}

Hide
noheader

{noheader}

nofooter

{nofooter}

nofootnotes

{nofootnotes}

Line Break
hardbreaks-option

{hardbreaks-option}

docinfo
docinfo

{docinfo}

docinfodir

{docinfodir}

docinfosubs

{docinfosubs}

Document Type
doctype

article

Table
table-frame

{table-frame}

table-grid

{table-grid}

table-stripes

{table-stripes}

Convert Tabs to Spaces
tabsize

{tabsize}

Embedded Document Title
showtitle

{showtitle}

notitle

{notitle}

URI
hide-uri-scheme

{hide-uri-scheme}

CDN
asset-uri-scheme

{asset-uri-scheme}

Cache
cache-uri

{cache-uri}

Embed Graphics
data-uri

{data-uri}

LaTeX
eqnums

{eqnums}

Equations and Formulas (STEM)
stem

asciimath

Web fonts
webfonts

Output File Extension
outfilesuffix

.html

DocBook Only
pagewidth

{pagewidth}

PDF Only
media

{media}

show-link-uri

{show-link-uri}

Image and Icon

Image

Directory
imagesdir

./videos

Icon

Directory
iconsdir

./icons

File Extension
icontype

svg

Admonitions
icons

font

CSS
iconfont-name

{iconfont-name}

CDN
iconfont-cdn

{iconfont-cdn}

iconfont-remote

Source Highlighting and Formatting

Highlighting

Tool
source-highlighter

highlight.js

highlight.js
highlightjsdir

{highlightjsdir}

highlightjs-theme

{highlightjs-theme}

Coderay
coderay-css

{coderay-css}

coderay-linenums-mode

{coderay-linenums-mode}

coderay-unavailable

{coderay-unavailable}

Rouge
rouge-css

{rouge-css}

rouge-linenums-mode

{rouge-linenums-mode}

rouge-unavailable

{rouge-unavailable}

rouge-style

{rouge-style}

Pygments
pygments-css

{pygments-css}

pygments-linenums-mode

{pygments-linenums-mode}

pygments-unavailable

{pygments-unavailable}

pygments-style

{pygments-style}

Prettify
prettifydir

{highlightjsdir}

prettify-theme

{highlightjs-theme}

Language
source-language

{source-language}

Formatting

Indent
source-indent

{source-indent}

Wrap
prewrap

Line Number
source-linenums-option

{source-linenums-option}

HTML Styling

Directory
stylesdir

.

File Name
stylesheet

stylesheet

Table of Content
toc-class

toc2

Embedded CSS
linkcss

Output
copycss

HTML element
css-signature

{css-signature}

Security

Read data from URI
allow-uri-read

{allow-uri-read}

AsciiDoc Attribute
max-attribute-value-size

{max-attribute-value-size}

AsciiDoc Include
max-include-depth

64


Copyright © 2023 hituzi no sippo


1. Footnote syntax test
2. Reuse footnote test
3. There is a space between footnote macro
4. Use empty attribute
5. Bold
6. Italic
7. Monospace
8. Highlight
9. Styled phrase
10. Subscript
11. Superscript
12. ‘Single’
13. “Double”
14. use attribute
15. bold italic highlight