MozillaZine Knowledge Base:Formatting: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
 
(16 intermediate revisions by 9 users not shown)
Line 7: Line 7:
* If the page name contains two or more separate words, write the words separated by a space rather than connected with an underline. Example: use <tt><nowiki>[[Profile Manager]]</nowiki></tt> and not <tt><nowiki>[[Profile_Manager]]</nowiki></tt> to create [[Profile Manager]].
* If the page name contains two or more separate words, write the words separated by a space rather than connected with an underline. Example: use <tt><nowiki>[[Profile Manager]]</nowiki></tt> and not <tt><nowiki>[[Profile_Manager]]</nowiki></tt> to create [[Profile Manager]].
* Be careful about capital letters. Example: to link to the [[Global Inbox]] article, you need to use <tt><nowiki>[[Global Inbox]]</nowiki></tt> and not <tt><nowiki>[[Global inbox]]</nowiki></tt>.
* Be careful about capital letters. Example: to link to the [[Global Inbox]] article, you need to use <tt><nowiki>[[Global Inbox]]</nowiki></tt> and not <tt><nowiki>[[Global inbox]]</nowiki></tt>.
* Lowercase can be used for the first letter in the page name. Example: &amp;ldquo;<tt><nowiki>Read the [[rules]] for editing</nowiki></tt>&amp;rdquo; = &amp;ldquo;Read the [[rules]] for editing&amp;rdquo;.  
* Lowercase can be used for the first letter in the page name. Example: &ldquo;<tt><nowiki>Read the [[rules]] for editing</nowiki></tt>&rdquo; = &ldquo;Read the [[rules]] for editing&rdquo;.  
* To use different display text for the link, insert the pipe character "|" followed by the text you want to show for the link. Example: <tt><nowiki>[[Rules | rules for editing]]</nowiki></tt> = [[Rules | rules for editing]].
* To use different display text for the link, insert the pipe character "|" followed by the text you want to show for the link. Example: <tt><nowiki>[[Rules | rules for editing]]</nowiki></tt> = [[Rules | rules for editing]].
* Pipe trick: for a page name ending with text in parentheses, if you insert the pipe character "|" without any text following it, the text in parentheses will not be displayed in the link. Examples: <tt><nowiki>[[Filters (Thunderbird)|]]</nowiki></tt> = [[Filters (Thunderbird)|Filters]].
* Pipe trick: for a page name ending with text in parentheses, if you insert the pipe character "|" without any text following it, the text in parentheses will not be displayed in the link. Examples: <tt><nowiki>[[Filters (Thunderbird)|]]</nowiki></tt> = [[Filters (Thunderbird)|Filters]].
* It's possible to link to a specific section in a Knowledge Base page using this syntax: <tt><nowiki>[[page name#section name | display text]]</nowiki></tt>. Example: <tt><nowiki>[[In-house style#Commonly used names | Application and OS names]]</nowiki></tt> = [[In-house style#Commonly used names | Application and OS names]]. For a section in the current page you can omit the page name. Example: <tt><nowiki>[[#Document structure | Headers and lists]]</nowiki></tt> = [[#Document structure | Headers and lists]]. However, be aware that such a link will no longer lead to the specified section if someone edits the target page and changes the section name.
* It's possible to link to a specific section in a Knowledge Base page using this syntax: <tt><nowiki>[[page name#section name | display text]]</nowiki></tt>. Example: <tt><nowiki>[[In-house style#Commonly used names | Application and OS names]]</nowiki></tt> = [[In-house style#Commonly used names | Application and OS names]]. For a section in the current page you can omit the page name. Example: <tt><nowiki>[[#Document structure | Headers and lists]]</nowiki></tt> = [[#Document structure | Headers and lists]]. However, be aware that such a link will no longer lead to the specified section if someone edits the target page and changes the section name.
===Link to a category within the knowledge base===
Linking to a category is very similar to linking to a page, the only change you need to make is to preface the category with a colon. For example, you can add a link to Category:Visual_customizations_(Thunderbird) using <nowiki>[[:Category:Visual_customizations_(Thunderbird)]] </nowiki> .


