<?xml version="1.0" encoding="utf-8"?>
<s1 title="HelpOnFormatting"><p></p>
<s2 id="Formatting" title="Formatting">
<p><p>Contents</p>
<ol><li>
<link anchor="F">Formatting</link><ol><li>
<link anchor="G">General</link></li>
<li>
<link anchor="T">Typeface</link></li>
<li>
<link anchor="C">Colorize text</link></li>
<li>
<link anchor="C-1">Colorize code (Syntax Highlighting)</link></li>
<li>
<link anchor="E">Examples</link><ol><li>
<link anchor="M">Mixing &apos;&apos;italic&apos;&apos; and &apos;&apos;&apos;bold&apos;&apos;&apos;</link></li>
<li>
<link anchor="S">Superscript &amp; Subscript</link></li>
<li>
<link anchor="C-2">Code blocks</link><ol><li>
<link anchor="N">Nesting curly braces</link></li>
<li>
<link anchor="C-3">Colorized Code</link></li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
</ol>
<p> </p>
<p>This page describes using the <jump href="/wiki/MoinMoin">MoinMoin</jump> wiki syntax (which is the default syntax for a <jump href="/wiki/MoinMoin">MoinMoin</jump> based wiki, but not the only one). For other parsers/syntaxes take a look at <jump href="/wiki/HelpOnParsers">HelpOnParsers</jump>. </p>
<p></p>
<s3 id="General" title="General">
<ul><li>Use one or more blank lines to separate paragraphs. </li>
<li><p>Use <code>&lt;&lt;BR&gt;&gt;</code> <jump href="/wiki/HelpOnMacros">macro</jump> to insert linebreaks into paragraphs. </p>
</li>
</ul>
<p></p>
</s3>
<s3 id="Typeface" title="Typeface">
<p><table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p><strong> Name/Sample</strong> </p>
</td><td><p> <strong> Markup </strong>   </p>
</td><td><p> <strong> Notes </strong>          </p>
</td></tr><tr><td><p>  <em>italic</em>     </p>
</td><td><p> <code>&apos;&apos;italic&apos;&apos;</code>       </p>
</td><td><p> Double single quotes.  </p>
</td></tr><tr><td><p>  <strong>bold</strong>     </p>
</td><td><p> <code>&apos;&apos;&apos;bold&apos;&apos;&apos;</code>       </p>
</td><td><p> Triple single quotes.  </p>
</td></tr><tr><td><p>  <code>monospace</code>    </p>
</td><td><p> <code>`monospace`</code>  </p>
</td><td><p> Single backticks for inline monospaced text. If possible, try to avoid long monospaced texts, especially inside tables: sometimes they are not properly wrapped by the browsers. Wiki markup is ignored. </p>
</td></tr><tr><td><p>  <code>monospace</code>    </p>
</td><td><p> <code>{{{monospace}}}</code>  </p>
</td><td><p> Same as backticks. Placing the braces in separate lines produces a <jump href="/wiki/HelpOnFormatting#c">code block</jump>. </p>
</td></tr><tr><td><p>  <strong>underline</strong>  </p>
</td><td><p> <code>__underline__</code>    </p>
</td><td><p>                         </p>
</td></tr><tr><td><p>  <sup>super</sup>script  </p>
</td><td><p> <code>^super^script</code>    </p>
</td><td><p>                         </p>
</td></tr><tr><td><p>  <sub>sub</sub>script  </p>
</td><td><p> <code>,,sub,,script</code>    </p>
</td><td><p>                         </p>
</td></tr><tr><td><p>  <small>smaller</small>    </p>
</td><td><p> <code>~-smaller-~</code>      </p>
</td><td><p>                         </p>
</td></tr><tr><td><p>  <big>larger</big>     </p>
</td><td><p> <code>~+larger+~</code>       </p>
</td><td><p>                         </p>
</td></tr><tr><td><p> <strike>stroke</strike>    </p>
</td><td><p> <code>--(stroke)--</code>     </p>
</td><td><p>                         </p>
</td></tr></table><p></p>
</s3>
<s3 id="Colorize text" title="Colorize text">
<p>Colorizing is enabled in tables without additional macros (see <jump href="/wiki/HelpOnTables">HelpOnTables</jump>).  </p>
<p><p></p>
</s3>
<s3 id="Colorize code (Syntax Highlighting)" title="Colorize code (Syntax Highlighting)">
<p>There are several ways to highlight code: </p>
<ol><li><p>Start a special code block containing the parser&apos;s name: <code>{{{#!parsername</code> </p>
</li>
<li><p>Embed a file attachment bearing a supported extension (such as <code>&quot;.py&quot;</code>) with <code>{{attachment:test.py}}</code> </p>
</li>
<li><p>Begin a page with the <jump href="/wiki/HelpOnProcessingInstructions">format processing instruction</jump>: <code>#format parsername</code> </p>
</li>
</ol>
<p><jump href="/wiki/HelpOnFormatting#S">Example.</jump> </p>
<p>MoinMoin comes with a special parser called <jump href="/wiki/HelpOnParsers#T">highlight</jump> that is based on <jump href="http://pygments.org/">Pygments</jump> internally. </p>
<p>You can use it to highlight many sorts of programming source code, configuration files and other sorts of text files used on computers. </p>
<p></p>
</s3>
<s3 id="Examples" title="Examples">
<p></p>
<s4 id="Mixing ''italic'' and '''bold'''" title="Mixing &apos;&apos;italic&apos;&apos; and &apos;&apos;&apos;bold&apos;&apos;&apos;">
<p><anchor id="italic_bold_example"/> </p>
<p><table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p> <strong>Markup</strong> </p>
</td><td><p> <strong>Result</strong>                    </p>
</td></tr><tr><td><p> <code>&apos;&apos;&apos;&apos;&apos;Mix&apos;&apos;&apos; at the beginning&apos;&apos;</code>   </p>
</td><td><p>  <em><strong>Mix</strong> at the beginning</em>  </p>
</td></tr><tr><td><p> <code>&apos;&apos;&apos;&apos;&apos;Mix&apos;&apos; at the beginning&apos;&apos;&apos;</code>   </p>
</td><td><p>  <strong><em>Mix</em> at the beginning</strong>  </p>
</td></tr><tr><td><p> <code>&apos;&apos;&apos;Mix at the &apos;&apos;end&apos;&apos;&apos;&apos;&apos;</code>         </p>
</td><td><p>  <strong>Mix at the <em>end</em></strong>        </p>
</td></tr><tr><td><p> <code>&apos;&apos;Mix at the &apos;&apos;&apos;end&apos;&apos;&apos;&apos;&apos;</code>         </p>
</td><td><p>  <em>Mix at the <strong>end</strong></em>        </p>
</td></tr></table><p></p>
</s4>
<s4 id="Superscript & Subscript" title="Superscript &amp; Subscript">
<p></p>
<source><![CDATA[You might recall ''a''^2^ `+` ''b''^2^ `=` ''c''^2^ from your math lessons, unless your head is filled with H,,2,,O.]]></source><p>Result: </p>
<p>You might recall <em>a</em><sup>2</sup> <code>+</code> <em>b</em><sup>2</sup> <code>=</code> <em>c</em><sup>2</sup> from your math lessons, unless your head is filled with H<sub>2</sub>O. </p>
<p><anchor id="codeexample"/> </p>
</s4>
<s4 id="Code blocks" title="Code blocks">
<p>Markup: </p>
<source><![CDATA[{{{
10 PRINT "Hello, world!"
20 GOTO 10
}}}]]></source><p>Result: </p>
<source><![CDATA[10 PRINT "Hello, world!"
20 GOTO 10]]></source><p></p>
<s5 id="Nesting curly braces" title="Nesting curly braces">
<p>As pointed out on <jump href="/wiki/HelpOnParsers">HelpOnParsers</jump>, you can nest multiple levels of curly braces: </p>
<p>Markup: </p>
<source><![CDATA[{{{{ 
This is a preformatted text block.
{{{ with curly braces inside }}}
}}}}]]></source><p>Result: </p>
<source><![CDATA[This is a preformatted text block.
{{{ with curly braces inside }}}]]></source><p><anchor id="SyntaxHighlighting"/> </p>
</s5>
<s5 id="Colorized Code" title="Colorized Code">
<p>Markup: </p>
<source><![CDATA[{{{#!highlight python
from colors import palette
palette.colorize('python')
}}}]]></source><p>Result: </p>
<codearea id="81034c0bf625acfaeadb1746b28f9bb3f866cf20"><codeline><codetoken type="ResWord">from</codetoken <codetoken type="ID">colors</codetoken <codetoken type="ResWord">import</codetoken <codetoken type="ID">palette</codetoken</codeline<codeline><codetoken type="ID">palette</codetoken.<codetoken type="ID">colorize</codetoken(<codetoken type="String">&apos;</codetoken<codetoken type="String">python</codetoken<codetoken type="String">&apos;</codetoken)</codeline</codearea</s5></s4></s3></s2></s1>