| Bold | Italic | Strikethrough | Underline |
| Superscript | Subscript | Comments | Inline styling |
| Links | Images | HTML-markup | NoWiki |
| Inline code | Block code | Block-Indent | Line-Indent |
| Lists | Headings | Definitions | Tables |
| Markup | '' ... '' |
|---|---|
| Example | here is ''bold text'' |
| Result | here is bold text |
| Markup | /% ... %/ |
|---|---|
| Example | /% A comment produces no output %/ |
| Result | |
| Caveats | Comments are not allowed to nest. |
| Markup | /*** ... ***/ |
|---|---|
| Example | /*** The comment markers are removed. Inner text ''is'' //processed// __normally__. ***/ |
| Result | The comment markers are removed. Inner text is processed normally. |
| Caveats | Comments are not allowed to nest. |
| Markup | <!--- ... ---> |
|---|---|
| Example | <!--- The comment markers are removed. Inner text ''is'' //processed// __normally__. ---> |
| Result | The comment markers are removed. Inner text is processed normally. |
| Caveats | Comments are not allowed to nest. |
| Markup | {{class{ ... }}} |
|---|---|
| Example | Here is {{grayout{grayed-out text}}} with CSS |
| Result | Here is grayed-out text with CSS |
| Markup | @@styles; ... |
|---|---|
| Example | @@color: green; font-style: italic; hello world@@ |
| Result | hello world |
| Caveats | Not available in Safe Mode |
| Markup | @@color(color): ... @@ |
|---|---|
| Example | testing @@color(green): green text@@ |
| Result | testing green text |
| Caveats | Not available in Safe Mode |
| Markup | @@bgcolor(color): ... @@ |
|---|---|
| Example | testing @@bgcolor(yellow): yellow background@@ |
| Caveats | Not available in Safe Mode |
| Result | testing yellow background |
| Markup | [[Link Text|URL]] |
|---|---|
| Example | Here is a [[link to wikklytext.com|http://wikklytext.com]] |
| Result | Here is a link to wikklytext.com |
| Markup | http:// ..., file:/// ..., ftp:// ..., etc. |
|---|---|
| Example | http://boodebr.org/python, mailto:nobody@nowhere.com |
| Result | http://boodebr.org/python, mailto:nobody@nowhere.com |
| Markup | [img[file][URL]] |
|---|---|
| Example | [img[css/img_link_www.png][http://wikklytext.com]] |
| Result | ![]() |
| Markup | <html> ... </html> |
|---|---|
| Example | <html>Raw <b>HTML</b>, all <i>wiki markup</i> {{{ is }}} ignored}}</html> |
| Result | Raw HTML, all wiki markup {{{ is }}} ignored}} |
| Caveats | HTML blocks are not allowed to nest. This markup is not available in Safe Mode. |
| Markup | <nowiki> ... </nowiki> |
|---|---|
| Example | <nowiki><nowiki>, ignores <b>all</b>   //markup//</nowiki> |
| Result | <nowiki>, ignores <b>all</b>   //markup// |
| Caveats | nowiki blocks are not allowed to nest. |
| Markup | <br> or <br/> |
|---|---|
| Example | Here is a<br>break and<br/>another break |
| Result | Here is a break and another break |
| Markup | -- |
|---|---|
| Example | And then -- eureka! |
| Result | And then — eureka! |
| Markup | ---- (On a line by itself.) |
|---|---|
| Example | ---- |
| Result | |
| Markup | &ENTITY;, &NNN;, &#xHH |
|---|---|
| Example | Π <br> 1 + 2 = 3 |
| Result | Π 1 + 2 = 3 |
| Markup | . (On a line by itself.) |
|---|---|
| Example | . |
| Result |
| Markup | ​ |
|---|---|
| Example | Hel​lo Wo​rld |
| Result | Hello World |
| Markup | {{{ ... }}} |
|---|---|
| Example | Here is an {{{inline code}}} sample |
| Result | Here is an inline code sample |
| Caveats | Code blocks are not allowed to nest. |
| Markup | {{{ ... ... }}} |
|---|---|
| Example | {{{ for i in range(20): print i print i*10 }}} |
| Result | for i in range(20): print i print i*10 |
| Caveats | Code blocks are not allowed to nest. |
| Markup | /*{{{*/ ... ... /*}}}*/ |
|---|---|
| Example | /*{{{*/ Here is a block of code. /*}}}*/ |
| Result | Here is a block of code. |
| Caveats | Code blocks are not allowed to nest. |
| Markup | //{{{ ... ... //}}} |
|---|---|
| Example | //{{{ Here is a block of code. //}}} |
| Result | Here is a block of code. |
| Caveats | Code blocks are not allowed to nest. |
| Markup | <!--{{{--> ... ... <!--}}}--> |
|---|---|
| Example | <!--{{{--> Here is a block of code. <!--}}}--> |
| Result | Here is a block of code. |
| Caveats | Code blocks are not allowed to nest. |
| Markup | <<< ... <<< |
|---|---|
| Example | <<< A block-ident indents the inner wiki text, preserving all other formatting. For example, here is a list: * One * Two ** Two.A ** Two.B * Three <<< |
| Result | A block-ident indents the inner wiki text, preserving all other formatting. For example, here is a list:
|
| Markup | > ... >> ... >>> ... > ... |
|---|---|
| Example | > Level one<br> > here >> Level two<br> >> here >>> Level three<br> >>> here > Level one<br> > here |
| Result | Level one here Level two Level onehere Level three here here |
| Markup | # ... 1st level ... ## ... 2nd level ... ### ... 3rd level ... |
|---|---|
| Example | /% Leading spaces are optional %/ # Item One ## Item Two ### Item three # Item Four |
| Result |
|
| Markup | * ... 1st level ... ** ... 2nd level ... *** ... 3rd level ... |
|---|---|
| Example | /% Leading spaces are optional %/ * Item One ** Item Two *** Item three * Item Four |
| Result |
|
| Markup | !1st level !!2nd level !!!3rd level |
|---|---|
| Example | !Heading, level 1 !!Heading, level 2 !!!Heading, level 3 !!!!Heading, level 4 !!!!!Heading, level 5 !!!!!!Heading, level 6 |
| Result | Heading, level 1Heading, level 2Heading, level 3Heading, level 4Heading, level 5Heading, level 6 |
| Markup | ;Term :Definition |
|---|---|
| Example | ;Term 1 :This is the definition of Term 1 ;Term 2 :This is the definition of Term 2 |
| Result |
|
| a | b | c |
|---|---|---|
| d | e | f |
| g | h | i |
| a | b | c |
|---|---|---|
| d | colspan=2 | |
| g | h | i |
| a | b | c |
|---|---|---|
| d | rowspan=3 | f |
| g | i | |
| j | l |
| aaaaaaaa | bbbbbbbb | ccccccccc |
|---|---|---|
| d | e | f |
| g | h | i |
| a | b | c |
| yellow here | red here | |
| bold white on green by mixing styles | ||
| aaaaaaaaaaaaaaaaaaa | bbbbbbbbbbbbbbbbb | cccccccccccccccccccc |
| left header | center header | |
|---|---|---|
| right header | center header | |
| left text | center text | right text |
| left text | ||
| left text | center text | right text |
| left text | ||
| Markup | <<macroname arg1 arg2 ...>> |
|---|---|
| Example | <<echos aaa "bbb" 'ccc' """ddd""" '''eee''' <quote>"fff"</quote>>> |
| Result | aaa bbb ccc ddd eee "fff" |
| Element, SubElement | From ElementTree |
|---|---|
| Text | Convenience to make a <Text> node. Usage: Text("some text") |
| WikError | If you need to raise an Exception, use this type. |
| FS_CWD | The (physical) location of your wikitext. If you need to open a file relative to your wikitext location, do: open(os.path.join(FS_CWD,filename), ...) |
| Item | TiddlyWiki | WikklyText |
|---|---|---|
| Allows leading spaces in listitems * # ; : | NO | YES1 |
| Allows leading spaces in separators ---- | NO | YES1 |
| Allows leading spaces in bgcolor() | NO | YES2 |
| Allow extra spaces inside @@ .. @@ | NO | YES2 |
| Allows full markup in links | NO | YES |
| Effect of a single linebreak character | Breaks paragraph | Paragraph continues flowing until double linebreak3 Use <<set $REFLOW 0>> to get TiddlyWiki behavior |
| Maximum header depth | 5; extra "!" chars are shown | 6; extra "!" chars are hidden4 |
| WikiWords are automatic links | YES | YES |
| Anchors within document | NO | YES5 |
| Output Formats | TiddlyWiki All-in-one self-contained wiki | XML, HTML, Drupal plugin, or standalone Wiki Modular library useful in any number of situations, plus a wiki server. |
| Image float left/right | YES | NO9 |
| In tables: Classes, THEAD, TFOOT | YES | NO9 Use {{class{ to set styles for tables and elements. |
| Macros | ||
| Macro language | Javascript | Python |
| How macros work ... | Create DOM elements directly in wiki | Return etree.Elements or strings (that are reparsed for wiki content) |
| Arg quoting | unquoted, ', " | unquoted, ', ", ''', """, <quote> .. </quote>6 |
| Arg: "aaa"bbb'ccc' | Two args (aaa and bbb'ccc') | One arg (aaabbbccc) Auto-concatenation of adjacent strings7 |
| Nested macro calls? | PARTIAL10 | YES8 |
| Thread-safe storage for data persistence across macro calls? | NO | YES |
| Python/C style escapes in argument strings? | NO | YES |
| Usage | <<closeAll>> |
|---|---|
| Description | This only exists for compatibility with TiddlyWiki texts. It does not do anything. |
| Example | <<closeAll>> |
| Result |
| Usage | <<codebox title arg [arg ...]>> |
|---|---|
| Description | Like a regular code box, except with a title. |
| Example | <<codebox "A Title" ''' for i in range(10): print i'''>> |
| Result | A Title for i in range(10): print i |
| Usage | <<debug arg arg ...>> |
|---|---|
| Description | Prints arguments to stdout - does not become part of document. |
| Example | No example, to prevent console noise. |
| Result |
| Usage | <<div class style id text>> |
|---|---|
| Description | Create a block element (like <div>). |
| Example | <<div "foo" "color:green; border: 1px solid red;" "baz" "I am //italic// here">> |
| Result | I am italic here |
| Notes | Generally speaking, this is meant to be used to create empty elements that are subsequently populated via Javascript. However, the text argument will be evaluated as wikitext so you can insert content directly, if desired. Use an empty string to leave an attribute undefined. |
| Usage | <<echo arg arg ...>> |
|---|---|
| Description | Echo back input arguments. Arguments are wikified just as if they were inline. |
| Example | <<echo "//Hello//-" world '''-__macro__'''>> |
| Result | Hello-world-macro |
| Usage | <<echos arg arg ...>> |
|---|---|
| Description | Like echo but adds a space between arguments. |
| Example | <<echos "AAA" BBB '''CCC'''>> |
| Result | AAA BBB CCC |
| Usage | <<get name>> |
|---|---|
| Description | Get the wikitext stored in the named variable (from an earlier call to <<set>>). |
| Example | <<set TestVar "Some __text__ ''here''">> <<get TestVar>> |
| Result | Some text here |
| Usage | <<help>> |
|---|---|
| Description | Generates this help text. |
| Example | <<help>> |
| Result | You're looking at it! |
| Usage | <<if_full_mode arg arg ...>> |
|---|---|
| Description | If running in Full Mode, return wikified args, else return nothing. |
| Example | <<if_full_mode "Hello ''Full Mode''">> |
| Result | Hello Full Mode |
| Usage | <<if_safe_mode arg arg ...>> |
|---|---|
| Description | If running in Safe Mode, return wikified args, else return nothing. |
| Example | <<if_safe_mode "Hello ''Safe Mode''">> |
| Result |
| Usage | <<include filename>> |
|---|---|
| Description | Include the entire contents of a file (contents will be parsed as wiki text). The included file is allowed to have a different text encoding than the current file. |
| Example | ''An ASCII encoded file:'' <<include "doc/mbsamples/english.txt">> ''An ISO-8859-7 (Greek) encoded file:'' <<include "doc/mbsamples/greek.txt">> |
| Result | An ASCII encoded file: English (ASCII): Hello world! An ISO-8859-7 (Greek) encoded file: Greek (ISO-8859-7): Γεια σου, κόσμε! |
| Usage | <<include_pyfunc filename title>> |
|---|---|
| Description | Include a file as a block of code (as if it were included inside {{{ .. }}}). Searches in sys.path and '.' if absolute path not given. title is the title for the box. If not given it defaults to filename. |
| Example | <<include_code doc/sample.py>> |
| Result | ERROR - No such file or resource "doc/sample.py" |
| Usage | <<include_pyfunc modulename funcname title>> |
|---|---|
| Description | Include the source code for a single Python function from the named module. Module must be in sys.path or '.'. title is the title for the box. If not given it defaults to modulename.funcname(). |
| Example | <<include_pyfunc atexit register>> |
| Result | atexit.register() def register(func, *targs, **kargs): """register a function to be executed upon normal program termination func - function to be called at exit targs - optional arguments to pass to func kargs - optional keyword arguments to pass to func """ _exithandlers.append((func, targs, kargs)) |
| Usage | <<include_pymod modulename title>> |
|---|---|
| Description | Include the source code for a Python module. Module must be in sys.path or '.'. title is the title for the box. If not given it defaults to modulename. |
| Example | <<include_pymod statvfs "A Title">> |
| Result | A Title """Constants for interpreting the results of os.statvfs() and os.fstatvfs().""" # Indices for statvfs struct members in the tuple returned by # os.statvfs() and os.fstatvfs(). F_BSIZE = 0 # Preferred file system block size F_FRSIZE = 1 # Fundamental file system block size F_BLOCKS = 2 # Total number of file system blocks (FRSIZE) F_BFREE = 3 # Total number of free blocks F_BAVAIL = 4 # Free blocks available to non-superuser F_FILES = 5 # Total number of file nodes F_FFREE = 6 # Total number of free file nodes F_FAVAIL = 7 # Free nodes available to non-superuser F_FLAG = 8 # Flags (see your local statvfs man page) F_NAMEMAX = 9 # Maximum file name length |
| Usage | <<indent arg arg ...>> |
|---|---|
| Description | Do a block indent, preserving all other formatting. Functionally, this is the same as: {{indent{ ... }}} ... but sometimes a macro is more convenient. |
| Example | Next line<br><<indent 'is indented'>> |
| Result | Next line is indented |
| Example | <<info "Hello title" Hello " " content>> |
|---|---|
| Result | Hello title Hello content |
| Usage | <<infobox title content [...]>> <<infobox content>> |
|---|---|
| Description | First form: Create an information box with a title. Second form: Create a box with no title. |
| Example | <<infobox "A Title" AA BB CC " and //italic text//">> <<infobox "This box has no title and uses a ''different'' __style__.">> |
| Result | A Title AABBCC and italic text This box has no title and uses a different style. |
| Usage | <<note text>> |
|---|---|
| Description | Create a simple note box without a title. |
| Example | <<note "Here is a note with //italic text// and ''bold text''.">> |
| Result | Here is a note with italic text and bold text. |
| Usage | <<py_add_path path>> |
|---|---|
| Description | Add the given path to sys.path. This is useful when you want to use include_code, include_pyfunc or include_pymod on a module in an arbitrary location. |
| Example | <<set TestVar "Some __text__ ''here''">> |
| Result | No return value. |
| Usage | <<set name arg arg ... >> |
|---|---|
| Description | Create a named variable containing the given wiki text. The text is evaluated (just as if it was inline) and stored. It can be retrieved later with get(). NOTE: Names beginning with $ are reserved for system use. |
| Example | <<set TestVar "Some __text__ ''here''">> |
| Result | No return value. |
| Usage | <<span class style id text>> |
|---|---|
| Description | Create an inline element (like <span>). |
| Example | <<span "foo" "color:red; font-weight: bold;" "baz" "I am //italic// here">> |
| Result | I am italic here |
| Notes | Generally speaking, this is meant to be used to create empty elements that are subsequently populated via Javascript. However, the text argument will be evaluated as wikitext so you can insert content directly, if desired. Use an empty string to leave an attribute undefined. |
| Usage | <<version>> |
|---|---|
| Description | Get the WikklyText version number. |
| Example | <<version>> |
| Result | 1.3.4-WIP |
| Example | <<warn "Hello title" Hello " " content>> |
|---|---|
| Result | Hello title Hello content |
| Usage | <<warnbox title content [...]>> <<warnbox content>> |
|---|---|
| Description | First form: Create an warning box with a title. Second form: Create a box with no title. |
| Example | <<warnbox "A Title" AA BB CC " and //italic text//">> <<warnbox "This box has no title and uses a ''different'' __style__.">> |
| Result | A Title AABBCC and italic text This box has no title and uses a different style. |