Difference between revisions of "Help:Contents"

From Amahi Wiki
Jump to: navigation, search
Line 30: Line 30:
 
<pre>
 
<pre>
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
<?php $v = "string";    // sample initialization ?>
+
<?php
This is some html text
+
      $v = "string";    // sample initialization
 +
?>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
</pre>
 
</pre>
Line 38: Line 39:
  
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
<?php $v = "string";    // sample initialization ?>
+
<?php
 +
      $v = "string";    // sample initialization
 +
?>
 
This is some html text
 
This is some html text
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 00:19, 2 January 2011

Help Topics

Wiki Formatting:

Code Formatting

To add formatting to code, we have a little Template:Code code template that can be used like this:

{{Code|bash$ this is a bash command
-bash: this: command not found
bash$ 
}}

Which should look like this:

bash code
​bash$ ls -l total 696 ... bash$ ​


Syntax Highlight for Code

If you like syntax highlighting, we have the syntax highlight extension and you can do this:

<syntaxhighlight lang="php">
<?php
      $v = "string";    // sample initialization
?>
</syntaxhighlight>

To look like:

<?php
      $v = "string";    // sample initialization
?>
This is some html text

or

<syntaxhighlight lang="ruby">
> ["Amahi", "Linux"].map{|i| "#{i} is cool!"}
=> ["Amahi is cool!", "Linux is cool!"]
</syntaxhighlight>

To look like:

       > ["Amahi", "Linux"].map{|i| "#{i} is cool!"}
       => ["Amahi is cool!", "Linux is cool!"]

Complete editing help