Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

UniWiki:Manual of Style/Lists: Difference between revisions

From EVE University Wiki
Djavin novienta (talk | contribs)
Djavin novienta (talk | contribs)
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 16: Line 16:
{{main|Wikipedia:Manual of Style/Embedded lists}}
{{main|Wikipedia:Manual of Style/Embedded lists}}


''Embedded lists'' are lists used within articles to present information that supplements the article's prose content. Wikipedia also uses several types of [[MOS:APPENDIX|standard appendices]], usually in list format, including "See also", "References", and "External links" sections, as well as [[WP:NAV|navigational templates]].
''Embedded lists'' are lists used within articles to present information that supplements the article's prose content. Wikipedia also uses several types of [[UniWiki:Manual of Style/Layout#Standard appendices and footers|standard appendices]], usually in list format, including "See also", "References", and "External links" sections, as well as [[Wikipedia:WP:NAV|navigational templates]].


== Purposes of lists ==
== Purposes of lists ==
Line 105: Line 105:


'''Note''': Avoid floating images to the left of a list as this disrupts the indentation of the bullet-points, making the hierarchy of list-items more difficult for readers to ascertain.
'''Note''': Avoid floating images to the left of a list as this disrupts the indentation of the bullet-points, making the hierarchy of list-items more difficult for readers to ascertain.
== Title of list ==
{{Unbulleted list
| Example 1
| Example 2
| Example 3
}}
</source>
| <syntaxhighlight lang="html4strict" enclose="pre">
<p><a name="Title_of_list" id="Title_of_list"></a></p>
<h2><span class="mw-headline">Title of list</span></h2>
<ul>
<li>Example 1</li>
<li>Example 2</li>
<li>Example 3</li>
</ul>
</syntaxhighlight>
| style="white-space:nowrap; padding:1em;" | {{fake heading|sub=2|Title of list}}
{{Unbulleted list
| Example 1
| Example 2
| Example 3
}}
|}


=== Numbered lists ===
=== Numbered lists ===
{{Shortcut|MOS:NUMLIST}}


