Bug with title and page number in citations using RTL languages (Arabic and Hebrew)
Suppose you cite a book written in Arabic or Hebrew by Jane Doe using Chicago style. Everything looks fine. You then cite a different book by Jane Doe. Still good. If you next want to cite the first book again, however, you run into a problem: this subsequent citation of the first book inverts the position of the book title and the page number in the citation. See attached image for what I mean.
This appears to be a Zotero issue, not a CSL issue, because it happens for both Chicago and MLA and for both Hebrew and Arabic. What seems to be happening is that the page number is somehow getting "glued" onto the title field, and although the page number is getting placed at the end of the title, this actually puts it to the left of the title since the title is in a RTL language. Does that make sense? Again, take a look at the image.
Note: MLA will actually exhibit this behavior on the first mention of a book if you have more than one work by the same author cited anywhere in the document.
Note: For some reason, the title and page number appear as font size 12 in a font-size-11 document (while the Author name remains properly in font size 11). This is a piece of evidence that leads me to believe book title and page number are getting glued together. In any case, I don't know why the font change is happening and seems to be an additional bug.
https://s3.amazonaws.com/zotero.org/images/forums/u3061023/lrmqnz4vhyppjoji9ie3.png
This appears to be a Zotero issue, not a CSL issue, because it happens for both Chicago and MLA and for both Hebrew and Arabic. What seems to be happening is that the page number is somehow getting "glued" onto the title field, and although the page number is getting placed at the end of the title, this actually puts it to the left of the title since the title is in a RTL language. Does that make sense? Again, take a look at the image.
Note: MLA will actually exhibit this behavior on the first mention of a book if you have more than one work by the same author cited anywhere in the document.
Note: For some reason, the title and page number appear as font size 12 in a font-size-11 document (while the Author name remains properly in font size 11). This is a piece of evidence that leads me to believe book title and page number are getting glued together. In any case, I don't know why the font change is happening and seems to be an additional bug.
https://s3.amazonaws.com/zotero.org/images/forums/u3061023/lrmqnz4vhyppjoji9ie3.png
Font size issue: Apparently Word allows styles to set different default font sizes for different scripts, so try editing the style being used for footnotes in your document and see if "Complex scripts" have a different size than "Latin".
HOWEVER, if I manually insert spaces into the citation I find that I also get the correct ordering of elements, so there must be a structural solution to the problem. Looking into the underlying XML of the document, I see that this is indeed the case. In the picture below, compare the incorrect and correct appearance of the citation, as it is rendered in Word and as it appears in the underlying XML:
https://s3.amazonaws.com/zotero.org/images/forums/u3061023/elxtkefj90faeqjgxh6z.png
This clearly shows that the root of the problem is Zotero outputting the page number inside the w:r element and the w:t sub-element along with the title.
The fix would be simply to output the comma and page number in their own separate w:r elements, no?