A common question asked on the bibdesk-users email list is how to connect BibDesk to writing applications like Microsoft Word, Apple's Pages, TextEdit, or other word processors, to insert inline references while writing and/or a reference list. There are various ways to accomplish this.
These writing applications do not natively use .bib files the way LaTeX (with BibTeX or Biber) or Pandoc do. Writing in LaTeX markup or the simpler Pandoc Markdown is like writing source code that will later be compiled to produce a final typeset document, whereas writing in formatted-text editors is like editing the final typeset document directly with the source code hidden from the user. These are two different writing paradigms with different strengths and weaknesses.
There is a basic way to put references into your writing application using only BibDesk and its template system. (BibDesk's template system is described in more detail in the Templates page of this wiki.) Note that if you are using a very contextually complex bibliography style, it may be easier to use one of the other ways in other sections below instead of BibDesk's template system. The steps for BibDesk's template system are:
If you only need a complete reference list at the end of your written document (and not inline references in the text):
If you need separate templates for inline references in the text and for the reference list at the end of the document:
Alternatively, instead of dragging or copying and pasting references using BibDesk's general templates as described above, you could set up your custom template(s) as System Service templates. This is done in the Service templates section of the Citation pane of BibDesk's Preferences. Then in any writing application that can access the macOS Services menu, you can use the BibDesk services: Complete Citation, Complete Text Bibliography, or Complete Rich Text Bibliography.
A disadvantage of the previous steps is that the references in your writing application cannot be automatically changed to another bibliography style, nor automatically updated if the bibliographic data changes. However, an advantage of the previous steps is that no software is required other than BibDesk.
Since BibDesk 1.7 (released May 2019), there is now a built-in export template for "Word XML", the Microsoft Word 2016 bibliography format. This option can be used to create a database that can be used with Word's built-in reference manager in the References ribbon in recent versions of Microsoft Word (2016 and later). The steps for doing this are:
Sources.xml
(case sensitive).~/Library/Containers/com.microsoft.word/Data/Library/Application Support/Microsoft/Office
to find the existing reference database for Word 2016.Sources.xml
to Sources.xml.bak
as a backup.Sources.xml
to this folder.Note that Microsoft Word's built-in reference manager is not as flexible as Zotero's Word plug-in, described below.
Zotero, an open-source cross-platform reference management application, can be used as an intermediary between BibDesk and your chosen writing application. To do this, first install Zotero, then use Zotero's menu command File → Import... to import your BibDesk database (.bib file) into Zotero. (For more control, before importing your BibDesk database into Zotero, install the Better BibTeX plugin in Zotero and configure its settings to your liking, and choose "Better BibTeX" format in the options of the File → Import... file selection box.)
You can use Zotero with your writing application in one of two ways:
Some background information: Zotero began as a plug-in for the Firefox web browser in 2006, and started its transition to a standalone application in 2011, while it also gained support for the then-new Citation Style Language (CSL) file format. CSL is an XML-based bibliography style specification analogous to BibTeX's .bst files, "but with dramatic improvements in ease-of-use, metadata flexibility, and international support". CSL has become an important bibliography style standard used by many applications (but not by BibDesk). The easy-to-use Zotero style repository contains thousands of CSL files (automatically pulled from the central CSL style repository), and the most widely used styles are frequently updated.
You may have wisely chosen to use BibDesk over Zotero due to one of BibDesk's many advantages such as its native BibTeX file format, its more Mac-like interface, or its support for macOS features such as AppleScript. Nevertheless, there are some strong reasons why Zotero can be a useful helper application when a BibDesk user writes in formatted-text editors:
Apart from Zotero's usefulness for formatting references, it is also useful for getting data into BibDesk: George MacKerron's Zot2Bib add-on for Zotero, combined with one of Zotero's web browser add-ons, enables a BibDesk user to do one-click importing of publications from an external web browser into BibDesk from a wide range of websites.
Pandoc is a versatile command-line tool for converting between document formats, but most importantly for BibDesk users it can also convert BibTeX into formatted references using CSL files, the popular bibliography style files that were described above in the section on Zotero. If you are not very familiar with the command line, you should not be scared away from using Pandoc, because it can be installed easily using an ordinary Mac package installer, and Pandoc commands are easy to learn. If you can understand Pandoc's gentle instructions for getting started, then you can use Pandoc; if not, try one of the other options above.
After installing Pandoc, the simplest way to use it to produce formatted references from your BibDesk database is to open Terminal and run a command with the form pandoc -f bibtex -t format -C --csl=cslfile -o outputfile inputfile
replacing format
with your desired output file format (docx, html, markdown, rtf, or many others), cslfile
with the name of your CSL file, outputfile
with the name of the file to be produced, and inputfile
with the name of your BibDesk database. This tells Pandoc to process the publications from your BibDesk database and produce a reference list in your chosen bibliography style in your chosen file format.
For example, let's say you have downloaded the latest APA style file (named apa.csl) from the Zotero style repository, and it is in your user documents folder with your BibDesk database (named References.bib). To produce a Microsoft Word .docx file of formatted references (named References.docx), you would open Terminal and run the command cd ~/Documents ; pandoc -f bibtex -t docx -C --csl=apa.csl -o References.docx References.bib
.
You can also run a Pandoc command with AppleScript's "do shell script" command, and by saving such an AppleScript in your BibDesk Scripts folder, you can use it to produce Pandoc-formatted references from BibDesk without opening Terminal. Like most command-line tools, Pandoc can also read data from standard input instead of from a file.
Several users have created scripts and programs that enable inserting references in Word, Pages, or other word processors. Most of these scripts run from the "Script Icon" menu in BibDesk. Including BibDesk references in these writing applications is usually as easy as the following process. This process mixes the two writing paradigms mentioned above, by inserting LaTeX commands into a formatted-text editor, and then transforming the LaTeX commands with a script.
\cite{refkey}
statement in your text. You can also copy and paste or type the citation statements directly. \cite{...}
statement with a formatted citation reference. They also include a bibliography of formatted full citations near the end of your document. Some scripts are also able to reverse the process back to the original \cite{...}
statements.
BibDesk scripts can be found on two locations in this wiki. Because these scripts are contributed by users, there are often several available options for each word processor or editor.
You can also search this wiki or the bibdesk-users mailing list for your word processing or text editor name.
Wiki: BibDesk_Applescripts
Wiki: FAQ
Wiki: Main_Page
Wiki: Other_Applications
Wiki: Templates