Test Monospace

From Retrosoftware

(Difference between revisions)
Jump to: navigation, search
(Show the difference between the use of single space and the <pre> tag)
(Added colour examples)
Line 10: Line 10:
<tt>
<tt>
<nowiki><tt></nowiki><br/>
<nowiki><tt></nowiki><br/>
-
<nowiki>lll ; &amp;nbsp;&amp;nbsp;&amp;nbsp; an ''italic'' comment &amp;gt; by Person A<br/></nowiki><br/>
+
<nowiki><span style="color:#008000">\ Simple example illustrating use of monospacing</span><br/></nowiki><br/>
-
<nowiki>AAA ; &amp;nbsp;&amp;nbsp;&amp;nbsp; followed by a '''bold''' comment &amp;gt; by Person B</nowiki><br/>
+
<nowiki>lll ; &amp;nbsp;&amp;nbsp;&amp;nbsp; an ''italic'' comment &amp;gt; by <span style="color:#0000C0">Blue Person</span><br/></nowiki><br/>
 +
<nowiki>AAA ; &amp;nbsp;&amp;nbsp;&amp;nbsp; followed by a '''bold''' comment &amp;gt; by <span style="color:#C00000">Red Person</span></nowiki><br/>
<nowiki></tt></nowiki>
<nowiki></tt></nowiki>
</tt>
</tt>
Line 18: Line 19:
<tt>
<tt>
-
lll ; &nbsp;&nbsp;&nbsp; an ''italic'' comment &gt; by Person A<br/>
+
<span style="color:#008000">\ Simple example illustrating use of monospacing</span><br/>
-
AAA ; &nbsp;&nbsp;&nbsp; followed by a '''bold''' comment &gt; by Person B
+
lll ; &nbsp;&nbsp;&nbsp; an ''italic'' comment &gt; by <span style="color:#0000C0">Blue Person</span><br/>
 +
AAA ; &nbsp;&nbsp;&nbsp; followed by a '''bold''' comment &gt; by <span style="color:#C00000">Red Person</span>
</tt>
</tt>
Line 30: Line 32:
<tt>
<tt>
-
&nbsp;lll ; &nbsp;&nbsp;&nbsp; an <nowiki>''italic''</nowiki> comment &amp;gt; by Person A<br/>
+
&nbsp;<nowiki><span style="color:#008000">\ Simple example illustrating use of monospacing</span></nowiki><br/>
-
&nbsp;AAA ; &nbsp;&nbsp;&nbsp; followed by a <nowiki>'''bold'''</nowiki> comment &amp;gt; by Person B<br/>
+
&nbsp;lll ; &nbsp;&nbsp;&nbsp; an <nowiki>''italic'' comment &amp;gt; by <span style="color:#0000C0">Blue Person</span></nowiki><br/>
 +
&nbsp;AAA ; &nbsp;&nbsp;&nbsp; followed by a <nowiki>'''bold''' comment &amp;gt; by <span style="color:#C00000">Red Person</span></nowiki><br/>
</tt>
</tt>
''Output:''
''Output:''
-
lll ; an ''italic'' comment &gt; by Person A
+
<span style="color:#008000">\ Simple example illustrating use of monospacing</span>
-
AAA ; followed by a '''bold''' comment &gt; by Person B
+
lll ; an ''italic'' comment &gt; by <span style="color:#0000C0">Blue Person</span>
 +
AAA ; followed by a '''bold''' comment &gt; by <span style="color:#C00000">Red Person</span>
===<nowiki>Using the <pre> tag</nowiki>===
===<nowiki>Using the <pre> tag</nowiki>===
-
Similar output to using a single space at the start of each line, use the <nowiki><pre></nowiki> tag to surround a block of text you want pre-formatted, in a separate box but, unlike using a single-space at the start of each line, wikitext markup (e.g. apostrophes used for italics/bold) is '''not''' interpreted. Special HTML characters, like &amp;gt; are still interpreted, however. Not true mono-spacing.
+
Similar output to using a single space at the start of each line, use the <nowiki><pre></nowiki> tag to surround a block of text you want pre-formatted, in a separate box but, unlike using a single-space at the start of each line, wikitext markup (e.g. apostrophes used for italics/bold or span colouring) is '''not''' interpreted. Special HTML characters, like &amp;gt; are still interpreted, however. Not true mono-spacing.
''Wikitext code:''
''Wikitext code:''
Line 48: Line 52:
<tt>
<tt>
<nowiki><pre></nowiki><br/>
<nowiki><pre></nowiki><br/>
-
lll ; &nbsp;&nbsp;&nbsp; an <nowiki>''italic''</nowiki> comment &amp;gt; by Person A<br/>
+
<nowiki><span style="color:#008000">\ Simple example illustrating use of monospacing</span></nowiki><br/>
-
AAA ; &nbsp;&nbsp;&nbsp; followed by a <nowiki>'''bold'''</nowiki> comment &amp;gt; by Person B<br/>
+
lll ; &nbsp;&nbsp;&nbsp; an <nowiki>''italic'' comment &amp;gt; by <span style="color:#0000C0">Blue Person</span></nowiki><br/>
 +
