inukshuk / anystyle

Fast citation reference parsing
https://anystyle.io
Other
1.03k stars 88 forks source link

Restore full page numbers from contracted page ranges #170

Open Frontoish opened 3 years ago

Frontoish commented 3 years ago

Many bibliographies contract the second number in page ranges, e.g. 36-9, 110-15, 237-86 for 36-39, 110-115, 237-286 It would be really useful if AnyStyle could recognise such contracted page ranges, and restore them to the full uncontracted versions, so that we can get the full page range into our bibliography management programs like Endnote or whatever.

I guess the algorithm would be something like:

Let s = number of digits in start page Let e = number of digits in end page

If s-e > 0 then pad out the beginning of the end page number with the first (s-e) digits of the start page number.

inukshuk commented 3 years ago

Good idea!