Closed larsfjaera closed 2 years ago
Dear @larsfjaera,
Sorry for the delay, I have been busy and could not have a look at GitHub before.
Could you provide a smal document that produces the output you mentioned? Just a test document that you are sure the references are linked incorrectly. That would make things easier to check and track the bug.
Cheers Luis
@mabentwickeltsich, no worries. Thanks for getting back to me.
I have attached a sample document as requested. I tried to mix up the references a bit. But look for example at Underwood et al., 2017, while it is the last reference in the list (number 11), the hyperlink in the text points to Chapman & Ermoian, 2017 (number 3), which is the first instance from 2017. The same phenomenon also occurs for the other years.
Dear @larsfjaera,
Sorry for the late response, but I finally have an answer for you that would help.
There are, however, some observations that I have for you.
First, the document that you provided have custom APA citation styles. If you modify the citation style (CSL file) the macros may be affected and not work properly. Please, stick to the original versions unless you really know what you are doing. Second, the macros will not link the citations as you described. There will be a message of an orphan citation and it will not be linked. I assume that you removed this verification and the macros are wrongly linking orphan citations to a previous found correct citation. I did not test this theory, but it is the most likely scenario. Third, some of your citations need work. For example, Debus et al., 1997 has half of the authors duplicated and with different spelling. Please, check all your bibliography in Mendeley to have a spotless list of entries in your document. Fourth, It would also be helpful if I know before hand that you are using modified versions of the CSL citation style and MendeleyMacros. Please, give as much information as you can in the future. That will reduce the time I take to find what the problem is.
The most helpful part for you is this. I noticed that the entries in Mendeley with the month of publication will be labeled as orphans and not linked by the macros. As a workaround, remove the months from your entries (I know it is not ideal, but it is a quick fix and also this info is not included in the visible text of the document) and the problem should be fixed. The other thing I found is an apostrophe (two due the duplicated author) in Debus et al., 1997. It seems that the regular expression does not like this situation. If you remove the apostrophe from O'Farrel, D. then this last citation will also be linked.
I will see if I can come up with a solution for both, the month and apostrophe in the next weeks. The month has to do with a change in the CSL citation style that I need to address. The apostrophe is just how the regular expression works.
Cheers Luis
@mabentwickeltsich I want to thank you very much for your reply and investigation into this issue. It is much appreciated.
First off, I apologize that the Debus et al. reference had duplicate authors. That was a mistake that I missed. With that said, I must inform you that I have not done any edits or customizations to either the MendeleyMacros or the APA citation style. I am not sure in what regard you mean that the citation style I have used diverges from APA?
After reading you reply, I updated all references in Mendeley using DOI lookup. I then used the APA citation generator from www.scribbr.com. Except a few minor differences that can be attributed to the different DOI lookup methods between Mendeley and Scribbr (such as Issue: May in the Battistoni reference), the citations are identical and does not have different styles. I am using the unmodified American Psychology Association 7th edition updated November 4th, 2020 by Brenton M. Wiernik ([Mendeley style link]( http://www.zotero.org/styles/apa](http://www.zotero.org/styles/apa )).
As mentioned, I have also not done any modifications to your macros. While I have forked your repository and did play around a bit with the code, I made sure that the modified version was not used when I noticed the issue. However, I double checked it today by first removing all macros in Word regarding MendeleyMacros. I then added the latest version of your macros into Word followed by an immediate run of GAUG_createHyperlinksForCitationsAPA. And I still get the references linked to the first reference of the given year and no messages regarding orphan citations are displayed.
In regards to your solution, I removed both Day and Month in Mendeley for all the 11 references I used. I did a sync in Mendeley followed by a Refresh in Word. I ran GAUG_cleanEnvironment and GAUG_createHyperlinksForCitationsAPA. This did not solve the issue for me. Inskip et al. are still linked to SignetBibliographie_001 and Underwood et al. to SignetBibliographie_003. With that said, I have not had any issues with the Debus et al. and the apostrophe. In my document, this reference is linked to SignetBibliographie_004.
It baffles me why we see such different results. I am not sure if there could be anything wrong with either my Word setup or Mendeley setup. I think I will have to try to set it all up from scratch on a clean computer with a new Mendeley account to see what my results are then. Nevertheless, I want to point out that the citations are linked correctly when using IEEE.
Again, thank you for your help. I will get back to you after I have tried setting it all up from scratch.
PS. I am using the following versions:
First of all, thanks for creating this great tool.
I have a small problem that I am unable to resolve. When I reference different publications, but from the same year, all the bookmarks from the given year are directed to the first reference of that year.
To provide an example:
In this case, Gentile et al., 2017 and Prusator et al., 2017 have the bookmark SignetBibliographie_001, while Guan et al. 2015 has SignetBibliographie_002, and none are assigned _003, which should be the case for Prusator et al.
Please see the attached image were the pointer hovers over the last reference.
I have tried using completely different references, but the same issue occurs.
Many thanks!