In my field, it is common to use author-year combinations or simply years as links to references. For example, an article might say:
An alternative was presented by Lewis (1968) and Stalnaker (1974).
The years link to bibliography entries. Can I replicate something like this in my notes? Ideally, I’d like to have the following:
(1) When selecting a link from bibtex-completion, I’m offered a choice of using the year or author+year as link text.
(2) The link is then inserted as ‘[[cite:lewis1986counterpart][1968]’, for example, which displays as just ‘1968’. (At the moment, it displays in full, with all the brackets.)
First, org is a structured format (like latex, or markdown), and citations are no different. Output presentation is more the focus of export or conversion.
But if you really want this …
… I think display config is handled by org-ref, so you’d want to check there.
BTW, the examples you gave would use the citet command.
Theoretically, it could be possible, but I agree with @bruce: do you really need to have them show in the proper format in your org files? As long as they get extended properly in your exports, wouldn’t be all right to just have the citekey, which contains the same information?
Thanks. That’s the response I’ve seen elsewhere to this kind of questions. It makes sense for writing articles, where the end product is the exported pdf. But my zettelkasten notes are not written to be exported. They are meant to be read as org files, so I’d like them to be as readable as possible.
(There are other aspects to this as well. For example, I want LaTeX formulas and equations to be rendered properly, rather than shown as source, etc. Basically, I want the org file to look as much as an exported article as possible.)
The problem is that, with Org-roam, we’re trying to stay true to Org-mode’s internals as much as possible, or to the default behaviour of the packages we employ, one of which is Org-ref. Org-ref provides us with the cite: links, which have their own formatting, and if we were to modify the way they work, it’d break compatibility with vanilla Org-mode and Org-ref.
Now, we can do it purely cosmetically, i.e., by fontifying the text with another version which might be retrieved via bibtex-completion, but this either introduces taxing operations upon loading/saving the file, or it has us modify the way cite: links work to display a description. The latter option could be discussed upstream.
@zaeph - any ideas why this isn’t working for me? Is there anything that org-roam is doing that would interfere with it, as it’s supposed to be default?
You can if you want to The minibuffer message has always worked, and I personally never really cared about the tooltip. I always chalked it up to one of those things that is supposed to function in his video but a lot of people had trouble with. Drag and drop PDF’s and url’s were others I remember being a common issue for people but I never bothered with them.
I believe that org-ref has citename: and citeyear: options as well. I couldn’t find it in the online docs but it’s referenced in the github issues section.
Uh, that’s weird. It’s working all right on my end, minus the weird formatting issues because of the lack of support for the CSL, i.e., the inclusions of all the {{…}} meant to preserve capitals.
The bulk of our efforts with ORB so far have been with bibtex-completion, potentially reflects the usage discrepancy we have. I could look into it, but we’ve got more pressing matters to address with Org-roam for now.
Thanks @zaeph, I agree it might be an upstream issue, but I’m not sure it belongs to org-ref or bibtex-completion.
bibtex-completion actually has an option to insert author-year links: bibtex-completion-format-citation-org-apa-link-to-PDF, which display roughly the way I want. But the link leads to a PDF, so it breaks access to my bibliography notes etc.
In a reddit post (that I can’t find anymore), jkitchin said links of the form [[cite:key][Author (Year)] would be in principle possible, but they would break exporting. I’m happy to break exporting, and I don’t see any other clash with org-ref. What I don’t understand is why these links don’t “fold in”, i.e. why ‘[[cite:key][text]]’ does not display as ‘text’.
@zaeph Am I wrong that org-ref has the capability to cite just the Author or Year? This recent issue on org-ref GitHub has jkitchin saying “There is definitely a citeyear and citeauthor defined in org-ref-natbib-types which should be included in org-ref-cite-types .” Or does that only apply to citation exporting rather than editor display?
@cobblepot I would guess everything refers to export. The bibtex key is used to point to the citation for all of the link types, but the types define different export options.
(setq org-ref-default-citation-link "citeyear") can be used to default to a certain type when inserting links, but it won’t look different in the editor.
Like @diagonallemma, I also care far more about org-mode readability than I do about exporting. For me, it works if I start making the link by opening the bibfile.
I put the cursor anywhere in the bibentry I want to link to. Then I do:
M-x org-store-link
and go to the .org file where I want to paste the link, and then:
M-x org-insert-link
The minibuffer displays the cite: link. If I hit return, it diplays a prototype link text. I edit that to taste and hit return. Then a folded cite: link appears in the org file.
This bulky procedure is cobbled together from this org-ref issue. I’ve never understood why it couldn’t be simpler, but the org maintainer says this is as good as it gets – he’s super-responsive, so if you want to know more, he’ll likely answer your question.
I will mention here, since it may have impact on this in the future: org will soon be getting native citation support. Part of that discussion could result in more robust ability to configure rendering.