Difference between revisions of "Help:Markup reference"

From Camera-wiki.org
Jump to: navigation, search
(Lists)
Line 27: Line 27:
 
and take a quick look at these sections. The former is the topmost level of classification; it was added with a pair of double equals signs: “'''==Second generation: hinged back=='''”. The latter is one stage below this, and uses a pair of treble equals signs: “'''===1933 model==='''”. Note that they're not numbered: the numbering too is generated automatically.
 
and take a quick look at these sections. The former is the topmost level of classification; it was added with a pair of double equals signs: “'''==Second generation: hinged back=='''”. The latter is one stage below this, and uses a pair of treble equals signs: “'''===1933 model==='''”. Note that they're not numbered: the numbering too is generated automatically.
  
For a further level of subdivision, '''====a third level====''' (four equals signs on each side) can be used. And if even this is not enough, '''=====a fourth level=====''' (five on each side) can be used too.
+
Put a header on a new line, and start anything that follows it on a new line. ???
 +
 
 +
For a further level of subdivision, '''====a third level====''' (four equals signs on each side) can be used. And if even this is not enough, a fourth and a fifth level (with five and six on each side respectively) can be used too.
  
 
==Page ingredients==
 
==Page ingredients==
Line 185: Line 187:
  
 
??? If you know CSS, you can make judicious use of the '''div''' element with the '''style''' attribute for page layout.
 
??? If you know CSS, you can make judicious use of the '''div''' element with the '''style''' attribute for page layout.
 +
 +
Use “'''<div class="center" style="width:auto; margin-left:auto; margin-right:auto;">'''” to start and “'''</div>'''” for a block of centered text.
  
 
==Links==
 
==Links==
Line 217: Line 221:
  
 
Any material can be placed in a hidden comment, as long as it does not include a pair of hyphens. (An implication of this is that one comment cannot be nested in another comment.)
 
Any material can be placed in a hidden comment, as long as it does not include a pair of hyphens. (An implication of this is that one comment cannot be nested in another comment.)
 +
 +
===Horizontal rules===
 +
 +
Make a horizontal rule (line) by placing an unbroken set of four hyphens (“----”), and only these hyphens, on a line.
  
 
==Notes==
 
==Notes==
Line 222: Line 230:
  
 
==See also==
 
==See also==
*[[Wikipedia:Help:HTML in wikitext|HTML in wikitext]], Wikipedia.
+
*[[Wikipedia:Help:Wiki markup|Wiki markup]], Wikipedia (reference guide)
 +
*[[Wikipedia:Help:HTML in wikitext|HTML in wikitext]], Wikipedia (reference guide)

Revision as of 14:37, 3 April 2011

This may eventually grow into something worth moving into a new “Help:” ... but it has a hell of a long way to go first.

This page explains Mediawiki markup. Mediawiki is the software behind not only Camera-wiki.org but also Wikipedia (for which it was created) and many other wikis; you may find what follows familiar from one of these. And if you happen to be used to HTML or XHTML, the explanation will be easy to follow, as Mediawiki is a preprocessor for XHTML and its markup is thus similar.

Page organization

Paragraphs (and line breaks)

Single line breaks have no effect within paragraphs. To separate one paragraph from the following paragraph, insert a blank line between them (hit the Enter key twice).

Don't attempt to indent the first line of a paragraph.

To indent a block quotation, start the block with “<blockquote>” and end it with “</blockquote>”.

There's convention whereby a comment in a talk page is indented further from the left than is the comment that prompted it. For each level of indentation from the left, add one colon (“:”) at the very start of your comment.

For a simple line break, use “<br />”. (In normal body text this is unnecessary; it can help within captions and the like.)

Headers (subtitles)

Think of an article as having a hierarchy of organization. Any article that is not particularly short needs subdivision by headers. As an example of this in action, we'll look at the article “Pearlette”.

