5

What is the difference between reftex-citation and org-reftex-citation?

And where can I find the documentation for org-reftex-citation referenced in this answer?

[1] Emacs manual: Creating citations

Christoph
  • 399
  • 1
  • 10

1 Answers1

3

You can find the documentation for org-reftex-citation by doing:

C-h f org-reftex-citation RET

In fact, you can use C-h f (describe-function) to look up documentation for any command or function that is available in your Emacs installation.

As for the difference between reftex-citation and org-reftex-citation: The former allows you to quickly insert citations into LaTeX documents, while the latter enables you to do the same for org-mode files. They are related in the sense that after identifying the correct .bib file to use for the current file, org-reftex-citation calls reftex-citation to insert a citation at point.

Bonus: More on getting help from Emacs itself

In addition to describe-function there are a number of commands that you can use to ask Emacs about itself. Some of the most useful ones are:

  • describe-variable (C-h v)
  • describe-key (C-h k)
  • describe-key-briefly (C-h c)
  • describe-mode (C-h m)
  • describe-package (C-h P)
itsjeyd
  • 14,586
  • 3
  • 58
  • 87
  • 2
    "The former allows you to quickly insert citations into LaTeX documents, while the latter enables you to do the same for org-mode files." - Which is to say that the former gives you something like `\cite{author99}` and the latter gives you something like `[[cite:author99]]`. Even in an org-mode file, if you mainly export from org-mode to LaTeX, `reftex-citation` may still be what you want. – Brian Z Apr 05 '15 at 13:23
  • thank you very much for your answers! I will try it out in the next days and will vote up as soon as I have enough points on this StackExchange site – Christoph Apr 05 '15 at 13:53
  • 2
    @BrianZ `org-reftex-citation` produces the same format as `reftex-citation` on my machine (`\cite{author99}`). I have zero customizations regarding `reftex` in my configuration. – itsjeyd Apr 05 '15 at 15:49
  • Hmm, I see. Then I guess the basic difference is in how they look for the bibliography file? – Brian Z Apr 05 '15 at 16:12
  • 4
    @BrianZ Yes, I think that's it. `org-reftex-citation` looks for a `#+BIBLIOGRAPHY:` line while `reftex-citation` collects relevant info from the `\bibliography` command. – itsjeyd Apr 06 '15 at 08:17