Module:Val/units/doc: Difference between revisions
Content deleted Content added
Caleb Cooper (talk | contribs) m Text replacement - "[[Template talk" to "[[Wikipedia:Template talk" |
Caleb Cooper (talk | contribs) No edit summary |
||
Line 1:
This where you {{edit|Module:Val/units|configure Val units}}. The list of Val units is published at ''[[Template:Val/list]]'', and here is the place that produces that report. So preview {{space}} <kbd>{{big|Template:Val/list}}</kbd> {{space}} from the edit box to see your changes before saving them. The file format and syntax are mostly self explanatory.
* The [[Wikipedia:field separator]] is two or more spaces.
* You can enter new units in the "Unsorted units" section if you are not sure where else it might go.
Line 30:
* Unit codes will be case sensitive.
* Prefer {{code|u}} for the Greek letter μ, if you're not sure.
* Composite units have [[Wikipedia:Dimensional analysis#Definition|dimensions]] that multiply, divide, and apply powers to component units. Use {{code|.}} to multiply, {{code|/}} to divide, and a signed digit for powers. For multiplication, {{code|*}} is deprecated. When adding a unit that includes division, consider also adding a version with multiplication by the negated power; for example, {{code|m/s2}} and {{code|m.s-2}} (for <kbd>m/s<sup>2</sup></kbd> and <kbd>m⋅s<sup>−2</sup></kbd>).
;unit pagename
Line 36:
;unit symbol
:[[Wikipedia:wp:V|Verifiable|]], standard symbol, formatted in accordance with [[Wikipedia:Wikipedia:WP:UNITS|Wikipedia:WP:UNITS]].
* Templates will not work for producing the unit symbol for input to this module; only [[Wikipedia:HTML#Formatting|Wikipedia HTML formatting]] is accepted.
* Composite units use {{code|⋅}} to multiply, {{code|/}} to divide, and {{tag|sup}} for powers. Division is also the unit-inversion form that multiplies a negative numbered power, for example for <kbd>m/s<sup>2</sup></kbd> and <kbd>m⋅s<sup>−2</sup></kbd> (from {{code|m.s-2}} and {{code|m/s2}}).
Line 66:
# Add any unit-code aliases.
# Add any sorting if needed. Details about sorting are covered below.
# Preview a test page. It will have template Val calls on it, and it may have a [[Wikipedia:Help:tables#Sortable tables|sortable table]] to test sorting. [[Template:Val/units/testcases]] is a test page containing Val calls for all units.
# ''Show changes'' to prove no accidental edits occurred.
# Save the page. Saving the page activates the changes immediately, and they go live. You're done adding your unit.
If you want a unit to add for practice, add one from [[Wikipedia:List of common physics notations|List of common physics notations]], or from [[Wikipedia:SI units#Units and prefixes|]].
'''Changing or removing existing unit codes''' is possible by employing {{tl|Template usage|Val|''code''}} to see how Val unit codes may or may not be in use on the wiki. For example, to see about changing or removing unit code <kbd>J.s</kbd>, do a
Line 77:
=== Examples ===
Say you're creating a new page or revamping an old page, and discover the need for a convenient way to make several entries containing [[Speed of light|<span title="speed of light in a vacuum">''c''<sub>0</sub></span>]], and link that symbol to the page ''Speed of light''. The following entry will define your unit code as <kbd>c0</kbd>, your unit symbol as <kbd><nowiki>''c''<sub>0</sub></nowiki></kbd>, and the unit's article as ''[[Wikipedia:Speed of light#Numerical value, notation, and units]]''.
:<kbd>c0{{spaces|2}}'''{{big|1= [[ }}'''Speed of light#Numerical value, notation, and unit symbol'''{{big|{{!}}}}'''<nowiki>''c''<sub>0</sub></nowiki>'''{{big|]]}}'''</kbd>
| |||