Jump to content

Module:Params/doc/examples/tablebox/doc

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Grufo (talk | contribs) at 03:57, 2 September 2024. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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

For a template for creating unstructured infoboxes, see {{module:params/doc/examples/informal tablebox}}.

Usage

[edit]

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 =| header 8 = [[Spin (physics)|Spin]]
	| text 8 = {{frac|1|2}}

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

	| header 10 = Lorem ipsum

	| text 11 = Dolor sit amet

}}

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 charge
Spin12
Half-lifeStable
Lorem ipsum
Dolor sit amet

Helper subtemplates

[edit]

Stylesheets

[edit]