View Single Post
Old 05-26-2025, 12:09 PM   #6
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,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Thinkling View Post
I made a custom column and used this template. The sorting works fine, but the original issue still stands: it's displayed as (e.g.) "Atlantic; The". This does seem to jive with the documentation for that template.
Yes it does. The output of the template becomes the text of the column. The documentation says that the template returns its argument with articles moved to the end. That is what you are seeing.
Quote:
I think I will need to write/extend a template to format the entry, like Kovid mentioned.
Columns sort on "what you see" except for columns that have a "look somewhere else" for sort order, e.g., title, authors, and series. There is no mechanism other than changing calibre's code to add look-aside sort functionality for other fields.

When Kovid suggested a custom column he was suggesting exactly what I showed you. Instead of sorting on Publisher you sort on the custom column to get the order you want. The Publisher field remains "The Atlantic". The custom field is "Atlantic; The".

You don't need to show the custom column in the book list to sort on it. Hide the custom column then use the "sort by" tool to sort the library. If you do this often enough then you can use the Action Chains plugin to create a shortcut to do the sort.

I could in theory add a "sort template" to custom columns, which would give you a mechanism to sort custom columns on something different from what you see. I'm not convinced the added functionality is worth the development effort. I'm also not sure the performance would be adequate.
chaley is offline   Reply With Quote