Warn if page cited is outside page range
Hi,
Just a simple feature that could reduce typing or tiredness-induced errors:
If the page specified in the word-processor citation falls outside the range specified in an articles page field, warn the user.
For instance:
Martin Paul Eve, "Some Article," Some Journal, 2011, 10-20.
I try and cite the article on page 22, which is not inside the page range; it would be great if Zotero could warn me that it looks like I've made a mistake.
Thanks!
Just a simple feature that could reduce typing or tiredness-induced errors:
If the page specified in the word-processor citation falls outside the range specified in an articles page field, warn the user.
For instance:
Martin Paul Eve, "Some Article," Some Journal, 2011, 10-20.
I try and cite the article on page 22, which is not inside the page range; it would be great if Zotero could warn me that it looks like I've made a mistake.
Thanks!
Example: minimal, at 110–115
I'm not sure how you would go about evaluating whether a given string lies between most of these end points, but I'm pretty sure that it would cost more in time to implement it than the small amount of time that might be saved. It's a pretty safe bet that this won't be implemented, at least in the short or medium term.Example: prefix on one number only, at N110–N115
Example: same prefix on both numbers, at N110–N115
Example: different prefixes on both numbers, at N110–P5
Example: leading number before prefix, at 123N110–N115
Example: multiple ranges, at 123N110–N115, 456K200–K299
Example: first less than second, at 123N110–N115, 000c23–22
Hmm, I suppose there are a great deal more numeric possibilities than I'd considered. That said (in C#/pseudocode):
string[] pageSplit = pages.split("-");
try{
int first = int.parse(pageSplit[0]);
int second = int.parse(pageSplit[1]);
if (page < first || page > second)
{
// alert the user
}
} catch (Exception)
{
// do nothing
}
would do the trick to deal with simple integer page numbers.
P.S. This was less a proposal to do with saving time as to do with catching mistakes which would otherwise go unnoticed.
Thanks again,
Martin
(Edit: I should add that this is just my personal opinion; this would be a change in Zotero proper, and so would belong to the core developers.)
I, too, am wary of features that only work in a subset of cases. It is, as you point out, however, the majority of cases. The dialogue can also be couched in gentle terms: "It appears the page number you have entered is outside the range entered for the item". Could even be disabled by default and added as an advanced "strict mode" feature.
Probably not worth it for such a small feature request, I guess; was just an idea as I did accidentally have the wrong page set specified the other day when I'd duplicated an item, wanting to cite two pieces from the same book.
Best,
Martin