<> = Help on Basic Formatting = ~-<>-~ This page contains basic information about !MoinMoin's formatting capabilities. It covers only a small amount of the formatting features but these are possibly covering about 99% of every-day problems. If you need more detailed information start with HelpOnEditing or HelpOnMoinWikiSyntax. == Basics == === White space === Note that white space most of the time is ignored. This: {{{ The only exception is white space at the beginning of a line. This is not another line. }}} leads to this: The only exception is white space at the beginning of a line. This is not another line. Details how white space at the beginning of a line is processed see [[HelpOnBasicFormatting#Indentation | Indentation]] === Line breaks === Insert a line break with the `<
>`. This: {{{ This goes onto the first line<
>This goes onto the second line. }}} leads to this: This goes onto the first line<
>This goes onto the second line === Indentation === This: {{{ no space Line 1 Line 2 Line 3 Line 4 }}} leads to this: no space Line 1 Line 2 Line 3 Line 4 === Titles === The different levels depend on the number of "=" signs: {{{ = level 1 = == level 2 == === level 3 === ==== level 4 ==== }}} Notes: * The first "=" char must be the first character on a line. * To the right of the very last "=" char their must not be any white space. A word of advice: try to avoid using level 4 headers, and '''never''' use headers of level 5 and 6! == Lists == For a detailed discussion see HelpOnLists. === Numbered Lists === {{{ 1. level1-1 1. level1-2 1. level2-1 1. level2-2 Normally this interrupts and therefore restart the numbering 1.#3 level1-3 }}} leads to this: 1. level1-1 1. level1-2 1. level2-1 1. level2-1 Normally this interrupts and therefore restart the numbering 1.#3 level1-3 === Bulleted Lists === {{{ * level1-1 * level1-2 * level2-1 * level2-2 * level1-3 }}} leads to this: * level1-1 * level1-2 * level2-1 * level2-2 * level1-3 == Tables == For a detailed discussion see HelpOnTables. This: {{{ || '''col1''' || '''col2''' || '''col3''' || || cell A1 || cell B1 || cell C1 || || cell A2 || cell B2 || cell C2 || || cell A2 || cell B2 || cell C2 || }}} leads to this: || '''col1''' || '''col2''' || '''col3''' || || cell A1 || cell B1 || cell C1 || || cell A2 || cell B2 || cell C2 || || cell A2 || cell B2 || cell C2 || Notes: * The first "|" char must be the first character on a line. * To the right of the very last "|" char their must not be any white space. == APL Code == This: {{{{ {{{ {⍵/⍳⍴,⍵} {{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵} }}} }}}} leads to this: {{{ {⍵/⍳⍴,⍵} {{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵} }}} This: {{{ Calculate prime numbers with APL: `{{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵}` is easy. }}} Leads to this: Calculate prime numbers with APL: `{{⍵/⍨2=+⌿0=⍵∘.|⍵}⍳⍵}` is easy. == Links == For a detailed discussion see HelpOnLinking. === Page names or CamelCasing or internal links === Names of pages in a wiki more often than not use !CamelCasing as in the name of this page: !HelpOnBasicFormatting. !CamelCase names are automatically converted into links within the realm of the current wiki. If a page name contains blanks surround them with `[[` and `]]`. Therefore this: {{{ [[Page name]] }}} leads to this: [[Page name]] Alternatively with an optional link text: {{{ [[Page name | link to some page]] }}} leads to this: [[Page name | link to some page]] === Prevent CamelCase links === Of course sometimes you don't want certain names to be converted into links. You can achieve that by prefixing the name with a "!" as in {{{ !JavaScript }}} That leads to !JavaScript Note that a link to a non-existent page is shown in italic: ThisPageDoesNotExist === External links === This: {{{ http://sandbox.aplwiki.com }}} results in this: http://sandbox.aplwiki.com Alternatively you can use an optional link text: {{{ [[http://sandbox.aplwiki.com | Link to the APL wiki sandbox]] }}} results in this: [[http://sandbox.aplwiki.com | Link to the APL wiki sandbox]] === Links within a page === You can link to another part of a page, but only to titles. For example, on a page "MyPage" with a level 3 title "My address" you could create a link somewhere on that page with {{{ [[ MyPage#My address]] }}} which leads to [[ MyPage#My address]]. Alternatively you can use an optional link text. This: {{{ [[ MyPage#My address | Link to my address]] }}} results in [[ MyPage#My address | Link to my address]]. === Links to attachments === See [[ HelpOnBasicFormatting#Attachments | Attachments ]] === Links to images === Before you start linking to an image first upload it as an attachment; click the "Attachments" button and act accordingly. Once the image is uploaded it is, among other things, available for link purposes. Since it is always associated with a certain page you can refer to it by its simple filename. For example, a link to the file "APL-Logo.png" which is attached to this page can be created with: {{{ [[attachment:APL-Logo.png]] }}} which leads to [[attachment:APL-Logo.png]]. Alternatively with an optional text as in: {{{ [[attachment:APL-Logo.png | download the APL logo ]] }}} which leads to [[attachment:sample.txt | link to the attachment]] For how to display an image within a page (rather than linking to it) see [[#Images | Images]]. == Images == First upload the image(s) as an attachment; click the "Attachments" button and act accordingly. Once the image is uploaded and attached to a page it can be used, either in order to display it within the page or for download (= linking, [[#links to images|see there]]). Since it is always associated with a certain page you can refer to it by its simple filename. Since linking to an image is discussed in the [[#Links to images]] chapter here we attempt to actually display the image. {{{ {{attachment:APL-Logo.png || width=40}} }}} which leads to {{attachment:APL-Logo.png || width=40}} Note that the height is also changed so that the originally ratio between height and width is preserved. Alternatively with an optional link text: {{{ {{attachment:APL-Logo.png | The APL logo | width=40}} }}} That's the result: {{attachment:APL-Logo.png | The APL logo | width=40}} Hover the mouse over the image and you will see "The APL logo" text pop up. Tables are sometimes useful to arrange images. This: {{{ || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || }}} leads to this: || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || {{attachment:fish.jpg}} || === Limitations === While images of types "PNG", "JPG" and "GIF" work fine, "BMP" and "ICO" don't. BMPs should not be used anyway because they are much bigger then the same picture converted to a PNG. == Attachments == For a detailed discussion see HelpOnLinking. Before you start linking to an attachment (for download purposes, for example) first upload the attachment; click the "Attachments" button and act accordingly. Once the attachment is uploaded it is available for link purposes. Since it is always associated with a certain page you can refer to it from within that page by its simple filename. For example, a link to the file "sample.txt" which is attached to this page can be created with: {{{ [[attachment:sample.txt]] }}} which leads to [[attachment:sample.txt]]. Alternatively with an optional link text as in: {{{ [[attachment:sample.txt | link to the attachment]] }}} which leads to [[attachment:sample.txt | link to the attachment]] You can also link to an attachment that is attached to another page. This: {{{ [[attachment:Fire/Fire_01.png]] }}} points to a screenshot attached to the page [[Fire]]. This will result in this: [[attachment:Fire/Fire_01.png]] Alternatively with an optional link test: {{{ [[attachment:Fire/Fire_01.png | Link to Fire]] }}} This will result in: [[attachment:Fire/Fire_01.png | Link to Fire]] == Table of contents == Insert this right after the `= title =` part of your page: {{{ <> }}} === Offer "Hide table-of-contents" link === In case a table-of-contents is getting very large you might want to offer the user the opportunity to hide and show the toc at his will. This can be achieved by putting this code onto the page, typically right after the level 1 header: {{{ ~-<>-~ }}} See this page as an example.