Jump to content

Module:Params/doc/examples/tablebox/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Grufo (talk | contribs) at 02:18, 2 September 2024 (Create a documentation page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This example template shows how to use {{#invoke:params|call_for_each_group}} to create an infobox-like template.

Usage

For instance, writing

{{module:params/doc/examples/tablebox

	| caption = Electron

	| header 1 = General properties

	| header 2 = Family
	| text 2 = [[Lepton]]

	| header 3 = [[Particle|Composition]]
	| text 3 = [[Elementary particle]]

	| header 4 = Physical properties

	| header 5 = [[Mass]]
	| text 5 = {{val|510.99895069|(16)|u=[[Electronvolt|keV]]&thinsp;[[Speed of light|c]]<sup>−2</sup>}}<br /><small>({{val|9.1093837139|(28)|e=-31|u=[[kilogram|kg]]}})</small>

	| header 6 = [[Electric charge]]
	| text 6 = {{val|-1.602176634|e=-19|u=[[coulomb (unit)|C]]}}

	| header 7 = [[Color charge]]
	| text 7 = 0

	| header 8 = [[Spin (physics)|Spin]]
	| text 8 = {{ofrac|1|2}}

	| header 9 = [[Half-life]]
	| text 9 = Stable

}}

will generate

Electron
General properties
FamilyLepton
CompositionElementary particle
Physical properties
Mass510.99895069(16) keVc−2
(9.1093837139(28)×10−31 kg)
Electric charge−1.602176634×10−19 C
Color charge0
SpinTemplate:Ofrac
Half-lifeStable

Helper subtemplates