| t | Here is information about basic syntax for TBWiki: | t | |
| | | |
| <table align="right"><tr><td><div class="toc"> | | |
| Contents: | | |
| <ul> | | |
| <li><a href="#General_markup">General markup</a></li> | | |
| <li><a href="#Headings">Headings</a></li> | | |
| <ul> | | |
| <li><a href="#2nd_level_heading">2nd level heading</a></li> | | |
| <ul> | | |
| <li><a href="#3rd_level_heading">3rd level heading</a></li> | | |
| <ul> | | |
| <li><a href="#4th_level_heading">4th level heading</a></li> | | |
| </ul> | | |
| </ul> | | |
| </ul> | | |
| <li><a href="#Bullet_Lists">Bullet Lists</a></li> | | |
| <li><a href="#Definition_lists">Definition lists</a></li> | | |
| <li><a href="#Images">Images</a></li> | | |
| <ul> | | |
| <li><a href="#image_options">image options</a></li> | | |
| </ul> | | |
| <li><a href="#Links">Links</a></li> | | |
| <li><a href="#Special_marks">Special marks</a></li> | | |
| <li><a href="#Preformatted_text">Preformatted text</a></li> | | |
| <li><a href="#Blocks">Blocks</a></li> | | |
| <li><a href="#Macros_and_processors">Macros and processors</a></li> | | |
| <ul> | | |
| <li><a href="#Macros">Macros</a></li> | | |
| <ul> | | |
| <li><a href="#Common_Macros">Common Macros</a></li> | | |
| <li><a href="#System_Macros">System Macros</a></li> | | |
| </ul> | | |
| <li><a href="#Processors">Processors</a></li> | | |
| <ul> | | |
| <li><a href="#Useful_processors">Useful processors</a></li> | | |
| <li><a href="#Demonstration_processors">Demonstration processors</a></li> | | |
| <li><a href="#In-progress_processors">In-progress processors</a></li> | | |
| <li><a href="#Testing_processors">Testing processors</a></li> | | |
| </ul> | | |
| </ul> | | |
| </ul> | | |
| </div></td></tr></table> | | |
| <p> | | |
| <h1><a name="General_markup">General markup</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=General_markup">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li>a blank line = a paragraph break | | |
| <li>4 or more dashes alone on line = a horizontal rule | | |
| <ul><li>number of dashes = thickness of line | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| (below this is a thin line, formed with ----) | | |
| <hr size=2> | | |
| (below this is a thick line, formed with ----------) | | |
| <hr size=8> | | |
| <p> | | |
| <ul><li><i>italic</i> = surround text by two single-quotes | | |
| </ul> | | |
| <p> | | |
| ''italic'' = <i>italic</i> | | |
| <p> | | |
| <ul><li><b>bold</b> = surround text by three single-quotes | | |
| </ul> | | |
| <p> | | |
| '''bold''' = <b>bold</b> | | |
| <p> | | |
| <ul><li><code>code (monospaced font)</code> = surround text by two backticks | | |
| </ul> | | |
| <p> | | |
| ``code`` = <code>code</code> | | |
| <p> | | |
| <h1><a name="Headings">Headings</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Headings">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li>leading and trailing '=' at start of line => headings | | |
| <ul><li>number of '=' = heading level | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| <h2><a name="2nd_level_heading">2nd level heading</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=2nd_level_heading">edit section</a>]</font></span> | | |
| </h2> | | |
| was made with == 2nd level heading ==<p> | | |
| <h3><a name="3rd_level_heading">3rd level heading</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=3rd_level_heading">edit section</a>]</font></span> | | |
| </h3> | | |
| was made with === 3rd level heading ===<p> | | |
| <h4><a name="4th_level_heading">4th level heading</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=4th_level_heading">edit section</a>]</font></span> | | |
| </h4> | | |
| was made with ==== 4th level heading ====<p> | | |
| <h1><a name="Bullet_Lists">Bullet Lists</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Bullet_Lists">edit section</a>]</font></span> | | |
| </h1> | | |
| You uses '*' or '-' with indentation, to create bullet lists: | | |
| <p> | | |
| <ul><div style="background-color:lightgrey; padding:5px; border-style: solid solid solid solid; border-width: 1px 1px 1px 1px;"> | | |
| <pre> * space and '*' = bullet | | |
| * indentation = bullet level | | |
| * indentation back to previous level does the right thing | | |
| | | |
| - you can use multiple lines for the content on | | |
| the same bullet level, by indenting them the same level | | |
| as the starting text | | |
| - this is indented for a second-level bullet | | |
| item, with multi-line text</pre></div></ul> | | |
| | | |
| <p> | | |
| Produces this: | | |
| <p> | | |
| <ul><li>space and '*' = bullet | | |
| <ul><li>indentation = bullet level | | |
| </ul><li>indentation back to previous level does the right thing | | |
| </ul> | | |
| <p> | | |
| <ul><li>you can use multiple lines for the words on | | |
| the same bullet level, by indenting them the same level | | |
| as the starting text | | |
| <ul><li>this is indented for a second-level bullet | | |
| item, with multi-line text | | |
| </ul> | | |
| </ul> | | |
| <p> | | |
| <h1><a name="Definition_lists">Definition lists</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Definition_lists">edit section</a>]</font></span> | | |
| </h1> | | |
| You can create definition lists with the following syntax: | | |
| <pre>; word: definition | | |
| </pre> | | |
| <p> | | |
| example: | | |
| <dl><dt> Red Baron</dt> | | |
| <dd> a very good pilot in world war I</dd> | | |
| <dt> Snoopy</dt> | | |
| <dd> a dog from the <i>Peanuts</i> cartoon</dd> | | |
| </dl> | | |
| <p> | | |
| Definition lists should end with a blank line. | | |
| <p> | | |
| <h1><a name="Images">Images</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Images">edit section</a>]</font></span> | | |
| </h1> | | |
| You can add inline images on a page with the syntax: | | |
| <ul><li>[<b></b>[image:image-name.jpg]] | | |
| or | | |
| <li>[<b></b>[image:ht<b></b>tp://server/remote-image.jpg] | | |
| </ul> | | |
| <p> | | |
| The image name can refer to a local file or a remote file. If the image name | | |
| starts with 'http', it is treated as a full URL to a remote site. | | |
| A local file refers to a filename in this wiki's files area area | | |
| (where uploaded files reside). | | |
| <p> | | |
| <h2><a name="image_options">image options</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=image_options">edit section</a>]</font></span> | | |
| </h2> | | |
| You can optionally add options to control image display and handling, | | |
| by placing a vertical bar after the image filename, followed by image options. The following options are supported: | | |
| <ul><li>width="xxx" | | |
| <li>height="yyy" | | |
| <li>alt="alternate text" | | |
| </ul> | | |
| <p> | | |
| If multiple attributes are used, they should be separated by a spaces. | | |
| <p> | | |
| Note that this is the same syntax as used for HTML <img> tags. | | |
| <p> | | |
| Example: | | |
| <ul><li>[<b></b>[image:image-name.jpg|height="200" alt="This is neat"]] | | |
| </ul> | | |
| <p> | | |
| <h1><a name="Links">Links</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Links">edit section</a>]</font></span> | | |
| </h1> | | |
| Links are either interpreted from plain text, when the part before the colon | | |
| is a recognized URL prefix (ht<b></b>tp: or ht<b></b>ttps:), or are specified with surrounding double square brackets. | | |
| <p> | | |
| <ul><li><a href="https:/server/page">https:/server/page</a> - automatically converted to link | | |
| <li>double-square bracket - link to local page e.g. [<b></b>[FrontPage]] => <a href="/tbwiki/FrontPage">FrontPage</a> | | |
| <li>double-square bracket with remote url - [ [ht<b></b>tp://google.com/]] => <a href="http://google.com/">http://google.com/</a> | | |
| <li>vertical bar inside brackets = separates link from cover text | | |
| <ul><li>[<b></b>[FrontPage|go to the Front Page]] => <a href="/tbwiki/FrontPage">go to the Front Page</a> | | |
| <li>[ [ht<b></b>tp://google.com|Google search engine]] => <a href="http://google.com">Google search engine</a> | | |
| </ul><li>link to local files: [<b></b>[file:filename.doc]] => <a style="color:red;" href="/tbwiki/DocBasicSyntax?action=upload_one&dest_fn=filename.doc">file:filename.doc</a> | | |
| <li>link from image: [<b></b>[image:image-name.jpg|FrontPage]] | | |
| <li>link from remote image to local page: [<b></b>[image:ht<b></b>tp://server/image-name.jpg|FrontPage]] | | |
| <li>link from local image to remote page: [<b></b>[image:image-name.jpg|ht<b></b>tp://server/other-page.html]] | | |
| </ul> | | |
| <p> | | |
| <h1><a name="Special_marks">Special marks</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Special_marks">edit section</a>]</font></span> | | |
| </h1> | | |
| The following special mark is supported: | | |
| <ul><li>caret-slash | | |
| </ul> | | |
| <p> | | |
| <pre> | | |
| ^/ shows a green checkmark | | |
| </pre> | | |
| <p> | | |
| Here is an example: | | |
| <p> | | |
| <p> | | |
| <img src="/tbw-files/green-checkmark.jpg" alt="checkmark"> green checkmark supported! | | |
| <p> | | |
| <h1><a name="Preformatted_text">Preformatted text</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Preformatted_text">edit section</a>]</font></span> | | |
| </h1> | | |
| Use triple braces to indicate text that should be output in | | |
| pre-formatted format. That is, the word wrappings and leading | | |
| spaces will be preserved. | | |
| <p> | | |
| <pre> | | |
| {{{ | | |
| this | | |
| is | | |
| preformatted | | |
| text | | |
| } }} | | |
| </pre> | | |
| <p> | | |
| Will display as this: | | |
| <pre> | | |
| this | | |
| is | | |
| preformatted | | |
| text | | |
| </pre> | | |
| <p> | | |
| Note that markup will not be processed inside a block of preformatted text: | | |
| <p> | | |
| <pre> | | |
| {{{ | | |
| Here's a [[link]] | | |
| } }} | | |
| </pre> | | |
| <p> | | |
| Yields: | | |
| <p> | | |
| <pre> | | |
| Here's a [[link]] | | |
| </pre> | | |
| <p> | | |
| <h1><a name="Blocks">Blocks</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Blocks">edit section</a>]</font></span> | | |
| </h1> | | |
| <ul><li>preformatted text - use triple braces, and no name | | |
| <li>named block - use triple braces and a name on the top line | | |
| <li>hidden block - use triple braces and a leading '#' in the name | | |
| <li>processor block - put the processor name after #! on the top line | | |
| <li>named table block - put the table name after the #!Table processor directive | | |
| </ul> | | |
| <p> | | |
| named block | | |
| <pre> | | |
| {{{MyData | | |
| <put data here> | | |
| }} } | | |
| </pre> | | |
| <p> | | |
| hidden block | | |
| <pre> | | |
| {{{#HyHiddenData | | |
| <this data won't display on the page | | |
| }} } | | |
| </pre> | | |
| <p> | | |
| processor | | |
| <pre> | | |
| {{{#!PigLatin | | |
| This will display as pig latin! | | |
| }} } | | |
| </pre> | | |
| <p> | | |
| named table block | | |
| <pre> | | |
| {{{#!Table:BlockName | | |
| <table spec and data> | | |
| }} } | | |
| </pre> | | |
| <p> | | |
| <h1><a name="Macros_and_processors">Macros and processors</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Macros_and_processors">edit section</a>]</font></span> | | |
| </h1> | | |
| Macros are invoked with double braces. Processors use triple braces, and #! preceding the processor name. | | |
| <p> | | |
| <h2><a name="Macros">Macros</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Macros">edit section</a>]</font></span> | | |
| </h2> | | |
| <p> | | |
| <h3><a name="Common_Macros">Common Macros</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Common_Macros">edit section</a>]</font></span> | | |
| </h3> | | |
| <ul><li>{<b></b>{BR}} - forced line break | | |
| <li>{<b></b>{TableOfContents}} - insert a table of contents | | |
| <li>{<b></b>{HTML(text)}} - insert raw text unprocessed in HTML output | | |
| <li>{<b></b>{Include(page)}} - include another page in this one | | |
| </ul> | | |
| <p> | | |
| <h3><a name="System_Macros">System Macros</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=System_Macros">edit section</a>]</font></span> | | |
| </h3> | | |
| <ul><li>{<b></b>{RecentChanges}} - show the list of recent edits | | |
| <li>{<b></b>{SystemInfo}} - show information about the tbwiki system | | |
| <li>{<b></b>{TitleIndex}} - show the list of pages on this site | | |
| </ul> | | |
| <p> | | |
| <h2><a name="Processors">Processors</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Processors">edit section</a>]</font></span> | | |
| </h2> | | |
| Processors can invoke plugins to produce output calculated at runtime (that is, at the time of page access). | | |
| <p> | | |
| <h3><a name="Useful_processors">Useful processors</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Useful_processors">edit section</a>]</font></span> | | |
| </h3> | | |
| Some useful processors: | | |
| <ul><li>#!Table - table processor | | |
| <li>#!WebSed - page scraping processor | | |
| <li>#!SlideShow - show a page as a slide show | | |
| <li>#!bc - calculator processor (see 'man bc') | | |
| <li>#!RegEx - do interactive RegEx testing | | |
| <li>#!RunningChart - show running chart from table data | | |
| <li>#!YellowBlock - show text inside a yellow block | | |
| </ul> | | |
| <p> | | |
| <h3><a name="Demonstration_processors">Demonstration processors</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Demonstration_processors">edit section</a>]</font></span> | | |
| </h3> | | |
| <ul><li>#!FooReplace - replace 'foo' with 'bar' in content | | |
| <li>#!PigLatin - change text to pig latin | | |
| <li>#!UserChoice - show how to use sub-actions | | |
| </ul> | | |
| <p> | | |
| <h3><a name="In-progress_processors">In-progress processors</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=In-progress_processors">edit section</a>]</font></span> | | |
| </h3> | | |
| <ul><li>#!Transcriber - used to transcribe videos | | |
| <li>#!User - used for user account administration | | |
| </ul> | | |
| <p> | | |
| <h3><a name="Testing_processors">Testing processors</a> | | |
| <span align=right class="section_edit_link">[<a href="/tbwiki/DocBasicSyntax?action=edit§ion=Testing_processors">edit section</a>]</font></span> | | |
| </h3> | | |
| <ul><li>#!GetBlock - test for internal get_block() routines | | |
| <li>#!RegressionCheck - test for markup-to-html conversion correctness | | |
| </ul> | | |
| <p> | | |