Content entered directly below the header but before the first section heading is called the preamble.

Text formatting

This is a paragraph of regular text.

This is a paragraph with a bold word and an italicized word. Bold italic is also possible.

Words can also have internal bold and italic formatting.

Some constrained monospace text, and some unconstrained monospace text.

Some Superscript® text and some subscript text: H2O.

This is a paragraph of regular text.

This is a paragraph with a *bold* word and an _italicized_ word. *_Bold italic_* is also possible.

Words can also have internal b**ol**d and it__ali__c formatting.

Some constrained `monospace text`, and some ``u``nconstrained ``m``onospace ``t``ext.

Some Superscript^®^ text and some subscript text: H~2~O.

The text at the end of this sentence is cross referenced to the third level heading

This is a link to the Asciidoctor User Manual.

The text at the end of this sentence is cross referenced to <<_third_level_heading,the third level heading>>

This is a link to the https://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual^].

This is an attribute reference {quick-uri}[which links this text to the Asciidoctor Quick Reference Guide^].

Replacements

  • copyright: ©

  • registered trademark: ®

  • trademark: ™

  • em dash (between words): — 

  • ellipses: …​

  • arrows: → ⇒ ← ⇐

  • apostrophe: Sam’s

  • XML entity (e.g., dagger): †

* copyright: (C)
* registered trademark: (R)
* trademark: (TM)
* em dash (between words): --
* ellipses: ...
* arrows: -> => <- <=
* apostrophe: Sam's
* XML entity (e.g., dagger): &#8224;

Math

Find the area under the graph of \$y = x^2\$ between \$x= 1\$ and \$x = 2\$.

\[ \int_1^2 x^2 dx = \left[ \frac{x^3}{3} \right]_1^2 = \frac{2^3}{3} - \frac{1^3}{3} = \frac{7}{3} \]

Find the area under the graph of \$y = x^2\$ between \$x= 1\$ and \$x = 2\$.

\[ \int_1^2 x^2 dx = \left[ \frac{x^3}{3} \right]_1^2 = \frac{2^3}{3} - \frac{1^3}{3} = \frac{7}{3} \]

Images

This is the image alt text.
Figure 1. Image caption
.Image caption
image::resources/picture.jpg[This is the image alt text.]

Footnotes

This is another paragraph.[1]

This is another paragraph.footnote:[This is footnote text and will be displayed at the bottom of the article.]

Headings

Second level heading

Third level heading

Fourth level heading
Fifth level heading
=== Second level heading
==== Third level heading
===== Fourth level heading
====== Fifth level heading

Lists

Unordered lists

Unordered list title
  • list item 1

    • nested list item

      • nested nested list item 1

      • nested nested list item 2

  • list item 2

.Unordered list title
* list item 1
** nested list item
*** nested nested list item 1
*** nested nested list item 2
* list item 2

Ordered lists

Ordered list title
  1. ordered list item

    1. nested ordered list item

  2. ordered list item

    1. second level list item

      1. third level list item

      2. another third level list item

      3. a final third level list item

    2. another second level list item

.Ordered list title
. ordered list item
.. nested ordered list item
. ordered list item
.. second level list item
... third level list item
... another third level list item
... a final third level list item
.. another second level list item

You can override the number scheme for any level by setting its style (the first positional entry in a block attribute list). You can also set the starting number using the start attribute:

(スタイル (ブロック属性リストの最初の位置のエントリ) を設定することで、任意のレベルの番号スキームをオーバーライドできます。また、start属性を使用して開始番号を設定することもできます。)

  1. Five

  2. Six

    1. a

    2. b

    3. c

  3. Seven

["lowerroman", start=5]
. Five
. Six
[loweralpha]
.. a
.. b
.. c
. Seven

Labelled lists

Here’s an example of a labeled list that identifies parts of a computer:

(コンピュータの部品を識別するラベル付きリストの例です。)

CPU

