Table of Contents

Welcome to OWLScribble!

An introduction to the OWLScribble markup language.

What is OWLScribble?

OWLScribble is a wiki markup language based on the markup used by OpenWiki. It was designed for use with the SewWiki project by Gavin Kistner.

Supported Markup

Paragraphs

Paragraphs start on a line of their own
and may be continued onto multiple
consecutive lines.

A double line break indicates the start
of a new paragraph.

  If the start of the text is indented at all,
  however, then it is treated as preformatted
  text.

Paragraphs start on a line of their own and may be continued onto multiple consecutive lines.

A double line break indicates the start of a new paragraph.

If the start of the text is indented at all,
however, then it is treated as preformatted
text.

Indented Paragraphs

  : An exception to the indented-paragraph rule is this.
    : Paragraphs (on a single line)
    : with whitespace preceding a colon
    : are indented based on the amount of space
  : But, as seen here, each line is its own paragraph.

An exception to the indented-paragraph rule is this.

Paragraphs (on a single line)

with whitespace preceding a colon

are indented based on the amount of space

But, as seen here, each line is its own paragraph.

Preformatted Text

   {{{
   for ( var i=0; i<10; ++i ){
     alert( 'hi!' );
   }
   }}}
for ( var i=0; i<10; ++i ){
  alert( 'hi!' );
}

To be clear about the start and end, you may specify preformatted text by wrapping it in {{{...}}} over multiple lines.

Such text is automatically unindented by the amount of indentation on the end markers.

Basic Inline Styling

This text **is bold**, this //is italic//,
and --this has been struck--.

//You can start a paragraph with an inline
style, but you cannot wrap it across lines.//

This is a @@code reference@@,
as is {{{this text}}}.

A double-exclamation point is a special
'todo' item. !!Add more examples!!

You can also ^^superscript^^ and
__subscript__ text, like H__2__O
or e^^pi*i^^.

This text is bold, this is italic, and this has been struck.

You can start a paragraph with an inline style, but you cannot wrap it across lines.

This is a code reference, as is this text.

A double-exclamation point is a special 'todo' item. TODO - Add more examples

You can also superscript and subscript text, like H2O or epi*i.

  • Unlike OpenWiki, you are not allowed to underline text. Sorry, but underlining is reserved for links in hyperlinked documents.

Headings

= Heading Level 1 =
== Heading Level 2 ==
=== Heading Level 3 ===
==== Heading Level 4 ====
===== Heading Level 5 =====
====== Heading Level 6 ======

