Jump to content

Template:Polarity/doc

From Wikipedia, the free encyclopedia
Center positive symbol
Center positive symbol
Center negative symbol
Center negative symbol

This template generates a polarity symbol, indicating that a device requires a direct current power supply with either a positive- (positive center) or negative-center (negative center) coaxial power connector (barrel plug). Alternatively, the template can be used to generate a fullwidth tilde (~), a symbol which indicates alternating current, which some devices require from their barrel-plug power supply.

This template is especially useful for infoboxes such as {{Infobox computing device}}, which have a "power" parameter for giving power consumption specifications. A reliable source backing up the polarity information is required.

Note: Please check to see if the image generated corresponds to the symbol on the device the article is about!

Usage

[edit]

This template can used either with named parameters, as in...:

{{polarity|polarity=positive|size=40}}
positive center

...or without:

{{polarity|positive|40}}

TemplateData

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

TemplateData for Polarity

A template for adding a electrical polarity symbol, indicating that a device requires a power supply with either a DC positive-center, DC negative-center, or alternating current (AC) ''barrel plug'' connector.

Template parameters

ParameterDescriptionTypeStatus
Polaritypolarity 1

The polarity of the coaxial power connector/''barrel plug'' connector that the device requires.

Default
Example
positive, pos, negative, neg, alternating-current, alternating, ac
Stringrequired
Sizesize 2

The size in height of the positive- or negative-center symbol to be displayed, in px. Defaults to 14 (px). Any other measurement (e.g. mm, em, in) is ignored.

Default
14
Stringoptional