Difference between revisions of "Help:List"

From Ballotpedia
Jump to: navigation, search
(updated category)
Line 1: Line 1:
{{help badge}}
+
{{help}}
  
 
This page explains how to create '''numbered or bulleted lists''' on Ballotpedia.
 
This page explains how to create '''numbered or bulleted lists''' on Ballotpedia.
  
 
== List basics ==
 
== List basics ==
 
 
[[Main Page|Ballotpedia]] offers three types of lists. '''Ordered lists''', '''unordered lists''', and '''definition lists'''. In the following sections, ordered lists are used for examples. Unordered lists would give corresponding results.
 
[[Main Page|Ballotpedia]] offers three types of lists. '''Ordered lists''', '''unordered lists''', and '''definition lists'''. In the following sections, ordered lists are used for examples. Unordered lists would give corresponding results.
  
Line 88: Line 87:
  
 
== Paragraphs in lists ==
 
== Paragraphs in lists ==
 
 
For simplicity, list items in wiki markup cannot be longer than a paragraph. A following blank line will end the list and reset the counter on ordered lists. Separating unordered list items usually has no noticable effects.
 
For simplicity, list items in wiki markup cannot be longer than a paragraph. A following blank line will end the list and reset the counter on ordered lists. Separating unordered list items usually has no noticable effects.
  
Line 96: Line 94:
  
 
==Continuing a list item after a sub-item==
 
==Continuing a list item after a sub-item==
 
 
In HTML, a list item may contain several sublists, not necessarily adjacent; thus there may be parts of the list item not only before the first sublist, but also between sublists, and after the last one; however, in wiki-syntax, sublists follow the same rules as sections of a page: the only possible part of the list item not in sublists is before the first sublist.
 
In HTML, a list item may contain several sublists, not necessarily adjacent; thus there may be parts of the list item not only before the first sublist, but also between sublists, and after the last one; however, in wiki-syntax, sublists follow the same rules as sections of a page: the only possible part of the list item not in sublists is before the first sublist.
  
Line 160: Line 157:
  
 
==Acknowledgements==
 
==Acknowledgements==
 
 
* [http://meta.wikimedia.org/wiki/Help:List "List" article from MediaWiki]
 
* [http://meta.wikimedia.org/wiki/Help:List "List" article from MediaWiki]
  
[[Category:Editing Help]]
+
[[Category:Intro editing help]]
 +
 
 
__NOTOC__
 
__NOTOC__

Revision as of 21:29, 11 July 2013

Editing Help
1328101905 Help.png
Index
Editing guide
Cheatsheet
Policies
Copyright
Textual standards
Visual standards
Glossary of terms
Edit review process

This page explains how to create numbered or bulleted lists on Ballotpedia.

List basics

Ballotpedia offers three types of lists. Ordered lists, unordered lists, and definition lists. In the following sections, ordered lists are used for examples. Unordered lists would give corresponding results.

wikitext rendering
* Lists are easy to do:
** start every line
* with a star (asterisk)
** more stars mean
*** deeper levels
  • Lists are easy to do:
    • start every line
  • with a star
    • more stars mean
      • deeper levels
*A newline
*in a list  
marks the end of the list.
Of course
*you can
*start again.
  • A newline
  • in a list

marks the end of the list. Of course

  • you can
  • start again.
# Numbered lists are good
## very organized
## easy to follow
  1. Numbered lists are good
    1. very organized
    2. easy to follow
* You can also
**break lines
**like this
  • You can also
    • break lines
    • like this
; Definition lists
; item : definition
; semicolon plus term
: colon plus definition
Definition lists
item 
definition
semicolon plus term
colon plus definition
* Or create mixed lists
*# and nest them
*#* like this
*#*; definitions
*#*: work:
*#*; apple
*#*; banana
*#*: fruits
  • Or create mixed lists
    1. and nest them
      • like this
        definitions
        work:
        apple
        banana
        fruits

Paragraphs in lists

For simplicity, list items in wiki markup cannot be longer than a paragraph. A following blank line will end the list and reset the counter on ordered lists. Separating unordered list items usually has no noticable effects.

Paragraphs can be forced in lists by using HTML tags. Two line break symbols, <br><br>, will create the desired effect. So will enclosing all but the first paragraph with <p>...</p>

For a list with items of more than one paragraph long, adding a blank line between items may be necessary to avoid confusion.

Continuing a list item after a sub-item

In HTML, a list item may contain several sublists, not necessarily adjacent; thus there may be parts of the list item not only before the first sublist, but also between sublists, and after the last one; however, in wiki-syntax, sublists follow the same rules as sections of a page: the only possible part of the list item not in sublists is before the first sublist.

In the case of an unnumbered first-level list in wikitext code this limitation can be overcome by splitting the list into multiple lists; indented text between the partial lists may visually serve as part of a list item after a sublist; however, this may give, depending on CSS, a blank line before and after each list, in which case, for uniformity, every first-level list item could be made a separate list.

Numbered lists illustrate that what should look like one list may, for the software, consist of multiple lists; unnumbered lists give a corresponding result, except that the problem of restarting with 1 is not applicable.

<ol>
  <li>list item A1
    <ol>
      <li>list item B1</li>
      <li>list item B2</li>
    </ol>continuing list item A1
  </li>
  <li>list item A2</li>
</ol>
  1. list item A1
    1. list item B1
    2. list item B2
    continuing list item A1
  2. list item A2
vs.
#list item A1
##list item B1
##list item B2
#:continuing list item A1
#list item A2
  1. list item A1
    1. list item B1
    2. list item B2
    continuing list item A1
  2. list item A2

One level deeper, with a sublist item continuing after a sub-sublist, one gets even more blank lines; however, the continuation of the first-level list is not affected:

#list item A1
##list item B1
###list item C1
##:continuing list item B1
##list item B2
#list item A2

gives

  1. list item A1
    1. list item B1
      1. list item C1
      continuing list item B1
    2. list item B2
  2. list item A2

Acknowledgements