# [Tex/LaTex] Automatically validate and format ISBNs

automationbiblatexscripts

Is there any way to get Biblatex to automatically validate and format ISBNs? That is, I would like to be able to enter a field such as

isbn = {9789549090666},


in my .bib file—not worrying about the presence or proper placement of hyphens—and have Biblatex render this as "ISBN 978-954-90906-6-6" when I print the bibliography with \printbibliography. It would also be useful if Biblatex could first validate the ISBN and, if it's an older ISBN-10, convert it to ISBN-13.

If there's no easy way of doing this in Biblatex, is there perhaps an external program I can run on my .bib file to do the validation and formatting? All I've found so far are online tools, and some of them improperly group the digits of the ISBN. (For those that aren't aware, while ISBNs have a fixed number of digits, the lengths of the hyphen-separated groups are variable.)

Please try biber 2.2 (along with biblatex 3.1). The --validate-datamodel option will report on invalid ISBNs. The new options --isbn10 will force ISBNs to 10-digit format and --isbn13 to 13-digit. --isbn-normalise will format with hyphens in the correct places.