Quote:
Originally Posted by tponzo
I don't want the leading zeros, although I will keep them if I can get the rest to work.
|
If you don't have the leading zeros, then books in the same series will sort 1, 11, 2 instead of 1, 2, 11.
In a format specification (the "0>3.2") the number before the period is the minimum length of the field. The number after the period is the minimum length after the decimal point. "3.2" says to use all the minimum length for the point and what follows (point is one character, then 2 more). You probably want something like 05.2f, which means use leading zeros, min field length of 5, with two after the decimal point. This will produce numbers of the form NN.NN. If you have series indices larger than 99, then increase the 5 to whatever is appropriate.
Note that the > (left aligned) isn't useful with numeric formats in templates, because all leading and trailing spaces in the result are removed. It is useful with string formats because it permits leading 0 filling.