Difference between revisions of "Template:Linum"
imported>SMcCandlish (Sometimes I really hate the MW parser. It's utterly stupid that {{templatename|1=One|Two}} isn't recognized as identical to {{templatename|1=One|2=Two}} and {{templatename|One|Two}}. ARGH.) |
imported>Codename Lisa (Nominated for deletion; see Wikipedia:Templates for discussion/Log/2016 September 5#Template:Linum.) |
||
| Line 1: | Line 1: | ||
| − | <li class="cplist-oli" style="list-style:{{{type|none}}};" value="{{{value|}}}">{{lino | + | {{Template for discussion/dated|page=Linum|link=Wikipedia:Templates for discussion/Log/2016 September 5#Template:Linum|help=off}}<li class="cplist-oli" style="list-style:{{{type|none}}};" value="{{{value|}}}">{{lino |
|1={{{1}}} | |1={{{1}}} | ||
|color={{{color|inherit}}} | |color={{{color|inherit}}} | ||
Revision as of 09:36, 5 September 2016
Template:Template for discussion/dated
Usage
This template, {{linum}} (for "list item, numbered") is part of the system of templates for copy-pasteable lists. It is used inside {{unbulleted list}} to provide a number, automatically spaced for you, in front of an item in an ordered list. It can be used to layout complicated outlines, e.g. "I) ... A) ... 1) ... i) ..." and other formats.
Parameters
|1=or first unnumbered parameter – the number, letter or other designation of the line item (e.g.1,A,xiv,physics, etc.). This can have wikimarkup (e.g. style, even a link) applied to it.|2=or|text=or|content=or second unnumbered - text of the item (can contain wikilinks and other markup like normal).|punct=– the punctuation after the number or other designation (e.g.),:, –; defaults to.like our default list#-formatted wikicode list style's output). No trailing space is needed; the template will provide that.|color=– a#XXXXXXcolor code or Web color name for the text (not background) color of the designation supplied in|1=, for unusual cases in which this is needed. This should not normally be used in mainspace .
Examples
- Basic copy-pasteable list:
{{unbulleted list
| {{linum|1|The first ordered list item}}
| {{linum|2|The second ordered list item}}
}}
- Template:Template for discussion/dated
- 1. The first ordered list item
- Template:Template for discussion/dated
- 2. The second ordered list item
Compare bare wikimarkup, with non-copy-pasteable numbers:
# The first ordered list item # The second ordered list item
- The first ordered list item
- The second ordered list item
The style of this can be matched more closely with a parameter on the wrapper template:
{{unbulleted list |style=margin-left: 2em
| {{linum|1|The first ordered list item}}
| {{linum|2|The second ordered list item}}
}}
- Template:Template for discussion/dated
- 1. The first ordered list item
- Template:Template for discussion/dated
- 2. The second ordered list item
- Outline style:
{{unbulleted list |style=margin-left: 1.5em
| {{linum|A |punct=) |text=The first ordered list item}}
| {{linum|B |punct=) |text=The second ordered list item <!-- leave item open for nested list -->
{{unbulleted list |style=margin-left: 1.5em
| {{linum|1 |punct=) |text=A nested sub-item}}
}} <!-- close nested list -->
}} <!-- close open item -->
}} <!-- close main list -->
- Template:Template for discussion/dated
- A) {{{2}}}
- Template:Template for discussion/dated
- B) {{{2}}}
- As a compact alternative to description lists:
This kind of usage should be in some clear order (alphabetical, chronological, etc.); otherwise use an unordered list.
Plural 'you' constructions:
{{unbulleted list |style=margin-left: 1em
| {{linum|English |punct=: |text=you all (informal), y'all (colloquial), yous (colloq.), yins (colloq.), ye (obsolete)}}
| {{linum|French |punct=: |text=''{{lang|es|vous}}''}}
| {{linum|Mandarin |punct=: |text=''nǐmen'' {{lang|zh|你们}} }}
| {{linum|Spanish |punct=: |text=''{{lang|es|tus}}'' (informal), ''{{lang|es|ustedes}}'' (formal)}}
}}
Plural 'you' constructions:
- Template:Template for discussion/dated
- English: {{{2}}}
- Template:Template for discussion/dated
- French: {{{2}}}
- Template:Template for discussion/dated
- Mandarin: {{{2}}}
- Template:Template for discussion/dated
- Spanish: {{{2}}}
Tech note
This template uses list-style-type: none and value="" to suppress the automated number generation of ordered lists, then replaces them with a copy-pasteable (and scalable!) value provided by the editor (it is passed to and generated by the {{lino}} meta-template).
See also
| The above documentation is transcluded from Template:Linum/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |