1

If I insert a citation into a .org file, (via helm-bibtex, citar or C-c C-l), I get a link in the buffer that looks like

Cite:&jaynesInformationTheoryStatistical1957.

I can do C-c C-l on the link and change the description to something a bit more readable, like Jaynes, 1957, or longer like Jaynes, Information Theory and Statistical Mechanics II.

Is there a way to make the link description automatically take a tidier format, or look like any of the commonly used citation styles, within the .org buffer itself? (I.e. I'm not concerned about what the citation looks like once the .org buffer is exported to .pdf document or a .tex file).

2 Answers 2

1

That looks like an org-ref link. I haven't used this package: https://github.com/alezost/org-ref-prettify.el, but it claims to do something similar to what you want.

Some alternatives include writing an interactive function to add the description of your choice, or add an :activate-func to the citation links that puts an overlay on them.

1
  • This was precisely what I was looking for, thanks! Thanks as well for all your work on org-ref; I started using it when I had nearly zero Emacs knowledge but it seems to have built itself into my workflow. Unfortunately that comes with a lot of technical debt but maybe one day I'll clean it up! May 3 at 18:02
1

Not sure about helm-bibtex but I use reftex and see pretty links in my Org buffer, but proper exported \textcite{...}, with this code. If I want it to look pretty I use T or P, other wise t or p.

(define-key global-map (kbd "C-c r") 'reftex-citation)
(setq reftex-cite-format
      '((?
 . "citep:%l")
    (?t . "citet:%l")   ; Author (YYY)
    (?T . "[[citet:%l][%A (%y)]]")   ; Author (YYY)
    (?p . "citep:%l") ; (Author, YYYY)
    (?P . "[[citep:%l][(%A, %y)]]") ; (Author, YYYY)
    (?n . "nocite:%l") ; (Author, YYYY) but NO EXPORT
    (?a . ",%l")  ;; add just a link to existing cite
    ))
6
  • Thanks! I think I can see what this is doing, and somewhere in the bowels of my config I have reftex, reftex-citation and org-reftex-citation. Unfortunately the formatting doesn't quite work, e.g. T gives me [[citet:jaynesInformationTheoryStatistical1957a][Jaynes ()]], and similarly for P -- there is some mashing of the link and the link description. I think I can debug this if I can find a spare hour. May 2 at 4:18
  • C-c t runs the command org-toggle-link-display (found in org-mode-map)
    – mankoff
    May 3 at 5:03
  • What is the BibTex entry for Jaynes 1957? Mine would be year = 1957,. Is yours Year or something else??
    – mankoff
    May 5 at 13:39
  • I have my entry as date = {1957-05-15},. There are two Jaynes papers from 1957 with the same title, so the second one is cited as 1957a. May 5 at 18:56
  • So this may be BibLaTeX vs BiBTeX. No YEAR, no reftex completion of year. Maybe change %y to something that pulls the string from the date field?
    – mankoff
    May 6 at 19:19

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.