same style different output through api and standalone

We have records like this in our group library
https://www.zotero.org/groups/358366/ethiostudies/items/itemKey/B66AKH8J

If I call the Zotero api, I get what I want, i.e.

Lepage, C. and J. Mercier 2011–2012. ‘Un tétraévangile illustré éthiopien à cycle long du XVe siècle. Codicologie et iconographie’, Cahiers Archéologiques, 54 (2011–2012), 99–174.

If instead with the same style I get the bibliography entry from the Zotero Standalone (latest) I get

Lepage, C. and J. Mercier 2011. ‘Un tétraévangile illustré éthiopien à cycle long du XVe siècle. Codicologie et iconographie’, Cahiers Archéologiques, 54 (2011), 99–174.

On a PR discussion for this style on Github, Rintze M. Zelle suggested that "The Zotero API and Standalone program likely use slightly different versions of the citeproc-js CSL processor which could explain the different results. (the output of the API looks correct)"

It is indeed true that the result we want is the one returned from the API. What can we do to get the same also from the standalone?
  • What version of Zotero are you using?
  • I have downloaded the latest Zotero Standalone recently, I have 5.0.21
  • Someone else will have to take a look at this, but Zotero 5.0.21 has citeproc-js 1.1.178, API is much older at 1.1.63, and the style is here.
  • the linked style is ok, but the main style we use is https://www.zotero.org/styles?q=id:hiob-ludolf-centre-for-ethiopian-studies
    The older API version does exactly what we want the style to do
  • Is this just an issue with the way that the Zotero Standalone app currently handles dates? Does the style format the way you want if you enter the date in Extra like this:
    issued: 2011/2012
  • yes, if I add that in extra it is ok in the standalone, then both API and standalone give the same result which is the one I want. was this documented somewhere I missed?
    Thanks!
  • edited September 26, 2017
    Not really, no. What's happening is that Zotero's internal date parser can't currently handle date ranges (an overhaul to the date system is planned). When you put it in Extra, you are using a workaround in Zotero's citation processor to use a more flexible date parser.

    The Extra syntax is documented here, but it would probably just be easier for you to ask a question if there is anything else you can't get to format the way you like:
    http://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html#cheater-syntax-for-odd-fields
  • Thanks a lot! is there something similar also for dates in different calendars?
    Normally if we have a record where we have the date in the Ethiopic Calendar and the Current Era, we enter in Date the Current Era data, e.g. 1989/1990 and in extra we add "EC 1982". Could we use something similar to 'issued:' to profit from the workaround?
  • There are several other "date" variables in the CSL language that Zotero uses to format citations (http://docs.citationstyles.org/en/stable/specification.html?highlight=archive#date-variables). These are 'accessed', 'container', 'event-date', 'original-date', and 'submitted'.

    'original-date' is used in quite a few styles for original publication information (e.g., in APA, this would print as "Original work published EC 1982". 'accessed' is also quite common. However, very few styles use the other date variables, so, for example, using 'submitted' would be pretty safe for including in your style without impacting output in any other styles.

    If you don't need to sort on the Ethiopian date (or use any other of the special formatting features for date variables, such as parsing out years, months, and days), then you could also just store "EC 1982" in Extra by itself and call the 'note' variable in your style.
  • Thanks a lot!

    I still have some inconsistencies, always with the above style, this time between what I get with the quick copy and API against the bibliography result of the Word plugin.

    For example this record:
    https://www.zotero.org/groups/358366/ethiostudies/items/itemKey/QDK77FD8

    If I drag and drop from Zotero Standalone the result is the one desired, and the same is true from the API:

    Bernabò, M. 2008. Il Tetravangelo di Rabbula. Firenze, Biblioteca Med. Laur., cod. Plut. 1.56: L’illustrazione del Nuovo Testamento nella Siria del VI secolo, ed. M. Bernabò (Roma: Edizioni di Storia e Letteratura, 2008).

    But the Word plugin (Microsoft Word for Mac version 15.38) instead, when adding the bibliography, does the following:

    Bernabò, M., ed., 2008. Il Tetravangelo di Rabbula. Firenze, Biblioteca Medicea Laurenziana, Plut. 1.56. L’illustrazione del Nuovo Testamento nella Siria del VI secolo (Roma: Storia e Letteratura, 2008).

    to be noted is also that the italic in the title (which I am not sure how to encode here) appears only after reopening the file and refreshing the bibliography.

    Thanks again!
  • These aren't the same item; potentially the Word add-on is using an old copy stored in the document. Test in a fresh document. (Citation processing would be unlikely to cause any of these differences, but the definite way to tell are the different publishers. Zotero citations _never_ change the content of the publisher field.
  • you are very right, I mistakenly took the item from the personal library. I apologise for the undue message, I kept trying and did not notice that I had picked the wrong item. the word plug in works like a charm as all the rest. Thanks a lot again!
  • Dear all, sorry to bother again. has something changed in the API regarding dates?

    see the link above for the example record.

    as reported, in September I used to get from the API what I wanted using our style (see the date)

    Lepage, C. and J. Mercier 2011–2012. ‘Un tétraévangile illustré éthiopien à cycle long du XVe siècle. Codicologie et iconographie’, Cahiers Archéologiques, 54 (2011–2012), 99–174.

    using this call https://api.zotero.org/groups/358366/items?&tag=bm:lepage2011testte&format=bib&style=hiob-ludolf-centre-for-ethiopian-studies

    but now this responds with

    Lepage, C. and J. Mercier 2012. ‘Un tétraévangile illustré éthiopien à cycle long du XVe siècle. Codicologie et iconographie’, Cahiers Archéologiques, 54 (2012), 99–174.

    locally with the same style I get the expected result (I think because of the issued:2011/2012 workaround)

    Lepage, C. and J. Mercier 2011–2012. ‘Un tétraévangile illustré éthiopien à cycle long du XVe siècle. Codicologie et iconographie’, Cahiers Archéologiques, 54 (2011–2012), 99–174.

    so now my problem is reversed, I have the correct result in word processor, and the wrong one from the API.
  • edited 11 days ago
    @dstillman I assume this is because of the recent change to how the API returns dates?

    https://forums.zotero.org/discussion/comment/294766#Comment_294766

    Does the API set this citeproc-js flag?
    citeproc.opt.development_extensions.field_hack = true

    If not, should it so that output has parity with the client?
  • The API was using an older citeproc-js version that didn't have field_hack enabled by default (and didn't support the new simpler format). Updated now. @pietroliuzzo, that API request now returns the format you expect.
  • thank you very much!
Sign In or Register to comment.