View Single Post
Old 01-21-2016, 03:08 PM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I don't have a paperwhite so I cannot test it there. Testing it in calibre using a custom column built from other columns, the following works:
Code:
program:

sidx=field('series_index');
i=format_number(sidx, "{:02d}");
f=format_number(sidx, "{:04.1f}");
isInt=cmp(f, i, '', 'yes', '');
final_sidx=finish_formatting(
    test(isInt, i, f),
    '',
    ' ',    <---- There is a space between the single quotes
    ' '     <---- There is a space between the single quotes
);

# Add together the final result
strcat(
    field('series'),
    final_sidx,
    field('title')
);
It produces the following:
Click image for larger version

Name:	Clipboard02.jpg
Views:	311
Size:	13.7 KB
ID:	145730

If the kindle sorts differently then all I can suggest is that it is doing something strange with the numbers, for example ignoring the decimal point and what follows.
chaley is offline   Reply With Quote