Quote:
Originally Posted by chaley
This Template Program Mode template does the job. It distinguishes between integer and floating point series numbers, picking different formatting. For floating point numbers it removes any trailing zeros after the number is formatted.
Code:
{series_index:'contains($, '\.', re(format_number($, '0>5.2f'), '0*$', ''), format_number($, '0>2d'))'}
|
Sorry for this completely novice question, but I just learnt about metadata plugboards today and found this post.
It's almost exactly as I want my books to appear on my Kindle.
One thing I would like though is brackets around the series number. I think the code is |[|] but I am not sure where to add it to the above template. I thought I had it, but my books end up with plugboard errors in the title when they arrive on my Kindle.
Thanks for any help.
Edit: Nevermind I figured it out myself. I swear I tried this already but it didn't work. I must've messed something up the first time.
Code:
{series_index:'contains($, '\.', re(format_number($, '0>5.2f'), '0*$', ''), format_number($, '0>2d'))'|[|]} {title}
Edit2: Hmm that didn't turn out how I wanted it to.
Now my series looks like:
[01] Book
[02] Book
[03.5] Book
[03] Book
How do I get it to sort it properly so 3.5 is after 3?