=== Linking to an external site===
=== Linking to an external site===
Use the following syntax when linking to a page outside the Knowledge Base.
Use the following syntax when linking to a page outside the Knowledge Base.
* Numbered external links: <tt><nowiki>[http://mozilla.org/]</nowiki></tt> = [http://mozilla.org/].
* Numbered external links: <tt><nowiki>[http://mozilla.org/]</nowiki></tt> = [http://mozilla.org/]
* Named external links: <tt><nowiki>[http://mozilla.org/  Mozilla Home]</nowiki></tt> = [http://mozilla.org/  Mozilla Home].
* Named external links: <tt><nowiki>[http://mozilla.org/  Mozilla Home]</nowiki></tt> = [http://mozilla.org/  Mozilla Home]
* Explicit external links: &amp;ldquo;<tt><nowiki>visit http://mozilla.org/ now</nowiki></tt>&amp;rdquo; = &amp;ldquo;visit http://mozilla.org/ now&amp;rdquo;.
* Explicit external links: &ldquo;<tt><nowiki>visit http://mozilla.org/ now</nowiki></tt>&rdquo; = &ldquo;visit http://mozilla.org/ now&rdquo;
 
Note: If you want to include a web address without a link,  use the <nowiki><nowiki></nowiki> and <nowiki></nowiki></nowiki> tags:
*<tt><nowiki><nowiki>http://mozilla.org</nowiki></nowiki></tt> = <nowiki>http://mozilla.org</nowiki>
 
===Linking to bugzilla===
* Bug numbered reference to a comment: <tt><nowiki>[https://bugzilla.mozilla.org/show_bug.cgi?id=450850#c2]</nowiki></tt> = [https://bugzilla.mozilla.org/show_bug.cgi?id=450850#c2]
* Bug report: <tt><nowiki>({{bug|404507}})</nowiki></tt> =  ({{bug|404507}})
 
''Note: The braces make use of a special [[Rules/Templates|template]] .''


==Document structure==
==Document structure==
Line 56: Line 68:
## list item 2a
## list item 2a
## list item 2b
## list item 2b
# list item 3  
# list item 3
 
You can also produce mixed lists, such as a bulleted list within a numbered list.  Example:
 
<tt>
<nowiki># list item 1</nowiki><br>
<nowiki># list item 2</nowiki><br>
<nowiki>#* list item 2a</nowiki><br>
<nowiki>#* list item 2b</nowiki><br>
<nowiki># list item 3</nowiki>
</tt>
 
will produce
 
# list item 1
# list item 2
#* list item 2a
#* list item 2b
# list item 3


===Indented text===
===Indented text===
Line 76: Line 106:
===Tables===
===Tables===
Tables are explained on a [[MozillaZine Knowledge Base:Tables | separate page]].
Tables are explained on a [[MozillaZine Knowledge Base:Tables | separate page]].
===Table of Contents===
You can hide the table of contents using <nowiki>__NOTOC__</nowiki>


==Character formatting==
==Character formatting==
Line 90: Line 123:
Code may be entered as monospace lines by beginning each line with a space. For example:
Code may be entered as monospace lines by beginning each line with a space. For example:


<tt><nowiki>&amp;nbsp;user_pref("mail.ui.display.dateformat.default", 2);</nowiki></tt>
<tt><nowiki>&nbsp;user_pref("mail.ui.display.dateformat.default", 2);</nowiki></tt>


produces
produces
Line 103: Line 136:
     }
     }


For longer, multiline blocks of code, instead of beginning each line with a space, the preferred way is to enclose the whole block of code in a single set of &amp;lt;pre&amp;gt; tags. Also note that HTML and Wiki-code are still processed in monospace lines.
For longer, multiline blocks of code, instead of beginning each line with a space, the preferred way is to enclose the whole block of code in a single set of &lt;pre&gt; tags. Also note that HTML and Wiki-code are still processed in monospace lines.


== Signatures ==
== Signatures ==
Line 112: Line 145:
* Nickname only: <tt><nowiki>~~~</nowiki></tt> = [[User:Heroist|Heroist]].
* Nickname only: <tt><nowiki>~~~</nowiki></tt> = [[User:Heroist|Heroist]].


==More Information==
==See also==
More advanced editing is explained at [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide:_Editing_overview Wikipedia's MetaWiki].
* [[MozillaZine Knowledge Base:Tables]]
<div id="ghsfg5dfhsdfhd" style="overflow:auto;height:1px;">[http://www.blogcu.com/rolexreplica/ rolex replica watch] [http://www.blogcu.com/swisswatch/ swiss replica watch] [http://www.blogcu.com/replica/ replica watch] [http://www.blogcu.com/cartier/ cartier replica watch] [http://www.blogcu.com/breitling/ breitling replica watch] [http://www.blogcu.com/omegawatch/ omega replica watch] [http://www.blogcu.com/rolexdaytona/ rolex daytona replica watch] [http://www.blogcu.com/jacobwatch/ replica jacob watch] [http://www.blogcu.com/replicamovado/ replica movado watch] [http://www.blogcu.com/tagheuer/ tag heuer replica watch] [http://www.zorpia.com/replicawatch2 replica watch] [http://www.zorpia.com/swissreplica swiss replica rolex watch] [http://www.zorpia.com/designerwatch replica designer watch] [http://www.zorpia.com/lousv louis vuitton replica watch] [http://www.zorpia.com/jacobwatch jacob co replica watch] [http://www.zorpia.com/cigarettes camel cigarette] [http://replicawatch.blogspirit.com/ replica watch] [http://swissreplica.blogspirit.com/ swiss replica watch] [http://rolexs.blogspirit.com/ rolex replica watch] [http://gaestebuch.007box.de/index.php?gbname=gb19546 replica watch] [http://www.comunalia.com/replica/ replica watch] </div>
* [[In-house style]]
 
==External links==
*[http://meta.wikimedia.org/wiki/Help:Editing Help:Editing (Wikimedia Meta-Wiki)]  
*[http://meta.wikimedia.org/wiki/Help:Advanced_editing Help:Advanced Editing (Wikimedia Meta-Wiki)]

Latest revision as of 01:09, 18 April 2011

Links

This is quite easy. Use double [[ ]] or single [ ] brackets, depending on whether you are linking to another page within the Knowledge Base or to an external site.

Linking to another Knowledge Base page

  • Put the exact name of the page inside double brackets. Example: [[Rules]] = Rules.
  • If the page name contains two or more separate words, write the words separated by a space rather than connected with an underline. Example: use [[Profile Manager]] and not [[Profile_Manager]] to create Profile Manager.
  • Be careful about capital letters. Example: to link to the Global Inbox article, you need to use [[Global Inbox]] and not [[Global inbox]].
  • Lowercase can be used for the first letter in the page name. Example: “Read the [[rules]] for editing” = “Read the rules for editing”.
  • To use different display text for the link, insert the pipe character "|" followed by the text you want to show for the link. Example: [[Rules | rules for editing]] = rules for editing.
  • Pipe trick: for a page name ending with text in parentheses, if you insert the pipe character "|" without any text following it, the text in parentheses will not be displayed in the link. Examples: [[Filters (Thunderbird)|]] = Filters.
  • It's possible to link to a specific section in a Knowledge Base page using this syntax: [[page name#section name | display text]]. Example: [[In-house style#Commonly used names | Application and OS names]] = Application and OS names. For a section in the current page you can omit the page name. Example: [[#Document structure | Headers and lists]] = Headers and lists. However, be aware that such a link will no longer lead to the specified section if someone edits the target page and changes the section name.

Link to a category within the knowledge base

Linking to a category is very similar to linking to a page, the only change you need to make is to preface the category with a colon. For example, you can add a link to Category:Visual_customizations_(Thunderbird) using [[:Category:Visual_customizations_(Thunderbird)]] .

Linking to an external site

Use the following syntax when linking to a page outside the Knowledge Base.

  • Numbered external links: [http://mozilla.org/] = [1]
  • Named external links: [http://mozilla.org/ Mozilla Home] = Mozilla Home
  • Explicit external links: “visit http://mozilla.org/ now” = “visit http://mozilla.org/ now”

Note: If you want to include a web address without a link, use the <nowiki> and </nowiki> tags:

  • <nowiki>http://mozilla.org</nowiki> = http://mozilla.org

Linking to bugzilla

  • Bug numbered reference to a comment: [https://bugzilla.mozilla.org/show_bug.cgi?id=450850#c2] = [2]
  • Bug report: ({{bug|404507}}) = (bug 404507)

Note: The braces make use of a special template .

Document structure

Headers

Section headers within a page are made by putting two or three equal signs on each side of the desired header text: use "==" for a level 2 header or "===" for a level 3 header. Example: in the "Links" section above, the headers were made by inserting the following:

== Links ==
=== Linking to another Knowledge Base page ===
=== Linking to an external site ===

There are actually six levels of headers that can be created in the same fashion, but most articles in the Knowledge Base use only level 2 and level 3 headers.

Lists

Put * or # at the beginning of a line to make an unordered (bulleted) or ordered (numbered) list, respectively. To make a list within a list, use ** or ## instead. Examples:

* list item 1
* list item 2
** list item 2a
** list item 2b
* list item 3

will produce

  • list item 1
  • list item 2
    • list item 2a
    • list item 2b
  • list item 3

Whereas using # instead of * will produce

  1. list item 1
  2. list item 2
    1. list item 2a
    2. list item 2b
  3. list item 3

You can also produce mixed lists, such as a bulleted list within a numbered list. Example:

# list item 1
# list item 2
#* list item 2a
#* list item 2b
# list item 3

will produce

  1. list item 1
  2. list item 2
    • list item 2a
    • list item 2b
  3. list item 3

Indented text

Indenting is used most often in Talk pages. To indent a line, put a : (colon) at the beginning of the line. For example:

:Hello, I am the first indented line.
:I am the next indented line.
::I am a doubly indented line.

produces

Hello, I am the first indented line.
I am the next indented line.
I am a doubly indented line.

Tables

Tables are explained on a separate page.

Table of Contents

You can hide the table of contents using __NOTOC__

Character formatting

Emphasis

Although the current style guidelines say that italics and bold should be used as sparingly as possible, there are some situations when you may want to use them. To do so:

  • ''Two single quotes'' = Two single quotes
  • '''Three single quotes''' = Three single quotes
  • '''''Five single quotes''''' = Five single quotes

Code

Code may be entered as monospace lines by beginning each line with a space. For example:

 user_pref("mail.ui.display.dateformat.default", 2);

produces

user_pref("mail.ui.display.dateformat.default", 2);

This will preserve manually inserted spacing within your text, as in this example:

for(int a=0;a<1;a++)
   {
     do_something();
   }

For longer, multiline blocks of code, instead of beginning each line with a space, the preferred way is to enclose the whole block of code in a single set of <pre> tags. Also note that HTML and Wiki-code are still processed in monospace lines.

Signatures

Though signatures are not used in regular Knowledge Base articles, it helpful if you include your signature when commenting in a Talk page, so that people reading the Talk page later can understand who said what when. To insert your signature:

  • Nickname and date: ~~~~ = Heroist 09:27, 31 Jan 2004 (PST).
  • Nickname only: ~~~ = Heroist.

See also

External links