Help:Editing: Difference between revisions
Dubiousjim (talk | contribs) (→Guidelines: fix {{Delete}}) |
Dubiousjim (talk | contribs) m (→Displaying code: formatting, typo) |
||
Line 255: | Line 255: | ||
<dl> | <dl> | ||
<dt id="inlinecode">Inline code | <dt id="inlinecode">Inline code | ||
<dd>Use <code><code></code> for styling, and <code><nowiki></code> to suppress markup. If you use both, they must appear in that order. <code><nowiki></code | <dd>Use <code><code></code> for styling, and <code><nowiki></code> to suppress markup. If you use both, they must appear in that order. <code><nowiki></code> converts → entities and collapses whitespace (even multiple <code>\n</code>s), but ignores all <nowiki>'''wiki'''</nowiki> and <code><span style="color:green"></code>HTML<code></span></code> <nowiki>[[markup]]</nowiki>. | ||
<dt>User input | <dt>User input | ||
<dd>{{Cmd|{{lb}}[[Template:Cmd|Cmd]]{{!}}a <var><var>command</var></var> to try{{rb}}}} | <dd>{{Cmd|{{lb}}[[Template:Cmd|Cmd]]{{!}}a <var><var>command</var></var> to try{{rb}}}} | ||
This is a block-level equivalent for the inline HTML element <kbd> (which the wiki does not process). Note that wiki markup is still honored in the command text; but whitespace is not collapsed. | This is a block-level equivalent for the inline HTML element <code><kbd></code> (which the wiki does not process). Note that wiki markup is still honored in the command text; but whitespace is not collapsed. | ||
Line 306: | Line 306: | ||
{{Cat|/path/to/file|body '''text''' <br /> more | {{Cat|/path/to/file|body '''text''' <br /> more | ||
Second line.}} | Second line.}} | ||
Note that wiki and HTML markup in the file contents aren't | Note that wiki and HTML markup in the file contents aren't converted, though entities still are. You must escape characters as follows: | ||
: {{=}} not inside [[..]] use &#61; or {{lb}}{{=}}{{rb}} | : {{=}} not inside [[..]] use &#61; or {{lb}}{{=}}{{rb}} | ||
: {{!}} not inside [[..]] use &#124; or {{lb}}!{{rb}} | : {{!}} not inside [[..]] use &#124; or {{lb}}!{{rb}} | ||
Line 324: | Line 324: | ||
Second line. | Second line. | ||
</p> | </p> | ||
This would be the behavior of HTML's <pre> without any styling. To wrap to screen width, use {white-space:pre-wrap}. | This would be the behavior of HTML's <code><pre></code> without any styling. To wrap to screen width, use {white-space:pre-wrap} in a style attribute. | ||
<!-- this extension not present | <!-- this extension not present |
Revision as of 11:31, 25 March 2012
Guidelines
- Starting a page
-
There are 2 ways to start a new page:
- Type the URL into the address bar. For example: http://wiki.alpinelinux.org/wiki/New_page
- Create a
[[New page]]
link on an existing page, then click the link.
- Temporary pages
- If you wish to create a temporary page, please use a subpage of your User namespace. For example: User:Hillary/Temporary page. This helps to keep the main namespace tidy and prevents the pages from turning up in normal searches (the User namespace is not searched by default).
- Moving/renaming pages
-
- If the move might be controversial, propose it first and try to resolve any disagrements on the discussion page.
- The new name must either not exist as a page, or exist as a redirect page with only 1 entry in its page history.
- Use the "What links here" link in the sidebar, and be sure to update all links to internal page targets. If this isn't done, double redirects are created. (That's where a redirect leads to a redirect, and in such cases only the first redirect is followed automatically.)
- In the default wiki skin, the link to Move pages (and also to Watch them) is in the popup menu between "View history" and the Search box.
- Always move the discussion page, too, unless you have a very good reason for not doing so.
- Deleting pages
- Only administrators can delete pages. Other users should instead use
{{Delete}}
to propose the page for deletion. (Don't clear the page's content except where it's obviously spam.)
Inline elements
- ''italic'' or use <i> or <em> or {font-style:italic} in a style attribute
- '''bold''' or use <b> or <strong> or {font-weight:bold} in a style attribute
- <small> or use {font-size:smaller} in a style attribute
- <big> or use {font-size:larger} in a style attribute (invalid in HTML5)
- <sup> or use {vertical-align:super} in a style attribute
- <sub> or use {vertical-align:sub} in a style attribute
- <font> is deprecated; use {font-size:10pt; color:red; font-family:"Courier"} in a style attribute
- <span style="color:gray">
- <span style="color:white; background:red">
- <u> or use <ins> or {text-decoration:underline} in a style attribute (<u> is valid in HTML5 but not HTML4/strict; <ins> can also be a block element)
<s>or use<del>or {text-decoration:line-through} in a style attribute (<s> is valid in HTML5 but not HTML4/strict; <del> can also be a block element)
<code>
uses {font-family:monospace;} (<tt> is invalid in HTML5)markup and → entities are still honored
- See also below
- and and
and are not processed by this wiki
- <var>
- <cite>
- {{Hint|term|explanation}}
- {{Path|/a/path/name}}
- {{Key| Ctrl}}+{{Key| C}}
- Here is one line, followed by <br />
and another line.
- Here is <!-- a comment -->.
Links
Here is [[Wiki pagetitle|a wiki page]]: a wiki page. Text immediately suffixing the link will be incorporated into the link text; separate with <nowiki /> to suppress.
Here is {{Pkg|gtk+2.0}}: gtk+2.0.
Here is an Alpine Issue link {{Issue|279}}: #279. The issue's description can be included as an optional second argument.
Here is [http://www.example.org/ an external link]: an external link. If no link text is supplied: [1]. Omit brackets for http://www.example.org/ (use <nowiki> to suppress).
[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info].
In Talk pages, -- ~~~~ gives a signature and timestamp: -- Dubiousjim 10:00, 4 March 2012 (UTC)
Headings
An article with 4 or more headings automatically creates a table of contents. You can force a table of contents (or fine-tune its placement) by inserting __TOC__. You can suppress the table of contents by inserting __NOTOC__.
Start headings at level 2, and don't skip levels.
== Heading2 ==
will produce:
Heading2
=== Heading3 ===
will produce:
Heading3
==== Heading4 ====
will produce:
Heading4
{{Delete|Message.}}
will produce:
This material is proposed for deletion ... Message. (Discuss) Make sure no other pages link here and check the page's history before deleting. |
{{Obsolete|Alternate message.}}
will produce:
This material is obsolete ... Alternate message. (Discuss) |
{{Merge|Page to merge with|Additional message.}}
will produce:
This material is proposed for merging ... It should be merged with Page to merge with. Additional message. (Discuss) |
{{Move|New page name|Reason.}}
will produce:
This page is proposed for moving ... It should be renamed to New page name. Reason. (Discuss) |
{{Draft|Alternate message.}}
will produce:
This material is work-in-progress ... Alternate message. (Last edited by Dubiousjim on 25 {{{03}}} 2012.) |
{{Expand|Alternate message.}}
will produce:
This material needs expanding ... Alternate message. |
Block elements
Lists
# Here is a numbered list item. ## Doubly-numbered #* Numbered and bulleted. * Here is a bulleted list item. ** Doubly-bulleted *# Bulleted and numbered. *# Another item.
will produce:
- Here is a numbered list item.
- Doubly-numbered
- Numbered and bulleted.
- Here is a bulleted list item.
- Doubly-bulleted
- Bulleted and numbered.
- Another item.
Blank lines, or non-bulleted/numbered lines, end the lists.
Each of these:
;item: Body text {{Define|item|Body text}}
will produce:
- item
- Body text
The second markup option also wraps a <span id="item">
around the block.
Indenting unstyled text
: Simply indented text (on left side only). <blockquote>This is a blockquote. It collapses whitespace, and indents on both sides.</blockquote>
will produce:
- Simply indented text (on left side only).
This is a blockquote. It collapses whitespace, and indents on both sides.
Displaying code
- Inline code
- Use
<code>
for styling, and<nowiki>
to suppress markup. If you use both, they must appear in that order.<nowiki>
converts → entities and collapses whitespace (even multiple\n
s), but ignores all '''wiki''' and<span style="color:green">
HTML</span>
[[markup]]. - User input
{{Cmd|a <var>command</var> to try}}
This is a block-level equivalent for the inline HTML element
<kbd>
(which the wiki does not process). Note that wiki markup is still honored in the command text; but whitespace is not collapsed.
- Command output; or shell sessions that intermix prompts, user input, and command output; or segments of files
- Use space-indented blocks or
<pre>
:Every line begins with '''a space'''. <pre> Lines aren't indented with '''a space.''' </pre> <nowiki>Only first line begins with '''a space'''.</nowiki>
will produce:
Every line begins with a space.
Lines aren't indented with '''a space.'''
Only first line begins with '''a space'''.
All of these render as styled blocks, in monospace, and don't collapse whitespace. They are block-level equivalents for the inline HTML elements
<code>
or<samp>
(which the wiki does not process).All of these markup options convert → entities. The first also processes '''wiki''' and <span style="color:green">HTML</span> [[markup]]. The second and the third don't; and they give equivalent presentations. With the third option, lines after the first should not be space-prefixed; the block will extend to the closing
</nowiki>
. - File contents
{{Cat|/path/to/file|body '''text''' <br /> more Second line.}}
will produce:
Contents of /path/to/file
body '''text''' <br /> more Second line.Note that wiki and HTML markup in the file contents aren't converted, though entities still are. You must escape characters as follows:
- = not inside [[..]] use = or {{=}}
- | not inside [[..]] use | or {{!}}
- {{ use { twice or {{lb}}
- }} use } twice or {{rb}}
- unmatched [[ use [ twice
- unmatched ]] use ] twice
- Block-level code with no additional styling
<p style="white-space:pre; font-family:monospace;">One line. Second line. </p>
will produce:
One line. Second line.
This would be the behavior of HTML's
<pre>
without any styling. To wrap to screen width, use {white-space:pre-wrap} in a style attribute.
Message Boxes
Tables
This material needs expanding ... Please feel free to help us complete it. |
{| border="1" style="width:75%; height:200px" <!-- align=right makes table float --> |+ The table's caption |- ! width=100px | columnlabel 1 ! columnlabel 2 !! columnlabel 3 |- ! rowlabel1 | Cell 1 || Cell 2 || Cell 3 |- style="height:100px; background:none" <!-- or style="background:transparent" --> | align=right style="width:200px" | Cell A | style="background:red; color:white" | Cell B | colspan=2 align=center | Cell C |- valign=top <!-- have to be applied to every row, default is valign=middle; or use style="vertical-align:top;" --> | rowspan=2 Cell D | ... |}
See also:
Images
This material needs expanding ... Please feel free to help us complete it. |
[[File:Alpinelinux 01.png|right|thumb|100px|Caption text]]
will produce:
Options can appear in any order:
- Caption text defaults to filename; to wholly suppress, use
<span title=""></span>
- alt=text
- Size can be [width][xheight]px
- page=number, for PDF images
- rendered inline, Caption shows as hover text: frameless, and/or border
- rendered inline, on separate line: none
- Valign for inline images, defaults to middle: middle|baseline|sub|super|top|text-top|bottom|text-bottom
- Text flow can be stopped by placing {{Clear}} before the text that should start below the floating image
- link=URL|pagetitle|blank, only for inline images
- rendered floating, defaults to right align, Caption displayed below image: thumb, thumb=alternate filename, frame (ignores size options)
- rendered floating, defaults to thumb: left|right|center
To instead link to the file, you need to add a colon: File:Alpinelinux 01.png.
See also:
- http://meta.wikimedia.org/wiki/Help:Images_and_other_uploaded_files
- http://meta.wikimedia.org/wiki/Help:Image_page
- http://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax
- http://www.mediawiki.org/wiki/Help:Images
- http://www.mediawiki.org/wiki/Help:Managing_files
- http://meta.wikimedia.org/wiki/Help:Navigational_image
Other
Create HRs like this:
----
Every page should be assigned at least one Category, by placing the following at the bottom of the page:
[[Category:Category name]]
To link to a Category page, without adding the linking page to the category: [[:Category:Not in this category]]
A redirect page should contain only:
#REDIRECT [[pagename]]
See also
- Help:Template
- MediaWiki's User Manual
- http://www.mediawiki.org/wiki/Help:Formatting
- http://meta.wikimedia.org/wiki/Help:HTML_in_wikitext
- http://en.wikipedia.org/wiki/Help:HTML_in_wikitext
- http://en.wikipedia.org/wiki/Help:Wiki_markup
There may be small divergences, but in general, ours seems to be just a standard MediaWiki installation.