:imagesdir: images

= Asciidoc Cheatsheet

<<<

Asciidoc is a rich text based markup language. A document written with Asciidoc can easily be converted to *HTML*, *_PDF_*, *Docbook*, *_Mobi_*, *Epub*, and *Odt* formats. This cheatsheet shows you the common features of Asciidoc Markup language. 

In order to get the source code of this example, right click on the following link and select "save target as": https://es.technikum-wien.at/openlab/openlab_wiki/wikis/asciidoc_cheatsheet.asciidoc[AsciiDoc Cheatsheet Source]

'''
 
== [underline]#Basic formats#

*Bold* , _İtalic_ , [underline]#Underscore# , To^p^ , Dow~n~

'''

== [underline]#Title levels#

There are 6 Level titles as HTML. First one is for document title.

[source,adoc]
----
= Level 1

Content ...

== Level 2

Content ...

=== Level 3

Content ...

==== Level 4

Content ...

===== Level 5

Content ...
----

'''

== [underline]#Lists#

There are ordered, unordered, checked and labeled list elements.

{empty} +

.Unordered list
* deep 1
** deep 2
*** deep 3
**** deep 4
***** deep 5
* deep 1

{empty} +

.Ordered list
. Order 1
. Order 2
.. Order 2a
.. Order 2b
. Order 3

{empty} +

.Checked list
- [*] checked
- [x] checked
- [ ] unchecked
-     normal

{empty} +

.Labeled list
Sample 1:: text text text text text text text text text text text text text text text text text text text text text text text text text text  

Sample 2:: text text text text text text text text text text text text text text text text text text text text text text text text text text

'''

== [underline]#Links#

You can use links:

http://asciidocfx.org - AsciidocFX

http://asciidocfx.org[AsciidocFX]

'''

== [underline]#Images#

You can declare images with `image::` prefix and `[]` suffix. Path may be _relative_ or _absolute_ .

=== Without caption

image::http://kodcu.com/wp/wp-content/uploads/2014/11/logo-kodcu-com5.png[]

=== With caption

image::http://kodcu.com/wp/wp-content/uploads/2014/11/logo-kodcu-com5.png[caption="Figure 1. ",title="Kodcu.com",alt="Kodcu.com"]

'''

== [underline]#Code higlighting#

You can declare inline or block based codes with Asciidoc syntax.

.Inline
Reference code like `types` or `methods` inline.

.Code block
[source,java]
----
public interface Hello {

    void hello();

}
----

You can use numbered elements named `callouts` in Asciidoc.

.Numbered code block
[source,ruby]
----
require 'sinatra' // <1>

get '/hi' do // <2>
  "Hello World!" // <3>
end
----
<1> Library import
<2> URL mapping
<3> Content for response

'''

== [underline]#Blocks#

sample sample sample sample sample sample sample sample sample sample sample sample sample sample sample sample .

=== _Sidebar_ block

.Title (optional)
****
sample sample sample samples ample sample sample sample
****

=== Example block

.Title (optional)
====
sample sample sample samples ample sample sample sample
====

ifdef::backend-html5[]
=== Passthrough block

++++
This block name is <b>Passthrough</b>. You can use HTML elements inside this block.
<br/>
<br/>
<u>sample;</u>
<br/><br/>
<ul>
    <li>sample 1</li>
    <li>sample 2</li>
    <li>sample 3</li>
</ul>
++++
endif::[]

=== Blockquotes block

.Title (optional)
[quote, Max Mustermann, SampleJ Ebook]
____
sample sample sample sample sample sample sample sample.

Sample:: sample sample sample sample sample sample sample sample sample.

sample sample sample sample sample sample sample sample sample sample sample sample sample sample sample sample sample.
____

'''

== [underline]#Warning blocks#

There are 5 types of warning blocks in Asciidoc markup language. These blocks have their own icons.

.NOTE
[NOTE]
====
Text text text text
====

.IMPORTANT
[IMPORTANT]
====
Text text text text
====

.TIP
[TIP]
====
Text text text text
====

.CAUTION
[CAUTION]
====
Text text text text
====

.WARNING
[WARNING]
====
Text text text text
====

'''

== [underline]#Tables#

With Asciidoc you can set up almost all complex table layouts.

=== A simple table

.Title (optional)
[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
|=======================

=== A complex table

.Title (optional)
|====
|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
|====

== [underline]#AsciidocFX Addons#

AsciidocFX text editor, *UML* diagrams, *mathematical complex formulas*, and *JavaFX Chart*.

Those are currently not supported by the es.technikum-wien.at git server.

The document is open to development and recommendation.

Thank you.
