Thorny UI issue with volume numbers [patch available]
For books, the Bluebook requires that ibid and supra references to multi-volume works specify the volume in all cases. For example:
1. An item is selected in the plugin UI; and
2. The item selected is derived from the book or chapter types; and
3. The current context has position "ibid" or "subsequent" with respect to the selected item.
I know that this is a lot to ask for, but I don't see any way of meeting the requirements of the style without this facility. Is there any prospect of it finding its way into the development path?
Update: I think I have a handle on this. We can put up a selection list of volumes when there is meaningful content in the numberOfVolumes field. There are a few details still to work out, but I will post a patch (or a giving-up message) below when I've done a little more on it.
Update II: Okay, this is now running smoothly. I think you'll like the behaviour, although my coding is none too pretty. I need to separate out the changes that apply to this specific feature. It's late here this PM, so I'll leave that work to tomorrow. Patch coming up within a day, though.
Dan: If I have explained what this does clearly enough above and you think it's worth taking a look, feel free to open a ticket. I'll upload the kit first thing tomorrow morning.
I've played around with addCitationDialog.js, addCitationDialog.xul and cite.js, and managed to call for a specific volume number in addition to the locator string. The problem is that this will need to be context sensitive; the plugin should only prompt for a volume when the following conditions are met:(1) 4 Richard R. Powell, Powell on Real Property para. 513[3], at 41-142 (Patrick J. Rohan ed., 1995).
(2) 2 id. para. 203, at 20-17.
1. An item is selected in the plugin UI; and
2. The item selected is derived from the book or chapter types; and
3. The current context has position "ibid" or "subsequent" with respect to the selected item.
I know that this is a lot to ask for, but I don't see any way of meeting the requirements of the style without this facility. Is there any prospect of it finding its way into the development path?
Update: I think I have a handle on this. We can put up a selection list of volumes when there is meaningful content in the numberOfVolumes field. There are a few details still to work out, but I will post a patch (or a giving-up message) below when I've done a little more on it.
Update II: Okay, this is now running smoothly. I think you'll like the behaviour, although my coding is none too pretty. I need to separate out the changes that apply to this specific feature. It's late here this PM, so I'll leave that work to tomorrow. Patch coming up within a day, though.
Dan: If I have explained what this does clearly enough above and you think it's worth taking a look, feel free to open a ticket. I'll upload the kit first thing tomorrow morning.
/*
* fbennett: Volume number setting
*
* ------------
* What it does
* ------------
*
* Some styles (well, Bluebook, anyway) require that the
* volume number be supplied for multi-volume works by a
* single author -- in back-references. This means that a
* single bibliographic entry must be made to work with
* multiple volumes, treating the whole set as a single work.
*
* This patch modifies Zotero to supply a volume selection
* widget to the client UI when there is an appropriate value
* in the numberOfVolumes field, and the work cited is not a
* specific chapter, dictionary entry, or encyclopedia entry.
*
* The value in numberOfVolumes may be an integer or a
* comma-delimited string. In the former case, a list of
* volume numbers ranging up from one is presented in the
* widget. In the latter case, the literal elements are
* presented.
*
* Selections are persistent, both while editing and after
* rendering of the citation. The value will feed through to
* CSL stylesheets in the normal way, through both text and
* number declarations.
*
* ---------------
* Functions added
* ---------------
*
* volumeNumberInit() hides the volume number widget in
* initial popup view.
*
* volumeNumber() enables the volume number widget with
* appropriate values.
*
* -------------------
* Functions exploited
* -------------------
*
* load() in the single condition resets screen when editing
* singles. (citation is active, so should reset in this
* case).
*
* load() in the multiple condition resets screen when editing
* multiples. (should take no action, because nothing is
* active on initial display).
*
* _listItemSelected() resets screen upon selection in
* right-side multiples box.
*
* treeItemSelected() resets screen on selection in the
* left-side box.
*
* ----
* Bugs
* ----
*
* In single-citation entry mode, the selected value is lost
* when the user clicks away from the citation and clicks
* back. This looks odd because the locator value (which does
* not depend on the citation data in any way, and so does not
* need to be reset) does not change.
*
* The handling of the fallback value could maybe use a little
* attention.
*
* In styles that do not require this level of precision, the
* additional field might strike some as a nuisance.
* Depending on how users react to this feature, it might be
* desirable to add a configuration option to suppress the
* selection box.
*/
Anyone have any information on how long the new relational framework is likely to be in coming?
Update: I've put up a Bluebook development sandbox bundle that includes a modified Zotero that incorporates this change.