Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/powerman/asciidoc-cheatsheet
Asciidoc cheatsheet for GitHub
https://github.com/powerman/asciidoc-cheatsheet
asciidoc asciidoctor cheatsheet gist github wiki
Last synced: 4 days ago
JSON representation
Asciidoc cheatsheet for GitHub
- Host: GitHub
- URL: https://github.com/powerman/asciidoc-cheatsheet
- Owner: powerman
- Created: 2015-04-22T17:06:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-16T15:57:40.000Z (almost 6 years ago)
- Last Synced: 2024-08-07T18:42:50.506Z (3 months ago)
- Topics: asciidoc, asciidoctor, cheatsheet, gist, github, wiki
- Language: Perl
- Size: 61.5 KB
- Stars: 145
- Watchers: 11
- Forks: 60
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
Asciidoc cheatsheet for GitHub
==============================
:toc:
:toc-placement: preamble
:toclevels: 1
:Some attr: Some value// Need some preamble to get TOC:
{empty}== GitHub limitations
This cheatsheet contains small part of Asciidoc markup which works and
looks fine on GitHub. There is also link:full.adoc[full cheatsheet], but
for now it's main use is to show bugs, design issues, GitHub limitations
and other differences from http://powerman.name/doc/asciidoc[how Asciidoc
cheatsheet should really looks like].GitHub Wiki has own limitations, check
https://github.com/powerman/asciidoc-cheatsheet/wiki[this cheatsheet in wiki]. +
GitHub Gist has own limitations, check
https://gist.github.com/powerman/d56b2675dfed38deb298[this cheatsheet in gist].You can try these browser add-ons to fix some issues:
- https://github.com/powerman/userjs-github-asciidoc[UserJS for GitHub: fix Asciidoc rendering]
- https://userstyles.org/styles/113008/github-compact-markdown-asciidoc-lists[UserCSS for GitHub: compact Markdown/Asciidoc lists]== Attributes
----
// Header of this document:Asciidoc cheatsheet for GitHub
==============================
:toc:
:toc-placement: preamble
:toclevels: 1
:Some attr: Some value// Need some preamble to get TOC:
{empty}
----++++
++++
++++
++++
....
Some attr's value is {someattr}.
Escaped: \{someattr} and +++{someattr}+++.
....++++
++++
Some attr's value is {someattr}.
Escaped: \{someattr} and +++{someattr}+++.++++
++++
++++
++++
== Section titles
++++
++++
++++
++++
....
== Level 1
Text.=== Level 2
Text.==== Level 3
Text.===== Level 4
Text.....
++++
++++
== Level 1
Text.=== Level 2
Text.==== Level 3
Text.===== Level 4
Text.++++
++++
++++
++++
== Paragraphs
++++
++++
++++
++++
....
.Optional Title
Usual
paragraph.Second paragraph.
....++++
++++
.Optional Title
Usual
paragraph.Second paragraph.
++++
++++
++++
++++
....
.Optional TitleLiteral paragraph.
Must be indented.....
++++
++++
.Optional Title
Literal paragraph.
Must be indented.++++
++++
++++
++++
....
.Optional Title
[source,perl]
die 'connect: '.$dbh->errstr;Not a code in next paragraph.
....++++
++++
.Optional Title
[source,perl]
die 'connect: '.$dbh->errstr;Not a code in next paragraph.
++++
++++
++++
++++
....
.Optional Title
NOTE: This is an example
single-paragraph note.
....++++
++++
.Optional Title
NOTE: This is an example
single-paragraph note.++++
++++
++++
++++
....
.Optional Title
[NOTE]
This is an example
single-paragraph note.
....++++
++++
.Optional Title
[NOTE]
This is an example
single-paragraph note.++++
++++
++++
++++
....
TIP: Some tip text.IMPORTANT: Some important text.
WARNING: Some warning text.
CAUTION: Some caution text.
....++++
++++
TIP: Some tip text.
IMPORTANT: Some important text.
WARNING: Some warning text.
CAUTION: Some caution text.
++++
++++
++++
++++
== Blocks
++++
++++
++++
++++
....
.Optional Title
----
*Listing* BlockUse: code or file listings
----
....++++
++++
.Optional Title
----
*Listing* BlockUse: code or file listings
----++++
++++
++++
++++
....
.Optional Title
[source,perl]
----
# *Source* block
# Use: highlight code listings
use DBI;my $dbh = DBI->connect('...',$u,$p)
or die "connect: $dbh->errstr";
----
....++++
++++
.Optional Title
[source,perl]
----
# *Source* block
# Use: highlight code listings
use DBI;my $dbh = DBI->connect('...',$u,$p)
or die "connect: $dbh->errstr";
----++++
++++
++++
++++
....
.Optional Title
[NOTE]
====
*NOTE* BlockUse: multi-paragraph notes.
====
....++++
++++
.Optional Title
[NOTE]
====
*NOTE* BlockUse: multi-paragraph notes.
====++++
++++
++++
++++
....
.Optional Title
[quote, cite author, cite source]
____
*Quote* BlockUse: cite somebody
____
....++++
++++
.Optional Title
[quote, cite author, cite source]
____
*Quote* BlockUse: cite somebody
____++++
++++
++++
++++
....
////
*Comment* blockUse: hide comments
////
....++++
++++
////
*Comment* blockUse: hide comments
////++++
++++
++++
++++
....
++++
*Passthrough* Block
Use: GitHub-restricted subset of HTML markup
12++++
....++++
++++
++++
*Passthrough* Block
Use: GitHub-restricted subset of HTML markup
12++++
++++
++++
++++
++++
....
.Optional Title
....
*Literal* BlockUse: workaround when literal
paragraph (indented) like
1. First.
2. Second.
incorrectly processed as list.
....
....++++
++++
.Optional Title
....
*Literal* BlockUse: workaround when literal
paragraph (indented) like
1. First.
2. Second.
incorrectly processed as list.
....++++
++++
++++
++++
== Text
++++
++++
++++
++++
....
forced +
line break
....++++
++++
forced +
line break++++
++++
++++
++++
....
normal, 'italic', _italic_, *bold*.+mono *bold*+, `mono pass thru *bold*`
``double quoted'', `single quoted'.
normal, ^super^, ~sub~.
....++++
++++
normal, 'italic', _italic_, *bold*.
+mono *bold*+, `mono pass thru *bold*`
``double quoted'', `single quoted'.
normal, ^super^, ~sub~.
++++
++++
++++
++++
....
Chars: n__i__**b**++m++n
....++++
++++
Chars: n__i__**b**++m++n
++++
++++
++++
++++
....
// Comment
....++++
++++
// Comment
++++
++++
++++
++++
....
(C) (R) (TM) -- ... -> <- => <= ¶
....++++
++++
(C) (R) (TM) -- ... -> <- => <= ¶
++++
++++
++++
++++
....
''''
....++++
++++
''''
++++
++++
++++
++++
....
Escaped:
\_italic_, +++_italic_+++,
t\__e__st, +++t__e__st+++,
\¶
....++++
++++
Escaped:
\_italic_, +++_italic_+++,
t\__e__st, +++t__e__st+++,
\¶++++
++++
++++
++++
== Macros: links, images
++++
++++
If you'll need to use space in url/path you should replace it with %20.
++++
++++
....
[[anchor-1]]
Paragraph or block 1.<>,
<>,
xref:anchor-1[],
xref:anchor-1[First anchor].
....++++
++++
[[anchor-1]]
Paragraph or block 1.<>,
<>,
xref:anchor-1[],
xref:anchor-1[First anchor].++++
++++
++++
++++
....
link:README.adoc[This document]
link:/README.adoc[]
....++++
++++
link:README.adoc[This document]
link:/README.adoc[]++++
++++
++++
++++
....
http://google.com
http://google.com[Google Search]
mailto:root@localhost[email admin]
....++++
++++
http://google.com
http://google.com[Google Search]
mailto:root@localhost[email admin]++++
++++
++++
++++
....
First home
image:images/icons/home.png[]
, second home
image:images/icons/home.png[Alt text]
..Block image
image::images/icons/home.png[]
image::images/icons/home.png[Alt text].Thumbnail linked to full image
image:/images/font/640-screen2.gif[
"My screenshot",width=128,
link="/images/font/640-screen2.gif"]
....++++
++++
First home
image:images/icons/home.png[]
, second home
image:images/icons/home.png[Alt text]
..Block image
image::images/icons/home.png[]
image::images/icons/home.png[Alt text].Thumbnail linked to full image
image:/images/font/640-screen2.gif[
"My screenshot",width=128,
link="/images/font/640-screen2.gif"]++++
++++
++++
++++
== Lists
++++
++++
++++
++++
....
.Bulleted
* bullet
* bullet
- bullet
- bullet
* bullet
** bullet
** bullet
*** bullet
*** bullet
**** bullet
**** bullet
***** bullet
***** bullet
**** bullet
*** bullet
** bullet
* bullet
....++++
++++
.Bulleted
* bullet
* bullet
- bullet
- bullet
* bullet
** bullet
** bullet
*** bullet
*** bullet
**** bullet
**** bullet
***** bullet
***** bullet
**** bullet
*** bullet
** bullet
* bullet++++
++++
++++
++++
....
.Bulleted 2
- bullet
* bullet
** bullet
*** bullet
....++++
++++
.Bulleted 2
- bullet
* bullet
** bullet
*** bullet++++
++++
++++
++++
....
.Ordered
. number
. number
.. lower roman
.. lower roman
. number
.. lower roman
.. lower roman
... lower alpha
... lower alpha
.... lower alpha
.... lower alpha
..... lower alpha
..... lower alpha
.... lower alpha
... lower alpha
.. lower roman
. number
....++++
++++
.Ordered
. number
. number
.. lower roman
.. lower roman
. number
.. lower roman
.. lower roman
... lower alpha
... lower alpha
.... lower alpha
.... lower alpha
..... lower alpha
..... lower alpha
.... lower alpha
... lower alpha
.. lower roman
. number++++
++++
++++
++++
....
.Ordered 2
a. lower alpha
b. lower alpha
.. lower roman
.. lower roman
. lower alpha
. lower alpha
1. lower alpha
2. lower alpha
3. lower alpha
4. lower alpha
. lower alpha
.. lower roman
c. lower alpha
....++++
++++
.Ordered 2
a. lower alpha
b. lower alpha
.. lower roman
.. lower roman
. lower alpha
. lower alpha
1. lower alpha
2. lower alpha
3. lower alpha
4. lower alpha
. lower alpha
.. lower roman
c. lower alpha++++
++++
++++
++++
....
.Labeled
Term 1::
Definition 1
Term 2::
Definition 2
Term 2.1;;
Definition 2.1
Term 2.2;;
Definition 2.2
Term 3::
Definition 3
Term 4:: Definition 4
Term 4.1::: Definition 4.1
Term 4.2::: Definition 4.2
Term 4.2.1:::: Definition 4.2.1
Term 4.2.2:::: Definition 4.2.2
Term 4.3::: Definition 4.3
Term 5:: Definition 5
....++++
++++
.Labeled
Term 1::
Definition 1
Term 2::
Definition 2
Term 2.1;;
Definition 2.1
Term 2.2;;
Definition 2.2
Term 3::
Definition 3
Term 4:: Definition 4
Term 4.1::: Definition 4.1
Term 4.2::: Definition 4.2
Term 4.2.1:::: Definition 4.2.1
Term 4.2.2:::: Definition 4.2.2
Term 4.3::: Definition 4.3
Term 5:: Definition 5++++
++++
++++
++++
....
.Labeled 2
Term 1;;
Definition 1
Term 1.1::
Definition 1.1
....++++
++++
.Labeled 2
Term 1;;
Definition 1
Term 1.1::
Definition 1.1++++
++++
++++
++++
....
[horizontal]
.Labeled horizontal
Term 1:: Definition 1
Term 2:: Definition 2Term 3::
Definition 3Term 4:: Definition 4
....++++
++++
[horizontal]
.Labeled horizontal
Term 1:: Definition 1
Term 2:: Definition 2Term 3::
Definition 3Term 4:: Definition 4
++++
++++
++++
++++
....
[qanda]
.Q&A
Question 1::
Answer 1
Question 2:: Answer 2
....++++
++++
[qanda]
.Q&A
Question 1::
Answer 1
Question 2:: Answer 2++++
++++
++++
++++
....
.Break two lists
. number
. numberIndependent paragraph break list.
. number
.Header break list too
. number--
. List block define list boundary too
. number
. number
--. number
. number
....++++
++++
.Break two lists
. number
. numberIndependent paragraph break list.
. number
.Header break list too
. number--
. List block define list boundary too
. number
. number
--. number
. number++++
++++
++++
++++
....
.Continuation
- bullet
continuation
. number
continuation
* bulletliteral continuation
.. letter
+
Non-literal continuation.
+
----
any block can beincluded in list
----
+
Last continuation.
....++++
++++
.Continuation
- bullet
continuation
. number
continuation
* bulletliteral continuation
.. letter
+
Non-literal continuation.
+
----
any block can beincluded in list
----
+
Last continuation.++++
++++
++++
++++
....
.List block allow sublist inclusion
- bullet
* bullet
+
--
- bullet
* bullet
--
* bullet
- bullet
. number
.. lower alpha
+
--
. number
.. lower alpha
--
.. lower alpha
. number
....++++
++++
.List block allow sublist inclusion
- bullet
* bullet
+
--
- bullet
* bullet
--
* bullet
- bullet
. number
.. lower alpha
+
--
. number
.. lower alpha
--
.. lower alpha
. number++++
++++
++++
++++
== Tables
++++
++++
++++
++++
....
.An example table
[options="header,footer"]
|=======================
|Col 1|Col 2 |Col 3
|1 |Item 1 |a
|2 |Item 2 |b
|3 |Item 3 |c
|6 |Three items|d
|=======================
....++++
++++
.An example table
[options="header,footer"]
|=======================
|Col 1|Col 2 |Col 3
|1 |Item 1 |a
|2 |Item 2 |b
|3 |Item 3 |c
|6 |Three items|d
|=======================++++
++++
++++
++++
....
.CSV data
[format="csv",cols="4"]
|======
1,2,3,4
a,b,c,d
A,B,C,D
|======
....++++
++++
.CSV data
[format="csv",cols="4"]
|======
1,2,3,4
a,b,c,d
A,B,C,D
|======++++
++++
++++
++++
....
[format="csv"]
[options="header",cols=",,s,,m"]
|===========================
ID,FName,LName,Address,Phone
1,Vasya,Pupkin,London,+123
2,X,Y,"A,B",45678
|===========================
....++++
++++
// Table column align doesn't work.
[format="csv"]
[options="header",cols=",,s,,m"]
|===========================
ID,FName,LName,Address,Phone
1,Vasya,Pupkin,London,+123
2,X,Y,"A,B",45678
|===========================++++
++++
++++
++++
....
.Multiline cells, row/col span
|====
|Date |Duration |Avg HR |Notes|22-Aug-08 .2+^.^|10:24 | 157 |
Worked out MSHR (max sustainable
heart rate) by going hard
for this interval.|22-Aug-08 | 152 |
Back-to-back with previous interval.|24-Aug-08 3+^|none
|====
....++++
++++
.Multiline cells, row/col span
|====
|Date |Duration |Avg HR |Notes|22-Aug-08 .2+^.^|10:24 | 157 |
Worked out MSHR (max sustainable
heart rate) by going hard
for this interval.|22-Aug-08 | 152 |
Back-to-back with previous interval.|24-Aug-08 3+^|none
|====
++++
++++
++++
++++