Difference between revisions of "Help:Editing"

m
 
Line 72: Line 72:
 
|-
 
|-
 
|
 
|
Code inlined into text is done by having one line between the code-tags. Like that: <eiffel>class EIFFEL</eiffel>.
+
Code inlined into text is done by having one line between the code-tags. Like that: <e>class EIFFEL</e>.
 
|
 
|
 
<pre>
 
<pre>
 
Code inlined into text is done by having
 
Code inlined into text is done by having
 
one line between the code-tags.  
 
one line between the code-tags.  
Like that: <eiffel>class EIFFEL</eiffel>.
+
Like that: <e>class EIFFEL</e>.
 
</pre>
 
</pre>
 
|}
 
|}

Latest revision as of 11: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: class EIFFEL.

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