Help:Formatting

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Example formatting page)
 
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Here are some typical formatting elements.  Hit the edit button above to see what you need to type to get each effect.
+
= General Guidelines =
  
The Contents box you see below is generated automatically and responds to heading lines you add to the text:
+
* English text only.
 +
* Please check for spelling, punctuation and grammatical errors in your work before submitting it.
 +
* Do not add any author or revision information to your page. This is all automatically handled by page history.
 +
* Discussions and comments about a page belong in the accompanying discussion page. You can visit or create the discussion section of any page by clicking on the "Discussion" tab at the top left corner.
 +
* Place relevant [http://meta.wikimedia.org/wiki/Help:Category category] tags at the bottom of the page. Please try to use them logically and look at existing pages for use examples.
  
= Level 1 heading =
 
  
Don't use level one headings if you can help it.  Use level 2 headings for anything which needs a clear dividing line, and level 3 for most other things.
+
= Code =
  
== Level 2 heading ==
+
* Small snippets of code, like for example <code> int health = 100</code>, can be denoted using the simple <code>&lt;code&gt;&lt;/code&gt;</code> tag.
  
=== Level 3 heading ===
+
* Don't use tabs in code examples. They are hard to type when editing in a browser and lines containing tabs have weird problems when combined with links generated by the syntax highlighter. If you have a script file with tabs and don't want to change that, you can copy the contents and then run the following line in a command shell before pasting it into the wiki: '' pbpaste | expand -t 4 | pbcopy '' (This example assumes you have set your editor to have a tab stop every 4 characters).
  
==== Level 4 heading ====
+
* For full blocks of code and proper syntax highlighting use <code>&lt;syntaxhighlight lang="csharp"&gt;&lt;/syntaxhighlight&gt;</code> instead. Which will produce the following:
  
===== Level 5 heading =====
+
<syntaxhighlight lang="csharp">
 +
using UnityEngine;
  
====== Level 6 heading ======
+
public class MyScript : MonoBehaviour
 +
{
 +
    public int value = 943;
  
Use multiple single quotes for ''italics'' and '''bold''' instead of the equivalent HTML tags.
+
    // Update is called once per frame.
 +
    private void Update()
 +
    {
 +
        if (value > 0)
 +
        {
 +
            value--;
 +
        }
 +
    }
 +
}
 +
</syntaxhighlight>
  
If you want to leave a paragraph break, use two carriage returns.
+
[[Help:Contents| More editing help.]]
If you only use one, it'll automatically join the second sentence onto the first.
+
 
+
----
+
 
+
You can add a horizontal divider, like the one above,  by typing four dashes.
+
 
+
In talk pages, you can type <nowiki>--~~~~</nowiki> (two dashes and four tildes) to sign your comments with your name and a datestamp.  This makes it easier to tell who is writing.  The signature looks like this: --[[User:NCarter|NCarter]] 23:11, 28 April 2006 (GMT)
+
 
+
== Lists ==
+
 
+
You can do lists by prefixing each item with asterisks:
+
 
+
*One
+
*Two
+
*Three
+
 
+
Numbered lists are done in the same way, but with hash signs:
+
 
+
#One
+
#Two
+
#Three
+
 
+
You can nest lists by adding extra symbols, and you can even mix numbered and non-numbered lists:
+
 
+
*One
+
*Two
+
**One
+
**Two
+
**#One
+
**#Two
+
**Three
+
*Three
+
 
+
== Internal links ==
+
 
+
Don't use complete URLs for internal links. Just use the bit which appears after 'index.php?title=' in the URL.  The following are examples of how to make various kinds of links:
+
 
+
[[Main Page]] - no need to use underscores for spaces... this is handled automatically.
+
 
+
[[Main Page|Link with a different title]] - use a bar | character to separate the link from the title.
+
 
+
[[:Category:MonoBehaviour]] - an unformatted link to a category.  For links to other namespaces, it's necessary to use a leading colon to cancel out the other colon between the namespace and the page name.
+
 
+
[[:Category:MonoBehaviour|A link to a category with a different title]] - Again, use a bar character as a separator.
+
 
+
== External links ==
+
 
+
[http://otee.dk/ OTEE] - external link.  Note that the link title is separated from the URL by a space.  You can't use a bar character for this purpose.
+

Latest revision as of 00:46, 19 October 2020

[edit] General Guidelines

  • English text only.
  • Please check for spelling, punctuation and grammatical errors in your work before submitting it.
  • Do not add any author or revision information to your page. This is all automatically handled by page history.
  • Discussions and comments about a page belong in the accompanying discussion page. You can visit or create the discussion section of any page by clicking on the "Discussion" tab at the top left corner.
  • Place relevant category tags at the bottom of the page. Please try to use them logically and look at existing pages for use examples.


[edit] Code

  • Small snippets of code, like for example int health = 100, can be denoted using the simple <code></code> tag.
  • Don't use tabs in code examples. They are hard to type when editing in a browser and lines containing tabs have weird problems when combined with links generated by the syntax highlighter. If you have a script file with tabs and don't want to change that, you can copy the contents and then run the following line in a command shell before pasting it into the wiki: pbpaste | expand -t 4 | pbcopy (This example assumes you have set your editor to have a tab stop every 4 characters).
  • For full blocks of code and proper syntax highlighting use <syntaxhighlight lang="csharp"></syntaxhighlight> instead. Which will produce the following:
using UnityEngine;
 
public class MyScript : MonoBehaviour
{
    public int value = 943;
 
    // Update is called once per frame.
    private void Update()
    {
        if (value > 0)
        {
            value--;
        }
    }
}

More editing help.

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox