Page locator change since upgrading
I have just upgraded from a 3beta version of Zotero standalone to version 3.0.3 (on Windows) I have been using an in-house style modified from Chicago for several years over various versions of Zotero plug-in and standalone.
Owing to how the style was developed, I have been inputting page locators for footnotes using, for example, "p. 45" or "pp. 45–46" in the locator text box in the Word for Windows add-on dialogue box. This has outputted footnote references with page numbers formatted as entered.
When opening a document now (and refreshing refs) after updating Zotero, I find all the footnotes with "pp. 45-46" type page references OK, but all the "p. 45" have changed to " 45". Editing these refs through the word plug-in reveals that all my "p. 45" type entries in the locator field have been changed to "45", stripping out the "p. " text. If I reenter the "p. " text, Zotero strips it out.
Any suggestions how I can modify the style to allow entry of "p. 45" in the word add-in dialogue box? (And to retain all the formatting in previously created documents, which are substantial).
Owing to how the style was developed, I have been inputting page locators for footnotes using, for example, "p. 45" or "pp. 45–46" in the locator text box in the Word for Windows add-on dialogue box. This has outputted footnote references with page numbers formatted as entered.
When opening a document now (and refreshing refs) after updating Zotero, I find all the footnotes with "pp. 45-46" type page references OK, but all the "p. 45" have changed to " 45". Editing these refs through the word plug-in reveals that all my "p. 45" type entries in the locator field have been changed to "45", stripping out the "p. " text. If I reenter the "p. " text, Zotero strips it out.
Any suggestions how I can modify the style to allow entry of "p. 45" in the word add-in dialogue box? (And to retain all the formatting in previously created documents, which are substantial).
The issue is that I do not where or how the "p. " portion of the text entered is removed, while the "pp. " portion is untouched? Is it by the style, by Zotero, or by the Windows add-in?
I wonder if the problem (or feature?) is in the word add-in, as a single style seems to be treated differently when using the Word add-in, as opposed to what appears in the Zotero test pane.
For example, if I use Chicago Manual of Style (full note) in the zotero test pane and enter page "p. 45", I get a single citation reference with page number "p. 45", as entered. But if I enter the same text "p. 45" in the locator box in the windows add-in dialogue box, using the same style on the same source, the citation has page reference " 45". Somewhere the "p. " portion has been stripped. If I try and edit the citation (using the word add-in), only the text "45" appears in the page locator box.
If I enter "pp. 45-46" in this example, I get both Zotero and Windows add-in giving a citation with page numbers "pp. 45-46", that is, the "pp. " is not stripped.
(To confuse the issue, the Zotero text pane strips the "p. " from the page reference to Multi Citations, and keeps the "pp. 45-46". This behavior mirrors the Word add-in.)
The first point would be that, as far as I know, ordinary Chicago style does not place a p. before a page number. But although it is not used in the standard version of the style, it can be added to your in-house version of the style.
As to what is going on with the "p." ... when the processor sees the p. at the start of the locator string, it sets "page" as the label for the locator ("page" is the default, so you see no effect, but if you put "ch. " at the start of the locator string, you will get "chap. " as the label). This behaviour buys properly localised label formatting and automatic plural sensitivity for locator strings (both of which are now working well, judging from the scarcity of error reports). Leaving the hard-coded p. in place is not so good, because it binds the document to custom styles (like your in-house style) where p. is required, but not provided by the style.
Thinking out loud, it seems you would be best served by a mechanism to also set the locator label form to "page" when pp. occurs at the start of the locator string. This would allow the document to use a style that supplies the locator (or not -- it would give you the full flexibility of Zotero styling). I can supply a means of performing the conversion automatically. Would you like to go that route? It would require that you install a plugin, which would only take me a few minutes to build. It seems to be possible to install plugins in Zotero Standalone, so this would, I think, be a clean solution on your desktop.
(The reason for the differing behaviour in the test pane and the word processor is that the two invoke the processor via different methods. Obviously it would be better if the behaviour were aligned, but that's the story there.)
It would be gratefully appreciated if you would be able to build a plugin to set the locator label form to "page" when locator strings begin with "pp.", as offered above. I have modified the house style to add the p. or pp. through the code, so the addition of the plug in all should correct the refs for my present documents. In the future, I will use only numeric locator strings and let the style do the work!
Thank you for your help, and I look forward to the plugin when you get a chance.
One small mystery. I have noticed after changing the code of my house style that entering spans of pages in the locator string in the format "210-213" gives a reference "pp. 210-213" as expected, but entering in the format "210-13" (as called for by my house style) gives "p. 210-13".
Any suggestions?
http://gsl-nagoya-u.net/http/pub/zotero-processor.xpi
It's very basic; it just replaces the CSL processor in the running Zotero with my current development version. If the plugin is uninstalled or disabled, Zotero will revert to the old behaviour. Some highlights:
- The behaviour of the test pane and the word processor should now be aligned.
- The p. and pp. prefixes to locator strings should not be overwritten in documents, but citations should come out correctly (as if the label is set to "page") nonetheless.
On the abbreviated page range issue, we may be able to do something about that. If this plugin works for you, it will give is a channel to try out possible solutions.
I tried this in Firefox and it works as expected. The locator fields with "pp. 45-89" type text now render correctly, and "p. 45" type entries also still work. The modified style also now gives correct entries with "p." or "pp." for new entries with only numeric locator text.
The issue now is for previously entered page ranges. Those entered with "pp. 45-56", that is pages below 100, are now fine. The remaining issue is for page ranges above 100 which are already entered in the locator field, eg as "pp. 145-56", which render as "p. 145-56", as per the above-quoted thread.
Incidentally, I tried to install your processor xpi in the standalone using the add-ons manager and "install add-on from file" option, and got the message: "The add-on 'Zotero Processor Gadget" could not be installed. It may be incompatible with this version of Zotero standalone".
I haven't run Standalone much yet, and had no idea it was that simple to add extensions. The version mismatch error should be easy to address; the next version of the plugin should install okay there as well.
Nearly there.
(Still have to fix up the Standalone compatibility issue. Should have that done in a day or so.)
The plugin installed in Firefox now works as expected. All refs now appear with "p. " and "pp. " correct according to context. The processor also now recognises pre-entered page range text in the locator field, such as "pp. 134-56" and renders it correctly.
I installed the processor plug-in in the standalone version of Zotero, and it now installs OK. (This is on a different machine, not connected to a network.) However, there seems to be no difference in behavior, whether the extension is enabled or disabled. That is, the pre-entered text in the locator field., such as "pp. 134-56" renders as "p. pp. 134-56" in my ref as called by the Word plugin.
Any pointers appreciated.
Thanks for this great thread. I have run into the exact same problem as Steve Milhist -- that is, I made my own Chicago style (for mine, I got rid of the automatic period at the end as I often want to put in my own punctuation or no punctuation). I, too, put "p." and "pp." in my page locators, as that is the way I like it. I, too, noticed that once upgraded the "p." and the "pp." no longer show up. I have been ignoring it as I haven't had to really submit any articles in the last few months, but now it is a problem.
So, I see that there is a solution -- as fbennet wrote:
. . .
Give this a try with a copy of one of your documents (in Firefox, for the moment; we'll need to work out how to install plugins in Standalone -- it's possible, but I'm not sure how it's done yet):
http://gsl-nagoya-u.net/http/pub/zotero-processor.xpi
It's very basic; it just replaces the CSL processor in the running Zotero with my current development version.
. . .
I downloaded the .xpi, but I have no idea how to instal it. Do I install it as a plugin within Zotero?
This is probably a basic question, but I am at a loss here?
thanks so much,
Daniel
OK, so I just clicked on the link (this time in Firefox, for some reason I was in another browser earlier), and it installed the "gadget." But when I go to a document and refresh my Zotero notes, the "p." and "pp." still don't show up.
What am I doing wrong?
When I look at my "add-ons" in Firefox, the "Zotero Processor Gadget" does appear under Extensions.
Hmmm . . . I am probably missing something here?
Thanks,
Daniel
In older versions of the processor, everything that you entered in the locator field was passed through literally. So if you entered "p. 123", you got "p. 123" in the document, and if you entered "pp. 123 & 456", you got "pp. 123 & 456" in the document.
In newer versions of the processor, "p." and "pp." are recognized as labels -- the same as if you set "Page" in the pull-down next to the locator field. In ordinary Chicago style, the locator label for "Page" is empty, so you just get the remainder of the string. So "p. 123" gives you "123" in the document, and "pp. 123 & 456" gives you "123 & 456" in the document.
I'm pretty sure that the plugin gadget isn't needed with Zotero 3.0.7. What you need to do is modify your Chicago style so that the "Page" label appears in the document (look for a condition locator="page" in the style). If the label is rendered, the processor will recognize it and pluralize it automatically as required.
I am so sorry to keep asking questions, but I have two:
1. I looked at how to edit a style (I must have figured it out before as I edited Chicago to have no period at the end), but it has been a few years, and I have no idea how to get into the style.
The document says,"open the style in notepad." How do I do that? I have looked around and I can't seem to find the styles anywhere.
2. Once I do figure out how to open that:
I go into the code and find
condition locator="page" and delete the word page? so it would read
conditoin locator=""
Is that what I do,
Again, so sorry for this, but also so frustrated right now.
Thanks,
Dan
OK, so once again I jumped the gun. I now am able to open my edited style in Notepad. I understand that once I edit it again, I save it as a .csl and just drag it into Firefox.
OK.
But now, I searched for the string you mentioned:
condition locator="page"
But there is no such code in Chicago; I can find the following:
<macro name="point-locators-subsequent">
<choose>
<if variable="locator">
<choose>
<if locator="page" match="none">
<group delimiter=" ">
etc.
So, I guess I am asking for a clarification on your last paragraph where you write:
What you need to do is modify your Chicago style so that the "Page" label appears in the document (look for a condition locator="page" in the style). If the label is rendered, the processor will recognize it and pluralize it automatically as required.
I need a little more guidance as to exactly what I am adding or what I am deleting from Chicago style.
And, again,
Thanks for your time,
Daniel
The Step-by-Step guide has a link to the Zotero repository. Find the style in the repository, and download it by clicking on the link (not the [install] link, the other one).
In the style, look for something like this (example from Chicago Note):
<choose>
<if locator="page" match="none">
<choose>
<if type="bill book graphic legal_case legislation
motion_picture report song" match="any">
<choose>
<if variable="volume">
<group>
<text term="volume" form="short"
text-case="lowercase" suffix=". "
strip-periods="true"/>
<number variable="volume" form="numeric"/>
<label variable="locator" form="short"
prefix=", " suffix=" "/>
</group>
</if>
<else>
<label variable="locator" form="short"
suffix=" "/>
</else>
</choose>
</if>
<else>
<label variable="locator" form="short" suffix=" "/>
</else>
</choose>
</if>
<else-if type="bill book graphic legal_case legislation
motion_picture report song" match="any">
<number variable="volume" form="numeric" suffix=":"/>
</else-if>
</choose>
<text variable="locator"/>
That's a lot of stuff, but what it's saying is this. "If the locator label is something other than 'page', print the labels for volume and for the locator, otherwise just print the volume number and the locator, separated by a colon, with no labels."
To get the effect you want, you would remove the condition around the stuff that prints the locator labels, and eliminate the stuff that prints without the labels. The code would then look like this:
<choose>
<if type="bill book graphic legal_case legislation
motion_picture report song" match="any">
<choose>
<if variable="volume">
<group>
<text term="volume" form="short"
text-case="lowercase" suffix=". "
strip-periods="true"/>
<number variable="volume" form="numeric"/>
<label variable="locator" form="short"
prefix=", " suffix=" "/>
</group>
</if>
<else>
<label variable="locator" form="short"
suffix=" "/>
</else>
</choose>
</if>
<else>
<label variable="locator" form="short" suffix=" "/>
</else>
</choose>
<text variable="locator"/>
I haven't tested this, but that's the general idea.
OK, so I now have downloaded the latest Chicago Style (note). I figured out with the new coding how to get rid of the period at the end of the note (much easier than in the old csl styles, only one fix needed in CSL 1.0).
But I still can't get the "p." and "pp. " that I have entered into the page locator field to show up. I looked closely at your two codes (printed them side by side to see what I needed to do), but the code I am looking at is different.
There are only three places where <if locator="page" match="none"> shows up. Three macros: "subsequent-point-locators", "point-locators", and one more (can't find it at the moment). Despite my attempts, everytime I delete some code, I get error messages.
So, below is the code to "point-locators" -- is there an easy way to delete something to get the code to not erase the "p. " and "pp. " that I have entered?
Once again, thanks so much,
Dan
<macro name="point-locators">
<choose>
<if variable="locator" match="none">
<choose>
<if type="article-journal chapter paper-conference" match="any">
<text variable="page"/>
</if>
</choose>
</if>
<else-if type="article-journal">
<group delimiter=" ">
<choose>
<if locator="page" match="none">
<label variable="locator" form="short" suffix=" "/>
</if>
</choose>
<text variable="locator"/>
</group>
</else-if>
<else-if type="legal_case"/>
<else>
<group delimiter=" ">
<choose>
<if locator="page" match="none">
<label variable="locator" form="short"/>
</if>
</choose>
<text variable="locator"/>
</group>
</else>
</choose>
</macro>
<choose>
<if variable="locator" match="none">
<choose>
<if type="article-journal chapter paper-conference" match="any">
<text variable="page"/>
</if>
</choose>
</if>
<else-if type="article-journal">
<group delimiter=" ">
<choose>
<if locator="page" match="none">
<label variable="locator" form="short" suffix=" "/>
</if>
</choose>
<text variable="locator"/>
</group>
</else-if>
<else-if type="legal_case"/>
<else>
<group delimiter=" ">
<choose>
<if locator="page" match="none">
<label variable="locator" form="short"/>
</if>
</choose>
<text variable="locator"/>
</group>
</else>
</choose>
</macro>
That worked perfectly. I still have some work to do as I DO want the "p. " stripped for journals, but not for books and book chapters. And I have to look at subsequent vs. first time, but I got the idea and I can now make it work on my own.
Really, thanks,
Daniel