The brain of the computer.

Hard drive

Permanent storage for operating system and/or user files.

RAM

Temporarily stores information the CPU uses during operation.

Keyboard

Used to enter text or control items on the screen.

Mouse

Used to point to and select items on your computer screen.

Monitor

Displays information in visual form using text and graphics.

CPU:: The brain of the computer.
Hard drive:: Permanent storage for operating system and/or user files.
RAM:: Temporarily stores information the CPU uses during operation.
Keyboard:: Used to enter text or control items on the screen.
Mouse:: Used to point to and select items on your computer screen.
Monitor:: Displays information in visual form using text and graphics.
A horizontal labelled list
CPU

The brain of the computer.

Hard drive

Permanent storage for operating system and/or user files.

RAM

Temporarily stores information the CPU uses during operation.

.A horizontal labelled list
[horizontal]
CPU:: The brain of the computer.
Hard drive:: Permanent storage for operating system and/or user files.
RAM:: Temporarily stores information the CPU uses during operation.
Labelled list with bullets
Diary
  • Milk

  • Eggs

Bakery
  • Bread

Produce
  • Bananas

.Labelled list with bullets
Diary::
* Milk
* Eggs
Bakery::
* Bread
Produce::
* Bananas

Mixed lists

Mixed unordered and ordered lists
  1. Linux

    • Fedora

    • Ubuntu

    • Slackware

  2. BSD

    • FreeBSD

    • NetBSD

.Mixed unordered and ordered lists
. Linux
* Fedora
* Ubuntu
* Slackware
. BSD
* FreeBSD
* NetBSD

Here’s a list that mixes all three types of lists:

(ここでは、3種類のリストをすべて混ぜ合わせたリストを紹介します。)

Operating Systems
  1. Linux

    • Fedora

    • Ubuntu

    • Slackware

  2. BSD

    • FreeBSD

    • NetBSD

Cloud Providers
  1. PaaS

    • OpenShift

    • CloudBees

  2. IaaS

    • Amazon EC2

    • Rackspace

Operating Systems::
  . Linux
    * Fedora
    * Ubuntu
    * Slackware
  . BSD
    * FreeBSD
    * NetBSD
Cloud Providers::
  . PaaS
    * OpenShift
    * CloudBees
  . IaaS
    * Amazon EC2
    * Rackspace

+ 記号を使うことでブロックやテーブルを追加することができる。

  • The header in AsciiDoc must start with a document title.

    = Document Title

    Keep in mind that the header is optional.

  • Optional Author and Revision information immediately follows the header title.

    = Document Title
    Doc Writer <doc.writer@asciidoc.org>
    v1.0, 2013-01-01
* The header in AsciiDoc must start with a document title.
+
----
= Document Title
----
+
Keep in mind that the header is optional.

* Optional Author and Revision information immediately follows the header title.
+
----
= Document Title
Doc Writer <doc.writer@asciidoc.org>
v1.0, 2013-01-01
----

-- でブロック化するとインデントを調整できる。(Open Blocks)

  • grandparent list item

    • parent list item

      • child list item

    paragraph attached to grandparent list item

* grandparent list item
+
--
** parent list item
*** child list item
--
+
paragraph attached to grandparent list item

Blocks

Example 1. Example block title

Content in an example block is subject to normal substitutions.

.Example block title
====
Content in an example block is subject to normal substitutions.
====
Sidebar title

Sidebars contain aside text and are subject to normal substitutions.

