2

The documentation for autocompletion of citations within TeXShop appears to be fragmented around the web. The default suggestion is to use a service from BibDesk, but this requires BibDesk to be open. I don't use BibDesk and I don't want to keep selecting the correct .bib file.

Is there a standard way to accomplish this without BibDesk? I see from this decade-old discussion that there were some applescripts to accomplish this, so it's at least possible.

  • Off topic: don't you like TeXstudio? – Sigur Jan 26 '15 at 14:25
  • I haven't used it. TeXShop uses the native mac spell check, I'd rather use a more mature editor if possible since there tend to be fewer death-by-a-thousand-cuts bugs. The only major advantage of TeXstudio I've seen is code folding, which seems minor to me. Does TeXstudio automatically grab the correct .bib file for citation completion? – Jess Riedel Jan 26 '15 at 14:29
  • TeXstudio has a good tool for auto completion. Also it can recognize your personal commands and suggest them to you. – Sigur Jan 26 '15 at 14:49
  • 1
    TeXShop uses BibDesk to provide autocompletion suggestions for \cite commands (e.g., type \cite{foo and hit opt-esc to bring up a list; it searches on title, author, keywords). From a quick look at the code, I didn't make TeXShop parse the .tex file to figure out which .bib file to open, though (my BibDesk completion plugin for TextMate does). If you're dead set against BibDesk, you'll need to write your own AppleScript based solution; others have done this using regexes to pseudo-parse BibTeX. – Adam Maxwell Jan 26 '15 at 17:45
  • 1
    Nope. Start with Matt Hills' solution, which you've already found, or look at the ruby stuff that TextMate ships with. Everything I've done along these lines uses BibDesk (naturally…I wrote some significant parts of it!), and I also know how hard it is to parse BibTeX generally. – Adam Maxwell Jan 27 '15 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.