Hi,

I have attached a version of Thomas Berker's cheatsheet, in asciidoc.

There are some uglies:

* uses divs, so it might be xhtml compatible only
  (not such a biggie: use the pdf for print copies)
* can't get trailing markup char correct in font examples
* the note block example is incorrect in the monospace
  (indented) form. there should be a newline between the
  para and numbered list.

and doubtless others.

If anyone can make it beautiful, please patch and share.
:-)

Cheers,
Barry.
++++
<div><div style="width:50%">
++++

[frame="all"]
`~50
AsciiDoc
Text based document generation
http://www.methods.co.nz/asciidoc/
Cheat Sheet
~~~~

.Header and Special Sections
***********
  My Title
  ========
  Your Name
  v0.1, 09 October 2006
  :author initials: YN
  :email: [EMAIL PROTECTED]
  :address: Street, ZIP, City, Country
  :releaseinfo: Draft
  :orgname: ORG Inc.
  :orgaddress: Street, ZIP, City, Country
  Special Sections
  ----------------
  Preface (book documents only)
  Abstract(article documents only)
  Dedication book documents only)
  Glossary
  Bibliography|References
  Colophon(book documents only)
  Index
  Appendix [A-Z][:.] <title>
***********

.Text Formatting
***********
_\_emphasized text__

*\*strong text**

+\+monospaced text++

\`\`quoted text''

#\#unquoted text##

[red]#[red]#Red text##

[,yellow]*[,yellow]*bold text on a yellow background**

[blue,#b0e0e6]+[blue,#b0e0e6]+Monospaced blue text on a light blue background++

[,,2]#[,,2]#Double sized text##

^^superscript^^, ~~subscript~~ (C) copyright,

(TM) trademark, (R) registered trademark,

-- em dash, ... ellipsis

forced \+ +
line break

A footnote footnote:[An example footnote.]

// This is a comment.

***********

.Admonitions
***********
NOTE, TIP, IMPORTANT, WARNING, CAUTION

 NOTE: Consul *necessitatibus* per id,
 consetetur, eu pro everti postulant
 homero verear ea mea, qui.

NOTE: Consul *necessitatibus* per id,
consetetur, eu pro everti postulant
homero verear ea mea, qui.

 [NOTE]
 .A NOTE block
 =================================
 Qui in magna commodo, est labitur
 dolorum an. Est ne magna primis
 adolescens.
 . Fusce euismod commodo velit.
 . Vivamus fringilla mi eu lacus.
  .. Fusce euismod commodo velit.
  .. Vivamus fringilla mi eu
      lacus.
 . Donec eget arcu bibendum
   nunc consequat lobortis.
 =================================

[NOTE]
.A NOTE block
=================================
Qui in magna commodo, est labitur
dolorum an. Est ne magna primis
adolescens.

. Fusce euismod commodo velit.
. Vivamus fringilla mi eu lacus.
.. Fusce euismod commodo velit.
.. Vivamus fringilla mi eu
   lacus.
. Donec eget arcu bibendum
  nunc consequat lobortis.
=================================

***********

.Callouts
***********

 .MS-DOS directory listing
 ........................................
 10/17/97   9:04 <DIR>   bin
 10/16/97  14:11 <DIR>   DOS          <1>
 10/16/97  14:25     119 AUTOEXEC.BAT <2>
 ........................................
 <1> This directory holds MS-DOS.
 <2> System startup code for DOS.

.MS-DOS directory listing
........................................
10/17/97   9:04 <DIR>   bin
10/16/97  14:11 <DIR>   DOS          <1>
10/16/97  14:25     119 AUTOEXEC.BAT <2>
.......................................
<1> This directory holds MS-DOS.
<2> System startup code for DOS.

***********

.Titles
***********

 Level 0 (top level):    ===================
 Level 1:                -------------------
 Level 2:                ~~~~~~~~~~~~~~~~~~~
 Level 3:                ^^^^^^^^^^^^^^^^^^^
 Level 4 (bottom level): +++++++++++++++++++

***********

++++
</div><div style="width:50%; position:absolute; right:0px; top:0px">
++++

.Tables
***********

 .An example table
  [grid="all"]
  '----------------.-------------------
  Column 1          Column 2
  -------------------------------------
  1                 Item 1
  2                 Item 2
  3                 Item 3
  -------------------------------------
  6                 Three items
  -------------------------------------

.An example table
[grid="all"]
'----------------.-------------------
Column 1          Column 2
-------------------------------------
1                 Item 1
2                 Item 2
3                 Item 3
-------------------------------------
6                 Three items
-------------------------------------

***********

.Blocks
***********
  .Block title
  - Note 1.
  - Note 2.
  [[block id]]
  Chapter titles can be ...
  CommentBlock:      ////////////////////
  PassthroughBlock:  ++++++++++++++++++++
  ListingBlock:      --------------------
  LiteralBlock:      ....................
  SidebarBlock:      ********************
  Filter blocks:     code~~~~~~~~~~~~~~~~
                     source~~~~~~~~~~~~~~
                     music~~~~~~~~~~~~~~~

 .Code filter
 [python]
 code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ''' A multi-line
     comment.'''
  def sub_word(mo):
     ''' Single line comment.'''
     word = mo.group('word')
 code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.Code filter
[python]
code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ''' A multi-line
     comment.'''
  def sub_word(mo):
     ''' Single line comment.'''
     word = mo.group('word')
code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 [Bertrand Russell, Mathematics (1956)]
 ______________________________________
 A good notation has subtlety and
 suggestiveness which at times makes it
 almost seem like a live teacher.
 ______________________________________

[Bertrand Russell, Mathematics (1956)]
______________________________________
A good notation has subtlety and
suggestiveness which at times makes it
almost seem like a live teacher.
______________________________________

 [caption="Example 1: "]
 .An example with a custom caption
 ======================================
 Qui in magna commodo, est labitur
 dolorum an. Est ne magna primis
 adolescens.
 ======================================

[caption="Example 1: "]
.An example with a custom caption
======================================
Qui in magna commodo, est labitur
dolorum an. Est ne magna primis
adolescens.
======================================

***********

.URLs, Images, Links
***********
[frame="none", format="dsv", separator="!"]
`85`15~
+http://www.example.com/path/ [Homepage]+   ! 
+http://www.example.com/path/[Homepage]+
+mailto:[EMAIL PROTECTED] [email Joe]+  ! +mailto:[EMAIL PROTECTED] Joe]+
+mailto:[EMAIL PROTECTED] []+           ! +mailto:[EMAIL PROTECTED]
+callto:joe.bloggs []+                      ! +callto:joe.bloggs[]+
+link:<local_target> [<caption>]+           ! +link:<local_target>[<caption>]+
+link:downloads/foo.zip [download foo.zip]+ ! +link:downloads/foo.zip[download 
foo.zip]+
+\[[an anchor]]+                            !
+image:images/logo.png [Company Logo]+      ! +image:images/logo.png[Company 
Logo]+
+image:images/logo.png ["Logo",height=32]+  ! 
+image:images/logo.png["Logo",height=32]+
+image:scr.png [height=32,link="scr.png"]+  ! 
+image:scr.png[height=32,link="scr.png"]+
~~~~

 .Image block
 [caption="Optional caption:"]
 image::images/layout.png[Alt text]

.Image block
[caption="Optional caption:"]
image::images/layout.png[Alt text]

***********

.References
***********

 We quote <<taoup>> inline.

We quote <<taoup>> inline.

 Bibliography
 ------------
 + [[[taoup]]] Eric Steven Raymond. 'The
   Art of UNIX Programming'.
   Addison-Wesley. ISBN 0-13-142901-9.
 + [[[walsh-muellner]]] Norman Walsh &
   Leonard Muellner. 'DocBook - The
   Definitive Guide'. O'Reilly &
   Associates. 1999. ISBN 1-56592-580-7.

.Bibliography
+ [[[taoup]]] Eric Steven Raymond. 'The
  Art of UNIX Programming'.
  Addison-Wesley. ISBN 0-13-142901-9.
+ [[[walsh-muellner]]] Norman Walsh &
  Leonard Muellner. 'DocBook - The
  Definitive Guide'. O'Reilly &
  Associates. 1999. ISBN 1-56592-580-7.

***********

++++
</div></div><div style="margin-right:-100px">
++++

.Invoking AsciiDoc/a2x
***********

 asciidoc [-b docbook|xhtml11|html4] [-d article|manpage|book] file.txt

 a2x -f pdf|chunked|htmlhelp|manpage|odt|text|xhtml [-d destinationpath] 
file.txt

***********

++++
</div>
++++
_______________________________________________
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss

Reply via email to