Categories
  Encyclosphere.org ENCYCLOREADER
  supported by EncyclosphereKSF

Lists

From Wikidoc - Reading time: 3 min


Editor-In-Chief: C. Michael Gibson, M.S., M.D. [1]

Overview[edit | edit source]

You can create two types of lists:

  1. Bullet Lists: which are unordered and not numbered and have a blue square before the text, or
  2. Numbered Lists: which order or number each item

How to Make a Bullet List:[edit | edit source]

To create a bulletted list, start the line with a star sign "*".

Typing this:

* This is a list
* This is part of the same list
* As is this!

Yields this:

  • This is a list
  • This is part of the same list
  • As is this!

How to Make a Numbered List:[edit | edit source]

Numbered lists are just as easy. Instead of starting the line with a "*", instead start each line with a "#".

Typing this:

# I'm number one!
# I'm number two!
# I'm number three!

Yields this:

  1. I'm number one!
  2. I'm number two!
  3. I'm number three!

Be Careful! A list ends when there is a line that has no # sign at the beginning. Numbering starts over with the number 1 again when the # sign is encountered again. So for instance:

Typing this:

# List 1
# List 1
No List
# List 2

Yields this:

  1. List 1
  2. List 1

No List

  1. List 2

Multi-leveled Lists[edit | edit source]

Adding more levels to a list is simple - just add another list character to the front. So:

* List Level 1
** List Level 2
*** List Level 3
** List Level 2
* List Level 1

becomes:

  • List Level 1
    • List Level 2
      • List Level 3
    • List Level 2
  • List Level 1

This works with both styles of list:

# List Level 1
## List Level 2
### List Level 3
## List Level 2
# List Level 1

becomes:

  1. List Level 1
    1. List Level 2
      1. List Level 3
    2. List Level 2
  2. List Level 1

Mixing Bullett Lists and Ordered Lists:[edit | edit source]

You can even create mixed lists

Typing this:

*# and nest them
*#* like this
*#*; can I mix definition list as well?
*#*: yes
*#*; how?
*#*: it's easy as
*#*:* a 
*#*:* b
*#*:* c

Yields this:

    1. and nest them
      • like this
        can I mix definition list as well?
        yes
        how?
        it's easy as
        • a
        • b
        • c

Structure inside List elements[edit | edit source]

Due to the issue of lists ending on the first non-list character line, special efforts must be taken in order to build multi-paragraph and multi-element list items.

Breaking up a paragraph should be done with <br>. This will create a new line without breaking the list. <p></p> will do this as well, but is a little trickier to get right.

Sometimes an element in a list needs to consist of both a sub-list, and further text that isn't a part of the sub-list. This too is achievable, placing a colon at the correct level will allow you to continue the list element without mess. This is not a perfect solution, as the indent is not always well-aligned with the list indents.

# List Element 1
## Sub-list element 1
## Sub-list element 2
#: Continuing List Element 1
  1. List Element 1
    1. Sub-list element 1
    2. Sub-list element 2
    Continuing List Element 1
* This is an example of a list element across several lines.<br>By inserting <br>, we 
  can spread the list element across several lines without having to go into
  multiple list elements.<br>Pretty spiffy, no?
* <p>In this example, we use paragraph markers to make multiple lines.</p><p>
  This works just as well, but does require a little foresight, as paragraph
  markers need to surround the text.</p><p>This, to many is not a hindrance</p>
* A ordinary ol' List element
  • This is an example of a list element across several lines.
    By inserting <br>, we can spread the list element across several lines without having to go into multiple list elements.
    Pretty spiffy, no?
  • In this example, we use paragraph markers to make multiple lines.

    This works just as well, but does require a little foresight, as paragraph markers need to surround the text.

    This, to many is not a hindrance

  • A ordinary ol' List element

Numbered lists across multiple columns[edit | edit source]

In some cases, it's necessary or useful to spread a numbered list across several columns (such as in a table). Wiki mark-up cannot handle this. Instead, HTML code needs to be used:

{| 
|<ol start="125"><li>a<li>bb<li>ccc</ol>
|<ol start="128"><li>ddd<li>ee<li>f</ol>
|}

becomes:

  1. a
  2. bb
  3. ccc
  1. ddd
  2. ee
  3. f

This system, of course, does not need to be used for bullet-point lists, as number preservation isn't an issue.


Template:WikiDoc Sources


Licensed under CC BY-SA 3.0 | Source: https://www.wikidoc.org/index.php/Lists
40 views | Status: cached on July 12 2024 06:49:33
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF