emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR] relative buffer-local path to bib for org-cite biblatex


From: Panayotis Manganaris
Subject: [FR] relative buffer-local path to bib for org-cite biblatex
Date: Fri, 12 May 2023 16:34:41 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

Hello, I just noticed that adding a local bibliography for use by the biblatex cite processor gets exported to latex as an absolute path.

`#+bibliography: main.bib`  exports to `\addbibresource{/home/me/etc/main.bib}`

I would like a setting to allow this to be a relative path if possible.

I usually generate a local bibliography when creating a manuscript repository intended to share. I'd rather have the local bib be defined relative to the main file in that case.

looking at `oc.el` I see no way to make this setting. but I image it'd be popular.

```elisp

(defun org-cite-list-bibliography-files ()
  "List all bibliography files defined in the buffer."
  (delete-dups
   (append (mapcar (lambda (value)
             (pcase value
               (`(,f . ,d)
                        (expand-file-name (org-strip-quotes f) d))))
           (pcase (org-collect-keywords
                           '("BIBLIOGRAPHY") nil '("BIBLIOGRAPHY"))
             (`(("BIBLIOGRAPHY" . ,pairs)) pairs)))
       org-cite-global-bibliography)))
```

I'll have to learn elisp soon. Thanks for maintaining my favorite tools! Best,

Panos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]