org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
571 stars 47 forks source link

Automatically detect PDF path through crossref and use it for new notes #154

Open lazzalazza opened 3 years ago

lazzalazza commented 3 years ago

InBook, inCollection and other such bibliographical entries may be linked via the "crossref" field to their respective Book, Collection, etc. entries; if these last high-level entries point to a PDF file, ORB (ver. 20201220.1653) is(apparently not using that path automatically when a new note for the lower-level (inBook, inCollection, etc.) entries is created.

I think it would be nice if ORB could automatically insert the correct path to the PDF file in the new notes (maybe when not set otherwise in the lower-level entries).

I don't know if this description is clear enough: if needed I can of course provide an example. Thanks for the great work!

myshevchuk commented 3 years ago

Yeah, great, everything is pretty clear and I like the idea. I'll look in to it.

myshevchuk commented 3 years ago

@lazzalazza Hi, sorry it took me so long to look at this. I started working at it and discovered that cross references are being resolved and have always been! ORB relies on bibtex-completion to get bibliographical information from bib files. And it seems that bibtex-completion, more specifically bibtex-completion-get-entry unconditionally resolves crossrefs. It works for any field, not just the file field.

Could you give me an example of your cross referenced entries, for which the crossrefs do not resolve? And any configuration options you set for ORB.