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) 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.
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. 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.
  • Sounds great. I'm happy to open a ticket for you. Are you coding against the trunk or against the 1.0 branch?
  • On 1.0 at the moment. I have both snapshots in my sandbox, and can check to see if it works against trunk as well. The last item I need to sort out this morning is multiple entries; that part turned out to be a wee bit broken. More news shortly (he said).
  • edited January 4, 2009
    It was more work than I initially anticipated, but this one is ready to go, in both 1.0 and 1.5 versions. The patch is too big to put up as a forum posting, but I can send it along when there's a ticket. Meanwhile, here's the description blurb from the patch comments:
    /*
    * 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.
    */

  • edited January 4, 2009
    While the patches now do exactly what I intended, with a bit more reflection I now fear that I may have gotten ahead of myself with this. Here is another example:

    (1) 3 William Holdsworth, A History of English Law 255 (3d ed. 1927).
    (2) 1 id. at 5-17 (2d ed. 1914).
    Uh, right. The years of publication differ, of course, and the editions as well in this example. I have an idea for a hack to keep the style development moving forward. It will be reasonably lightweight, but the better solution may be in the hierarchical ontology framework.

    Anyone have any information on how long the new relational framework is likely to be in coming?
  • edited January 5, 2009
    Okay, so I'm stubborn. I've hacked in a slight extension that recognizes a slash-and-comma list of volume/year/edition sets in the numberOfVolumes field. Too rough for production, but it might stimulate some ideas for smoothing out the UI. This covers this particular problem with Bluebook conformance (touch wood). One more hurdle cleared, kinda.

    Update: I've put up a Bluebook development sandbox bundle that includes a modified Zotero that incorporates this change.
Sign In or Register to comment.