The very start rightly has no header. (Don't add headers such as “Introduction”, “Preamble”, or similar.)

There follows a table of contents, which the software has generated automatically. Note within it:

3 Second generation: hinged back
3.1 1933 model

and take a quick look at these sections. The former is the topmost level of classification; it was added with a pair of double equals signs: “==Second generation: hinged back==”. The latter is one stage below this, and uses a pair of treble equals signs: “===1933 model===”. Note that they're not numbered: the numbering too is generated automatically.

Put a header on a new line, and start anything that follows it on a new line. ???

For a further level of subdivision, ====a third level==== (four equals signs on each side) can be used. And if even this is not enough, a fourth and a fifth level (with five and six on each side respectively) can be used too.

Page ingredients

Tables

Tables need to be explicitly opened and closed, and their contents must be written row by row. Here's a 2×2 example:

{|
|-
! Header 1
! Header 2
|-
| row 1, cell 1
| row 1, cell 2
|-
| row 2, cell 1
| row 2, cell 2
|}

This produces:

Header 1 Header 2
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

For details, see Wikipedia's “Help:Table”.

Lists

Lists are remarkably easy. There are two kinds, unordered (not numbered) and ordered (numbered).

What it looks like What you type Comments
Unordered:
  • This
  • That
  • The other
*This
*That
*The other
asterisks
Ordered:
  1. This
  2. That
  3. The other
#This
#That
#The other
hash marks

A list item should be typed on one line (it should not include a line break).

Lists may be nested, and in any combination: an ordered/unordered list may be nested within an ordered/unordered list. An example:

What it looks like What you type Comments
Unordered within ordered:
  1. Prewar
  2. Postwar film
    • 35mm and smaller
    • Larger than 35mm
  3. Digital
#Prewar
#Postwar film
#*35mm and smaller
#*Larger than 35mm
#Digital
A hash mark for every item, and not just for every top-level item

Character formatting

The way that text appears within a paragraph, list item, etc, can be altered via either Mediawiki-specific use of apostrophes[1] or certain XHTML tags. First, the apostrophes:

What it looks like What you type Comments
Italics: Asahi Camera is helpful
''Asahi Camera'' is helpful
Two (plain) apostrophes to start, two to finish.
Bold: It is marked SP
It is marked '''SP'''
Three (plain) apostrophes to start, three to finish.

And yes, you can combine italics and bold.

Secondly, the XHTML tags. You mark the start of an area needing some change with “<XXX>” and you mark its end with “</XXX>” — though not with “XXX” but instead with something else, as explained below:

What it looks like What you type Comments
Superscript: marketed as the “330D” in Europe
marketed as the “330<sup>D</sup>” in Europe
Subscript: marketed as the “A41” in Japan
marketed as the “<sub>A</sub>41” in Japan
Small: [not verified]
<small>[not verified]</small>
Rarely helpful in the text of an article.

(Editors familiar with CSS can also format within <span style="[CSS rules]"> and </span>.)

Characters

Characters on your keyboard

You should be able to type just about any character that's on your keyboard, and in the normal way. Exceptions are:

  • combinations of characters that most people would never want (such as pairs of single quotation marks)
  • the two inequality signs “<” and “>

The last pair will seldom be useful in the context of cameras; but if you do need them, type “&lt;” and “&gt;” respectively. (Mnemonics: “lt” and “gt” for “less than” and “greater than” respectively.)

Characters not on your keyboard

As for all the characters that aren't on most people's keyboards and that are occasionally useful — áàäâāăãåą and more — you can either:

  • copy them from elsewhere and paste them
  • insert them via the “numeric references” (eg “&#333;” for “ō”) or named “character entities” (eg “&uuml;” for “ü”) that are standard for HTML or XHTML in regular web pages

Many web resources help with the latter; one of these is Alan Wood’s Unicode resources.

Page layout

It's rarely a good idea to set out to design a page, but it may help to design parts of a page.

For small agglomerations of images, the use of tables (described above) is acceptable. But tables are better avoided for anything large, as they tend to force a lot of scrolling in small browser windows.

??? If you know CSS, you can make judicious use of the div element with the style attribute for page layout.

Use “<div class="center" style="width:auto; margin-left:auto; margin-right:auto;">” to start and “</div>” for a block of centered text.

Links

For links from graphics, see ???.

Internal links

Camera-wiki.org has a page titled “Pearlette”. The simple way to link to it is “[[Pearlette]]” (for “Pearlette”). If it helps to link to it by another name, this other name follows the title and the pipe character (“|”): “[[Pearlette|Konishiroku Pearlette]]” (for “Konishiroku Pearlette”).

External links

See also ???

Simply, for a link to a page that's not in Camera-wiki.org, use single (square) brackets, the URL, the page title but no pipe character: “[http://www.tlr-cameras.com/ TLR Cameras Website]” for TLR Cameras Website.

Interwiki links work for some other wikis. For example, “[[Wikipedia:Fujifilm]]” brings Wikipedia:Fujifilm. Combination with a pipe and an alternative title works: “[[Wikipedia:Fujifilm|Fujifilm (Wikipedia)]]” brings Fujifilm (Wikipedia). Likewise, “[[Commons:File:Perfekta_6x6_IMGP4292.jpg|Perfekta (Wikimedia Commons)]]” brings Perfekta (Wikimedia Commons). There's also a handy shortcut employing the pipe character: “[[Wikipedia:Fujifilm|]]” brings Fujifilm.

Footnoting

After either a factual assertion that would benefit from being sourced to an authority, or an opinion or quotation, add a source footnote. The markup for any footnote is the same. ???

If the article is to have any footnotes, then there should be a single self-closing tag, “<references />” below the point from which the last of the footnotes is to be linked. It normally goes under (and indeed is the only text under) the header “==Notes==”.

Write each footnote at the point in the main text from which there should be an index number. Insert “<ref>XYZ</ref>”. This will lead to the automatic generation of an appropriate index number and a footnote that reads “XYZ”.

A given footnote may be pointed to from two or more places. In any one of these places — among which the first is recommended, as this aids subsequent editing — add the footnote in full, but with a name.[2] Example: “<ref name="perfekta66">XYZ</ref>”. Each of the other pointers to the same footnote is simply a self-closing tag with the same name: “<ref name="perfekta66" />”.

Miscellaneous

Hidden comments

Material written between an opening “<--” and a closing “-->” is visible to anyone who edits the page but isn't otherwise visible. (This is useful for temporarily “commenting out” material that's seriously flawed but that could later be fixed.)

Any material can be placed in a hidden comment, as long as it does not include a pair of hyphens. (An implication of this is that one comment cannot be nested in another comment.)

Horizontal rules

Make a horizontal rule (line) by placing an unbroken set of four hyphens (“----”), and only these hyphens, on a line.

Notes

  1. These must be standard, straight-from-the-keyboard apostrophes: ' . “Typographic quotes” — opening- and closing-specific quotation marks and — won't work for this.
  2. The name should start with a simple letter (A–Z, a–z), and should only include letters, digits (0–9), underlines and/or hyphens.???

See also