Difference between revisions of "PSU Cyril Wiki:Wiki markup guide"

From PSU Cyril Wiki
Jump to: navigation, search
m (THis is how you imaging.)
(Tables)
 
Line 43: Line 43:
 
== Advanced markup ==
 
== Advanced markup ==
 
=== Tables ===
 
=== Tables ===
 +
{| class="wikitable" style="text-align:center"
 +
! colspan="4" | Table header
 +
|-
 +
| Cell 1 || Cell 2 || Cell 3 || Cell 4
 +
|}
 +
* The table above was produced using the following code:
 +
<pre>{| class="wikitable" style="text-align:center"
 +
! colspan="4" | Table header
 +
|-
 +
| Cell 1 || Cell 2 || Cell 3 || Cell 4
 +
|}</pre>
 +
* Here is a breakdown of what function each line serves.
 +
*# '''<nowiki>{| class="wikitable" style="text-align:center"</nowiki>''' - This defines the table and its basic properties.  You can replace ''center'' with ''left'' or ''right'' to alter text alignment.
 +
*# '''<nowiki>! colspan="4" | Table header</nowiki>''' - This creates a table header.  By beginning a line with an exclamation mark, you will create a cell with a slightly darker background.  Also, any text in this cell will automatically be in bold.  In this particular example, ''colspan="4"'' defines that this particular cell will stretch across four columns.  (Always remember to separate any style functions and the text you want displayed in the header with a vertical pipe, |.)
 +
*# '''<nowiki>|-</nowiki>''' - This combination of a vertical pipe and hyphen is used to create a new row.
 +
*# '''<nowiki>| Cell 1 || Cell 2 || Cell 3 || Cell 4</nowiki>''' - This is the actual new row of data.  Be sure that you always start a new row with a single vertical pipe, after which you can type your data.  When you are ready to add a new cell to a row, type two vertical pipes, followed by your data.
 +
*# '''<nowiki>|}</nowiki>''' - This defines the end of a table.  You must include this to properly close a table.
  
 
=== Templates ===
 
=== Templates ===

Latest revision as of 11:34, 15 June 2012

The basics

Text markup

  • Type in italics by enclosing words in double apostrophes. For example, ''I'm italicized'' appears as I'm italicized.
  • Bold text is created by enclosing words in triple apostrophes. So, '''that's a bold statement''' appears as that's a bold statement.
  • Bold, italicized text can be created by using quintuple apostrophes. '''''I'm bold and italicized''''' appears as I'm bold and italicized.

Creating links

  • In order to create a link to another article at the PSUPedia, enclose the article's name in double brackets, [[like this]].
    • If the article you've linked already exists, the link will appear in blue text.
    • If the article you've linked does not exist, a red link will be displayed. You can click this red link to be taken to the editor where you can create an article.
  • You can make links display alternate names by typing a vertical pipe after the link followed by the name you want the link to display, all encased in double brackets. For example, [[Main Page|take you home]] will take you home.
  • External links are created by encasing the full URL in single brackets, like this [http://phantasystaruniverse.jp/]. You should always follow the URL with a space and then text for what you want the link to say, otherwise the link will appear only as a number in brackets followed by the "off-wiki link" symbol, like this [1]. For example, [http://phantasystaruniverse.jp/ official Japanese PC site] will appear like this: official Japanese PC site.

Creating lists

  • Basic unordered lists are created by using an asterisk (*) at the start of each new line.
    • If you need to indent a new line in the list, simply increase the number of asterisks by one. This line, for example, begins with **.
      • This can be done as many times as necessary. (This line used three asterisks.)
        • But don't go overboard! (Four asterisks here, oh, dear...)
      • When you're ready to go back one
  • or more indention levels in your list, simply subtract asterisks.
  1. If you prefer to create numbered lists, use a pound sign # instead of an asterisk.
    1. Just like with unordered lists, pound signs can be stacked to indent.
  2. The main indention level will maintain sequence with itself.
    1. But further indention levels
    2. will only maintain order if they are not interrupted
    3. by a lower-indented line.

Sections and subsections

  • Articles generally are divided up into sections to better organize data. Sections are created by enclosing what you want to name a section in double equals signs. The section named "The basics" in this article, for example, was created by typing == The basics ==.
  • Subsections are created in the same way. Simply increase the number of equals signs enclosing the subsection name. In this article, this particular subsection, "Sections and subsections," was created by typing === Sections and subsections ===.
  • After at least three sections or subsections have been created in an article, a table of contents will appear at the top of the article. Clicking the links in the table of contents will take you to each section.

Images

  • First, familiarize yourself with our image submission guidelines.
  • Second, follow those guidelines. No, seriously. Follow them.
  • Use this page to upload an image. Please remember the file name and extension; you'll need it in a moment!
  • To add an image to an article, use this code: [[File:Image_name.png|Alternate text]]. Obviously, replace "Image_name.png" with your image's name and extension. "Alternate text" can be replaced with a caption that will display when the image is moused-over.
  • Other commands can be added to the image code to alter how it is displayed. Each command should be added after the file name, and should be separated from all other parts of the code by vertical pipes, |. Here are a few imaging options:
    1. Use thumb to display the image as a thumbnail. If you include alternate text, that text will be displayed as a caption below the image. For example: [[File:Image_name.png|thumb|Alternate text]]
    2. Alignment commands (left, right, center) can be used to align the image with a particular side of an article. For example: [[File:Image_name.png|right|Alternate text]]
    3. Images can be resized by stating a pixel width in the coding. This should be done by inserting a number followed by px. For example: [[File:Image_name.png|150px|Alternate text]]

Advanced markup

Tables

Table header
Cell 1 Cell 2 Cell 3 Cell 4
  • The table above was produced using the following code:
{| class="wikitable" style="text-align:center"
! colspan="4" | Table header
|-
| Cell 1 || Cell 2 || Cell 3 || Cell 4
|}
  • Here is a breakdown of what function each line serves.
    1. {| class="wikitable" style="text-align:center" - This defines the table and its basic properties. You can replace center with left or right to alter text alignment.
    2. ! colspan="4" | Table header - This creates a table header. By beginning a line with an exclamation mark, you will create a cell with a slightly darker background. Also, any text in this cell will automatically be in bold. In this particular example, colspan="4" defines that this particular cell will stretch across four columns. (Always remember to separate any style functions and the text you want displayed in the header with a vertical pipe, |.)
    3. |- - This combination of a vertical pipe and hyphen is used to create a new row.
    4. | Cell 1 || Cell 2 || Cell 3 || Cell 4 - This is the actual new row of data. Be sure that you always start a new row with a single vertical pipe, after which you can type your data. When you are ready to add a new cell to a row, type two vertical pipes, followed by your data.
    5. |} - This defines the end of a table. You must include this to properly close a table.

Templates