Library data and cit style not updated into Word document

[edit: Very special problem that initially looked like a broken connection between Zotero and Word 2016. After moving all library items of one user into a group library, they were assigned new URIs. So the word-plugin kept using the old URIs with the data from within the document instead of the data from the new group library with new URIs. So after editing library data in the group, the user kept wondering why many of the edits wouldn't show up in the Word document. Over the course of this thread, with a couple of scenic routes, the problem was pinpointed and a very hasslesome solution was found. Takehome lesson: don't transfer a library while working on a project. Either use the same library and sync that with other users. Or create a group in the very beginning.]

Hi.
I wonder why the word plug-in always refreshes all citations in a document after I changed the citation style. I know I will refresh eventually, but there are a few reasons why I don't want that right away. And if I do, there's the refresh button. In fact, the very existence of the refresh button made me trust I could change the style and only refresh once I'm ready to.

Two reasons apply in my case. One, my friend, whose PhD thesis I'm tinkering on, used Zotero the wrong way in the beginning. Instead of using citation locators, she manually typed page numbers into the citations after creating them. So now I'd like to change the style, then edit these citations, giving them proper citation locators and get them back in the right style. Now with the automatic refresh, a lot of these page numbers (pseudo citation locators) were lost.
Second, I'm still tinkering with the citation style and don't want to wait for 20 minutes each time I change the style because Zotero decides to go through all my citations.
«1
  • edited October 26, 2015
    And yes, I do want to test my style on her material instead of any test field, because it turns out the visual editor does not give me the same output as my friends Zotero database in her document. Plus, her stuff is in German and I can't be sure about categories, labels etc., I have to see it working on the German-language material.
  • w/o any comment on your feature request, I'd very much recommend using https://www.zotero.org/support/dev/citation_styles/reference_test_pane for testing styles--much easier than having to install style&test for every edit.
  • Thank you, adamsmith. Although now it turns out that my style behaves differently in the test pane and in MS Word. With another different behaviour in the visual editor's example display. Hehe. Let's see...
  • test pane and Word should definitely be the same. They run the exact same processor on the citations.
    Visual editor may be slightly different.
  • edited October 26, 2015
    [deleted]
  • (If you do see differences, specific examples would be helpful)
  • Thanks. So are there any known issues with MS Word 2016?
    That would explain not just the incoherent behaviour but also my having to press all the Word add-in buttons in twice before anything happens.

    (Screen shots of incoherent behaviour between visual editor, Word doc, and test pane here: https://www.dropbox.com/sh/x4ousmg6bnsyi00/AADrqyFUBp2-MlI3rzipJFyxa?dl=0
    Test pane gives me firstname sirname in the bibliography; the other two give my sirname, firstname, which is good but it doesn't to so with editors, only authors.

    I've found my own way through a lot problems and questions creating the style, but know I'm kind of stuck. Any hints greatly appreciated.
  • OS X Yosemite
    Zotero 4.0.28.8 standalone
  • The may be some kinks left in behavior of Word 2016, but definitely nothing that would affect citation formatting.
    It'd be helpful to see this for the same citations. My best guess for what you're seeing in the reference pane is wrong data entry (everything in a single field instead of lastname, firstname)
  • edited October 26, 2015
    I've double checked the data, and all names were entered correctly. But still, it's more coherent now. New screen shots, matching database entries:
    https://www.dropbox.com/sh/x4ousmg6bnsyi00/AADrqyFUBp2-MlI3rzipJFyxa?dl=0

    My only remaining problem seems to be that editors (in German, the short label is "Hrsg.") seem to be Firstname Sirname, and I'd like them the other way around, just like authors. Tried many things. Would you be so kind as to tell me the official way to do that? :-)
  • {braindead after weeks of tinkering}
  • get me a copy of the style code to gist.github.com as a secret gist, then post the link here. Much easier to deal with specifics than in abstract.
  • Thank you. Here we go:
    https://gist.github.com/anonymous/bacf67c7931a060b60c1#file-tu-darmstadt-geschichte-german-csl
  • try https://gist.github.com/adam3smith/ead9381d8b0dff7ee35b
    I just change this for in text citations, though. Bibliography entries look exactly right for me for edited books, i.e. I get:

    Hancké, Bob; Rhodes, Martin; Thatcher, Mark (Hrsg.): Beyond varieties of capitalism : Conflict, contradiction, and complementarities in the European economy, Oxford and New York: Oxford University Press 2007.
  • That's what I get in the visual editor, too. Damn.
    Sorry, are you saying I should try using your code? And are you saying it's inline instead of note-based? Or should I use the bibliography section of your code?

    By the way, thank you tons. I've read a lot of pre-existing answers of yours about different problems I had. Do you take Visa or Flattr?
  • Or is your code the corrected version of mine?
    In which case, the footnote citations are supposed to be Firstname Sirname, so I was content here.
  • you should try my code. I didn't change the order in footnotes, but cleaned it up a little because I was seeing errors there. I also want to make 100% sure we're looking at the same code.

    If that doesn't work, please export the above Zotero item for the edite book to Zotero RDF (right-click --> Export), open the exported file with a text editor like TextEdit and again post to a public gist so we can make sure it's nothing particular to that item.
  • Am using your code now and just noticed that the name order in bibliography (not citations) in the test pane depends on the name display switch in the data editor. Is that the meaning of the blanc line in the "name-as-sort-order" pop-down? (I haven't gotten any helpful behaviour out of the other two options in name-as-sort-order.)

    https://www.dropbox.com/sh/x4ousmg6bnsyi00/AADrqyFUBp2-MlI3rzipJFyxa?dl=0
  • Sorry, don't bother, I read up on the meaning of single-field vs. double-field names.
  • I think you're misunderstanding the switch in Zotero, at least if you're referring to the white rectangle after names: that's not a display switch; it's a data entry switch:
    Adam Smith in single-field mode is _not_ equivalent to Smith, Adam in two-field mode.
    The main use of the former are institutional authors like World Health Organization"
  • yup, that was it.

    (name as sort order, btw., is documented here: http://docs.citationstyles.org/en/stable/specification.html#name
  • So, I'm fixing the database right now and will ask again tomorrow if anything's still insolvably wrong. Thank you lots, Adam!
  • edited October 26, 2015
    And thanks for the documentation link. I've never found that, at least not using google. It's exactly what I need. Everything will be easy from here on out. Or so I hope :-)
  • Sorry, me again. If you have another minute to help me with this: I DO get WAY different results in Word than I get in the Zotero app's style editor. Not related to the names anymore. Is it possible that the Word plug-in somehow doesn't push the style and data into the document anymore? Although I've installed the style a couple times over, selected it in the doc prefs and re-started both applications and the system?

    In Word, I get this citation in a footnote:
    Anette Baumann: Jüdische Reichskammergerichtsprozesse aus den Reichsstädten Frankfurt und Hamburg, S. 297-316., S. 13; Verena Kasper-Marienberg: Die Wiener Reichshofratsakten, S. 45-60.

    Note that "S. 297-316." is the chapter's pages in the container book (followed by a stupid period) and "S. 13" is a citation locator.

    Test panel screenshot and RDF here: https://www.dropbox.com/sh/x4ousmg6bnsyi00/AADrqyFUBp2-MlI3rzipJFyxa?dl=0
    My code has changed very little from what you gave me earlier: https://gist.github.com/anonymous/666acc8e8e0f0c25ccc3#file-tu-darmstadt-csl

    Difference in Word:
    - the longer title-short still shows (I changed it to a shorter one today)
    - page range of chapter in container. I deleted it from the code days ago (although I want it), yet it's still showing up.
    - and sometimes this annoying period at the end of the container page range, that stays there even if followed by a citation locator.

    Could the lagging connection between Zotero and Word be related to errors in my code? (It's a fork of an existing one, forgot which one.) Because if I select a different style, the auto-refresh is very prompt and quick. If I select mine, the buttons react extremely delayed (like 20 seconds), the citation bar needs a lot of time to process, and, like I said, the style changes don't appear.

    Any idea?
    Thanks and good night! (It's 1:35am in Berlin now.)
  • Could you try this in a new Word document? (just create a single footnote with that cite)
    Yes, it's possible that the citation in the document wouldn't update anymore, but before checking on that I'd want to make sure this works regularly in Word.
  • edited October 27, 2015
    Excellent idea. Works like a charm in an empty document. However, it doesn't anymore if I copy&paste the content of my full document into a new one.
  • you can look at the field codes in a document by pressing alt+F9 in Word (maybe alt+FN+F9 on Mac). Check the field code for the same item in the old document (where it's not updating properly) and the new document (where it does).
    It's a string of all the fields in Zotero, but you're specifically looking for the one that says something like: "uri":["http://zotero.org/users/2433/items/PEH3G4FX"]

    That should be the same in both (and it's what Zotero uses to match citation and database). If it's not, post both here and I can probably tell you what happened.
  • edited October 27, 2015
    Yes, here we go. I compared the strings and I have a suspicion regarding the reason.

    from the code in my broken docx
    "uri":["http://zotero.org/users/1540390/items/DPKJ432R
    "uri":["http://zotero.org/users/1540390/items/QUIEFVRX
    "uri":["http://zotero.org/users/1540390/items/988FUD3R

    from the code in a new doc:
    "uri":["http://zotero.org/groups/408231/items/7BGA3TSX"]
    "uri":["http://zotero.org/groups/408231/items/4SZF2DZX"]
    "uri":["http://zotero.org/groups/408231/items/KWD4DKSK"]


    The codes in the broken docx are probably from my friend's zotero library from when she was writing her thesis. We then created a group, she copied all the items over to the group library and deleted her own. So now we are working in the group, with the documents in Dropbox and everyone on their own computers.

    What's strange, however, is that not all citations were consistently disconnected ever since I started working on it. Some style updates have gone through, as do many of the changes in the library data. But many don't.
  • Exactly what you say, yes.
    Style updates would go through either way--if Zotero doesn't find an item in its database, it uses the data stored in the document.

    Library data -- best guess I have would be that the item was originally inserted from the group. That's the only way a change of the data of an item in the group would actually be reflected in the document.

    You could consider creating a fresh Firefox/Zotero profile and syncing with her account so you have the original database. That might be easier than fixing all the links in the document.
  • edited October 27, 2015
    Not sure if you fully get the situation.
    The old codes ("user" in the uri) are probably from her library which doesn't exist anymore. It might be in her trash bin, I'll ask her. (Deleting her lib after copying it to the group lib was my way of making sure we all work on the same data.)

    The codes in the new document are the ones with the group-URIs.

    Strange thing is that when I make a new citation in the old doc, citing the same titles, you'd think it uses the new URIs and gets it right. The resulting URIs are:
    "uri":["http://zotero.org/users/1540390/items/DPKJ432R"]

    which doesn't make a lot of sense, unless I am user 1540390, but then where do the group-URIs come from?
Sign In or Register to comment.