Convert from LaTeX to Word using field codes

Hi - apologies if this has been asked/discussed (I couldn't find anything in the forums), but is there standard code to add manually to citation keys in Word such that Zotero will recognize them? The use case is converting a document from LaTeX to Word (for submission reasons). Apparently in EndNote, one can manually insert the field codes using {...} and it will be recognized by EndNote. In LaTeX the codes are written as \cite{...} so it's a simple matter to strip the \cite part and then have EndNote recognize the {...} fields. Is there an equivalent for Zotero? I toggled the field codes in Word but they seem incredibly complex :( I thought that Pandoc might be an answer since the bibliography file would in theory be format independent, but I'm having trouble getting that to work. Also I'd rather not have to suggest another program as a solution for this question. Again, apologies for any duplication here and thanks for any tips!
  • If you have a LaTeX document already, I suggest you use pandoc to convert from LaTeX to word automatically. https://medium.com/@zhelinchen91/how-to-convert-from-latex-to-ms-word-with-pandoc-f2045a762293

    pandoc has its own citation processor that can format the citations based on your bibliography file.

    If you have the items in your Zotero library with the same citation keys, I suggest you export your bibliography as a Better CSL YAML or Better CSL JSON file (with the Better BibTeX plugin) rather than .bib for best results.

    If you really need live Zotero citations in Word for editing purposes, that's possible using pandoc as well, but is more involved.
  • Thanks so much! I figured Pandoc would be the cleanest, but this is for another patron (not me) so I'm hesitant to suggest installing another program for them to use. I am trying to get Pandoc to deal with just a basic LaTeX file from Overleaf but not having much luck with it detecting citations :( I'll try the Better BibTeX outputs and see if that works better. The issue with the live citations in Word isn't so much with editing, but more for ease of conversion. In the past my patron basically just cut and pasted from TeX/LaTeX and then did a find/replace on the citations, which worked in EndNote which has simpler field codes than Zotero. Thanks again for your help!
  • Hi - I tried Better CSL YAML but Pandoc is just not seeing the citations, and I don't know why. I tried exporting to docx and ODF and neither works, so I think this may be a Pandoc or LaTeX issue. Thanks!
  • I think we'll get this in Zotero in the not-too-distant future. There's bascially two components needed: native citekey support and then the ability to scan on those citekeys.
    The former should happen fairly soon and the latter is then attractive enough as a feature that I'd hope Zotero invests some time in it as a replacement for the barely maintained RTF scan.
  • Hi! Thanks so much for the comments. I did eventually get Pandoc to work - there was an error in my .bib file that was causing Pandoc to fail, but I sorted that out.

    @bwiernik with regards to "If you really need live Zotero citations in Word for editing purposes, that's possible using pandoc as well, but is more involved."
    -> This is what my patron is actually asking for. Are there instructions posted somewhere that I can refer to?

    Thank you all for your help! <3 Zotero
Sign In or Register to comment.