0

I am very new to Emacs and I am trying to figure out how to use org-mode and org-ref to write academic papers.

Following the instruction of org-ref setup, I was able to export org file to tex and pdf. However, the default citation type is not really for the journals in my research area (I believe it's just \cite{} in Tex and basically a number in [ ] in pdf). The author of org-ref package has kindly offered a way in the manual to change the default citation type to a couple of other types by pressing C-u in the helm citation selection buffer (to enter this selection buffer, it's C-c ] or SPC m i c in spacemacs) before actually inserting the citation into the org file. Another window of different types is expected to appear and allows users to choose what they want, such as citet, citep.

I noticed that C-u runs evil-scroll-up in spacemacs, which is very handy. This might cause the issue of not being able to choose citation types, or not (tried other distribution somehow still not working).

Would it be possible to help me with this? Many thanks.

2
  • Could you say what command exactly C-c ] is bound to? (Do C-h k to find out what command a key sequence is bound to). I have org-ref-version 1.1.1, and use the command org-ref-helm-insert-cite-link, which prompts me for the precise citation command I would like to use. Oct 27, 2017 at 10:20
  • Hi, @Reign of Error, it is the command you mentioned. Can you try type C-u while you are in the helm citation selection buffer? It should prompt citation types (like, author (year), or (author, year). Please let me know. Thanks.
    – Jin
    Oct 27, 2017 at 15:20

2 Answers 2

4

You may want to change the default citation type in your init.el file to the one you use a lot, e.g.:

(setq org-ref-default-citation-link "citep")

C-u is for a universal-argument in regular emacs. I think it is bound to Spc-u in Spacemacs. Maybe typing that inside the helm window will lead to alternate citation types.

0

I had the same trouble, and I hope this can help you. The function mentioned inside 'org-ref's manual (Pressing C-u inside helm) is currently not working. You can alternatively choose the citation type by pressing C-u C-c ], or simply changing the cite in cite:AnyReference2018 for the one that you are looking for (Eg: citep:AnyReference2018 equals to \citep{AnyReference2018}, and so on).

If you want to change the bibliography style, you just need to add the line \bibliographystyle{plainnat} to your file, replacing plainnat by the style that you want.

4
  • C-u C-c ] should prompt you to insert a label link, not an alternate citation link. Are you also using spacemacs? Pressing C-u inside helm works fine as far as I know in regular emacs. Nov 14, 2018 at 23:39
  • I'm using regular emacs (version 25.3.2) with org-ref (version 20190107.209) and C-u is bound to universal-argument, as you mentioned. Inside helm, C-u does nothing, as described by @Jin. Jan 28, 2019 at 18:00
  • It is C-u followed by enter. Is that what does nothing? Jan 29, 2019 at 2:16
  • I can't believe that it was just this. It worked now, thank you very much @JohnKitchin Jan 31, 2019 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.