In-line citations have space before and after number
Hi,
After restarting my computer and re-opening the document I was just working on in Word with Zotero plugin, Zotero asked me to re-download and install the Zotero for Word plugin. After doing this, now my in-line, superscripted citations all have a space before and after the number. It did not change the citations that were already in the document prior to the restart--they have no spaces. If I remove the spaces manually, the citations stop syncing with refresh.
I checked the citation style I am using, and do not see scripting to add in spaces around the number there, so I'm guessing it is a bug independent of the style format.
I am working on a Mac (just updated to 15.0.1)
Zotero version 7.0.8-beta.1+e754fa0c4 - I am not sure if it automatically upgraded the Zotero version from 6 when I restarted.
Word version 16.89.1 (for Mac)
After restarting my computer and re-opening the document I was just working on in Word with Zotero plugin, Zotero asked me to re-download and install the Zotero for Word plugin. After doing this, now my in-line, superscripted citations all have a space before and after the number. It did not change the citations that were already in the document prior to the restart--they have no spaces. If I remove the spaces manually, the citations stop syncing with refresh.
I checked the citation style I am using, and do not see scripting to add in spaces around the number there, so I'm guessing it is a bug independent of the style format.
I am working on a Mac (just updated to 15.0.1)
Zotero version 7.0.8-beta.1+e754fa0c4 - I am not sure if it automatically upgraded the Zotero version from 6 when I restarted.
Word version 16.89.1 (for Mac)
Mac
Zotero 7.0.8-beta.1+e754fa0c4
Word Version 16.89.1
Does a screenshot of a new document help? I'm using Nature style and just tried out on a new document -- now there is no space after the superscripted number (good), but still space before the number.
Went back to my older documents using the same style before yesterday's reinstall, no space either before or after superscripted numbers.
In a new document, I see the same thing as @CherryChengchenLi -- there is a space before the superscripted in text citation, but not after it.
If I press Add/Edit Citation on those citations, it works as normally. But if I remove the space manually to fix to the desired format, it does give that dialog.
Step-by-step:
1. Write some text, and place cursor where I want to add the in-text citation.
2. Select Add/Edit Citation while Zotero 7 app is open.
3. Select the desired style format (I typically use a custom one based off of the Nature style, but the problem also exists with the Nature style)
4. Select the citation to add and select OK.
5. Citation is inserted into the document as was described, and modeled by @CherryChengchenLi.
However, in an existing document with citations already existing, there are still some problems.
1. When I changed between citation styles, it updated to remove most, but not all of the unexpected spaces. When trying to fix the ones with a space by removing and readding it (with or without letting it refresh citations between these steps), it enters it again with a space before and after the citation.
2. New citations add spaces before the number, but only in the middle of a paragraph. At the end of a paragraph, it works as expected. But if I copy/paste that citation to the desired location and refresh citations to fix number ordering, it goes back to adding the space.
1) Copy pasting same citation from a different document doesn't fix the problem.
2) The document that had the citation copied has gray brackets ([]) around the number. Refreshing does not fix the way it appears.
Edit 1: No, in fact it is not true. I am digging into. It worked in a new document. I then edited an existing one (edited by others also), which had all the superscripts with a leading space. I had to replace all, because while the numbers were detected (a new reference got the correct numbering and was added to the bibliography), there were not editable (selecting the number and hitting add/edit citation just showed an empty citation bar). I noticed that if I wanted to insert a citation right after a ) or a ", the new citation I added to replace the previous always suddenly showed a leading space. Then, I came to an error when I tried to add a citation between two brackets (), right after an equation object. An error message popped up ("Zotero experienced an error updating your document. Would you like to view troubleshooting instructions?"). I clicked "No" because I knew what happened. Despite this error, all the citations seems to be correct (no leading space). But when I tried again the Nature style in new document, I got a leading space in all the citations, when there was none prior to the edition of my existing document.
Edit 2: Exiting Word seems to help. Inserting a citation in Nature format in a new, empty document works as expected (no leading/trailing space). I'll try to reproduce with an equation object inside parenthesis.
Restarted Word -> Zotero -> Document Preferences -> select "Nature" -> inline citations automatically updated.
Now there is no leading space before the inline citation numbers (good)!
Mac
Zotero 7.0.7 (don't think this is the most updated version though)
Word Version 16.89.1 for mac
Generating an error in the existing does not trigger the behavior reported earlier (i.e., leading space in a blank, new document), as far as I can see.
Edit1:
Going through all the in-text citations and editing them through the Add/Edit Citation button broke everything. I have lost my references and and error message is now popping every time I try to add or refresh.
Edit2:
This seems to be linked to an equation I copy from another document into the document I am working on. When I Add/Edit Citation, the error message pops up. I have AutoSave on and after the error occurred, the document I have copied the equation from is modified, without me to touching it. I can see it because the AutoSave has been activated on the document source.
Edit3:
It doesn't seem to be linked to the equation, as I can trigger the error prior to the copy/paste of the equation, but not for all the citations. The Debug ID is D1411463013.
Edit4:
I have isolated two shorts paragraph which trigger the error message. Report IDs: 978000172 and 1166304361 (The second ID is after a prenthesis.)
I am sorry, this reply is a mess and maybe talking about unrelated issues. I guess I will have to trough the whole document and reinsert all the citations.
Edit 5: Restarting the laptop seems to have solved the errors related to Add/Edit Citation, but there is still a space after a closing parenthesis.
1. I have a document, I reinserted all the citations from scratch with the updated beta, and no space has been added. Everything is fine.
2. I made a copy of the same exact document, to edit it. After some time working on it, adding some new citations, changing position of paragraph, then all of a sudden (I cannot say when it started during the editing process), almost all the citations that did not have any spaces got a leading space (only a few did not have). Again, no leading space existed in this document before I started to make changes. And the original document (in 1.) is still correct. Please note I am tracking changes.
3. Using Add/Edit Citation button makes the space to disappear. The Refresh button has no action on that.
4. After several Add/Edit Citation use, I then started to receive an error message. And then everything started to fall apart. Any citation I tried to edit thrown an error message. I was able to isolate a problematic paragraph. I copied it into an empty document. Error message while refreshing, trying to change the style, editing citation. Everything was a mess.
5. I restarted my laptop. Everything is now fine, in the sense I can edit citation for the leading space to disappear.
I am not sure whether it makes sense or not.
Do you think the citations that had a space added to them were edited in bulk by Zotero (i.e. when renumbering citations due to prepending one at the start of the document)? What do you mean by "there is a space after a closing parenthesis"?