Jump to content

User:Permstrump/Tutorials

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Permstrump (talk | contribs) at 21:35, 18 March 2016 (Glossary templates: lists). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

List and table templates

H:TABLE - H:LIST - H:COL

Category:List formatting and function templates

Glossary templates

Template:Defn/doc

Glossary template

Example:

{{term|1=aspirin}}
{{defn|1=A mild analgesic of the non-steroidal anti-inflammatory drug (NSAID) family...}}
{{term|1=heroin}}
{{term|1=diacetylmorphine |multi=y}}
{{term|1=diamorpine |multi=y}}
{{defn|1=A synthetic narcotic drug of the opiate family...}}
{{term|1=ranitidine}}
{{defn|1=An antacid of the proton pump inhibitor family...}}

Result

Result: vs. no |multi=y
aspirin
A mild analgesic of the non-steroidal anti-inflammatory drug (NSAID) family...
heroin
diacetylmorphine
diamorpine
A synthetic narcotic drug of the opiate family...
ranitidine
An antacid of the proton pump inhibitor family...
aspirin
A mild analgesic of the non-steroidal anti-inflammatory drug (NSAID) family...
heroin
diacetylmorphine
diamorpine
A synthetic narcotic drug of the opiate family...
ranitidine
An antacid of the proton pump inhibitor family...
Term definition

Basic usage:

{{glossary}}

{{term|1=term}}
{{defn|1=Definition.}}

{{glossary end}}

Linking to the term:

{{term}} automatically creates anchors from the original term (|term= or |1=) or |id= value, as entered, and an all-lower-case version. About 90% of the links to glossary entries are going to be mid-sentence, and will expect to start with a lower-case letter, except for proper names. If your glossary has a case where one entry and another share the same name except for case, the second one must be given a unique |id=:

 {{term|term=Foo}}
{{term|term=foo|id=foo (2)}}

Lists

Template:Pagelist

Template for listing wikilinks to multiple pages

This template is mostly useful from within other templates that accept a variable number of page names as arguments. For example, the page arguments {{{1}}}{{{10}}} can be passed to this template using {{pagelist|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}}}. Any parameters not specified to the original template will be passed as empty parameters and not listed by the pagelist template.

Examples:

Type this To get this
{{Pagelist|X1|X2|X3|X4|X5}} X1, X2, X3, X4 and X5
{{Pagelist|nspace=Template|X1|X2|X3|X4|X5}} X1, X2, X3, X4 and X5
{{Pagelist|nspace= |delim=''|X1|X2|X3|X4|X5}} X1, X2, X3, X4 and X5


{{flatlist}}

This template can be used with or without {{endflatlist}}. For navigation boxes using {{navbox}}, one can set |listclass=hlist, and achieve the same styling without using this template. For image captions, list (i.e. asterisk) markup does not work, so consider using {{hlist}} instead.

Basic

Syntax:
{{flatlist|
* [[cat]]
* [[dog]]
* [[horse]]
* [[cow]]
* [[sheep]]
* [[pig]]
}}
Examples:


Numbered lists

Syntax:
{{flatlist|
# [[first]]
# [[second]]
# [[third]]
# [[fourth]]
# [[fifth]]
# [[sixth]]
}}
Examples:

Collapsible templates

{{cot}}

Syntax:

{{cot|TITLE}}
{{cob}}


Template:Collapsible list

Template:Collapsible list (no fill, no border)

Syntax

{{Collapsible list
 | expand = 
 | framestyle = 
 | titlestyle = 
 | title = 
 | liststyle = 
 | hlist = 
 | bullets = 
 | <!-- 1 = -->    <!--(First item in list; the "1 =" is usually not required)-->
 | <!-- 2 = -->    <!--(Second item in list; ditto)-->
 | <!-- 3 = -->    <!--(Third item in list; etc.)-->
 | <!-- etc -->
}}

Parameters

expand Include as |expand=on, |expand=true, etc to set the list's default state to expanded rather than collapsed.
framestyle Custom CSS styling applied the template overall (title and list).
titlestyle Custom CSS styling applied to the title.
title The list's title (always on view beside the list's [show/hide] link).
liststyle Custom CSS styling applied to the list (specifically, to the <ul>...</ul> tags delimiting the list).
hlist Include as |hlist=on, |hlist=true, etc to produce a horizontal rather than vertical list.
bullets Include as |bullets=on, |bullets=true, etc to place a bullet point before each list item.
Unnamed parameters
(first, second, third...)
The list items (in the order in which they will appear). If none are supplied, the template outputs nothing.

Example (no fill, no border):

Table templates

WP:USEPROSE

WikiTable

Syntax:

{| class="wikitable"
!Prose!!List with no content
|- valign="top"
| width="50%" | The '''[[20th-century]] [[architecture]] of [[New York City]]''' includes numerous icons of architecture, most notably its striking [[skyscrapers]].  In the first few decades of the century, the city became a center for the [[Beaux-Arts architecture|Beaux-Arts]] movement, represented by architects [[Stanford White]] and [[Carrère and Hastings]]. New York's new skyscrapers included the [[Flatiron Building]] (1902), where Fifth Avenue crosses Broadway at [[Madison Square]]; [[Cass Gilbert]]'s [[Woolworth Building]] (1913), a neo-Gothic "Cathedral of Commerce" overlooking City Hall; the [[Chrysler Building]] (1929), a pure expression of [[Art Deco]]; and the [[Empire State Building]] (1931). Modernist architect [[Raymond Hood]], and [[Lever House]] after World War II, began the clusters of "glass boxes" that transformed the classic skyline of the 1930s, culminating in the [[World Trade Center (1973–2001)|World Trade Center]] towers (1973).
| '''[[20th-century]] [[architecture]] of [[New York City]]'''
* [[Flatiron Building]] (1902)
* [[Woolworth Building]] (1913)
* [[Chrysler Building]] (1929)
* [[Empire State Building]] (1931)
* [[World Trade Center (1973–2001)|World Trade Center]] (1973)
|}

