v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Difference between revisions of "Template:Ct/doc"
Jump to navigation
Jump to search
(+) |
(be careful with absolutes) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
| {{tt|<nowiki>The temperature of [[magma]] is {{ct|12000}}.</nowiki>}} || The temperature of [[magma]] is {{ct|12000}}. | | {{tt|<nowiki>The temperature of [[magma]] is {{ct|12000}}.</nowiki>}} || The temperature of [[magma]] is {{ct|12000}}. | ||
|} | |} | ||
− | </ | + | |
+ | The template can parse both numbers and NONE, the two temperature-related values most commonly used in the raws. You can give it a second argument (which defaults to "none") for a fallback if and only if the value given is precisely NONE. This is helpful for templates that use data directly derived from parsing [[raw file]]s. | ||
+ | {| class="wikitable" | ||
+ | ! Code !! Product | ||
+ | |- | ||
+ | | {{tt|<nowiki>The ignition point of [[slate]]: {{ct|NONE}}.</nowiki>}} || The ignition point of [[slate]]: {{ct|NONE}}. | ||
+ | |- | ||
+ | | {{tt|<nowiki>The ignition point of [[slate]] is {{ct|NONE|nonexistent; it never ignites}}.</nowiki>}} || The ignition point of [[slate]] is {{ct|NONE|nonexistent; it never ignites}}. | ||
+ | |} | ||
+ | |||
<includeonly>[[Category:Inline formatting templates]]</includeonly> | <includeonly>[[Category:Inline formatting templates]]</includeonly> | ||
<noinclude>[[Category:Template Documentation]]</noinclude> | <noinclude>[[Category:Template Documentation]]</noinclude> |
Latest revision as of 21:33, 14 July 2014
This template assists in the display of temperatures, measured in degrees Urist, by adding a hovertext which displays the temperature in degrees Celsius, rounded to the nearest one decimal point. It is actually quite flexible, being capable of parsing the number it needs out of entire lines of text, but it is stylistically recommended you restrict the template to the temperature itself:
Code | Product |
---|---|
[[Water]] freezes at {{ct|10000}}. | Water freezes at 10000 °U . |
{{ct|[[Water]] freezes at 10000 °U.}} | Water freezes at 10000 °U. |
The temperature of [[magma]] is {{ct|12000}}. | The temperature of magma is 12000 °U . |
The template can parse both numbers and NONE, the two temperature-related values most commonly used in the raws. You can give it a second argument (which defaults to "none") for a fallback if and only if the value given is precisely NONE. This is helpful for templates that use data directly derived from parsing raw files.
Code | Product |
---|---|
The ignition point of [[slate]]: {{ct|NONE}}. | The ignition point of slate: none. |
The ignition point of [[slate]] is {{ct|NONE|nonexistent; it never ignites}}. | The ignition point of slate is nonexistent; it never ignites. |