Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 12-23-2019, 10:19 AM   #1
TheRealAce
Junior Member
TheRealAce began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: Kindle Basic 10th gen
Issues with decimal numbers sorting + sorting series but showing title first

Dear E-readers,

this is a 2-part question, I hope that's okay.


First, for some reason the Kindle doesn't sort decimal number correctly when displayed like this:

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),
    '',
    ' [',
    '] '
);

# Add together the final result
strcat(
    field('series'),
    final_sidx,
    field('title')
);
Stormlight Archive [01] - Way of Kings
Stormlight Archive [02.5] - Edgedancer
Stormlight Archive [02] - Words of Radiance


After an extensive search I concluded it's not possible because of the number/symbol order programmed in Kindle itself. However, the threads and articles I read where at least 2 years old, some older.
Has there been an update and/or is it fixable with the current version?

To clarify, I did get it to sort correctly with:

Code:
{series} {series_index:04.1f|[|] }{title}
but then it shows all numbers with a .0 like so:

Stormlight Archive [01.0] - Way of Kings
Stormlight Archive [02.0] - Words of Radiance
Stormlight Archive [02.5] - Edgedancer


and that applies to other series without decimals as well.
Apologies for sounding like a total OCD freak, but this is not quite what I want.


Second, nothing major but, I'd like to sort my series on the series name and number but with the title showing first, like this:


Way of Kings - Stormlight Archive [01]
Words of Radiance - Stormlight Archive [02]
Oathbringer - Stormlight Archive [03]


But when putting title first, it of course sorts on title alphabetically:

Oathbringer - Stormlight Archive [03]
Way of Kings - Stormlight Archive [01]
Words of Radiance - Stormlight Archive [02]


Is it possible to have title show first but still sort on series?


Any help or advice would be greatly appreciated, apologies again for the nitpicking. If it's not solvable I guess I'd have to choose between ugly numbers or wrong sorting.

BTW: I have a Kindle Basic 10th gen 6" and Calibre 4.6

TheRealAce is offline   Reply With Quote
Old 12-23-2019, 10:41 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,063
Karma: 57259778
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I can't answer for a New Kindle (have a K4nt )
PLUGBOARD and Collection was my solution

Code:
{series_index: >5.2f|| - }{title}
BTW use a leading space when formatting the index for some of the issue as space sorts before 0 - 9, elims the leading 0

Personally, I just leave the leading and trailing 0's, it makes the list look more even
theducks is offline   Reply With Quote
Advert
Old 12-23-2019, 11:17 AM   #3
TheRealAce
Junior Member
TheRealAce began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2019
Device: Kindle Basic 10th gen
Quote:
Originally Posted by theducks View Post
I can't answer for a New Kindle (have a K4nt )
PLUGBOARD and Collection was my solution

Code:
{series_index: >5.2f|| - }{title}
BTW use a leading space when formatting the index for some of the issue as space sorts before 0 - 9, elims the leading 0

Personally, I just leave the leading and trailing 0's, it makes the list look more even
How do you remove all the trailing 0's and still be able to use decimals like:
1
2.5

and not
2.50

Right now I've managed to remove the leading zero and have only 1 trailing 0.
Code:
{series}{series_index:2.1f| #| - }{title}
Series #1.0
Series #1.5


I guess this is best option under the circumstances. Would be great if someone can get it to:

Series #1
Series #1.5
Series #2


Thanks for replying!
TheRealAce is offline   Reply With Quote
Old 12-23-2019, 03:53 PM   #4
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: 11,833
Karma: 7030035
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
See this post.
chaley is offline   Reply With Quote
Reply

Tags
number, sorting, sorting series


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting By Title with Series Included greenoznic Calibre Companion 2 05-13-2016 12:36 PM
Sorting: Same title beginning, shorter title first Under the Covers Calibre 14 05-04-2015 10:18 PM
Aura HD Sorting by Title ivanm Kobo Reader 0 01-13-2015 06:36 PM
[Old Thread] Sorting folders by author/series/title goodreader16 Library Management 15 05-06-2011 01:18 AM
Title Sorting / Author Sorting ahi Sony Reader 0 09-14-2009 01:51 PM


All times are GMT -4. The time now is 02:05 PM.


MobileRead.com is a privately owned, operated and funded community.