Help:Editing: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
For text formatting ('''bold''', ''italics'', etc.) have a look at http://meta.wikimedia.org/wiki/Help:Editing for help. | |||
To highlight code, you can use the following syntax: | |||
{| class="wikitable" | |||
! What it looks like | |||
! What you type | |||
|- | |||
| | |||
<code> | |||
Code without syntax highlighting | |||
</code> | |||
| | |||
<pre> | |||
<code> | |||
Code without syntax highlighting | |||
</code> | |||
</pre> | |||
|- | |||
| | |||
<eiffel> | |||
class EIFFEL_CODE | |||
inherit | |||
LIST [ANY] | |||
end | |||
</eiffel> | |||
| | |||
<pre> | |||
<eiffel> | |||
class EIFFEL_CODE | |||
inherit | |||
LIST [ANY] | |||
end | |||
</eiffel> | |||
</pre> | |||
|- | |||
| | |||
<c> | |||
static void main(**args) { | |||
args++; | |||
} | |||
</c> | |||
| | |||
<pre> | |||
<c> | |||
static void main(**args) { | |||
args++; | |||
} | |||
</c> | |||
</pre> | |||
|- | |||
| | |||
<xml> | |||
<?xml version="1.0"?> | |||
<tag> | |||
<subtag/> | |||
<subtag attr="value"> | |||
</subtag> | |||
</tag> | |||
</xml> | |||
| | |||
<pre> | |||
<xml> | |||
<?xml version="1.0"?> | |||
<tag> | |||
<subtag/> | |||
<subtag attr="value"> | |||
</subtag> | |||
</tag> | |||
</xml> | |||
</pre> | |||
|- | |||
| | |||
Code inlined into text is done by having only one line between the code-tags. Like that: <eiffel>class EIFFEL</eiffel>. | |||
| | |||
<pre> | |||
Code inlined into text is done by having only | |||
one line between the code-tags. | |||
Like that: <eiffel>class EIFFEL</eiffel>. | |||
</pre> | |||
|} | |||
The available tags are: | |||
{| class="wikitable" | |||
| <nowiki><code>...</code></nowiki> | |||
| Code without syntax highlighting | |||
|- | |||
| <nowiki><eiffel>...</eiffel></nowiki> | |||
| Eiffel code | |||
|- | |||
| <nowiki><c>...</c></nowiki> | |||
| C code | |||
|- | |||
| <nowiki><cpp>...</cpp></nowiki> | |||
| C++ code | |||
|- | |||
| <nowiki><csharp>...</csharp></nowiki> | |||
| CSharp code | |||
|- | |||
| <nowiki><java>...</java></nowiki> | |||
| Java code | |||
|- | |||
| <nowiki><xml>...</xml></nowiki> | |||
| XML | |||
|} | |||
If you want to highlight a different language or have line numbers you can use the ''code'' tag and add formatting options: | |||
{| class="wikitable" | |||
| <nowiki><code>[php,N] ... </code></nowiki> | |||
| PHP code without line numbers | |||
|- | |||
| <nowiki><code>[perl,Y] ... </code></nowiki> | |||
| Perl code with line numbers | |||
|} | |||
Available language types are: eiffel, c, cpp, html, java, css, js, javascript, vbnet, csharp, pascal, xml, xhtml, php, delphi, bash, perl, sql, python, pseudocode | |||
Revision as of 18:33, 19 January 2007
For text formatting (bold, italics, etc.) have a look at http://meta.wikimedia.org/wiki/Help:Editing for help.
To highlight code, you can use the following syntax:
| What it looks like | What you type |
|---|---|
Code without syntax highlighting |
<code> Code without syntax highlighting </code> |
class EIFFEL_CODE inherit LIST [ANY] end |
<eiffel> class EIFFEL_CODE inherit LIST [ANY] end </eiffel> |
static void main(**args) { args++; } |
<c>
static void main(**args) {
args++;
}
</c>
|
<?xml version="1.0"?> <tag> <subtag/> <subtag attr="value"> </subtag> </tag> |
<xml> <?xml version="1.0"?> <tag> <subtag/> <subtag attr="value"> </subtag> </tag> </xml> |
|
Code inlined into text is done by having only one line between the code-tags. Like that: |
Code inlined into text is done by having only one line between the code-tags. Like that: <eiffel>class EIFFEL</eiffel>. |
The available tags are:
| <code>...</code> | Code without syntax highlighting |
| <eiffel>...</eiffel> | Eiffel code |
| <c>...</c> | C code |
| <cpp>...</cpp> | C++ code |
| <csharp>...</csharp> | CSharp code |
| <java>...</java> | Java code |
| <xml>...</xml> | XML |
If you want to highlight a different language or have line numbers you can use the code tag and add formatting options:
| <code>[php,N] ... </code> | PHP code without line numbers |
| <code>[perl,Y] ... </code> | Perl code with line numbers |
Available language types are: eiffel, c, cpp, html, java, css, js, javascript, vbnet, csharp, pascal, xml, xhtml, php, delphi, bash, perl, sql, python, pseudocode