emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [FR] relative buffer-local path to bib for org-cite biblatex
@ 2023-05-12 20:34 Panayotis Manganaris
  2023-05-12 21:03 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Panayotis Manganaris @ 2023-05-12 20:34 UTC (permalink / raw)
  To: emacs-orgmode

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FR] relative buffer-local path to bib for org-cite biblatex
  2023-05-12 20:34 [FR] relative buffer-local path to bib for org-cite biblatex Panayotis Manganaris
@ 2023-05-12 21:03 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-05-12 21:03 UTC (permalink / raw)
  To: Panayotis Manganaris; +Cc: emacs-orgmode

Panayotis Manganaris <panos.manganaris@gmail.com> writes:

> 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.

In the next release, the relative path will remain relative and
absolute path will remain absolute.

See https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5ec364a1ae327312da6f69766a2bec79bc7691e8

Handled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-12 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-12 20:34 [FR] relative buffer-local path to bib for org-cite biblatex Panayotis Manganaris
2023-05-12 21:03 ` Ihor Radchenko

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).