emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Panayotis Manganaris <panos.manganaris@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [FR] relative buffer-local path to bib for org-cite biblatex
Date: Fri, 12 May 2023 16:34:41 -0400	[thread overview]
Message-ID: <07e3eab0-8cf5-905b-5a54-3917eb2dcf21@gmail.com> (raw)

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	other threads:[~2023-05-12 20:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 20:34 Panayotis Manganaris [this message]
2023-05-12 21:03 ` [FR] relative buffer-local path to bib for org-cite biblatex Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07e3eab0-8cf5-905b-5a54-3917eb2dcf21@gmail.com \
    --to=panos.manganaris@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).