Changes

Jump to navigation Jump to search
<pre> examples
Line 146: Line 146:  
Linking is covered in a separate page: [[Wiki Team/Guide/Links]]
 
Linking is covered in a separate page: [[Wiki Team/Guide/Links]]
   −
== Code Examples ==
+
== Preformatted text==
Text which does not begin in the first column will be shown indented, in a fixed width font.   This is appropriate for showing computer code or command examples, such as this famous little program:
+
 
 +
Text which does not begin in the first column of the wiki editing box will be shown indented, in a fixed width font.
 +
For example, this line was preceded by a single space. It preserves whitespace formatting:    A    B    C    D    E    F    G    H    I
 +
 
 +
A single paragraph of text can be entered with a space in column 1 (the first character position in the wiki editing box) of every line to preserve the raw text format of the entry.
 +
    For example, this block of lines was
 +
    entered with 4 spaces before each line.
 +
    A    B    C    D    E    F    G    H    I
 +
 
 +
The parser tags {{Code|<nowiki><pre> and </pre></nowiki>}} may be entered before and after blocks of preformatted text to preserve the raw format of the text.  This is suitable for chat transcripts such as [[Design_Team/Meetings/2009-03-01]].
 +
=== Line wrapping ===
 +
Line wrapping can be adjusted with the style property '''white-space''' (See http://www.w3schools.com/cssref/pr_text_white-space.asp)
 +
* With this tag and style, {{Code|<nowiki><pre style="white-space:pre-wrap"></nowiki>}}, whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks.
 +
 
 +
=== Code Examples ===
 +
Raw text is appropriate for showing computer code or command examples, such as this famous little program:
    
   main(){
 
   main(){

Navigation menu