John Kitchin’s org-ref is a great way to handle citations in Emacs' org-mode. It uses helm-bibtex to search for and select citatitions to insert, but does not support the corresponding ivy version. Org-ref does have an ivy search function, but it is not nearly as good as ivy-bibtex. Ivy-bibtex will insert citations into org documents, but its default format is not the same as it is in org-ref.
To fix that, I added the following to my init file:
|
|
This prompts for both pre and post-note text when selecting the citation. Here are the org-mode citations that are produced:
- Citation only: autocite:lewisCounterfactuals1973
- Citation with post-text: [[autocite:lewisCounterfactuals1973][::25]]
- Citation with pre-text: [[autocite:lewisCounterfactuals1973][As seen in::]]
- Citation with both pre and post-text: [[autocite:lewisCounterfactuals1973][As seen in::25]]
When exported, these produce the following LaTeX code:
\\autocite{lewisCounterfactuals1973}
\\autocite\[\]\[25\]{lewisCounterfactuals1973}
\\autocite\[As seen in\]\[\]{lewisCounterfactuals1973}
\\autocite\[As seen in\]\[25\]{lewisCounterfactuals1973}
I use Chicago parenthetical references – so these compile like this:
- (Lewis 1973)
- (Lewis 1973, 25)
- (As seen in Lewis 1973)
- (As seen in Lewis 1973, 25)