Wiki Team/Guide/Formatting: Difference between revisions

Code Examples: space in column1 before <nowiki> example
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{GoogleTrans-en}}</noinclude>{{TOCright}}
<noinclude>[[Category:General public]]
[[Category:HowTo]]
</noinclude>
For a quick overview of wiki markup see the [[Wiki Team/Guide/Overview]]!
For a quick overview of wiki markup see the [[Wiki Team/Guide/Overview]]!


Line 12: Line 14:
Use these to change fonts:
Use these to change fonts:
<center>
<center>
{| {{Prettytable}}
{|
|-
|-
|bgcolor="#A7C1F2"|'''Description'''
|bgcolor="#A7C1F2"|'''Description'''
Line 43: Line 45:
It is often useful to divide articles into sections and subsections.  The following markup can be used.  You must begin these on a new line.
It is often useful to divide articles into sections and subsections.  The following markup can be used.  You must begin these on a new line.
<center>
<center>
{| {{Prettytable}}
{|
|-
|-
|bgcolor="#A7C1F2"|'''Heading'''
|bgcolor="#A7C1F2"|'''Heading'''
Line 80: Line 82:
Wiki markup makes lists fairly easy:
Wiki markup makes lists fairly easy:
<center>
<center>
{| {{Prettytable}}
{|
|-
|-
|bgcolor="#A7C1F2"|'''List type'''
|bgcolor="#A7C1F2"|'''List type'''
Line 144: 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(){
Line 207: Line 224:


         return entries, total_count</nowiki>
         return entries, total_count</nowiki>
 
== Stopping Text flow ==
See [[mediawikiwiki:Help:Images#Stopping_the_text_flow]].
== Tables ==
== Tables ==
Tables are covered in a separate page: [[Help:Tables]]
Tables are covered in a separate page: [[Help:Tables]]
Line 224: Line 242:


== Translation ==
== Translation ==
We have a mechanism for maintaining multilingual versions of pages in the wiki. Please see [[Translation Team/Wiki Translation]] for more information about translations. We also recommend the use of the Google machine translation for pages that have yet to be translated by a human expert. To use the Google translation, simply include the following at the top of your page:
We have a mechanism for maintaining multilingual versions of pages in the wiki. Please see [[Translation Team/Wiki Translation]] for more information about translations. We also recommend the use of the Google machine translation for pages that have yet to be translated by a human expert. To see a [http://translate.google.com/about/ Google translation], simply use the dropdown selector in the sidebar.
   
   
<nowiki><noinclude>{{GoogleTrans-en}}</noinclude></nowiki>
 


== See Also ==
== See Also ==
Line 232: Line 250:
* [[Wiki Team/Guide/Overview]]
* [[Wiki Team/Guide/Overview]]
* [http://www.mediawiki.org/wiki/Help:Formatting MediaWiki Manual: Formatting]
* [http://www.mediawiki.org/wiki/Help:Formatting MediaWiki Manual: Formatting]
[[Category:General public]]
[[Category:HowTo]]