Citations in LO image captions

I'm adding citations to image captions in LibreOffice. When inserting, I'm warned that they'll be styled like in the bibliography, which is fine with me. However, they turn out somewhat messed up; for example, there are ibidems or short titles which I wouldn't expect if citations were really rendered like in the bibliography.

(FWIW, I'm also finding that some of those short titles appear in captions that are found before images with captions holding the correspondig long title. I suspect the latter might have to do with the order the images were inserted first.)

Is there any way to really make Zotero just display citations in image captions bibliography-style?
  • I didn't know we had such a warning. What exactly does it say?
    Generally, Image Captions don't work well for citations of any kind. One option is to just generate the citation in Zotero and paste them there (with no connection to Zotero, i.e. not using the LO add-on at all) then add them to the bibliography using Edit Bibliography in the add-on.
  • Thank you for your quick reply. Too bad I can't use Zotero natively for my table of figures, though :-(

    FWIW, the warning reads
    "Citations in text frames will be formatted as if they appear at the end of the document"
  • Ah right - that's not the same as bibliography. It means that they're treated as if they were the last citations in the document (citations on the last page, say). Hence the short titles.
  • I think I can identitfy one bug rather clearly: while LO itself manages to enumerate illustrations correctly in the order they appear in the document, Zotero seems to use the order in which citations in illustrations were last modified; so if my illustrations 1 and 2 are from the same source, but I happen to insert the Zotero citation into 1 after I inserted it into 2, 1 will have an 'Ibid' while 2 will have a long title. A fix to this issue would thus have to involve evaluating the number of the illustration as generated by LO.

    (Is there any better place to report that as a bug, like on GitHub?)
  • this is the right place for bug reports, but I wouldn't get my hopes up for this to get fixed, at least not by Zotero's dev team (that is provided that this actually is a bug, i.e. would be possible to fix given the limitation of LO reference marks).
    When Simon patched the add-on to allow citations in captions at all, he was quite down on the ability to get any position information on them, so I'd be surprised if he were willing to wade into that again.
  • Hmm, could you point me to a file or commit where to find the code that's handling citations in figure captions? I cloned https://github.com/zotero/zotero-libreoffice-integration, did a bit of grepping and had a look at the git log, but haven't really found anything relevant to my issue yet...
  • I don't know much about that code, so I won't be able to help you with this (but others may -- zotero-dev would be the place for that), but the relevant commit was:
    https://github.com/zotero/zotero-libreoffice-integration/commit/cccddf95b51a72dcac57916b7b696862fa2235ca
  • Thanks, but that's actually just the code the enables insertion of citations into text frames. Do you happen to also know where Zotero determines if this is a first or subsequent occurrence of a citation in order to print the long title, short title, or ibid?
  • If there were code available to do that, Simon would have hooked it up. (Since figures are not stored in display sequence in the document, a solution would require some way of identifying where LO places them in the text flow when the document is rendered. Unfortunately, it seems that would not be trivial to do.)
  • but in general terms, the libreOffice add-on uses three components:
    1) The actual add-on I linked to
    and two components which are actually part of Zotero, not the add-on, namely
    2) integration.js which assembles the relevant information and
    and
    3) citeproc.js (written by fbennett), which the formats the citations/bibliography

    I'm pretty sure the only special code handling text frames is in the add-on itself.
  • The code for comparing ReferenceMark positions is here.
Sign In or Register to comment.