Zotero Citation Picker: paste citation key into LaTeX as "\cite{citation key here}"

I admit: I am confused.
I've got Zotero working on my Linux platform;
I have the FireFox extension installed;
I've got the BibLaTeX extension installed, and I have created a *.bib exported library for LaTeX to pull from.
I've also installed the ODT/RTF extensions in Zotero.
While using TexStudio, I can use my hotkeys Alt+Z to pull up the Zotero Citation picker, and I can find the reference in my Zotero library (so far, so good!)
When I have chosen the reference and hit ENTER, it pastes the reference into TexStudio as:
\cite{|author,date|||zu:0::nLnLnnLL}
where n is a number and L is an uppercase letter.
This is really slick, but LaTeX (i.e, the biber package) cannot interpret the string {|author,date|||zu:0::nLnLnnLL} and use it to generate the correct in-line citation (and bibliography/ Reference list) from the *.bib library that I have supplied.
Either:
i) I am missing something in my Zotero setup (and so it generates the wrong output string); or,
ii) a way to insert the citation key directly from the Citation Picker DOESN'T exist (which seems like a serious deficiency!).

Comments? Guidance?
  • edited March 7, 2023
    See https://retorque.re/zotero-better-bibtex/citing/cayw/

    You somehow have the ODF Scan code in the citekey -- no idea why, but the only reason you'd get the citation picker would be if you had it set up with BBT (in which case see the link above) or if TexStudio has custom integration (in which case, that'd be where to look).
  • I forgot to mention that I had also installed Zotpicknix (https://emmareisz.github.io/zotpicknix/) "scannable_cite" and configured the file zotpicknix.sc to point to "TeXstudio"
    So now that I look at Zotpicknix and the "scannable_cite" script in more detail (by which I mean, the scannable_cite files "Scannable Cite.js", "Scannable Cite.mako" and "scannablecite.py") it appears that it just might be possible to use the Zotero / Biblatex citation key instead of the ODF scan-code. That would be FANTASTIC! The script refers to (a file?) Zotero.getHiddenPref. Is anybody familiar with that?
  • It's much easier. You can just create script, call it zotpicknix-blt
    and just replace l. 9. in the code of the zotpicknix-pd script, which is currently
    CAYW_URL="http://localhost:23119/better-bibtex/cayw?format=pandoc" # Edit the URL as needed for a different citation marker format.

    with

    CAYW_URL="http://localhost:23119/better-bibtex/cayw?format=biblatex" # Edit the URL as needed for a different citation marker format.

    And then follow the instructions in zotpicknix to use that script.
  • Adam: that's brilliant ! It works exactly as I had hoped. Is this the common way of using Zotero within a LaTeX IDE?
  • It's one common way, though I don't think many people go through zotpicknix -- there are so many options of how you can do this: drag & drop from Zotero, relying on your IDE to auto-recognize citekeys from an auto-updated bibtex file, having the IDE connect directly to Zotero (as RStudio does), direct integration of Zotero Picker into the IDE/Text editor (as with VS Studio Code)...
Sign In or Register to comment.