Help:Formatting

From Rosetta Code
Revision as of 22:30, 12 January 2008 by rosettacode>Mwn3d (A good start to a wiki tips and tricks page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Editing on a wiki site is a bit different from editing plain HTML. While HTML is allowed, there are some extra things.

The Editor

If you enable JavaScript on your browser, you get a neat little toolbar to help you out with wiki editing. You can use these buttons you help you learn how to do things for yourself. First, there are Bold and Italics buttons. Next, there is a button you can use to link to an internal page, and one you can use to link to an external page. There is a button for making text into a header (like "The Editor" shown above). You can link to an image on the site with the next button:

Or to another form of media with the one after that. You can show mathematical formulas in LaTeX (not currently installed on the site) with the next button. The next button allows you to show text without wiki formatting in case your language uses text that wiki has reserved for itself (for example, two apostrophes in a row). The next button adds your signature to things (used mostly for talk pages), and the last button adds a horizontal bar, but that gets annoying.

Wiki Formatting on Your Own

If you would like to break yourself away from the GUI editor options, you can click the "edit" tab on almost any page to see for yourself, or just type the formatting codes in yourself.

'''Bold text'''

''Italic text''

[[Internal Link]] or [[Internal Link|Display title]] to change what words show up on the page for the link.

[external link] or [external link|Display title] to change what words show up on the page for the link.

=Big headline= (not a button in the JavaScript editor)

==Small headline==

===Medium headline=== (not a button in the JavaScript editor)

[[Image:Example.jpg]]

[[Media:Example.ogg]]

<math>LaTeX formula</math>

<nowiki>Don't use wiki formatting</nowiki>

Your signature: --~~~~

Horizontal bar: ----

*Bulleted text (shown below, not a button in the JavaScript editor)

:Indented text. Use multiple colons to indent multiple times. (not a button in the JavaScript editor)

<tt>Monospaced font text</tt> usually used for talking about commands in sentences. (not a button in the JavaScript editor)

Useful Tips, Characters, and Codes

One way to make sure that your edits have come out just like you want is to preview them before submitting them. Clicking the "Show preview" button before you save your page will show you how the page will look with whatever content you have added, but it won't bother anyone else if it's wrong. Even after all of this it may still not look right, though. So here are a few more tips:

  • To add a newline. simply insert two returns or add a <br>. (the HTML way will be a slightly smaller line break)
  • To add certain math characters (for those with no LaTeX experience), hold "alt" and press the following codes on your keypad (no padding with zeros):
  • 26 → (Implies)
  • 170 ¬ (Not)
  • 224 through 234 αßΓπΣσµτΦΘΩ (Greek letters: alpha, big beta, big gamma, pi, big sigma, little sigma, mu, tau, big phi, big theta, big omega)
  • 236 ∞ (Infinity)
  • 241 through 243 ±≥≤ (Plus/minus, less than/equal to, greater than/equal to)
  • 246 ÷ (Division)
  • 247 ≈ (Approximately)
  • 248 ° (Degrees)
  • 251 √ (Square root. Will not extend across entire formula...parentheses suggested)
  • 253 ² (Squared)
  • To add superscripted text, put <sup></sup> around it. <sup>example</sup> shows example.
  • To add subscripted text, put <sub></sub> around it. <sub>example</sub> shows example.
  • When you add programming examples to a page, make sure you insert them in the proper alphabetical order.
  • Case-insensitive
  • Longer words come after shorter words that start with the same sequence ("bar" comes before "barber" and C comes before C++)
  • To show your code in a code box, add a space before each line (including blank lines):

This is not code.

This is totally code.
  • Spelling counts
  • If you change only a small portion of a page, check the "This is a minor edit" box so that people can filter out typo fixes when they search.
  • If you have a question about something on a page, ask! Sometimes even we are wrong about coding, so if you think you see a problem or don't understand something, click the "discussion" tab at the top of the page and tell us about it.
  • Add your signature (--~~~~) to the end of messages on talk pages, and indent responses underneath previous messages:

Message 1.

Response to message 1.
Response to response to message 1.
Second response to message 1.

Message 2.

Response to message 2.