Help:Editing: Difference between revisions

951 bytes added ,  Saturday at 21:10
might as well start a section on tables *grumbles*
(rewrote lede; brought over my WikiTricks page to a new section since it belongs here as part of the general documentation; removed out-of-place link to Test)
(might as well start a section on tables *grumbles*)
Line 10: Line 10:
Underlining text is not as convenient; it requires you to fall back to raw HTML markup:<br />
Underlining text is not as convenient; it requires you to fall back to raw HTML markup:<br />
<code><nowiki><u>Here's the underline tag</u></nowiki></code> gives you <u>Here's the underline tag</u>.
<code><nowiki><u>Here's the underline tag</u></nowiki></code> gives you <u>Here's the underline tag</u>.
Finally, although we have not been in the habit of using it on OniGalore, you can highlight text with the mark tag:<br />
<code><nowiki><mark>Pay attention</mark></nowiki></code> yields <mark>Pay attention</mark>.


===Monospace and unformatted text===
===Monospace and unformatted text===
Line 119: Line 116:


Templates are not a special kind of wiki page; they're simply a term that we use to refer to pages that are meant to be transcluded.  Templates usually provide a standardized format for something like a [[:Template:Chapters|table]], or else they supply a standard [[:Template:Cleanup|header]] or [[:Template:OBD_File_Footer|footer]].  You should familiarize yourself with the templates if you plan to do a decent amount of editing; they are not only time-savers, they also help editors make their edits fit in with OniGalore standards, and make it easier to change large amounts of wiki text at once.
Templates are not a special kind of wiki page; they're simply a term that we use to refer to pages that are meant to be transcluded.  Templates usually provide a standardized format for something like a [[:Template:Chapters|table]], or else they supply a standard [[:Template:Cleanup|header]] or [[:Template:OBD_File_Footer|footer]].  You should familiarize yourself with the templates if you plan to do a decent amount of editing; they are not only time-savers, they also help editors make their edits fit in with OniGalore standards, and make it easier to change large amounts of wiki text at once.
==Tables==
MediaWiki provides simple markup for creating HTML tables that avoids the need to create lots of <code><nowiki><tr></nowiki></code> and <code><nowiki><td></nowiki></code> tags, though the results are also somewhat more limited than a pure HTML table. To open a table simply write <code><nowiki>{|</nowiki></code>, optionally declare column names with <code><nowiki>!</nowiki></code>, then declare new rows with <code><nowiki>|-</nowiki></code> and new cells within a row with <code><nowiki>|</nowiki></code>. This markup…
<pre>
{|
!Column 1
!Column 2
|-
|R1C1
|R1C2
|-
|R2C1
|R2C2
|}</pre>
…produces this table:
{|
!Column 1
!Column 2
|-
|R1C1
|R1C2
|-
|R2C1
|R2C2
|}
Normally we apply the class "wikitable" to a table to give it borders and make it look pretty with <code>{| class="wikitable"</code>, though you can do a lot of manual styling for almost any custom look you want (see {{SectionLink||Further help}} to read more about tables).
To make the table a fixed width, add this CSS styling to the first line: <code>{| style="width:500px;"</code>. You can also use a percentage such as <code>width:50%;</code>. To center the table on the page, use <code>{| style="margin-left:auto; margin-right:auto;"</code>.
For more advanced table markup, see below.


==Advanced tricks==
==Advanced tricks==
Some of these "tricks" are very simple in practice, but hard to remember. This is basically a list of bookmarks to helpful examples.
Some of these "tricks" are very simple in practice, but hard to remember. This is basically a list of bookmarks to helpful examples around the wiki:
*Alphabetic footnotes: [[Quotes/Manual]]
*Alphabetic footnotes: [[Quotes/Manual]]
*Indenting wrapped text: [[Walkthrough]]
*Indenting wrapped text: [[Walkthrough]]
Line 132: Line 161:
**Advanced styling: [[Template:OBD File Header]]
**Advanced styling: [[Template:OBD File Header]]
**Aesthetic designs: [[Template:PoliciesSidebox]], [[Anniversary Edition]]
**Aesthetic designs: [[Template:PoliciesSidebox]], [[Anniversary Edition]]
**Centering on a page: Simply drop <code>style="margin-left:auto; margin-right:auto;"</code> onto the first line after the <code>{|</code>
**Hideable columns: [[OBD:Versions]]
**Hideable columns: [[OBD:Versions]]
**Multipart tables: [[Rights]]
**Multipart tables: [[Rights]]