Example:

Prose List with no content
The 20th-century architecture of New York City includes numerous icons of architecture, most notably its striking skyscrapers. In the first few decades of the century, the city became a center for the Beaux-Arts movement, represented by architects Stanford White and Carrère and Hastings. New York's new skyscrapers included the Flatiron Building (1902), where Fifth Avenue crosses Broadway at Madison Square; Cass Gilbert's Woolworth Building (1913), a neo-Gothic "Cathedral of Commerce" overlooking City Hall; the Chrysler Building (1929), a pure expression of Art Deco; and the Empire State Building (1931). Modernist architect Raymond Hood, and Lever House after World War II, began the clusters of "glass boxes" that transformed the classic skyline of the 1930s, culminating in the World Trade Center towers (1973). 20th-century architecture of New York City
Long sequence with 2 columns

Syntax:

{| class="wikitable"
!Prose!!List
|- valign="top"
| width="50%" | [[Philosophy|Philosophers]] discuss the meaning, function, and possibility of offering definitions. It is typical (e.g., in [[college logic]] texts) to distinguish a number of different kinds and techniques of definition, including dictionary or [[lexical definition]], [[intensional definition]], [[extensional definition]], [[ostensive definition]], [[stipulative definition]], [[operational definition]], [[theoretical definition]], [[persuasive definition]], and [[definition by genus and difference]].
| width="50%" | [[Philosophy|Philosophers]] discuss the meaning, function, and possibility of offering definitions. It is typical (e.g., in [[college logic]] texts) to distinguish a number of different kinds and techniques of definition, including:
{{col-begin}}
| width="50%" align="{{{align|left}}}" valign="{{{valign|top}}}" style="border:0"|
* Dictionary or [[lexical definition]]
* [[Intensional definition]]
* [[Extensional definition]]
* [[Ostensive definition]]
* [[Stipulative definition]]
| width="50%" align="{{{align|left}}}" valign="{{{valign|top}}}" style="border:0"|
* [[Operational definition]]
* [[Theoretical definition]]
* [[Persuasive definition]]
* [[Definition by genus and difference]]
{{col-end}}
|}

Example:

Prose List
Philosophers discuss the meaning, function, and possibility of offering definitions. It is typical (e.g., in college logic texts) to distinguish a number of different kinds and techniques of definition, including dictionary or lexical definition, intensional definition, extensional definition, ostensive definition, stipulative definition, operational definition, theoretical definition, persuasive definition, and definition by genus and difference. Philosophers discuss the meaning, function, and possibility of offering definitions. It is typical (e.g., in college logic texts) to distinguish a number of different kinds and techniques of definition, including:


H:COL

Columns without borders

Two columns

Syntax:
{{colbegin}}
{{lorem}}
{{lorem}}
{{colend}}
Produces:

Lorem ipsum dolor sit amet, consectetur adipiscing 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.


Lorem ipsum dolor sit amet, consectetur adipiscing 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.


Multiple columns

Syntax:
{{col-begin}}
{{col-break}}
{{lorem}}
{{col-break}}
{{lorem}}
{{col-break}}
{{lorem}}
{{col-end}}
Produces:


{{br list}}

Sortable table

Usage: {{br separated entries|entry1|entry2|entry3|entry4|entry5|...}}

Example
Code Result
{{br separated entries|entry1|entry2|entry3}} entry1
entry2
entry3
{{br separated entries| |entry2|entry3}} entry2
entry3
{{br separated entries|entry1| |entry3}} entry1
entry3
{{br separated entries|entry1|entry2| }} entry1
entry2
{{br separated entries|entry1| | }} entry1
{{br separated entries| |entry2| }} entry2
{{br separated entries| | |entry3}} entry3
{{br separated entries| | | }}
{{br separated entries|entry1|entry2|entry3|entry4|entry5|entry6}} entry1
entry2
entry3
entry4
entry5
entry6

Parameters:

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Permstrump in articles based on its TemplateData.

TemplateData for Permstrump

Creates a <br /> delimited collection of items. Primarily for use in infoboxes, it only adds the <br /> tags where needed.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
First item1

First item, may be null

Stringoptional
Second item2

Second item, many more items can be added

Stringoptional

Talkpage templates

WP:Signatures

Image with comment templates
Favs
Tag Renders Tag Renders
{{Autp}} Answered on user's talk page. {{Duck}}  Looks like a duck to me
{{Like}} 👍 Like {{Dislike}} Dislike
{{Done}}  Done {{Done-t}}  Done
{{Great}} thumbs up Great! {{Not sure}} Not sure
{{Orz}} Orz... {{WPcrystalball}}  Wikipedia is not a crystal ball.
{{Suggestion}} question mark Suggestion {{ToDo}}  ToDo
{{Thank}}  Thanks {{You're welcome}} Smiley You're welcome!
{{Thank you very much}}  Thank you very much! {{Sorry}} Smiley Sorry!

Lists

Lists of lists

Category:Wikipedia templates