Similar to the above, use a # symbol to obtain a numbered list:
Similar to the above, use a # symbol to obtain a numbered list:
Line 145: Line 120:
# Example 3
# Example 3
</pre>
</pre>
| <syntaxhighlight lang="html4strict" enclose="pre">
|<h2><span class="mw-headline">Title of list</span></h2>
<p><a name="Title_of_list" id="Title_of_list"></a></p>
<h2><span class="mw-headline">Title of list</span></h2>
<ol>
<ol>
<li>Example 1</li>
<li>Example 1</li>
Line 153: Line 126:
<li>Example 3</li>
<li>Example 3</li>
</ol>
</ol>
</syntaxhighlight>
| style="white-space:nowrap; padding:1em;" | <u>'''Title of list'''</u>
| style="white-space:nowrap; padding:1em;" | {{fake heading|sub=2|Title of list}}
# Example 1
# Example 1
# Example 2
# Example 2
Line 160: Line 132:
|}
|}
Blank lines between items of an ordered list will not only cause the same problems as in the previous example, but will also restart the numbering at "1". This cannot be fixed without complex wiki markup (defeating ease-of-editing expectations), so double-spacing should always be avoided in numbered lists.
Blank lines between items of an ordered list will not only cause the same problems as in the previous example, but will also restart the numbering at "1". This cannot be fixed without complex wiki markup (defeating ease-of-editing expectations), so double-spacing should always be avoided in numbered lists.
==== Other cases ====
{{Shortcut|MOS:SPECIALLIST}}
Experienced editors can use raw html to achieve more complex results, such as ordered lists using indexes other than numbers, and ordered lists not starting from 1.
{| class="wikitable"
! Wikitext
! Appearance
|-
| <source lang="html"><ol type="a">
<li>this</li>
<li>list</li>
<li>uses</li>
<li>letters</li>
<li>as</li>
<li>indexes</li>
</ol></source>
|
<ol type="a">
<li>this</li>
<li>list</li>
<li>uses</li>
<li>letters</li>
<li>as</li>
<li>indexes</li>
</ol>
|-
| <source lang="html"><ol start="10">
<li>this</li>
<li>list</li>
<li>starts</li>
<li>from</li>
<li>10</li>
</ol></source>
|
<ol start="10">
<li>this</li>
<li>list</li>
<li>starts</li>
<li>from</li>
<li>10</li>
</ol>
|-
| <source lang="html"><ol type="I" start="50">
<li>this</li>
<li>list</li>
<li>uses</li>
<li>roman</li>
<li>numerals</li>
<li>and</li>
<li>starts</li>
<li>from</li>
<li>50</li>
</ol></source>
|
<ol type="I" start="50">
<li>this</li>
<li>list</li>
<li>uses</li>
<li>roman</li>
<li>numerals</li>
<li>and</li>
<li>starts</li>
<li>from</li>
<li>50</li>
</ol>
|}
Valid values for the list type are:
*1 (default, numbers)
*a (lowercase [[latin letters]])
*A (uppercase latin letters)
*i (lowercase [[roman numerals]])
*I (uppercase roman numerals)
The start value <i>can</i> be negative, but only if the list uses numbers as indexes. Otherwise, bizarre results are achieved.
{| class="wikitable"
! Wikitext
! Appearance
|-
| <source lang="html"><ol type="a" start="-2">
<li>definitely</li>
<li><b>not</b></li>
<li>a</li>
<li>good</li>
<li>idea!</li>
</ol></source>
|
<ol type="a" start="-2">
<li>definitely</li>
<li><b>not</b></li>
<li>a</li>
<li>good</li>
<li>idea!</li>
</ol>
|}
=== Description (definition, association) lists ===
{{anchor|Definition lists|Association (definition) lists}}
<!-- [[Wikipedia:Definition list]] and [[Wikipedia:Semicolon]] redirect here -->
{{Shortcut|MOS:DEFLIST}}
Wikipedia has a special markup for {{dfn|description lists}} (formerly called ''{{dfn|definition lists}}'' in [[HTML4]] and ''{{dfn|association lists}}'' in [[HTML5]]). A description list contains groups of "terms and definitions, metadata topics and values, questions and answers, or any other groups of name–value data".<ref>{{citation|author=[[W3C]]|title=HTML5: A Vocabulary and Associated APIs for HTML and XHTML, W3C Working Draft|date=5 April 2011|url=http://www.w3.org/TR/2011/WD-html5-20110405/grouping-content.html#the-dl-element}}.</ref>
There are templates for producing description lists such as glossaries, in ways that provide for richer, more complex content than bare wikimarkup syntax. The basic format of a ''{{dfn|[[WP:Manual of Style/Glossaries#Template-structured|template-structured description list]]}}'' is:
{| class="wikitable"
|-
!Wikitext
!Appearance
|-
|
{{tlx|glossary}}<br />
{{tlx|term|name 1}}<br />
{{tlx|defn|value 1}}<br />
{{tnull|term|name 2}}<br />
{{tnull|defn|value 2}}<br />
{{tnull|term|name 3}}<br />
{{tnull|defn|value 3}}<br />
{{tlx|glossary end}}
|
{{glossary}}
{{term|name 1}}
{{defn|value 1}}
{{term|name 2}}
{{defn|value 2}}
{{term|name 3}}
{{defn|value 3}}
{{glossary end}}
|}
The content in any {{tl|defn}} can be complex, including multiple paragraphs, block quotations, sub-lists, etc.  See [[Template:Glossary]] for full documentation.
The simpler, but very functionality-limited and easily broken, basic wikimarkup format is:
{{markup
|
; name 1 : value 1
; name 2 : value 2
; name 3 : value 3
|
; name 1 : value 1
; name 2 : value 2
; name 3 : value 3
}}
An alternative source layout is to put the name on a separate line straight after the term, like so:
{{markup
|
; name 1
: This is the value associated with the first name and may be quite long, but must be one unbroken line in the source.
; name 2
: This is the value associated with the second name, which may also be long.
|
; name 1
: This is the value associated with the first term and may be quite long, but must be one unbroken line in the source.
; name 2
: This is the value associated with the second term, which may also be long.
}}
This still keeps the names and values within a single description list, and the alternation of typically short names and longer values makes the separate components easy to spot while editing. The resulting layout and HTML are identical to that generated by the single-line syntax.
{{em|A major weakness of both variants of <code>;</code>-and-<code>:</code> markup is that they are easily broken by later editors attempting to create multi-line values.}} Use of template-structured formatting resolves that problem.
Use structured or description list format instead of other, made-up formats, as they may not fit reader and editor expectations, hamper reusability of Wikipedia content, make automated processing more difficult, or introduce usability and accessibility problems.
As with unordered (bulleted) lists, items in description lists should not be double-spaced, as it causes each entry to be its own bogus "list" in the output, obviating the point of putting the entries in list markup to begin with.
In some cases, tables are better-suited to associating content than description lists.
Note that when colons are used for [[WP:INDENT|indentation]], in articles or on talk pages, they too are rendered in HTML as description lists. It is preferable to use [[Template:Indent]] or one of its variants, especially in articles.


=== Tables ===
=== Tables ===
Although the use of tables to display lists is discouraged—because they provide low-quality accessibility and have a more complex notation that hinders editing—there are some instances where they can be useful, such as when three or more columns are required. See [[Wikipedia:When to use tables]].
Although the use of tables to display lists is discouraged—because they provide low-quality accessibility and have a more complex notation that hinders editing—there are some instances where they can be useful, such as when three or more columns are required. See [[UniWiki:Manual of Style/Tables]].


=== Horizontal lists ===
=== Horizontal lists ===
{{anchor|Comma-separated lists}}
{{shortcut|WP:FLATLIST}}
In situations such as infoboxes, a single-line list may be useful—in this case:
In situations such as infoboxes, a single-line list may be useful—in this case:


Line 346: Line 147:
|List with commas
|List with commas
|Entry 1, entry 2, entry 3
|Entry 1, entry 2, entry 3
|-
|List with {{tl|Flatlist}}
|{{Flatlist|
* Entry 1
* entry 2
* entry 3
}}
|-
|-
|}
|}


Note the capitalization of only the first word in this list (but words that are normally capitalized would still be capitalized). This applies regardless of the separator used between the list type and the entries themselves—whether it is a comma (as in the first example above), or an infobox divider (as in the second example above).
Note the capitalization of only the first word in this list (but words that are normally capitalized would still be capitalized). This applies regardless of the separator used between the list type and the entries themselves—whether it is a comma or an infobox divider.
 
=== Timelines ===
{{seealso|Wikipedia:Timeline standards}}
{{shortcut|WP:CHRONO|WP:DATELIST}}
 
For lists of dated events, or timelines, use one instance of {{Tl|Timeline-event}} per event, thus:
 
<pre>
* {{Timeline-event|date={{Start date|1904|11|18|df=y}}|event=A thing happened}}
* {{Timeline-event|date={{Start date|1905}}|event=Not much happened}}
* {{Timeline-event|date={{Start date|1906|01|21}}|event=Something else happened}}
</pre>
 
to render as:
* {{Timeline-event|date={{Start date|1904|11|18|df=y}}|event=A thing happened}}
* {{Timeline-event|date={{Start date|1905}}|event=Not much happened}}
* {{Timeline-event|date={{Start date|1906|01|21}}|event=Something else happened}}
 
(note optional <code>df=y</code> (date first) parameter – date formatting should be consistent within individual articles).
 
Chronological lists, such as timelines, should be in earliest-to-latest chronological order. See {{section link|Wikipedia:Stand-alone lists|Chronological ordering}}.
 
== Boilerplate text ==
Directly before an incomplete list, insert {{tlx|expand list}}, which will substitute the following onto the page:
{{expand list}}
 
Several topic-specific variations of this template are also available within {{cat|Hatnote templates for lists}}. Only one of {{tlx|expand list}} or its variations should be added, unless the topic is significantly related to more than one of the subcategories. Do not add both {{tlx|expand list}} AND a variation to any list. <!-- because the whole purpose of these specific templates is to diffuse the category -->


== Bulleted and numbered lists ==
== Bulleted and numbered lists ==
* Do not use lists if a passage is read easily as plain paragraphs.
* Do not use lists if a passage is read easily as plain paragraphs.
* Use proper wikimarkup- or template-based list code ''(see also [[Help:List]])''.
* Use proper wikimarkup- or template-based list code ''(see also [[Wikipedia:Help:List]])''.
* Do not leave blank lines between items in a bulleted or numbered list unless there is a reason to do so, since this causes the Wiki software to interpret each item as beginning a new list.
* Do not leave blank lines between items in a bulleted or numbered list unless there is a reason to do so, since this causes the Wiki software to interpret each item as beginning a new list.
* Use numbers rather than bullets only if any of the following apply:
* Use numbers rather than bullets only if any of the following apply:
Line 398: Line 165:


== Pro and con lists ==
== Pro and con lists ==
{{See also|Wikipedia:Pro and con lists}}
{{hatnote|See also: [[Wikipedia:Wikipedia:Pro and con lists|Wikipedia:Pro and con lists]]}}


These are lists of arguments for and against a particular contention or position. They include lists of ''Advantages and disadvantages'' of a technology or proposal (such as [[Wi-Fi]]) and lists of ''Criticisms and defenses'' of a political position or other view, such as [[libertarianism]] or [[evolution]]. Pro and con lists can encapsulate or bracket [[WP:NPOV|neutrality]] problems in an article by creating separate spaces in which different points of view can be expressed. An alternative method is to thread different points of view into running prose.
These are lists of arguments for and against a particular contention or position. They include lists of ''Advantages and disadvantages'' of a technology or proposal (such as [[Wikipedia:Wi-Fi|Wi-Fi]]) and lists of ''Criticisms and defenses'' of a political position or other view, such as [[Wikipedia:Libertarianism|libertarianism]] or [[Wikipedia:Evolution|evolution]]. Pro and con lists can encapsulate or bracket [[Wikipedia:WP:NPOV|neutrality]] problems in an article by creating separate spaces in which different points of view can be expressed. An alternative method is to thread different points of view into running prose.


Either method needs careful judgment as to whether and how it should be used. In particular, pro and con lists can fragment the presentation of facts, create a binary structure where a more nuanced treatment of the spectrum of facts is preferable, encourage oversimplification, and require readers to jump back and forth between the two sides of the list.
Either method needs careful judgment as to whether and how it should be used. In particular, pro and con lists can fragment the presentation of facts, create a binary structure where a more nuanced treatment of the spectrum of facts is preferable, encourage oversimplification, and require readers to jump back and forth between the two sides of the list.


== See also ==
== See also ==
* [[Wikipedia:List dos and don'ts]] (information page summarizing the key points in this guideline)
* [[Wikipedia:Wikipedia:List dos and don'ts|Wikipedia:List dos and don'ts]] (information page summarizing the key points in this guideline)
* [[Wikipedia:Line-break handling]] – Covers among other things how to properly handle the line wrapping in horizontal link lists
* [[Wikipedia:Wikipedia:Line-break handling|Wikipedia:Line-break handling]] – Covers among other things how to properly handle the line wrapping in horizontal link lists
* [[Help:Sorting]] – Tables on Wikipedia can be made sortable with <code>class="sortable"</code>, this page explains how
* [[Wikipedia:Help:Sorting]] – Tables on the UniWiki can be made sortable with <code>class="sortable"</code>, this page explains how
* [[Wikipedia:Manual of Style/Stand-alone lists]]
* [[Wikipedia:Wikipedia:Manual of Style/Stand-alone lists|Wikipedia:Stand-alone lists]]
* [[Wikipedia:Manual of Style/Embedded lists]]
* [[UniWiki:Manual of Style/Embedded lists]]
* [[Wikipedia:Manual of Style/Disambiguation pages]] – Disambiguation pages are lists of [[homograph]]s—a word or a group of words that share the same written form but have different meanings—with their own page rules and layouts
* [[UniWiki:Manual of Style/Disambiguation pages]] – Disambiguation pages are lists of [[Wikipedia:Homograph|homographs]]—a word or a group of words that share the same written form but have different meanings—with their own page rules and layouts
* [[Wikipedia:WikiProject Laundromat]] – The project's goal is to reduce the number of inappropriate laundry lists in Wikipedia articles


== Notes ==
== Notes ==
{{Reflist}}
{{Reflist}}