At line 1 changed one line |
This page is in no way yet official. This is somewhat a sandbox for starting work on a Creole Additions page. This would have optional markup that wiki developers can choose whether they wish to implement or not. |
This page is in no way yet official. This has optional markup that wiki developers can choose whether they wish to implement or not. |
At line 3 added 2 lines |
//Please discuss the features below or new proposals on [[Talk.Creole Additions]] first!// |
|
At line 7 added 23 lines |
== Plug-in/Extension |
|
For those wiki engines which wish to support plug-ins, we recommend double angle brackets: |
|
{{{ <<CurrentTimePlugin format='yyyy.MM.dd'>> }}} |
|
Output: [{CurrentTimePlugin format='yyyy.MM.dd'}] |
|
see [[GenericExtensionElementProposal]] and [[HintsOnExtending]] |
|
== Monospace |
|
For those wiki engines which wish to support monospace, we recommend the following syntax. |
|
{{{ This is ##monospace## text. }}} |
|
Recommended XHTML: {{{ This is <tt>monospace</tt> text. }}} |
|
Output: This is {{{monospace}}} text. |
|
Comparison: |
http://www.wikimatrix.org/syntax.php?i=26 |
|
At line 43 added 2 lines |
see also [[SuperscriptAndSubscriptProposal]] |
|
At line 20 changed one line |
For those wiki engines which wish to support subscript, we recommend the following syntax. (We need to discuss which is better.) |
For those wiki engines which wish to support subscript, we recommend the following syntax. |
At line 22 removed 2 lines |
{{{ This is ~~subscripted~~ text. }}} |
or |
At line 58 added 2 lines |
see also [[SuperscriptAndSubscriptProposal]] |
|
At line 70 added 8 lines |
Using u is not a very good idea. See the reason at section Monospace. |
|
Usually underline is used to emphasis words. For that we can use ~* or ~**. In some case, we can customize it via css. For example, in Chinese, underline means the word is a name (people name, place, etc) just as first-character-Caps in English. For those wikis, we can produce this XHTML, |
|
{{{ This is <span class="name">underlined</span>. }}} |
|
We may set the class name as a variable in wiki engine, so wiki admins can write customize the class name to fit their needs in a config file/page. |
|
At line 63 changed one line |
== Monospace |
== Indented paragraphs |
At line 65 changed one line |
For those wiki engines which wish to support monospace, we recommend the following syntax. |
Indented paragraphs are paragraphs which begin with a colon or {{{>}}} sign. The |
colon must be the first character of the line. Multiple colons define |
the level of indenting. Indented paragraphs can contain styled text, |
links, spans of verbatim text, and inline extensions. |
At line 67 removed 27 lines |
{{{ This is ##monospace## text. }}} |
|
Recommended XHTML: {{{ This is <tt>monospace</tt> text. }}} |
|
Output: This is {{{monospace}}} text. |
|
Comparison: |
http://www.wikimatrix.org/syntax.php?i=28 |
|
== Plug-in |
|
For those wiki engines which wish to support plug-ins, we recommend double angle brackets: |
|
{{{ <<[{CurrentTimePlugin format='yyyy.MM.dd G \'at\' hh:mm:ss z'}]>> }}} |
|
Output: [{CurrentTimePlugin format='yyyy.MM.dd G \'at\' hh:mm:ss z'}] |
|
==Escape Character |
|
%%commentbox |
Users should be able to escape markup characters (or all non-alphanumeric characters) with a special character. It's often faster to type and more readable than using nowiki (3+3 curly braces). In order to allow spaces in front of lists, which is a quite common practice in wiki engines, it should be a escape character other than space. This way, stars, slashes and other markup characters, when found in the original text, can be easily escaped, to be rendered as themselves. [[Escape Character Reasoning|Reasoning]] |
%% |
|
It is often troublesome to use the nowiki in-line to display symbols of wiki syntax, so it would be useful to have an escape character that could be put before wiki syntax to prevent it from being interpreted. The tilde was chosen not to conflict with line breaks and because it is a very infrequently used character. It is not generally easy to type, but it will also not need to be used often, so in this sense it is also suitable. |
|
The escape character only escapes in certain combinations. This means that e.g. the tilde in this use case is displayed as tilde and not escaped. It would certainly **never** escape if followed by a space or an alphanumeric character. |
|
At line 95 changed one line |
http://stud.hs-heilbronn.de/~someone |
This is a normal paragraph. |
:This is an indented |
paragraph in two lines. |
::This is more indented. |
At line 98 changed one line |
Escape characters only trigger if you use it in combination with the occurrence of a character that has special meaning in creole and would otherwise be rendered as markup. For example if you use "tilde + equal sign as first characters in a line" it will escape the equal sign and display it as such because otherwise it would be rendered as heading. |
or |
At line 101 changed 2 lines |
=Heading |
~=Line starting with equal sign, this displays a normal tilde: ~ |
This is a normal paragraph. |
> This is an indented |
paragraph in two lines. |
>> This is more indented. |
At line 105 changed one line |
If an escape character is only used in certain combinations we have a minimum of collisions with existing markup. For example if an wiki uses tilde as normal markup, it would not collide with e.g. |
Possible XHTML (separate stylesheets or {{{<dl><dd></dd></dl>}}} also possible): |
At line 107 changed 5 lines |
{{{ |
~=This is a heading |
~this is subscript in certain wikis~ |
~~=This is a sentence with a tilde and an equal sign at the beginning... (tilde escapes itself) |
}}} |
At least MediaWiki and Oddmuse are using dl with empty or no dt to indent text. This is simple, but it's a wrong use of definition list. |
At line 113 removed 2 lines |
Here's a complete list that would cause the escape character (e.g. tilde) to trigger escaping of the following character combinations. This can be extended as need be. Note also that an escape character can be escaped by putting a space after it, since a space cannot be escaped. |
|
At line 116 changed 20 lines |
Escapes Markup Combination Constraint Example: |
============== ========================== ========= |
Bold Anywhere ~** |
Italics Anywhere ~// |
Unordered Lists Hyphen, first chars in line ~- |
Ordered Lists First chars in line ~# |
Headings Equal signs, first chars in line ~= |
Links Open Anywhere ~[[ |
Inside Links Within Links [[A pipe ~| is used within links]] |
Links Close Anywhere ~]] |
Line Breaks Anywhere ~\\ |
Horizontal Line First chars in line ~---- |
Image Open Anywhere ~{{ |
Image Close Anywhere ~}} |
Table Open First chars in line ~| this is | not a table |
Inside Tables Pipe used within a table cell | x~|y | |
Escaping Escape Anywhere ~~ |
Escaping Escape Anywhere ~<space> |
Nowiki Open First chars in line ~{{{ |
Nowiki Close First chars in line ~~}}} |
<p>This is a normal paragraph.</p> |
<div style="margin-left:2em"> |
<p>This is an indented paragraph in two lines.</p> |
<div style="margin-left:2em"> |
<p>This is more indented.</p> |
</div> |
</div> |
At line 138 changed one line |
So, for example, this markup: |
== Definition lists |
At line 140 changed 8 lines |
{{{ |
{{{ |
int main(int argc, char *argv[]) { |
if argc>0 { |
if argc<=1 { |
--argc; |
~}}} |
}}} |
Definition lists are made of two kinds of items: |
title, typically displayed in bold font, and definition, typically |
displayed indented. Titles begin with a semicolon at the beginning of |
a line. Definitions either follow the title, separated with a colon; |
or they begin on a new line beginning with a colon. |
At line 149 removed 2 lines |
will produce this result: |
|
At line 152 changed 7 lines |
<pre> |
int main(int argc, char *argv[]) { |
if argc>0 { |
if argc<=1 { |
--argc; |
~}}} |
</pre> |
; First title of definition list |
: Definition of first item. |
; Second title: Second definition |
beginning on the same line. |
At line 161 changed one line |
---- |
Recommended XHTML: |
At line 163 removed one line |
Creole: |
At line 165 changed one line |
Some examples of markup are: {{{** <i>this</i> ** ~}}} |
<dl> |
<dt>First title of definition list</dt> |
<dd>Definition of first item.</dd> |
<dt>Second title</dt> |
<dd>Second definition beginning on the same line.</dd> |
</dl> |
At line 167 removed 9 lines |
|
Recommended XHTML: |
{{{ |
Some examples of markup are: <tt>** <i>this</i> **</tt> |
}}} |
|
Sample output: |
|
Some examples of markup are: {{{** <i>this</i> **}}} |