Template:Plainlist/doc
This is a documentation subpage for Template:Plainlist. It contains usage information, categories and other content that is not part of the original template page. |
This template uses TemplateStyles: |
Usage
[edit]{{Plainlist}} starts a plain, or unbulleted, list, such as:
It uses proper HTML list markup, which is more standards-compliant and more accessible than separating list items with <br />.
Parameters
[edit]- hanging-indent – indents the list items with a "hanging indent". Options are
1em
or2em
- indent – indents the entire list by a number of standard indents (one indent being 1.6em), particularly handy for inclusion in an indented discussion thread.
- Example:
|indent=2
- Example:
- lead — Adds vertical whitespace at the start of a list. (Name is from leading in printing.
- style – adds CSS style options.
- Example:
|style=border:solid 1px silver; background:lightyellow
- This CSS style adds a solid silver border around the list, 1 pixel thick, and sets the background color of the list to light yellow.
- Example:
|style=margin-left:2em; text-indent:-2em
- This CSS style creates a "hanging indent" style list often seen in the index of a book.
- Example:
- class — adds extra CSS classes
Examples
[edit]Example
{{Plainlist |
* [[Author:George Washington|George Washington]]
* [[Author:John Adams (1735-1826)|John Adams]]
* [[Author:Thomas Jefferson|Thomas Jefferson]]
* James
** [[Author:James Madison|James Madison]]
** [[Author:James Monroe|James Monroe]]
}}
Example
{{Plainlist |lead=5em|indent=2|hanging-indent=2em|style=font-size:80%;|
* 1 {{lorem ipsum}}
* 2 {{lorem ipsum}}
* 3 {{lorem ipsum}}
}}
- 1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- 3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Example: Split (/s and /e) templates
This is equivalent to the example above.
{{Plainlist/s|lead=5em|indent=2|hanging-indent=2em|style=font-size:80%;}}
* 1 {{lorem ipsum}}
* 2 {{lorem ipsum}}
* 3 {{lorem ipsum}}
{{Plainlist/e}}
Example: /m template suppresses the hanging indent on the first item
{{Plainlist/m|lead=5em|indent=2|hanging-indent=2em|style=font-size:80%;}}
<noinclude>*</noinclude> ...continued from prior page. {{lorem ipsum}}
* 2 {{lorem ipsum}}
* 3 {{lorem ipsum}}
{{Plainlist/e}}
- ...continued from prior page. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
- 3 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Alternate use
[edit]This template is also available in three parts
- {{plainlist/s}} (start)
- {{plainlist/e}} (end)
- {{plainlist/m}} (middle - the hanging indent of the first element is suppressed)
Removes bullets or numbers from a list.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | The list,. Should be selected before calling the wizard. | Content | suggested |
hanging-indent | hanging-indent | 'Out-dents' list items when they wrap.
| String | optional |
indent | indent | Indents the entire list using a choice of 1 or 2. 1 being 1.6em and 2 being 3.2em.
| String | optional |
lead | lead | Adds vertical whitespace at the beginning of list.
| String | optional |
style | style | Adds css style options.
| String | optional |
hi | hi | no description | Unknown | optional |
class | class | CSS class to add ( Typically defined in IndexStyles) | Unknown | optional |
Additional info
[edit]- To be recognized, paragraphs are preceded by the asterisk.
- {{plainlist/m}} requires the first paragraph at the top of page to be preceded by <noinclude>*</noinclude>.
- Hyphenated words do not use the {{hws}} and {{hwe}} templates, or hyphens. The words are joined seamlessly.