2,862 bytes added
, 05:17, 16 July 2021
This module was used to replace {{tl|Subatomic particle}} in [[List of baryons]] to remove that article from [[:Category:Pages where post-expand include size is exceeded]]. Prior to the replacement, half of the article was not displayed correctly.
== Usage ==
* <code>{{#invoke:particles|nolink|''item1''|''item2''|''item3''|...}}</code> {{green|1=(display items with no link)}}
* <code>{{#invoke:particles|link|''item1''|''item2''|''item3''|...}}</code> {{green|1=(each displayed symbol is linked to an article)}}
These items are built-in to the module:
{| class="wikitable"
! Item !! Result
|-
| / || " / "
|-
| + || " + "
|-
| or || " or "
|-
| seen || " (seen) "
|-
| _word1_word2 || " word1 word2" {{green|1=(word''N'' is any text)}}
|-
| (text) || "(text)" {{green|1=(text is any text)}}
|-
| br || "<br />" {{green|1=(and splits the result into lines)}}
|}
Any other item must an identifier for a particle (not case sensitive). If an item is not recognized, an error message is displayed. Each identifier is defined in [[Module:Particles/data]].
Any '''br''' item divides the result into lines, and each line is enclosed in a nowrap span. If there are no '''br''' items, the result is a single line enclosed in a nowrap span.
== Examples ==
{| class="wikitable"
! Wikitext !! Result
|-
| <code><nowiki>{{#invoke:particles|nolink|Proton+}}</nowiki></code> || {{#invoke:particles|nolink|Proton+}}
|-
| <code><nowiki>{{#invoke:particles|link|Sigma*+|(1385)}}</nowiki></code> || {{#invoke:particles|link|Sigma*+|(1385)}}
|-
| <code><nowiki>{{#invoke:particles|link|Up quark|Up quark|Down quark}}</nowiki></code> || {{#invoke:particles|link|Up quark|Up quark|Down quark}}
|-
| <code><nowiki>{{#invoke:particles|link|Proton|/|Proton+|/|Nucleon+}}</nowiki></code> || {{#invoke:particles|link|Proton|/|Proton+|/|Nucleon+}}
|-
| <code><nowiki>{{#invoke:particles|link|Charmed lambda+|+|Kaon-|+|Pion+|+|Pion+|seen}}</nowiki></code> || {{#invoke:particles|link|Charmed lambda+|+|Kaon-|+|Pion+|+|Pion+|seen}}
|-
| <code><nowiki>{{#invoke:particles|link|Lambda0|+|Pion+|or|br|Sigma+|+|Pion0|or|br|Sigma0|+|Pion+}}</nowiki></code> || {{#invoke:particles|link|Lambda0|+|Pion+|or|br|Sigma+|+|Pion0|or|br|Sigma0|+|Pion+}}
|-
| <code><nowiki>{{#invoke:particles|link|Lambda0|+|Pion+|_any_text|br|Sigma+|+|Pion0|_more_text|br|Sigma0|+|Pion+}}</nowiki></code> || {{#invoke:particles|link|Lambda0|+|Pion+|_any_text|br|Sigma+|+|Pion0|_more_text|br|Sigma0|+|Pion+}}
|}
== Modules ==
The following modules are used:
* [[Module:Particles]] • Code to display one or more particle symbols.
* [[Module:Particles/data]] • Particle definitions extracted from subpages of [[Template:Subatomic particle]].
* [[Module:Su]] • Called to display ''sup'' and ''sub'' (top and bottom) labels.