Difference between revisions of "Help:Editing"
m |
|||
(4 intermediate revisions by the same user not shown) | |||
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> | ||
+ | |- | ||
+ | | | ||
+ | <e> | ||
+ | class EIFFEL_CODE | ||
+ | inherit | ||
+ | LIST [ANY] | ||
+ | end | ||
+ | </e> | ||
+ | | | ||
+ | <pre> | ||
+ | <e> | ||
+ | class EIFFEL_CODE | ||
+ | inherit | ||
+ | LIST [ANY] | ||
+ | end | ||
+ | </e> | ||
+ | </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 one line between the code-tags. Like that: <e>class EIFFEL</e>. | ||
+ | | | ||
+ | <pre> | ||
+ | Code inlined into text is done by having | ||
+ | one line between the code-tags. | ||
+ | Like that: <e>class EIFFEL</e>. | ||
+ | </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> | ||
+ | | C# 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 |
Latest revision as of 10:08, 23 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 |
<e> class EIFFEL_CODE inherit LIST [ANY] end </e> |
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 one line between the code-tags. Like that: |
Code inlined into text is done by having one line between the code-tags. Like that: <e>class EIFFEL</e>. |
The available tags are:
<code>...</code> | Code without syntax highlighting |
<eiffel>...</eiffel> | Eiffel code |
<c>...</c> | C code |
<cpp>...</cpp> | C++ code |
<csharp>...</csharp> | C# 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