Post

JabRef offers basic Cite As You Write (CAYW) functionality

JabRef offers basic Cite As You Write (CAYW) functionality

Hello, I’m Philip, one of the Google Summer of Code (GSoC) students at JabRef this year, and I will be giving you a small introduction on JabRef’s new Cite As You Write (CAYW) feature.

When working with LaTeX editors, it is often a struggle to switch between JabRef and the editor to search for the according entries and their citation keys. This is especially true when working with large libraries, where the search can take a while. To make this easier, JabRef now offers a Cite As You Write (CAYW) endpoint that allows you to search for entries and their citation keys directly from your LaTeX editor and automatically insert them at your current cursor position.

Preparation on JabRef’s side

To use the CAYW endpoint, you need to have JabRef running and the HTTP server enabled. To enable the HTTP server, go to FilePreferencesGeneral and under HTTP Server section check the box for Enable HTTP Server.

Connecting TeXstudio to the CAYW endpoint

In the following example, we use TeXstudio. Other editors are posible - read on at the documentation on the cayw feature.

Open TeXstudio. Go to MacrosEdit Macros. Set a Name and a Trigger for the macro. After that you have to set the Type to Script and paste the following code into the Script field:

1
2
var url = "http://localhost:23119/better-bibtex/cayw??format=biblatex&texstudio=true&minimize=true&command=cite"
system("curl -sS '" + url + "'")

cayw-texstudio.png

After that, you can save the macro and close the dialog by clicking Ok.

Using the CAYW endpoint

After the configuration step, you can use the macro by typing ccc. Then, the search dialog opens up. There, you can then search for entries and select them.

cayw-texstudio.png cayw-search.png cayw-texstudio2.png

Are you curious?

Try the CAYW feature in our current development version and explore the new functionality. Your opinion is highly appreciated: Please show up in our Feedback forum.

We are working on becoming fully compatible with the CAYW Endpoint of Better BibTeX for Zotero. For instance other formats such as pandoc or MultiMarkdown are on the roadmap. During GSoC, all bugs and concrete feature requests are tracked at a seperate issue tracker.

This post is licensed under CC BY 4.0 by the author.