I could succesfully config org-roam-bibtex
after a lot of tries.
This is my config if someone finds useful. I copied all the config from https://rgoswami.me/posts/org-note-workflow/
The part that gave me an issue is the org-ref-default-bibliography
which must be a list even if you have only one directory for your bibtex file (otherwise it will throw you an error).
(setq maikol/bibliography-path "~/Dropbox/org/roam/literature/library.bib")
(setq maikol/pdf-path "~/Zotero/storage/")
(setq maikol/bibliography-notes "~/Dropbox/org/roam/literature/")
(use-package! org-ref
;; :init
; code to run before loading org-ref
:config
(setq
org-ref-completion-library 'org-ref-ivy-cite
org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename-helm-bibtex
org-ref-default-bibliography (list "~/Dropbox/org/roam/literature/library.bib")
org-ref-bibliography-notes "~/Dropbox/org/roam/literature/bibnotes.org"
org-ref-note-title-format "* NOTES %y - %t\n :PROPERTIES:\n :Custom_ID: %k\n :NOTER_DOCUMENT: %F\n :ROAM_KEY: cite:%k\n :AUTHOR: %9a\n :JOURNAL: %j\n :YEAR: %y\n :VOLUME: %v\n :PAGES: %p\n :DOI: %D\n :URL: %U\n :END:\n\n"
org-ref-notes-directory maikol/bibliography-notes
org-ref-notes-function 'orb-edit-notes
))
(after! org-ref
(setq
bibtex-completion-notes-path maikol/bibliography-notes
bibtex-completion-bibliography "~/Dropbox/org/roam/literature/library.bib"
bibtex-completion-pdf-field "file"
bibtex-completion-notes-template-multiple-files
(concat
"#+TITLE: ${title}\n"
"#+ROAM_KEY: cite:${=key=}"
"#+ROAM_TAGS: ${keywords}"
"#+CREATED:%<%Y-%m-%d-%H-%M-%S>"
"Time-stamp: <>\n"
"- tags :: \n"
"* NOTES \n"
":PROPERTIES:\n"
":Custom_ID: ${=key=}\n"
":NOTER_DOCUMENT: %(orb-process-file-field \"${=key=}\")\n"
":AUTHOR: ${author-abbrev}\n"
":JOURNAL: ${journaltitle}\n"
":DATE: ${date}\n"
":YEAR: ${year}\n"
":DOI: ${doi}\n"
":URL: ${url}\n"
":END:\n\n"
)
)
)
(use-package! org-roam-bibtex
:after (org-roam)
:hook (org-roam-mode . org-roam-bibtex-mode)
:config
(setq orb-preformat-keywords
'("=key=" "title" "url" "file" "author-or-editor" "keywords"))
(setq orb-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
""
:file-name "literature/%<%Y-%m-%d-%H-%M-%S>-${slug}"
:head "#+TITLE: ${=key=}: ${title}
#+ROAM_KEY: ${ref}
#+ROAM_TAGS:
Time-stamp: <>
- tags :: ${keywords}
* ${title}
:PROPERTIES:
:Custom_ID: ${=key=}
:URL: ${url}
:AUTHOR: ${author-or-editor}
:NOTER_DOCUMENT: %(orb-process-file-field \"${=key=}\")
:NOTER_PAGE:
:END:
"
:unnarrowed t))))
(use-package! org-noter
:after (:any org pdf-view)
:config
(setq
;; The WM can handle splits
;;org-noter-notes-window-location 'other-frame
;; Please stop opening frames
;;org-noter-always-create-frame nil
;; I want to see the whole file
org-noter-hide-other nil
;; Everything is relative to the rclone mega
org-noter-notes-search-path maikol/bibliography-notes
)
)