Problem with custom style in 2.1b5

I'm using Mac OSX 10.6.6, Firefox 3.6.13 and Office Mac 2011 14.0.2

For Zotero 2.09, I have PythonExt 2.6.2.20100203 and Zotero MacWord Integration 3.0b7 installed.

For Zotero 2.1b5, I have PythonExt 2.6..20100203 and Zotero MacWord Integration 3.1b1 installed.

I am having a problem with a customized style with Zotero 2.1b5 that doesn't occur with 2.09.

I tested things using 4 different scenarios.

In 2.09

1) Text (Smith, 2011a) text (Smith, 2011b) text (Smith, 2011c)

SMITH, A. 2011a. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011b. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011c. Third Test Reference. TEST 1: 11-15.

2) Text (Smith, 2011a, 2011b, 2011c) text

SMITH, A. 2011a. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011b. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011c. Third Test Reference. TEST 1: 11-15.

3) Text (Smith, 2011a) text (Smith, 2011b) text (Smith, 2011c) text (Smith, 2011a, 2011b, 2011c)

SMITH, A. 2011a. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011b. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011c. Third Test Reference. TEST 1: 11-15.

4) Text (Smith, 2011a, 2011b, 2011c) text (Smith, 2011a) text (Smith, 2011b) text (Smith, 2011c)

SMITH, A. 2011a. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011b. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011c. Third Test Reference. TEST 1: 11-15.

All of the above work as they should. however, the situation in 2.1b5 is different as indicated below

In 2.1b5

1) Text (Smith, 2011a) text (Smith, 2011b) text (Smith, 2011c)

SMITH, A. 2011a. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011b. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011c. Third Test Reference. TEST 1: 11-15.

All appears to be OK here

2) Text (Smith, 2011; 2011; 2011) text

SMITH, A. 2011. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011. Third Test Reference. TEST 1: 11-15.

Note that the 'a', 'b', 'c' are all missing.

If the 'keep in order' box is unchecked I get

Text (Smith, 2011a; 2011a; 2011a) text

SMITH, A. 2011a. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011a. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011a. Third Test Reference. TEST 1: 11-15.

Note all citations are 'a' and there are all 'a's in the bibliography.

3) Text (Smith, 2011a) text (Smith, 2011b) text (Smith, 2011c) text (Smith, 2011c; 2011c; 2011c)

SMITH, A. 2011c. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011c. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011c. Third Test Reference. TEST 1: 11-15.

Note all the 'c's in the multiple citation list and the bibliography

4) Text (Smith, 2011; 2011; 2011) text (Smith, 2011) text (Smith, 2011) text (Smith, 2011)

SMITH, A. 2011. First Test Reference. TEST 1: 1-5.
SMITH, A. 2011. Second Test Reference. TEST 1: 6-10.
SMITH, A. 2011. Third Test Reference. TEST 1: 11-15.

Note that there is no 'a', 'b' or 'c'

I'm wondering if this is a bug or whether there is a problem with my Style script.

