Category:How to

From mn/geo/geoit
Revision as of 17:29, 30 January 2015 by Basal@uio.no (talk | contribs) (Created page with "== <span style="font-family:arial,helvetica,sans-serif">Editing pages on the Geo-IT MediaWiki</span> == <span style="font-family:arial,helvetica,sans-serif">A good starting p...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Editing pages on the Geo-IT MediaWiki

A good starting place for markup reference can be found here: http://meta.wikimedia.org/wiki/Help:Wikitext_examples

Another point is that this wiki is using Subpages, so in places you'll see reference to a <subpages .> tag. This just means that the list of subpages will be dynamically generated in that location.

Editing Source Code

Note that for the purposes of documenting source code there are two important features:

  1. use the <code> ... </code> to show some simple code snippets: def foo(): return
  2. The syntax highlighting extension has been installed, so you can wrap source code examples in <syntaxhighlight> tags. This is helpful for documenting a code example and supports many languages. Usage is simple. Here's an example of how to display some 'Hello World' source code examples:
<syntaxhighlight lang='python'>
# Hello World in Python
print("Hello World")
</syntaxhighlight>


<syntaxhighlight lang='csharp'> //Hello World in C# class HelloWorld {

   static void Main()
{
System.Console.WriteLine("Hello, World!");
}

}

</syntaxhighlight>


<syntaxhighlight lang='cpp'> // Hello World in C++ (pre-ISO)

  1. include <iostream.h>

main() {

   cout << "Hello World!" << endl;
return 0;

}


</syntaxhighlight>

</span></span></span>

The above code block results in:

<span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:trebuchet ms,helvetica,sans-serif;"><span style="font-size:small;"><span class="co1"># Hello World in Python</span>
<span class="kw1">print</span><span class="br0">(</span><span class="st0">"Hello World"</span><span class="br0">)</span></span></span></span>
<span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:trebuchet ms,helvetica,sans-serif;"><span style="font-size:small;"><span class="co1">//Hello World in C#</span>
</span></span></span>

<span class="kw4">class</span> HelloWorld <span class="br0">{</span>

   static void Main()
{
System.Console.WriteLine("Hello, World!");
}


<span class="br0">}</span>   C<span class="sy0">++</span>

Back to index
<span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:trebuchet ms,helvetica,sans-serif;"><span style="font-size:small;"><span class="co1">// Hello World in C++ (pre-ISO)</span>
</span></span></span>

  <span class="co2">#include <iostream.h></span>   main<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span>

   cout << "Hello World!" << endl;
return 0;


<span class="br0">}</span>

Other Resources

Consult the User's Guide for information on using the wiki software. See Also:


/Reference

This category currently contains no pages or media.