Difference between revisions of "Template:1/2/doc"

From blackwiki
< Template:1‎ | 2
Jump to navigation Jump to search
blackwiki>Crissov
(→‎Usage: more complex example)
blackwiki>Crissov
(→‎Usage: note on spacing)
Line 5: Line 5:
  
 
The template uses [[HTML]] markup to create a large, readable, and stacked "{{1/2}}", as opposed to the often illegible "½" or horizontal "1/2". It is intended as a concise, easily-interpreted alternative to <code><nowiki>{{Frac|1|2}}</nowiki></code>.
 
The template uses [[HTML]] markup to create a large, readable, and stacked "{{1/2}}", as opposed to the often illegible "½" or horizontal "1/2". It is intended as a concise, easily-interpreted alternative to <code><nowiki>{{Frac|1|2}}</nowiki></code>.
{{#if:{{{1|}}}|{{frac|{{{1}}}|1|2}}|{{frac|1|2}}}}
 
* <code><nowiki>Take {{1/2}} pound. Stir for 2{{1/2}} minutes. Bake for {{1/2|1}} hour.</nowiki></code>
 
  
 +
* <code><nowiki>Bake for {{1/2}} hour.</nowiki></code>
 
generates:
 
generates:
 +
* Bake for {{1/2}} hour.
 +
without requiring the use of bulky HTML markup.
  
* Take {{1/2}} pound. Stir for 2{{1/2}} minutes. Bake for {{1/2|1}} hour.
+
Please note that this template does not handle preceding integers (or succeeding units) and the spacing in between, use {{tl|frac}} for that:
  
without requiring the use of bulky HTML markup.
+
* <code><nowiki>Bake for {{frac|2|1|2}} hours.</nowiki></code>
 +
* Bake for {{frac|2|1|2}} hours.
  
 
=== See also ===
 
=== See also ===

Revision as of 14:00, 28 December 2013

Usage

The template uses HTML markup to create a large, readable, and stacked "​12", as opposed to the often illegible "½" or horizontal "1/2". It is intended as a concise, easily-interpreted alternative to {{Frac|1|2}}.

  • Bake for {{1/2}} hour.

generates:

  • Bake for ​12 hour.

without requiring the use of bulky HTML markup.

Please note that this template does not handle preceding integers (or succeeding units) and the spacing in between, use {{frac}} for that:

See also