AAA ; &nbsp;&nbsp;&nbsp; followed by a <nowiki>'''bold''' comment &amp;gt; by <span style="color:#C00000">Red Person</span></nowiki><br/>
<nowiki></pre></nowiki>
<nowiki></pre></nowiki>
</tt>
</tt>
Line 56: Line 61:
<pre>
<pre>
-
lll ; an ''italic'' comment &gt; by Person A
+
<span style="color:#008000">\ Simple example illustrating use of monospacing</span>
-
AAA ; followed by a '''bold''' comment &gt; by Person B
+
lll ; an ''italic'' comment &gt; by <span style="color:#0000C0">Blue Person</span>
 +
AAA ; followed by a '''bold''' comment &gt; by <span style="color:#C00000">Red Person</span>
</pre>
</pre>

Revision as of 14:50, 3 March 2012

Contents

Examples of writing up mono-spaced fonts on the wiki

Using the <tt> tag, &nbsp; and <br/> tags

Surround the text with <tt> tags, use HTML line breaks <br/> at the end of lines, and use the HTML code for a non-breaking space &nbsp; to represent spaces. Both wikitext markup (e.g. apostrophes used for italics/bold) and special HTML characters, like &gt; are interpreted. Recommended for true mono-space requirements.

Wikitext code:

<tt>
<span style="color:#008000">\ Simple example illustrating use of monospacing</span><br/>
lll ; &nbsp;&nbsp;&nbsp; an ''italic'' comment &gt; by <span style="color:#0000C0">Blue Person</span><br/>
AAA ; &nbsp;&nbsp;&nbsp; followed by a '''bold''' comment &gt; by <span style="color:#C00000">Red Person</span>
</tt>

Output:

\ Simple example illustrating use of monospacing
lll ;     an italic comment > by Blue Person
AAA ;     followed by a bold comment > by Red Person


Using a single-space to start each line

Use a single space at the start of each line, to pre-format the text, in a separate box. Both wikitext markup (e.g. apostrophes used for italics/bold) and special HTML characters, like &gt; are interpreted. Not true mono-spacing.

Wikitext code:

 <span style="color:#008000">\ Simple example illustrating use of monospacing</span>
 lll ;     an ''italic'' comment &gt; by <span style="color:#0000C0">Blue Person</span>
 AAA ;     followed by a '''bold''' comment &gt; by <span style="color:#C00000">Red Person</span>

Output:

\ Simple example illustrating use of monospacing
lll ;     an italic comment > by Blue Person
AAA ;     followed by a bold comment > by Red Person


Using the <pre> tag

Similar output to using a single space at the start of each line, use the <pre> tag to surround a block of text you want pre-formatted, in a separate box but, unlike using a single-space at the start of each line, wikitext markup (e.g. apostrophes used for italics/bold or span colouring) is not interpreted. Special HTML characters, like &gt; are still interpreted, however. Not true mono-spacing.

Wikitext code:

<pre>
<span style="color:#008000">\ Simple example illustrating use of monospacing</span>
lll ;     an ''italic'' comment &gt; by <span style="color:#0000C0">Blue Person</span>
AAA ;     followed by a '''bold''' comment &gt; by <span style="color:#C00000">Red Person</span>
</pre>

Output:

<span style="color:#008000">\ Simple example illustrating use of monospacing</span>
lll ;     an ''italic'' comment > by <span style="color:#0000C0">Blue Person</span>
AAA ;     followed by a '''bold''' comment > by <span style="color:#C00000">Red Person</span>