Asciidoc -- Markup language --


Overview:

AsciiDoc is a text document format for writing notes, documentation, web pages, and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, man page.


Install Asciidoctor:

Windows:
  # ActiveScriptRuby Ruby MSI Packages
  https://www.artonx.org/data/asr/
  # Ruby Installer for Windows
  https://rubyinstaller.org/downloads/

  PATH=<RUBY_PATH>

  # admin
  $> gem install asciidoctor

  $> gem install --pre asciidoctor-pdf

  $> asciidoctor --version

gem install asciidoctor-pdf-cjk
gem install asciidoctor-diagram
choco install graphviz

$ gem install coderay

Notation:

Horizontal Rule

'''
---
- - -
***
* * *






Comment

// single-line

////
multi-line
////

Document Header

Document Title
====================
:author:    Fname Lname
:email:     mail@mail
:revdate:   April 1, 2001
:revnumber: 2.1.1
:imagesdir: myimages
= Document Title
Fname Lname <mail@mail>
2.1.1, April 1, 2001

Section Title

  =       Level0    // Document Title
  ==      Level1
  ===     Level2
  ====    Level3
  =====   Level4
  ======  Level5

Level1

Level2

Level3

Level4
Level5

Line Breaks

aaa
bbb

ccc

aaa bbb

ccc

aaa
bbb +
ccc

aaa bbb
ccc

[%hardbreaks]
aaa
bbb
ccc

aaa
bbb
ccc


Page Break

<<<

Unordered List

*     Level1
**    Level2
***   Level3
****  Level4
***** Level5
  • Level1

    • Level2

      • Level3

        • Level4

          • Level5

*  list1
*  list2
** list2-1
** list2-2
*  list3
  • list1

  • list2

    • list2-1

    • list2-2

  • list3

- Level1
- Level1
  • Level1

  • Level1


Ordered List

[arabic, start=2]
.     arabic
.     arabic
[loweralpha, start=4]
..    loweralpha
...   lowerroman
....  upperalpha
..... upperroman
  1. arabic

  2. arabic

    1. loweralpha

    2. loweralpha

      1. lowerroman

        1. upperalpha

          1. upperroman

.  list1
.  list2
.. list2-1
.. list2-2
  1. list1

  2. list2

    1. list2-1

    2. list2-2

[%reversed]
. aaa
. bbb
. ccc
  1. aaa

  2. bbb

  3. ccc


Checklist

- [*] checked
- [x] checked
- [ ] not checked
-     normal list item
  • ✓ checked

  • ✓ checked

  • ❏ not checked

  • normal list item


Labeled List

item1:: content
item2::
  content
item2-1::: content
item2-1-1:::: content
item3::
item4:: content
item1

content

item2

content

item2-1

content

item2-1-1

content

item3
item4

content


Hybrid List

item1::
item1-1:::
  . aaa
  * list1
  . bbb
  * list1
  * list2
item1
item1-1
  1. aaa

    • list1

  2. bbb

    • list1

    • list2


Q&A List

[qanda]
Question?:: Answer
Question?:: Answer
  1. Question?

    Answer

  2. Question?

    Answer


http://asciidoctor.org

http://asciidoctor.org[^]

link:++http://example.org/?q=[a b]++[空白を含むURL]

link:\\server\share\whitepaper.pdf[Whitepaper]

link:index.html[Documents]

devel@dicsuss.arquillian.org

http://discuss.asciidoctor.org[Asciidoctor, role="external", window="_blank"]

Admonition

[NOTE]
aaa
[TIP]
aaa
[IMPORTANT]
aaa

WARNING: aaa

CAUTION: aaa
Note
aaa
Tip
aaa
Important
aaa
Warning
aaa
Caution
aaa

Text Formatting

*bold*
**b**old
_italic_
__i__talic
`monospace`
``m``onospace

bold bold italic italic monospace monospace


Custom Styling With Attributes

#Highlight#
[.small]#small#
[.big]#big#
[.underline]#underline#
[.line-through]#line-through#
[.overline]#overline#

Highlight small big underline line-through overline


Subscript, Superscript

^Super^
~Sub~

Super Sub


Quotation Marks and Apostrophes

"`Double`", "Double"

'`Single`', 'Single'

B'z

Girls`'

“Double”, "Double"

‘Single’, 'Single'

B’z

Girls’


Include

include::file.adoc[]

include::https://url.com/file.adoc[]

Image

image::file.jpg[]

image::https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg[Tux,250,350]

.Title
[#image]
[caption="Image 1:", link=http://www.com]
image::file.jpg[image, 300, 200]
Tux
image
Image 1:Title
aaa image:https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg[Tux,250,350] bbb

aaa Tux bbb


Video

video::file.mp4[]
video::mArrNRWQEso[youtube]
video::22439234[vimeo]

Literal Block

....
aaa
aaa
*aaa*
....
aaa
aaa
*aaa*

Listing Block

.Title
----
aaa
aaa
*aaa*
----
Title
aaa
aaa
*aaa*
[source, python]
.Title
----
Source
----
Title
Source

Callouts

----
source //<1>
source #<2>
source ;;<3>
source <!--4-->
----
<1> C
<2> RubyPythonPerl
<3> Clojure
<4> XML
source (1)
source (2)
source (3)
source (4)
  1. C-style

  2. Ruby,Python,Perl,etc.

  3. Clojure

  4. XML


Source File

[source, java]
----
include::file.java[]
----

[source, java]
----
include::{sourcedir}/file.java[]
----

[source, java, indent=0]
----
include::{sourcedir}/file.java[lines=5..7]
----

:source-highlighter: pygments   // coderayhighlightjsprettifypygments

Sidebar Block

.Title
****
Text
****
Title

Text


NOTE

[NOTE]
====
AAA

.Title
- list1
- list2
- list3
====
Note

AAA

Title
  • list1

  • list2

  • list3


Quote Block

Text

— AAA
BBB

Table

.Title
|===
|COL1 |COL2 |COL3

|Cell11
|Cell12
|Cell13

|Cell21
|Cell22
|Cell23
|===
Table 1. Title
COL1 COL2 COL3

Cell11

Cell12

Cell13

Cell21

Cell22

Cell23

[cols="2*", options="header"]
|===
|COL1
|COL2

|Cell11
|Cell12

|Cell21
|Cell22
|===
COL1 COL2

Cell11

Cell12

Cell21

Cell22

[cols="1,1,2", options="header"]
.Title
|===
|COL1
|COL2
|COL3

|Cell11
|Cell12
|Cell13

|Cell21
|Cell22
|Cell23
|===
Table 2. Title
COL1 COL2 COL3

Cell11

Cell12

Cell13

Cell21

Cell22

Cell23


Column Formatting

[cols="e,m,^,>s", width="25%"]
|===
|1 >s|2 |3 |4
^|5 2.2+^.^|6 .3+<.>m|7
^|8
|9 2+>|10
|===

1

2

3

4

5

6

7

8

9

10


CSV

[format="csv", options="header"]
|===
COL1,COL2,COL3
Cell11,Cell12,Cell13
Cell21,Cell22,Cell23
|===
COL1 COL2 COL3

Cell11

Cell12

Cell13

Cell21

Cell22

Cell23

|===
include::file.csv[]
|===

Replacements

Copyright       (C)     // &#169;

Registered      (R)     // &#174;

Trademark       (TM)    // &#8482;

Em dash         --      // &#8212;

ellipses        ...     // &#8230;

single arrow R  ->      // &#8594;

double arrow R  =>      // &#8658;

single arrow L  <-      // &#8592;

double arrow L  <=      // &#8656;

Copyright ©

Registered ®

Trademark ™

Em dash  — 

ellipses …​

single arrow R →

double arrow R ⇒

single arrow L ←

double arrow L ⇐


Passthroughs

\*AAA*

pass:[*AAA*]

pass:q[<u>AAA</u>]

+++<u>AAA</u>+++

*AAA*

*AAA*

AAA

AAA


Passthrough Block

++++
*AAA*
++++
*AAA*

Open Block

[source]
--
*AAA*
--
*AAA*
[sidebar]
--
*AAA*
--

AAA


Table of Contents

:toc:
:toc: right
:toc: left

Bibliography

aaa <<AAA>> bbb <<BBB>>

[bibliography]
- [[[AAA]]] aaa. 2001.
- [[[BBB]]] bbb. 2001.

aaa [AAA] bbb [BBB]

  • [AAA] aaa. 2001.

  • [BBB] bbb. 2001.


Footnotes

aaa footnote:[AAA]
bbb footnote:uid[BBB]
ccc footnote:uid[]

aaa [1] bbb footnote:uid[BBB] ccc footnote:uid[]


1. AAA