ASCIIdoc Reference

Contents

Headings

Title and subtitles

Lists

ordered and unordered lists

Attributes

bold, italics, underline, strikeout, centering text, admonition like Note

HyperLinks

link, anchor

Images

image

Math Equations

math, subscript, superscript,

Code Sections

code

Tables

table

Custom CSS

Custom (local organization) CSS

Comments

comment

Audio,Video

audio video

Attaching Files

File Attachments such as PDF, BibTex, etc.

FAQ

Frequently Asked Questions knowledgebase

More Help :

AsciiDoc implementation reference documentation

Headings

A title starts with = Title, a subtitle with == Subtitle, sub-subtitles with === message, etc.

Use :sectnums: to turn on numbered section numbers

Lists

Ordered list

Use a period to indicate the next element in an ordered list

  1. element 1

    1. element 1a

  2. element 2

  . element 1
  .. element 1a
  . element 2

If you wish to pick up at a certain index, eg. 4, add something like the following above your next period.

[start=4]

See also section headings with :sectnum: active to make ordered headings.

Unordered Lists

Use a dash or star to indicate the next element in an unordered list

eg.

  • list element

    • list sub field

  • list element 2

  * list element

   **  list sub field

  * list element 2

Bold

Use two asterisks around text to bold face it.

eg. bold

*bold*

Italics

Use underscores around text to italicize it.

eg. italics

_italics_

Underline

To underline text, do the following:

underline text

[underline]##underline text##

Strikeout

For strikeout text like this

   [line-through]#this#

Centering Text

this
a new line

[.text-center]
**
this +
a new line
**

Admonition

The capitalized words NOTE, IMPORTANT, TIP, CAUTION and WARNING can be used like this:

Note
An admonition draws the reader’s attention to auxiliary information.
Important
Don’t forget the children!
Tip
Look for the warp zone under the bridge.
Caution
Slippery when wet.
Warning
The software you’re about to use is untested.
 NOTE: Ad admonition draws attention...

or

  [NOTE}
  ----
  THis is a note.
  ----

To make a hyperlink, use:

link:https://www.google.com[sometext]
or
link:https://www.google.com#anchor[sometext]

Anchor

To make a hypertext anchor, use

[#anchor_name]

Image

First, upload the image using Manage Assets, then you can reference the image. You can leave it the default size or specify a height or width in pixels or relative percentages.

By default, the image will act like a character and will change the output line’s height. To make text wrap around the image, specify ,float=right or ,float=left as show below.

sample text
image::myimage.png[sample text]
or
image::myimage.png[sample text,width=25,float=left]

Math Equations

Math follows simple TeX formatting, eg sample equations

α=βx+γ

 [asciimath]
 --
 \alpha = \beta x + \gamma
 --

Code Samples

To include source code or text that is preformatted use

 [source]
 -----
 stuff
 -----

Subscripts

Subscripts likethis can be added with

   like~this~

SuperScripts

Superscripts likethis can be added with

   like^this^

Tables

Tables can have multiple colums and rows, and you can specify the relative widths of the columns.

For equal columns

Table 1. title of table

title1

title2

data1

data2

.title of table
[width="100%",cols="1,1"]
|=====
|title1|title2
|data1|data2
!=====

To make the second column four times as wide use

[width="100%",cols="1,4"]
|=====
|title1|title2
|data1|data2
!=====

It is possible to create a table from Comma Separated Values (CSV) data

Table 2. CSV data, 15% each column

1

2

3

4

a

b

c

d

A

B

C

D

.CSV data, 15% each column
[format="csv",width="60%",cols="4"]
[frame="topbot",grid="none"]
|======
1,2,3,4
a,b,c,d
A,B,C,D
|======

Comments

To place a comment in your file (it will not be visible to users) use

\\comment

Audio

  audio::xxx.mp4[audio];

Video

Easily attach a youtube video and set its size, eg. 300 pixels or, perhaps 100%.

youtube video
 .youtube video
 video::RvRhUHTV_8k[youtube,width=300]

Custom Local Organization CSS

It is possible to have local organization CSS for specific features. Use [ dot CSS name]. Eg. for the blackbarlist CSS use:

[.blackbarlist]##
  link:#one1[one]
  link:#two[two]
  link:#three[three]
##

or aqua text

[.aqua]##aqua## text

If you wish to use SPANs or DIVs, that is possible.

Type the word

[userinput]#asciidoc#

Which generates HTML

<span class="userinput">asciidoc</span>

Or use DIVs with dashes to delimit the extent of the text.

  [.userinput]
  --
  command1

  command2
  --

Attaching Files

Almost any type of file can be uploaded to the "Managed Assets", and then referenced by a link.

For example: If your page was titled "simpletest2" and you had uploaded *test.bib" as a managed asset, you can link to it in your document with the following ASCIIdoc code:

link:simpletest2.assets/test.bib[bibtex]

The link will not work from the GUI editor or preview, but it will work when you view the published page.

OnlineScholar always displays graphic formats (PNG, JPEG, TIFF, WebM) but downloads all other file types in Managed Assets.