Headings must begin at the start of the line. Markup inside headings is ignored. (For example, == My //Sweet// Heading == will not make the word italic, but will instead show the // characters in the output.)

Linking

 * Visit SiteMap, HomePage, or WhereDoIBegin to get started.
 * Visit the [[What is a Wiki?]] page if you're really lost.
 * Visit hTTp://www.google.com to find stuff on the web.
 * The [hTTp://www.microsoft.com company that shall not be named] thinks they can beat Google.
 * This page was edited by [GavinKistner the Wiki Gardener].

OWLScribble supports three styles of specifying a link:

  1. Text that looks like URLs are automatically linked. You must use a capital 'T' and lowercase letters in the protocol to get it recognized. (It's annoying, but designed to stop spam bots.) So http://www.google.com/ will not be linked, but hTTp://www.google.com will yield: www.google.com
    • Supported protocols are http, https, and ftp.
  2. WikiWords are automatically treated as links to other pages in the Wiki, and expanded out. For example, typing CapitalizedWordsScrunchedTogether produces "Capitalized Words Scrunched Together".
    • The OWLScribble class simply turns the above into the 'HTML' code: <wiki_link page="CapitalizedWordsScrunchedTogether">Capitalized Words Scrunched Together</wiki_link>. It is up to the consumer of OWLScribble to run through the #wiki_links collection and replace the above with something reasonable (such as an HTML anchor) after doing whatever it needs to do (such as a db lookup).
  3. If you want to create a wiki page whose name doesn't look like a WikiWord, you can wrap it in double-square brackets, like See the [[Table of Contents]] page.
    • Again, OWLScribble turns the above into: <wiki_link page="Table of Contents">Table of Contents</wiki_link>, leaving it up to the consumer of OWLScribble to change that tag into something better.

With either URLs or WikiWords, you can optionally use an alternative description for the link text. As shown above, place a single set of square brackets around what you want linked, with the URL or WikiWord as the first item.

Preventing Linking

Sometimes you want to write something that looks like a
~WikiWord (such as ~OpenWiki) but you don't want it to
appear as a link to a page in the wiki.

You can either wrap it in preformatted text delimiters
like @@{{{OpenWiki}}}@@, or place a tilde (~) character right
before it, as in {{{~OpenWiki}}}.

Sometimes you want to write something that looks like a WikiWord (such as OpenWiki) but you don't want it to appear as a link to a page in the wiki.

You can either wrap it in preformatted text delimiters like {{{OpenWiki}}}, or place a tilde (~) character right before it, as in ~OpenWiki.

Lists

Bulleted Lists

         1         2         3         4         5         6     
12345678901234567890123456789012345678901234567890123456789012345
  * Bullet lists need **at least one space** before the asterisk.
    * **A space** must appear after the asterisk.
      * They may be nested to an arbitrary depth.
  * Tabs may also be used for indentation.
  * Mixing tabs and spaces is asking for trouble.
  • Bullet lists need at least one space before the asterisk.
    • A space must appear after the asterisk.
      • They may be nested to an arbitrary depth.
  • Tabs may also be used for indentation.
  • Mixing tabs and spaces is asking for trouble.

Numbered Lists

         1         2         3         4         5         6     
12345678901234567890123456789012345678901234567890123456789012345
  1. Numbered lists must also have a space before the number.
  1. The actual number doesn't matter...
    3. ...but the period after the number does.
    1. As well as the space after the period.
  # You can also use the 'octothorp' if you like.
    # //(A fancy name for the 'sharp' or 'pound' symbol.)
  # Other types of numbered lists are supported beyond arabic.
    a. For arabic lists, you can use 1, 2, 3, ... 23, etc.
    a. but for the following, you must use the actual character.
    a. A lowercase 'a' is for lowercase alphabetical lists.
    A. An uppercase 'A' is for uppercase alphabetical lists.
    i. A lowercase 'i' is for lowercase roman numeral lists.
    I. An uppercase 'I' is for uppercase roman numeral lists.
  1. Numbered lists must also have a space before the number.
  2. The actual number doesn't matter...
    1. ...but the period after the number does.
    2. As well as the space after the period.
  3. You can also use the 'octothorp' if you like.
    1. (A fancy name for the 'sharp' or 'pound' symbol.)
  4. Other types of numbered lists are supported beyond arabic.
    1. For arabic lists, you can use 1, 2, 3, ... 23, etc.
    2. but for the following, you must use the actual character.
    3. A lowercase 'a' is for lowercase alphabetical lists.
    4. An uppercase 'A' is for uppercase alphabetical lists.
    5. A lowercase 'i' is for lowercase roman numeral lists.
    6. An uppercase 'I' is for uppercase roman numeral lists.

Mixing Lists

         1         2         3         4         5         
12345678901234567890123456789012345678901234567890123456789
  * Bulleted and numbered lists may be alternately nested
    1. And (as seen above)...
    i. ...you can mix numbered list styles on the fly
  * But woe unto you if you try to mix a bullet...
  1. ...and a number in the same list.
    * //Sorry buddy, but that doesn't fly.//
  • Bulleted and numbered lists may be alternately nested
    1. And (as seen above)...
    2. ...you can mix numbered list styles on the fly
  • But woe unto you if you try to mix a bullet...
  • ...and a number in the same list.
    • Sorry buddy, but that doesn't fly.

Definition Lists

         1         2         3         4         5         
12345678901234567890123456789012345678901234567890123456789
  ; Semantic : of or relating to meaning in language
  ; Grok : to understand //completely//
  ;      : to inherently and almost intuitively comprehend
Semantic
of or relating to meaning in language
Grok
to understand completely
to inherently and almost intuitively comprehend
  • Unlike OpenWiki, you cannot 'nest' or indent definition lists.

Tables

|| **Age** || **Sex** || **Weight** ||
|| 32      ||    M    ||        180 ||
|| 30 || F || 150 ||
|||| //average// || **165** ||
Age Sex Weight
32 M 180
30 F 150
average 165

You don't have to line up the bars from one row to the next, but you may if you want the text representation to look clean. As seen above, you can cause a cell to span multiple columns.

Processing Directives

A processing directive appears as a pair of pound symbols with a command inside, optionally followed by parameters to that command inside parentheses. For example:

##TableOfContents##
##IncludePage(ProcessingDirectives)##

OWLScribble currently recognizes the following directives:

Note that OWLScribble only handles the TableOfContents directive natively. The other directives are replaced with an empty non-HTML 'wiki_command' tag, such as <wiki_command do="TableOfContents" /> or <wiki_command do="IncludePage" param="CommonFooter" />. It is up to the consumer of OWLScribble to handle and/or replace such tags with meaningful information.

There are two ways to handle these tags. One way is to parse and modify the HTML produced by OWLScribble as a string. This is effective, but not recommended.

The recommended mechanism for handling processing directives is to spin through the #wiki_commands collection of the OWLScribble object after initialization, processing the commands and replacing the tags as desired. Once this is done, call the #to_s or #to_html methods on the OWLScribble instance to get the final output.

Miscellaneous

HTML entities are not needed (and do not work) inside OWLScribble; you can type "this & that" and it will produce the HTML this &amp; that, displaying as "this & that". Typing &amp; will actually show "&amp;".