View Single Post
Old 06-13-2025, 08:39 AM   #15
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,109
Karma: 77213681
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by chaley View Post
Assuming you use n.m only for omnibus-style books, multiple books in order, and not for intermediate books e.g. a book 2.5 that falls between 2 and 3, then this might work:
Code:
program:
	series_start = floor($series_index);
	fraction = fractional_part($series_index);
	if fraction ==# 0 then
		result = series_start
	else
		series_end = floor(fraction*100);
		if series_end >=# 0 then
			result = series_start & '-' & series_end
		fi
	fi;
	result
This template assumes you always use 2 digits in the fraction. How to disambiguate single digit fractions and 2 digit fractions isn't obvious.

Also, if you have both omnibus and intermediate books (as I do) then you would need some way to distinguish between them. I would use a Yes/No "Is Omnibus" column for this.

It might be easiest in the long run to have a text custom column that contains the series string you want for the book.


I put it in the devices forum.
I have "omnibus" in the admintags column.
ownedbycats is offline   Reply With Quote