.Sidebar title
****
Sidebars contain aside text and are subject to normal substitutions.
****
Listing block title
Content in a listing block is subject to verbatim substitutions.
Listing block content is commonly used to preserve code input.
[#id-for-listing-block]
.Listing block title
----
Content in a listing block is subject to verbatim substitutions.
Listing block content is commonly used to preserve code input.
----
code block title
public class Person {
  private String name;
  public Person(String name) {
    this.name = name;
  }
}
[source,java]
.code block title
----
public class Person {
  private String name;
  public Person(String name) {
    this.name = name;
  }
}
----
literal block title
public class Person {
  private String name;
  public Person(String name) {
    this.name = name;
  }
}
.literal block title
....
public class Person {
  private String name;
  public Person(String name) {
    this.name = name;
  }
}
....
callouts
line of code  (1) (5)
line of code  (2)
line of code  (3)
line of code  (4)
1 A callout behind a line comment for C-style languages.
2 A callout behind a line comment for Ruby, Python, Perl, etc.
3 A callout behind a line comment for Clojure.
4 A callout behind a line comment for XML or SGML languages like HTML.
5 A callout behind a line comment for C-style languages.
----
line of code  `// <1> <5>`
line of code  `# <2>`
line of code  `;; <3>`
line of code  `<!--4-->`
----
<1> A callout behind a line comment for C-style languages.
<2> A callout behind a line comment for Ruby, Python, Perl, etc.
<3> A callout behind a line comment for Clojure.
<4> A callout behind a line comment for XML or SGML languages like HTML.
<5> A callout behind a line comment for C-style languages.

Tables

Table 1. A simple table with a title
Column heading 1 Column heading 2

Column 1, row 1

Column 2, row 1

Column 1, row 2

Column 2, row 2

.A simple table with a title
|===
|Column heading 1 |Column heading 2

|Column 1, row 1
|Column 2, row 1

|Column 1, row 2
|Column 2, row 2
|===
Table 2. A table containing another nested table

\[X_nY_m\]

  • \(X\) a ante \(i\)

  • \(Y\) a ante \(j\)

Trad.

Stock.

Esteq.

====
.A table containing another nested table
[cols=".^,<.^a,>.^a"]
|===
| \[X_nY_m\]
| * \(X\) a ante \(i\)
* \(Y\) a ante \(j\)
| [cols=">.^"]
!===
! Trad. ! Stock. ! Esteq.
!===
|===
====

Quotes

This is a block quote or a prose excerpt. This is subject to normal substitutions.

— firstname lastname
movie title
[quote, firstname lastname, movie title]
____
This is a block quote or a prose excerpt.
This is subject to normal substitutions.
____

下記の書き方の場合は attribution にリンクが設定できる。

I hold it that a little rebellion now and then is a good thing, and as necessary in the political world as storms in the physical.
Thomas Jefferson
Papers of Thomas Jefferson: Volume 11
"I hold it that a little rebellion now and then is a good thing,
and as necessary in the political world as storms in the physical."
-- https://example.com/[Thomas Jefferson], Papers of Thomas Jefferson: Volume 11
This is a verse block.
  Indents and endlines are preserved in verse blocks.
— firstname lastname
poem title and more
[verse, firstname lastname, poem title and more]
____
This is a verse block.
  Indents and endlines are preserved in verse blocks.
____

Admonitions

This is a tip. There are five admonition labels: Tip, Note, Important, Caution and Warning.
This is a note.
This is important.
Caution — be careful!
This is a warning.
TIP: This is a tip. There are five admonition labels: Tip, Note, Important, Caution and Warning.

NOTE: This is a note.

IMPORTANT: This is important.

CAUTION: Caution -- be careful!

WARNING: This is a warning.

Admonition blocks

A "NOTE" type admonition

This is an example of an admonition block.

Unlike an admonition paragraph, it may contain any AsciiDoc content. The style can be any one of the admonition labels:

  • NOTE

  • TIP

  • WARNING

  • CAUTION

  • IMPORTANT

[NOTE]
.A "NOTE" type admonition
====
This is an example of an admonition block.

Unlike an admonition paragraph, it may contain any AsciiDoc content.
The style can be any one of the admonition labels:

* NOTE
* TIP
* WARNING
* CAUTION
* IMPORTANT
====

1. This is footnote text and will be displayed at the bottom of the article.