Template:SI photon units/doc
This is a documentation subpage for Template:SI photon units. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit]This template displays a table of SI photon units for usage in articles about physics or radiometry. It may also serve as a navigation box at the end of corresponding articles.
The template supports three optional parameters to finetune its behaviour.
Parameters
[edit]Documentation of parameters:
Parameter 1
[edit]1 = undefined or empty
Template will not display the string "Table X. " in front of the table's title "SI photon units".
1 = <number>
The template will display the table number as part of the table header in the following form: "Table <number>. SI photon units.", where <number> is a placeholder for the number (or other table designation) given as parameter.
Parameter 2
[edit]2 = undefined or empty
Template will not show "(Compare)" links in the table footer.
2 = "self"
The template will display "(Compare) links in the table footer to jump to the corresponding photometry and radiometry tables within the same article. In order for this to work, the photometry and radiometry tables must be included using the templates {{SI light units}}
and {{SI radiometry units}}
. It is not necessary to reload the article for comparison.
2 = any non-empty string other than "self"
The template will display "(Compare)" links (as above). However, the links will point to the corresponding photometry and radiometry tables in their corresponding articles "Photometry (optics)" and "Radiometry", not to within the article, where the {{SI photon units}}
template has been included. This is useful, if the other tables should not be included in the article.
Parameter 3
[edit]3 = undefined
The table's footnotes will be grouped in a reference group named "nb" and displayed immediately after the table. In order to avoid conflicts with other references in the article, it is advisable to use other group names for external references (default is ""). Otherwise these external references will be listed after the table as well.
3 = empty, that is: ""
The table's footnotes will be grouped in the article's default group "", as used for all other references without specific group names. It is important to manually include a <references/>
tag or the {{Reflist}}
template somewhere in the article. This is the place where the footnotes will show up.
3 = <groupname>
The table's footnotes will be grouped in a reference group named as specified in the groupname. It is important to manually include a <references group="<groupname>"/>
tag or the {{Reflist|group=<groupname>}}
template somewhere in the article. This is the place where the footnotes will show up. Try to use a short groupname, as the table will look nicer this way.
Examples
[edit]Some easy examples:
{{SI photon units}}
{{SI photon units|1}}
{{SI photon units|1|compare}}
{{SI photon units||compare}}
{{SI photon units|1|compare|""}}
{{SI photon units|1||""}}
{{SI photon units||compare|""}}
{{SI photon units|1|compare|Note}}
{{SI photon units|||notes}}
{{SI photon units||compare|Note}}
Combining the tables in a single article (individually grouped footnotes in group "nb"):
{{SI light units|1|self}}
{{SI radiometry units|2|self}}
{{SI photon units|3|self}}
Combining the tables in a single article (individual footnotes in separately named groups, f.e. "T1", "T2", and "T3"):
{{SI light units|1|self|T1}}
{{Reflist|group=T1}}
{{SI radiometry units|2|self|T2}}
{{Reflist|group=T2}}
{{SI photon units|3|self|T3}}
{{Reflist|group=T3}}
Combining the tables in a single article (combined footnotes f.e. in group "nb"):
{{SI light units|1|self|nb}}
{{SI radiometry units|2|self|nb}}
{{SI photon units|3|self|nb}}
...
{{Reflist|group=nb}}
Combining the tables in a single article (combined footnotes with default references):
{{SI light units|1|self|""}}
{{SI radiometry units|2|self|""}}
{{SI photon units|3|self|""}}
...
{{Reflist}}
Notes
[edit]Ideally, the "(Compare)" links would show up on the left or right of the table header, similar to "v d e", so that the cursor would remain in the same position and one could flip back and forth between the tables
without window realignment. However, this would require a small change in the {{Navbar-header}}
template.
See also
[edit]