Difference between revisions of "Help:Editing"
From ProgrammingExamples
m (be sure) |
m (→Quick tricks) |
||
Line 4: | Line 4: | ||
* To get syntax highlighting, surround your source code with <code><nowiki><source lang="</nowiki>''language''<nowiki>">...</source></nowiki></code> <br />or (preferred) <code><nowiki><syntaxhighlight lang="</nowiki>''language''<nowiki>">...</syntaxhighlight></nowiki></code>. <br />The [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages list of supported languages] is huge, and includes among many others '''c''', '''cpp''', '''java''', '''perl''', '''python'''. Note: lang attributes are in all lower case. | * To get syntax highlighting, surround your source code with <code><nowiki><source lang="</nowiki>''language''<nowiki>">...</source></nowiki></code> <br />or (preferred) <code><nowiki><syntaxhighlight lang="</nowiki>''language''<nowiki>">...</syntaxhighlight></nowiki></code>. <br />The [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages list of supported languages] is huge, and includes among many others '''c''', '''cpp''', '''java''', '''perl''', '''python'''. Note: lang attributes are in all lower case. | ||
* To keep your indentation, but '''not''' show syntax highlighting, you may surround your code with ''pre'' tags: <br /><code><nowiki><pre>your code</pre></nowiki></code> | * To keep your indentation, but '''not''' show syntax highlighting, you may surround your code with ''pre'' tags: <br /><code><nowiki><pre>your code</pre></nowiki></code> | ||
− | * [http://www.mediawiki.org/wiki/Help:Formatting To mark up the page in other ways] Be sure to read to the bottom of the page where tables, links and images are mentioned. | + | * [http://www.mediawiki.org/wiki/Help:Formatting To mark up the page in other ways] ''Be sure to read to the bottom of the page where tables, links and images are mentioned.'' |
Revision as of 21:08, 20 April 2011
I3XklJ <a href="http://jmzwylmlcpmi.com/">jmzwylmlcpmi</a>, [url=http://itxrhqkswyau.com/]itxrhqkswyau[/url], [link=http://xlszzokcgjcq.com/]xlszzokcgjcq[/link], http://inoiuhcpgrgx.com/
Quick tricks
- To get syntax highlighting, surround your source code with
<source lang="language">...</source>
or (preferred)<syntaxhighlight lang="language">...</syntaxhighlight>
.
The list of supported languages is huge, and includes among many others c, cpp, java, perl, python. Note: lang attributes are in all lower case. - To keep your indentation, but not show syntax highlighting, you may surround your code with pre tags:
<pre>your code</pre>
- To mark up the page in other ways Be sure to read to the bottom of the page where tables, links and images are mentioned.