# Arranging Collections



## Aragorn234 (Apr 4, 2012)

I am sure this has been asked' but I cannot find an answer.
I have a new Kindle (Gen 4) non touch model.
I am using Calibre to organise my books. I am happy with collections put want to have them ordered in order. 
Example

I have the James Rollins Sigma force series but they do not appear in released order. I have updated metadata ensured publish dates are correct etc then ensured they are in the same series and numbered correctly. When I transfer to the Kindle they are in a random order. Surely with such a popular device this  has been addressed?


----------



## Linjeakel (Mar 17, 2010)

Hi, Aragorn, welcome to Kindleboards!

Trying to get your series in order depends on how you've got them sorted. If you don't want to put the number in the title, you need to sort by author. (You can sort your home page by author or just within your collections if you have them collected separately). When you change the metadata in Calibre (and I think this is right) you need to put the publishing dates in reverse order - make dates up, it really doesn't matter - but the first book in the series needs to have the latest date, _not_ the earliest, which it will if you put the actual published dates in. As you get later books in the series, you need to put in a date that is _earlier_ than the previous one.

I'm not quite sure how or why it works, but apparently it does. Worth a try! Otherwise, as I say, you'll need to actually change the title of the book to include the series number i.e. 01 Sandstorm, 02 Map of Bones etc etc and then sort by title within the collection. If you name books like this, you won't be able to sort the home page by title as you'll have all your 01s first, then all your 02s etc which wouldn't be very helpful.

Another thing to remember before you decide which way to do it, is that when you change the collection sort order, it changes it for all collections, so unless you want to keep changing it, make sure the sort order you go for is the one that will suit all your collections, whether they're series or not.


----------



## Morf (Nov 18, 2010)

Take a look here http://www.kboards.com/index.php/topic,104288.msg1608291.html#msg1608291 where we discussed a technique to get Calibre to prefix the title of a book with the series index, which means when you look at the book on the Kindle it shows the order of the series.

I had a play with this tonight for the first time for a friend and it works very well!


----------



## Linjeakel (Mar 17, 2010)

Morf said:


> Take a look here http://www.kboards.com/index.php/topic,104288.msg1608291.html#msg1608291 where we discussed a technique to get Calibre to prefix the title of a book with the series index, which means when you look at the book on the Kindle it shows the order of the series.
> 
> I had a play with this tonight for the first time for a friend and it works very well!


That's interesting, Morf - I hadn't seen that before. It would certainly make it easier for me as I like to have everything in title order and this would automatically group things together. I already have series info on Calibre but I'd have to make some of them shorter I think - or the actual title of the books would disappear off the right hand side!

I might have a play with that, when I've got some time. 

I have to say though, I'm really annoyed that we have to rely so much on third party software, just to do basic editing and sorting on the Kindle - Amazon just don't like us being able to customise things at all, do they?


----------



## Morf (Nov 18, 2010)

You can change the components you make the title up with fairly easily. For instance, the example I gave:


```
{series:|| }{series_index:0>2s|[|] - }{title}
```
will give:

_A Song of Fire and Ice [02] - A Clash of Kings_

but if you know the series name and only want the number, then you can take the "series" bracket out:


```
{series_index:0>2s|[|] - }{title}
```
which will give:

_[02] - A Clash of Kings_

The biggest problem I found when playing with it is that it would help if it were easier to switch it on and off - it seems like the only way to do this is to remove the plugboard, whereas it would be nice if you could select which one(s) to enable.

And yes, I agree, putting series information and other similar customisation on the Kindle would be really useful - a much more useful enhancement IMHO than a touch screen!


----------



## Aragorn234 (Apr 4, 2012)

I got the first example to work, however the second was the one I was looking for and could not get it to work.
I copied it directly and put it into the plugboard but it does not provide the numbers at the start just the random ordering I had before.

I don't really understand the parts of the coding so am having difficulties troubleshooting

Thanks for the advise so far


----------



## Morf (Nov 18, 2010)

Aragorn234 said:


> I don't really understand the parts of the coding so am having difficulties troubleshooting





Spoiler



Don't tell Anne or Lynn because it will blow my reputation around here, but I don't really understand the coding either - I just used copy and guesswork to work this out!



Well, if you got the first one working (I presume you mean you got something like _A Song of Fire and Ice [02] - A Clash of Kings_) then you've got the plugboard set up OK.

All I really understand about the coding is that each item in braces {} is a field from the Calibre database - so {series} will give the series name, {series_index) will give the count within the series and so on.

The rest of the stuff within the braces is to do with conditional formatting, so for instance {series:|| } puts nothing before series, and a space after it - but only if there is a value for series. The tutorial here http://manual.calibre-ebook.com/template_lang.html explains this but it does get complex very quickly. The examples came from http://www.mobileread.com/forums/showthread.php?t=118563.

Anyway, without trying to write a tutorial, let me suggest ways to get it working.

The only difference between the first and the second should be that I took out the "{series}" item, so if you can get the first working, take out the series item and you should then get the second one.

If that doesn't work, you could attack it from the other side - start with the simplest which is:


```
{series_index}{title}
```
which should give _1A Clash of Kings_, then if that works try


```
{series_index|| }{title}
```
which should give _1 A Clash of Kings_, then if that works try to understand and add in the optional formatting you want (so {series_index:0>2s|[|] - } says "index is always 2 characters with a leading zero if needed, put a "[" before it and "] - " after it which gives _[02] - _).

Finally, be careful with the "|" character - this is an odd character to type on a PC keyboard, on mine it comes from the key with a broken bar (¦) on it (and the key with "|" on it produces "¦" ) - try both and see which actually works.


----------



## Aragorn234 (Apr 4, 2012)

Thank you so much for your help.
I managed to work through the steps and using your explanation understood the coding.

I now have the naming convention I was after. Having it explained made it much easier to understand the coding.

Thank you once again


----------



## Morf (Nov 18, 2010)

No problem, glad you got it working.

You do realise you're now our expert, don't you!


----------



## kapierce65 (Dec 31, 2011)

Linjeakel said:


> Hi, Aragorn, welcome to Kindleboards!
> 
> Trying to get your series in order depends on how you've got them sorted. If you don't want to put the number in the title, you need to sort by author. (You can sort your home page by author or just within your collections if you have them collected separately). When you change the metadata in Calibre (and I think this is right) you need to put the publishing dates in reverse order - make dates up, it really doesn't matter - but the first book in the series needs to have the latest date, _not_ the earliest, which it will if you put the actual published dates in. As you get later books in the series, you need to put in a date that is _earlier_ than the previous one.
> 
> ...


WoW...Thank You Linjeakel for the tip on changing the publishing dates. Now my series show up in the correct order. Previously, I used Morf's suggestion about changing the metadata plugboards so now it is just the way I want it! Thanks to you all for the great advice!!!


----------



## Linjeakel (Mar 17, 2010)

kapierce65 said:


> WoW...Thank You Linjeakel for the tip on changing the publishing dates. Now my series show up in the correct order. Previously, I used Morf's suggestion about changing the metadata plugboards so now it is just the way I want it! Thanks to you all for the great advice!!!


You're welcome! There is often more than way to achieve something and you just have to find the way that fits in with your own set up. I'm glad that worked for you as I haven't used it myself and I was just explaining it from memory!


----------

