I often use the preview feature of BibDesk to generate citations I can cut & paste into other documents (e.g. for those colleagues of mine who can't let go of their lowly Microsoft word processor). Recent version of BibDesk allow to select different bib style (e.g. apalike, acm, ieeetr), which is fantastic, but I have yet to find one that outputs the DOI of an article, which is what I need it to do. Any clue on how I might customize one of those styles to do that? The previewtemplate.tex provided by BibDesk is very cryptic and I have no idea where to start. Thanks in advance


1 Answer 1


From what I gather, previewtemplate.tex is just a skeleton file for BibDesk to call LaTeX.


%% I cut details

\nocite{<<CiteKeys>>}          % <<CiteKeys>> is replaced by the selected entries' keys
\bibliography{<<File>>}        % <<File>> by the path to the opened .bib file
\bibliographystyle{<<Style>>}  % <<Style>> is replaced by the style set in the preferences  

It just happens that none of the bibliographystyle listed by BibDesk default prints the DOI. You should either find or write your own TeX bibliography style.

If you already have your own .bst, you can put it where TeX will find it (see LaTeX can't find my .bst file. How do I show it the way?) and set BibDesk’s preferences (Preferences > TeX Preview > BibTeX Style) accordingly. You can also put your .bst whereever you want if you set BibTeX Style to its full path.

An alternative solution: BibDesk templates

You could try to use BibDesk’s own export templates. You can write them within BibDesk (File > New/Open Template) or in plain text, RTF or even .doc, RSS, HTML...

You might want to copy and edit BibDesk default templates (in ~/Library/Application Support/BibDesk/Templates). But they tend to display everything.

Once you have a satisfying template, you add it to BibDesk preferences (File > Preferences > Templates). You can now select the entries your interested in and export them (File > Export...). Your template should appear in the list of File formats.

If you really want to copy/paste, your custom templates should also appear in the menus (Presentation > [Side/Lower] Preview). Text templates don’t, but if you declare them as RTF (File > Preferences > Templates, the Role entry in the table), everything is fine again.

An example

A (very minimal, created within BibDesk) template would be:

<$fields.Title?><$fields.Title/>, </$fields.Title?><$fields.Year?><$fields.Year/>, </$fields.Year?><$urls.Doi.absoluteString/></$publications>

When run on the following .bib file:

    Author = {Perec, Georges},
    Doi = {10.978.207/0715237},
    Title = {La Disparition},
    Year = {1989}}

it generates:

La Disparition, 1989, http://dx.doi.org/10.978.207/0715237
  • The BibDesk Wiki’s page on templates
    – Édouard
    Commented Jun 26, 2013 at 21:19
  • Wow, that was a thorough answer @Êdouard. Thanks! I did fumble around with your minimal template but never got it to be recognized as a valid export format. In any case, the Export feature appears to work on the entire bib file, whereas in most applications I am only interested in typesetting a single bib entry (perhaps I should have made that clearer) into PDF. I have .bst files that do what I want, but I cold not figure out how to tell BibDesk to go read them. Sorry to be so useless...
    – El Niño
    Commented Jun 26, 2013 at 22:09
  • par ailleurs, un choix littéraire très judicieux.
    – El Niño
    Commented Jun 26, 2013 at 22:12
  • Ou plutôt : « Tu n’as pas mal choisi ton bouquin ». For the custom .bst try my suggestion above. For exporting a subset of entries, you may want to look into the Export only selected items option in the export window.
    – Édouard
    Commented Jun 26, 2013 at 22:40
  • I see. So the only way to specify a custom bst is via customtemplate.tex? The preference menu doesn't allow for that?
    – El Niño
    Commented Jun 27, 2013 at 0:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .