|
| 1 | +--- |
| 2 | +title: JabRef offers basic Cite As You Write (CAYW) functionality |
| 3 | +tags: [gsoc] |
| 4 | +author: palukku |
| 5 | +--- |
| 6 | + |
| 7 | +Hello, I'm Philip, one of the [Google Summer of Code (GSoC) students at JabRef](https://summerofcode.withgoogle.com/programs/2025/projects/6Z6Fqv6g) this year, and I will be giving you a small introduction on JabRef's new Cite As You Write (CAYW) feature. |
| 8 | + |
| 9 | +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. |
| 10 | +This is especially true when working with large libraries, where the search can take a while. |
| 11 | +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. |
| 12 | + |
| 13 | +## Preparation on JabRef's side |
| 14 | + |
| 15 | +To use the CAYW endpoint, you need to have JabRef running and the HTTP server enabled. |
| 16 | +To enable the HTTP server, go to `File` → `Preferences` → `General` and under `HTTP Server` section check the box for `Enable HTTP Server`. |
| 17 | + |
| 18 | +## Connecting TeXstudio to the CAYW endpoint |
| 19 | + |
| 20 | +In the following example, we use [TeXstudio](https://www.texstudio.org/). |
| 21 | +Other editors are posible - read on at the [documentation on the cayw feature](https://docs.jabref.org/cite/cite-as-you-write). |
| 22 | + |
| 23 | +Open TeXstudio. Go to `Macros` → `Edit Macros`. Set a `Name` and a `Trigger` for the macro. |
| 24 | +After that you have to set the Type to `Script` and paste the following code into the `Script` field: |
| 25 | + |
| 26 | +```javascript |
| 27 | +var url = "http://localhost:23119/better-bibtex/cayw??format=biblatex&texstudio=true&minimize=true&command=cite" |
| 28 | +system("curl -sS '" + url + "'") |
| 29 | +``` |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +After that, you can save the macro and close the dialog by clicking `Ok`. |
| 34 | + |
| 35 | +## Using the CAYW endpoint |
| 36 | + |
| 37 | +After the configuration step, you can use the macro by typing <kbd>c</kbd><kbd>c</kbd><kbd>c</kbd>. |
| 38 | +Then, the search dialog opens up. |
| 39 | +There, you can then search for entries and select them. |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +## Are you curious? |
| 46 | + |
| 47 | +Try the CAYW feature in our [current development version](https://builds.jabref.org/main/) and explore the new functionality. |
| 48 | +Your opinion is highly appreciated: Please show up in our [Feedback forum](https://discourse.jabref.org/c/feedback/3). |
| 49 | + |
| 50 | +We are working on becoming fully compatible with the CAYW Endpoint of [Better BibTeX for Zotero](https://retorque.re/zotero-better-bibtex/citing/cayw/index.html). |
| 51 | +For instance other formats such as pandoc or MultiMarkdown are [on the roadmap](https://github.com/palukku/jabref/issues/13). |
| 52 | +During GSoC, all bugs and concrete feature requests are tracked at [a seperate issue tracker](https://github.com/palukku/jabref/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20label%3A%22component%3A%20cite-as-you-write%22). |
0 commit comments