Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Val/units/doc
(section)
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== How to add a unit == To maintain Val units, # {{edit|Module:Val/units|Edit Module:Val/units}} and make your changes. # Preview {{space}} <kbd>{{big|Template:Val/list}}</kbd> {{space}} . #* Look for any messages. An "Invalid definition" message is available automatically. #* [[Wikipedia:TESTLINK|Prove the intended link]] from the preview. #* Hover the mouse over the link, and read the hover-text or URL display somewhere in the browser. # 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 [[Help:tables#Sortable tables|sortable table]] to test sorting. # ''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 [[List of common physics notations]], or from [[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 :{{#invoke:DemoTemplate|tlusage|val|"J.s"|0}}. Put any unit code in quotes if it contains dash, dot, or slash{{mdash}}anything but a letter or number. === 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 ''[[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> or as explained below at [[#Advanced unit entry formats|§Advanced unit entry formats]], you can also write :<kbd>c0{{spaces|2}}<nowiki>''c''<sub>0</sub></nowiki>{{spaces|6}}Speed of light#Numerical value, notation, and units</kbd> Then preview with ''Template:Val/list'', and check for an error message next to the new unit, and test the link you gave. After that the page with the (saved) Val calls is used to test the linked and non-linked versions of the normal and the per units: *<kbd><nowiki>{{val|0.891|u=c0}}</nowiki></kbd> β {{val|0.891|u=c0}} *<kbd><nowiki>{{val|0.891|ul=c0}}</nowiki></kbd> β {{val|0.891|ul=c0}} *<kbd><nowiki>{{val|0.891|up=c0}}</nowiki></kbd> β {{val|0.891|up=c0}} *<kbd><nowiki>{{val|0.891|upl=c0}}</nowiki></kbd> β {{val|0.891|upl=c0}} For an entire example that uses the other format to make a Val/unit entry. #Put this in a sandbox: <kbd>{<nowiki/>{val|1.23|ul='''tins'''}}</kbd> β {{val|1.23|ul=tins}} #Edit [[Module:Val/units]] and insert a line like the following (do not save yet): #:<kbd>'''tins'''{{spaces|3}}'''tins'''{{spaces|3}}Contins unities</kbd> #Under "Preview page with this module" enter <kbd>Template:Val/list</kbd>, and click ''Show preview''. It shows Val/list through the version of Val/units in the edit box. Say there are no errors, the markup and hover-text look good, and the link navigates to the unit's page. #Then in the same way of previewing, put the [[wp:pagename|fullpagename]] of the sandbox from step 1, and click ''Show preview''. #''Save page'' to save the edit to Module:Val/units. If you want a unit to add for practice, add one from ''[[List of common physics notations]]'', or from ''[[SI units#Units and prefixes]]''. There are many examples of ''composite'' units that have their own page, so adding a unit code for one of those should link to its page. There are many articles that could use a new Val unit, such as molarity at [[Resveratrol]]. Either of the test pages of these examples could have the sortable test-table shown in the next section.
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)