The script follows in the next couple of posts.
  • <?xml version="1.0" encoding="UTF-8"?>
    <style xmlns="http://purl.org/net/xbiblio/csl" xml:lang="en" class="in-text" >
    <info>
    <title>DBA FINAL Chicago Manual of Style (Author-Date format)</title>
    <id>http://www.zotero.org/styles/DBA FINAL chicago-author-date</id>
    <link href="http://www.zotero.org/styles/chicago-author-date"/>
    <author>
    <name>Julian Onions</name>
    <email>julian.onions@gmail.com</email>
    </author>
    <category term="author-date"/>
    <category term="generic-base"/>
    <updated>2010-03-15T01:24:16+00:00</updated>
    <summary>The author-date variant of the Chicago style</summary>
    <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
    </info>
    <macro name="secondary-contributors">
    <choose>
    <if type="chapter" match="none">
    <group delimiter=". ">
    <choose>
    <if variable="author">
    <names variable="editor">
    <label form="verb-short" text-case="capitalize-first" suffix=". "/>
    <name and="text" delimiter=", "/>
    </names>
    </if>
    </choose>
    <choose>
    <if variable="author editor" match="any">
    <names variable="translator">
    <label form="verb-short" text-case="capitalize-first" suffix=". "/>
    <name and="text" delimiter=", "/>
    </names>
    </if>
    </choose>
    </group>
    </if>
    </choose>
    </macro>
    <macro name="container-contributors">
    <choose>
    <if type="chapter">
    <group prefix="," delimiter=", ">
    <choose>
    <if variable="author">
    <names variable="editor">
    <label form="verb-short" prefix=" " text-case="lowercase" suffix=". "/>
    <name and="text" delimiter=", "/>
    </names>
    <choose>
    <if variable="container-author">
    <group prefix=" by ">
    <names variable="container-author">
    <label form="verb-short" prefix=" " text-case="lowercase" suffix=" "/>
    <name and="text" delimiter=", "/>
    </names>
    </group>
    </if>
    </choose>
    </if>
    </choose>
    <choose>
    <if variable="author editor" match="any">
    <names variable="translator">
    <label form="verb-short" prefix=" " text-case="lowercase" suffix=". "/>
    <name and="text" delimiter=", "/>
    </names>
    </if>
    </choose>
    </group>
    </if>
    </choose>
    </macro>
    <macro name="anon">
    <choose>
    <if variable="author editor translator" match="none">
    <text term="anonymous" form="short" text-case="capitalize-first" suffix="."/>
    </if>
    </choose>
    </macro>
    <macro name="editor">
    <names variable="editor">
    <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
    <label form="short" prefix=", " suffix="."/>
    </names>
    </macro>
    <macro name="translator">
    <names variable="translator">
    <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
    <label form="verb-short" prefix=", " suffix="."/>
    </names>
    </macro>
    <macro name="recipient">
    <choose>
    <if type="personal_communication">
    <choose>
    <if variable="genre">
    <text variable="genre" text-case="capitalize-first"/>
    </if>
    <else>
    <text term="letter" text-case="capitalize-first"/>
    </else>
    </choose>
    </if>
    </choose>
    <names variable="recipient" delimiter=", ">
    <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
    <name and="text" delimiter=", "/>
    </names>
    </macro>
  • <macro name="contributors">
    <names variable="author">
    <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", "
    delimiter-precedes-last="always" font-variant="small-caps"/>
    <label form="verb-short" prefix=", " suffix="." text-case="lowercase"/>
    <substitute>
    <text macro="editor"/>
    <text macro="translator"/>
    </substitute>
    </names>
    <text macro="anon"/>
    <text macro="recipient"/>
    </macro>
    <macro name="contributors-short">
    <names variable="author">
    <name form="short" and="text" delimiter=", "/>
    <substitute>
    <names variable="editor"/>
    <names variable="translator"/>
    </substitute>
    </names>
    <text macro="anon"/>
    </macro>
    <macro name="interviewer">
    <names variable="interviewer" delimiter=", ">
    <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
    <name and="text" delimiter=", "/>
    </names>
    </macro>
    <macro name="archive">
    <group delimiter=". ">
    <text variable="archive_location" text-case="capitalize-first"/>
    <text variable="archive"/>
    <text variable="archive-place"/>
    </group>
    </macro>
    <macro name="access">
    <group delimiter=". ">
    <choose>
    <if type="graphic report" match="any">
    <text macro="archive"/>
    </if>
    <else-if type="book thesis chapter article-journal article-newspaper article-magazine" match="none">
    <text macro="archive"/>
    </else-if>
    </choose>
    <text variable="DOI" prefix="doi:"/>
    <choose>
    <if type="legal_case" match="none">
    <text variable="URL"/>
    </if>
    </choose>
    </group>
    </macro>
    <macro name="title">
    <choose>
    <if variable="title" match="none">
    <choose>
    <if type="personal_communication" match="none">
    <text variable="genre" text-case="capitalize-first"/>
    </if>
    </choose>
    </if>
    <else-if type="book">
    <text variable="title" font-style="italic"/>
    </else-if>
    <else>
    <text variable="title"/>
    </else>
    </choose>
    </macro>
    <macro name="edition">
    <choose>
    <if type="book chapter" match="any">
    <choose>
    <if is-numeric="edition">
    <group delimiter=" ">
    <number variable="edition" form="ordinal"/>
    <text term="edition" form="short" suffix="."/>
    </group>
    </if>
    <else>
    <text variable="edition" suffix="."/>
    </else>
    </choose>
    </if>
    </choose>
    </macro>
    <macro name="locators">
    <choose>
    <if type="article-journal">
    <text variable="volume" prefix=" "/>
    <text variable="issue" prefix=", no. "/>
    </if>
    <else-if type="legal_case">
    <text variable="volume" prefix=", "/>
    <text variable="container-title" prefix=" "/>
    <text variable="page" prefix=" "/>
    </else-if>
    <else-if type="book">
    <group prefix=". " delimiter=". ">
    <group>
    <text term="volume" form="short" text-case="capitalize-first" suffix=". "/>
    <number variable="volume" form="numeric"/>
    </group>
    <group>
    <number variable="number-of-volumes" form="numeric"/>
    <text term="volume" form="short" prefix=" " suffix="." plural="true"/>
    </group>
    </group>
    </else-if>
    <else-if type="chapter">
    <choose>
    <if variable="page" match="none">
    <group prefix=". ">
    <text term="volume" form="short" text-case="capitalize-first" suffix=". "/>
    <number variable="volume" form="numeric"/>
    </group>
    </if>
    </choose>
    </else-if>
    </choose>
    </macro>
  • <macro name="locators-chapter">
    <choose>
    <if type="chapter">
    <choose>
    <if variable="page">
    <group prefix=", ">
    <text variable="volume" suffix=":"/>
    <text variable="page"/>
    </group>
    </if>
    </choose>
    </if>
    </choose>
    </macro>
    <macro name="locators-article">
    <choose>
    <if type="article-newspaper">
    <group prefix=", " delimiter=", ">
    <group>
    <text variable="edition" suffix=" "/>
    <text term="edition" prefix=" "/>
    </group>
    <group>
    <text term="section" form="short" suffix=". "/>
    <text variable="section"/>
    </group>
    </group>
    </if>
    <else-if type="article-journal">
    <text variable="page" prefix=": "/>
    </else-if>
    </choose>
    </macro>
    <macro name="point-locators">
    <group>
    <choose>
    <if locator="page" match="none">
    <choose>
    <if type="book">
    <choose>
    <if variable="volume">
    <group>
    <text term="volume" form="short" text-case="lowercase" suffix=". "/>
    <number variable="volume" form="numeric"/>
    <label variable="locator" form="short" include-period="true" prefix=", " suffix=" "/>
    </group>
    </if>
    <else>
    <label variable="locator" form="short" include-period="true" suffix=" "/>
    </else>
    </choose>
    </if>
    </choose>
    </if>
    <else-if type="book">
    <number variable="volume" form="numeric" suffix=":"/>
    </else-if>
    </choose>
    <text variable="locator"/>
    </group>
    </macro>
    <macro name="container-prefix">
    <text term="in" text-case="capitalize-first"/>
    </macro>
    <macro name="container-title">
    <choose>
    <if type="chapter">
    <text macro="container-prefix" suffix=" "/>
    </if>
    </choose>
    <choose>
    <if type="legal_case" match="none">
    <text variable="container-title" font-style="italic"/>
    </if>
    </choose>
    </macro>
    <macro name="publisher">
    <group delimiter=": ">
    <text variable="publisher-place"/>
    <text variable="publisher"/>
    </group>
    </macro>
    <macro name="date">
    <date variable="issued">
    <date-part name="year"/>
    </date>
    </macro>
    <macro name="day-month">
    <date variable="issued">
    <date-part name="month"/>
    <date-part name="day" prefix=" "/>
    </date>
    </macro>
    <macro name="collection-title">
    <text variable="collection-title"/>
    <text variable="collection-number" prefix=" "/>
    </macro>
    <macro name="event">
    <group>
    <text term="presented at" suffix=" "/>
    <text variable="event"/>
    </group>
    </macro>
    <macro name="description">
    <choose>
    <if type="interview">
    <group delimiter=". ">
    <text macro="interviewer"/>
    <text variable="medium" text-case="capitalize-first"/>
    </group>
    </if>
    <else>
    <text variable="medium" text-case="capitalize-first" prefix=". "/>
    </else>
    </choose>
    <choose>
    <if variable="title" match="none"> </if>
    <else-if type="thesis"> </else-if>
    <else>
    <text variable="genre" text-case="capitalize-first" prefix=". "/>
    </else>
    </choose>
    </macro>
    <macro name="issue">
    <choose>
    <if type="article-journal">
    <text macro="day-month" prefix=" (" suffix=")"/>
    </if>
    <else-if type="legal_case">
    <text variable="authority" prefix=". "/>
    </else-if>
    <else-if type="speech">
    <group prefix=" " delimiter=", ">
    <text macro="event"/>
    <text macro="day-month"/>
    <text variable="event-place"/>
    </group>
    </else-if>
    <else-if type="article-newspaper article-magazine" match="any">
    <text macro="day-month" prefix=", "/>
    </else-if>
    <else>
    <group prefix=". " delimiter=", ">
    <choose>
    <if type="thesis">
    <text variable="genre" text-case="capitalize-first"/>
    </if>
    </choose>
    <text macro="publisher"/>
    <text macro="day-month"/>
    </group>
    </else>
    </choose>
    </macro>
    <citation>
    <option name="et-al-min" value="3"/>
    <option name="et-al-use-first" value="1"/>
    <option name="et-al-subsequent-min" value="3"/>
    <option name="et-al-subsequent-use-first" value="1"/>
    <option name="disambiguate-add-year-suffix" value="true"/>
    <option name="disambiguate-add-names" value="true"/>
    <option name="collapse" value="year"/>
    <sort>
    <key macro="contributors"/>
    <key macro="date"/>
    <key variable="citation-number"/>
    </sort>
    <layout prefix="(" suffix=")" delimiter="; ">
    <group delimiter=" ">
    <group delimiter=", ">
    <text macro="contributors-short"/>
    <text macro="date"/>
    </group>
    <text macro="point-locators"/>
    </group>
    </layout>
    </citation>
    <bibliography>
    <option name="hanging-indent" value="true"/>
    <option name="entry-spacing" value="0"/>
    <sort>
    <key macro="contributors"/>
    <key variable="issued"/>
    </sort>
    <layout suffix=".">
    <text macro="contributors" suffix=". "/>
    <text macro="date" suffix=". "/>
    <text macro="title"/>
    <text macro="description"/>
    <text macro="secondary-contributors" prefix=". "/>
    <text macro="container-title" prefix=". "/>
    <text macro="container-contributors"/>
    <text macro="locators-chapter"/>
    <text macro="edition" prefix=". "/>
    <text macro="locators"/>
    <text macro="collection-title" prefix=". "/>
    <text macro="issue"/>
    <text macro="locators-article"/>
    <text macro="access" prefix=". "/>
    </layout>
    </bibliography>
    </style>
  • @mapmaker: I'd love to help you sort this out, if you can post your style in a more accessible way. Try pasting it into a "public gist" using this address, and post its address back to this thread. Be happy to take a look.

    https://gist.github.com/
  • ... I cut and pasted the fragments into a file, and when reassembled, it validates. I am able to reproduce the behavior here. It's clearly a bug, but you can avoid it by removing the subsequent-et-al-min and subsequent-et-al-first attributes from the bibliography node. You have these set to exactly the same values as et-al-min and et-al-use-first respectively, and that seems to be triggering the problem. Removing them won't change anything in the parameters scanned by the style; it will just make the breakage you see go away.


    I'll look into this further, though; this shouldn't be happening.
  • @fbennett: I removed the 2 items you suggested and things are now working as they should in 2.1b5. THANKS!!

    There is another relatively minor issue that I didn't raise as part of the one above so as to not confuse things. I have Word set up to insert a 6 pt space between paragraphs (the normal.dotm file). When I am using 2.09, the bibliography list 'respects' the 6 pt format. That is, there is a 6 pt space between each reference. However, with 2.1b5, there is no 6 pt space between references.

    Any ideas as to why there is a difference?

    Thanks again!
  • In 2.1, the plugins use the Bibliography style in Word; you'll have to modify it to match your needs.
  • Of course! How dumb of me! It is the same for 2.09. I'm running 2.09 on my iMac and 2.1b5 on my MacBook and had forgotten that I changed the Bibliography style on the iMac but not on the MacBook.

    Thanks for jogging my memory.
  • Upon further review, that may be what 2.1 is supposed to do but it does not, at least for me. If the bibliography default style in a new document is set to add the 6 pt space, and a bibliography is inserted (from 2.1b5), the style gets overwritten and the space changes to 0 pts. In order to get the style back to having 6 pts, it must be adjusted again. This was not the case with 2.09 where the default style was maintained.
  • Ok-- we'll have to get someone in here who actually uses the Word plugin.

    I can't offer much more myself, since I don't use Word.
  • OK, thanks.

    Now here's something else I've run across.

    This 1st link is to the csl file (modified as per fbennett's suggestion:

    https://files.me.com/dbruce.atkinson/3c27b3

    This second link is to a Word file with citations/bibliography created with 2.09:

    https://files.me.com/dbruce.atkinson/upu2fu

    The 3rd link is to a Word file with the citations/bibliography created with 2.1b5:

    https://files.me.com/dbruce.atkinson/0rfbq9

    You can see when comparing the 2 word files that a) with 2.09 the 'European Commission' is not repeated in the multiple citation whereas it is with 2.1b5, and b) with 2.09 the bibliography has uppercase/small caps for 'European Commission' but with 2.1b5 it is uppercase/lowercase.

    Any help you might be able to provide in trying to understand the reasons for the differences would be appreciated.
  • That one is also better addressed by one of the resident CSL gurus.
  • OK, thanks again.
  • Re: styling, the bibliography style should get overwritten exactly once with the style defaults. Zotero can't tell if you've modified it before you insert a bibliography, but it shouldn't modify it with subsequent refreshes. Is this not what happens?
  • Yes, that is exactly what happens but only in 2.1b5. In 2.1b5 the Bibliography style in Word is overwritten by the style defined by the csl the 1st time but not with subsequent additions or refreshes. In 2.09 the opposite happens, that is, the csl defined style is overwritten by the Word style. If there is no style specified in the csl, it defaults to 'no indent' and 1 line (12 pts) between references. I discovered this by modifying the csl file to <option name="entry-spacing" value=".5"/> The .5 equated to 6 pts.

    Personally, I would prefer the 2.09 approach but if that's not going to happen that is fine too now that I understand what is going on.

    Cheers
  • Re styles (again). I stand corrected. The overall bibliography style in Word does seem to be overwritten with 2.09 as well. The difference seems to have something to do with how specific paragraph styles are handled. In 2.09, when a bibliography is added, it keeps the 6 pt paragraph separation wheras in 2.1b5 this reverts to 0 pts.

    in 2.09, I have:
    <option name="hanging-indent" value="true"/>
    <option name="entry-spacing" value="0"/>

    since the paragraph style doesn't get changed, the bibliography keeps the 6 pt format; the '0' space looks like 6 pts

    In 2.1b5, the same command does not show any space since the paragraph style reverts to 0 pts. Therefore the csl needs to be modified to:
    <option name="hanging-indent" value="true"/>
    <option name="entry-spacing" value=".5"/>

    And the .5 yields the 6 pt spacing.

    Something is clearly different but I don't think there is a 'right' or 'wrong'
  • @mapmaker,

    I'm able to download the two Word files above, but the style code returns a "no longer available" error. I've deleted the style file I reassembled earlier; I'll need to have the style to check further.
  • Sorry about that, I inadvertently moved it to another folder. Here it is again. It has the modifications that you suggested yesterday.

    https://files.me.com/dbruce.atkinson/18369u
  • Meanwhile ... I found the problem. Institutional names were not collapsing properly. I have fixed the problem in the citeproc-js trunk, and will put out a new release later today. The revised code should appear in the next beta release of Zotero 2.1.

    Thank you for your feedback, by the way. It's how things get better.
  • Thanks a bunch. You folks are great in providing timely support.

    Another comment regarding the style issue. Based on all the playing around I've done with it (some might call it 'testing') I've reached the following conclusion:

    With 2.09, Zotero does not overwrite or modify the Bibliography Style that is set within Word but merely augments it temporarily while adding a bibliography based on the style commands within the csl. If one looks at the Bibliography Style in Word before and after adding a bibliography, they will see that it remains unchanged.

    On the other hand, with 2.1b5, the Bibliography Style within Word is actually overwritten by Zotero. This can be confirmed by looking at the Bibliography Style before then again after adding a bibliography.

    If this is confirmed, then I think that the approach in 2.09 is better and should be kept for the future.

    Cheers.
  • Just downloaded and tried 2.1b6. There is still a problem that I reported earlier.

    The Style can be found at:

    https://files.me.com/dbruce.atkinson/m9kbx3

    With 2.09, the output (citation and bibliography) looks like this:

    https://files.me.com/dbruce.atkinson/qrnqjp

    While with 2.1b6, the output looks like this:

    https://files.me.com/dbruce.atkinson/kas8uo

    As you can see, the bibliography with 2.09 has the author (an institution) as upper case/small caps while the 2.1b6 bibliography is upper case/lower case. The 2.09 output is the correct one so something is happening to overrule this in 2.1b6.

    I note that this only happens with institutions. The upper case/small caps seems to work OK with authors are people in 2.1b6.
Sign In or Register to comment.