Template talk:Hands

This is the discussion page for: Template:Hands.

Updated for fractions, lk=off, abbr=hh, r=1
7-July-2011: UPDATED (from /sandbox). I have updated Template:Hands to allow the new options. This is the first update since 23 August 2009. The updated features include: allows a fraction as in $14.1 3/4$; new options: abbr=on (or abbr=hh for "hh"), lk=off to not wikilink; r=1 to round inches/cm as 1 decimal place, rinch=1 to round inches, rcm=1 to round cm to 1 decimal; fixed for ranges, omits spaces if hyphen/dash or comma in the range; and shows more examples.

The changes were tested in the /sandbox version, in Template:Hands/sandbox, to allow unlinking "hands" by lk=off, and to support fractional horse heights, such as Theodore O'Connor being hh (or ?). The fraction 3/4 adds 0.75 inches. Examples:
 * {&#123;hands|14.2}}&rarr;
 * {&#123;hands|14.2|lk=off}} &rarr;
 * {&#123;hands|14.1+3/4}}  &rarr;
 * {&#123;hands|15.2+655/1000}}  &rarr;

Note how the of an inch is coded as "+3/4" combined with the number "14.1+3/4" in hands. The wikilink for "hands" will default to "lk=on" so to get plain text, use "lk=off" when showing many horse heights in an article.

New options for abbreviation and rounding: Keeping Template:Hands with the same simple results, I have also added optional parameters for abbreviation (abbr=on or abbr=hh to show "hh" for hands high) and rounding (r=2, rinch=2, rcm=1). We need to round the inches, in the rare case of having 1/3 inch (0.333333333):
 * {&#123;hands|14.1+1/3}}     &rarr;
 * {&#123;hands|14.1+1/3|rinch=1}} &rarr;
 * {&#123;hands|15.3|abbr=on}}     &rarr;
 * {&#123;hands|15.3|abbr=hh}}     &rarr;

With option rinch=1, inches are rounded to 1 decimal place, to show "57.3" rather than 57.333333333333 inches when 1/3 inch. Remember, all those new parameters are optional, and Template:Hands will still default to the simple inches/cm as before. The plan is to keep Hands simple for most cases, while allowing rare options, when there are several heights in one article. -Wikid77 15:03, 7 July 2011 (UTC)

Template:Convert supports hands
The standard measurement converter, Template:Convert, also has an option for converting the hand (unit), as unit-code "hand" or "hands". However, the parameters for Convert are in a different order than in Template:Hands. Some examples:
 * {&#123;convert|1.9|m|hands}} &rarr; 1.9 m
 * {&#123;convert|13.1|-|13.3|hands|in}}  &rarr; 13.1 - 13.3 hands
 * {&#123;convert|14.3|hands}}      &rarr; 14.3 hands
 * {&#123;convert|14.3|hands|in cm}} &rarr; 14.3 hands
 * {&#123;convert|14.3|hands|royal cubit}} &rarr; 14.3 hands

Use of Template:Convert allows a greater variety of other units, than Template:Hands, beyond just inches and cm. -Wikid77 (talk) 15:03, 7 July 2011 (UTC)