Template talk:Hs

From ChoralWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This doesn't work in FireFox

I gather this template is supposed to produce horizontal space equal to the width of the text passed to it as a parameter; Eg., {{hs|0}}123456{{hs|78}}9 should produce

1234569 – which could be compared with
0123456789 – except it doesn't in FireFox, where it produces
0123456789

The way I got the required space was to use which is the equivalent of a "figure (digit) space" for each digit that was to be omitted. Some fonts (eg. Palatino Linotype), but not all, have this "figure space" encoded as &8199 (see User:CHGiffen/Spacing for more spacing issues which led to the template spc). Since I think that Philip really intended this template primarily for left padding numbers with (figure) space so that they align right in listings. To this end, I've created a template ds so that {{ds|n}} will produce n digit spaces:

1 - type: {{ds|3}}1
10 - type: {{ds|2}}10
100 - type: {{ds|1}}100 or just {{ds}}100
1000 - type: {{ds|0}}1000 or just 1000

Chucktalk Giffen 14:39, 29 August 2009 (UTC)