legend: keywords, user input
formatting
_italic_,
i__tali__c,
*bold*,
b**ol**d,
`monospace `,
mo``no ``space,
^superscript^,
~subscript~,
'`single quoted`',
"`double quoted`",
\*not-bold*,
[red]#styled#,
s[small]##tyle##d,
attribute
:attribute: value | {set:attribute:value}
→ {attribute} = value
:attribute!: | :!attribute: | {set:attribute!}
→ {attribute} = {}
:attribute-missing: [skip | drop | drop-line | warn]
:attribute-undefined: [drop | drop-line]
\{not-reference}
{counter:name} | {counter:name:init}
→ print ++name-value
:!name: → {}
{counter2:_name_} → ++name-value
|
title
= Document title: subtitle
:toc: [auto | preamble | left | right | macro (toc::[])]
:toc-title: text
:toclevels: [0-5]
preamble-text
== Level 1
[discrete] - no structure and TOC
== Level 1
:sectnums:
=== 1.1. Level 2
:leveloffset: +2
== 1.1.1. Level 3
:sectnumlevels: 2
== Level 3
[colophon | abstract | preface | dedication | part introduction
| appendix | glossary | bibliography | index]
== Styled level 3
:idprefix: char
:idseparator: char
:sectids:
:sectanchors:
:sectlinks:
:appendix-caption: text
|
header
= {doctitle}{title-separator} subtitle
{firstname} {middlename} {lastname} <{email}>; {firstname_2} {lastname_2} <{email_2}>
{revnumber}, {revdate}: {revremark}
{author} - {firstname} {middlename} {lastname}
{authors} - {author}, {author_2}
{authorinitials} - fml
:description:
:keywords:
:title:
:version-label:
©️
:orgname:
:docinfo:
:docinfo1:
:docinfo2:
:no-header-footer:
:noheader:
:nofooter:
:notitle:
:showtitle:
:fragment:
|
block
.title (no space after .)
[[id]]
[block-name, block-attributes]
delimeter
block-text
delimeter
delimiter |
blockname
|
////
|
comment
|
====
|
[example]
|
```
|
[listing | source]
|
----
|
[listing | source]
|
....
|
[literal]
|
--
|
open block
|
++++
|
[pass | stem]
|
____
|
[quote | verse]
|
****
|
[sidebar]
|
|===
|
table |
|
paragraph
paragraph 1
paragraph 1
:hardbreaks: | [%hardbreaks]
| paragraph 1 + paragraph 2
''' | --- | - - - | *** | * * * - hline
<<< - page break
// - comment
conditional
ifdef::variable[] | ifndef::variable[]
endif::variable[] | endif::[]
ifdef::variable[inline_text]
ifdef::first,second[] - any
ifdef::first+second[] - all
ifeval::[{sectnumlevels} > 1]
ifeval::["{backend}" == "html5"]
== != < > <= >=
|
list
[square | circle | disc | none | unstyled]
* unordered 1
** unordered 1.1
//
* unordered 2
- unordered 3
+
unordered 3 text
- [*] checked
- [x] checked
- [ ] not checked
[arabic | decimal | decimal | decimal-leading-zero |
loweralpha | lower-alpha | upperalpha | upper-alpha |
lowerroman | lower-roman | upperroman | upper-roman | lowergreek,
start=n]
. ordered
[horizontal]
term:: definition
subterm::: definition
|
table
[cols,
format=[csv | dsv | psv],
separator=['|' | '!' | char],
options=[header | footer | breakable | unbreakable | autowidth],
frame=[topbot | sides | none | all],
grid=[rows | cols | none | all],
caption, width,
align=[left | right | center],
float=[left | right]
]
|===
cell-spec|cell[1,1] cell-spec|cell[1,2]
cell-spec|cell[2,1]
cell-spec|cell[2,2]
|===
cols="3*" = "1,1,1" = "33%,33%,33%"
<^> - halign, .<^> - valign
a - asciidoc, e - emphasis, h -header, d - default
l - literal, m - monospaced, s - strong, v - verse
cell-spec: n* - repeat, n+ - colspan, .n+ - rowspan, <^>, .<^>, aehdlmsv
|
link
http, https, ftp, irc, mailto, [email protected]
link:url[text, target, role]
id=[id | external-file#id]
[[id]] | anchor:id[ref-text]
| [[id, ref-text]]
…
<<id, ref-text>> | xref:id[ref-text]
includes
include::file.txt[leveloffset=+-n,
lines=7;14..25;28..-1,
indent=n,
tags=tag1;tag2]
(# tag::tag1[] … # end::tag1[])
bibliography
<<bib-item>>.
…
[bibliography]
- [] <description>
text.footnote:[text]
text.footnoteref:[id, text]
text.footnoteref:[id]
|
image
:figure-caption: :imagesdir:
image:inline.jpg[]
image::file.jpg[alt]
image::file.jpg[caption, title, alt, width, height, link,
float=[left | right],
align=[text-left | text-right | text-center],
role=[left | right | th | thumb | related | rel],
pdfwidth, scaledwidth, scale ]
pdfwidth (pdf), scaledwidth (docbook),
scale (docbook) - n[pt(def) | px | pc | cm | mm | in | % | vw]
video and audio
video::file.mp4[title, width, height, start, end, poster, theme, lang,
options=[autoplay | loop | modest | nocontrols | nofullscreen] ]
video::rPQoq7ThGAU[youtube | vimeo]
audio::file.mp3[options=[autoplay | loop | controls | nocontrols] ]
|
quote
[quote, attribution, citation title and information]
____
quote
____
"quote"
-- attribution, citation title and information
> > quote
> quote
verse
[verse, attribution, verse title and information]
____
verse
____
|
source code
:source-highlighter: [pygments | coderay | highlightjs | prettify]
:source-language:
[source,language]
----
code <1>
----
<1> - callout (<!--1--> for xml)
```language
code // <2>
```
<2> - non-selectable (// # ;;)
admonition
admonition=[NOTE | TIP | IMPORTANT | WARNING | CAUTION]
[admonition]
text
admonition: inline-text
|
math
:stem: [latexmath | asciimath (def)]
[stem | asciimath | latexmath]
++++
math
++++
stem:[sqrt(4) = 2]
latexmath:[C = \alpha + \beta Y^{\gamma} + \epsilon]
icon
:icons: font
icon:name[size=[nx | lg | fw],
rotate=[90 | 180 | 270],
flip=[horizontal | vertical],
link, window, alt, width, height, title, role ]
|
asciidoctor-diagram
[type, generated-file-name, image-format]
....
diagram text
....
type::source-file[generated-file-name]
type=[actdiag | blockdiag | ditaa | graphviz | meme |
mermaid | nwdiag | packetdiag| plantuml | rackdiag |
seqdiag | shaape | wavedrom ]
image-format=[gif | png | svg | txt]
asciidoctor -r asciidoctor-diagram file
|
asciidoctor-pdf
:autofit-option: :pagenums: :pdfmark:
:chapter-label: Chapter
:front-cover-image: image:cover.pdf[]
:back-cover-image: image…
:media: [screen | print | prepress]
:page-background-image: image…
:pdf-page-layout: [portrait | landscape]
:pdf-page-size: [name | w x h]
:text-alignment: [left | right | center]
:title-logo-image: image…
:title-page-background-image: image…
:pdf-stylesdir:
:pdf-style:
:pdf-fontsdir:
asciidoctor-pdf file |
asciidoctor -b pdf -r asciidoctor-pdf file
|
localization
:appendix-caption:
:caution-caption:
:chapter-label:
:example-caption:
:figure-caption:
:important-caption:
:last-update-label:
:listing-caption:
:manname-title:
:note-caption:
:preface-title:
:table-caption:
:tip-caption:
:toc-title:
:untitled-label:
:version-label:
:warning-caption:
|
blank - nothing
|
empty - nothing
|
sp - space
|
nbsp -  
|
zwsp[4] - ​
|
wj[5] - ⁠
|
apos - '
|
quot - "
|
lsquo - ‘
|
rsquo - ’
|
ldquo - “
|
rdquo - ”
|
deg - °
|
plus - +
|
brvbar - ¦
|
vbar - |
|
amp - &
|
lt - <
|
gt - >
|
startsb - [
|
endsb - ]
|
caret - ^
|
asterisk - *
|
tilde - ~
|
backslash - \
|
backtick - `
|
two-colons - ::
|
two-semicolons - ;;
|
|
environment attribute
:imagesdir: ./images
:iconsdir: ./icons
:stylesdir: ./styles
:scriptsdir: ./js
{asciidoctor} {asciidoctor-version}
{backend} {basebackend}
{docdate} {docdatetime}
{docdir} {docfile}
{docname} {doctime}
{doctype} {embedded}
{filetype} {htmlsyntax}
{localdate} {localdatetime} {localtime}
{outdir} {outfile} {outfilesuffix}
{safe-mode-level} {safe-mode-name} {safe-mode-unsafe}
{safe-mode-safe} {safe-mode-server} {safe-mode-secure}
{user-home}
|
named substitution
subs=[none | normal | verbatim | specialchars | specialcharacters | quotes
| attributes | replacements | macros | post_replacements]
text replacement
(C) - ©
(R) - ®
(TM) - ™
-- - —
... - …
-> - →
=> - ⇒
<- - ←
<= - ⇐
Sam's - Sam’s
experimental
:experimental:
kbd:[F11] - keyboard image
menu:Menu[Submenu > Item]
btn:[OK] - buttons
|