I came across citar, and I am trying to use citar-org-roam to take notes on academic papers. I must be missing something about usage/configuration. I get “Make sure ‘citar-notes-paths’ and ‘citar-file-note-extensions’ are non-nil” when I try to use citar-open-notes. If I set the ‘citar-notes-paths’ variable, then citar creates normal notes without using the template defined above.

Here’s what is in my init.el:

(use-package org-roam
  :custom
  (org-roam-directory "~/RoamNotes")
  (org-roam-completion-everywhere t)
  (org-roam-capture-templates
  '(("d" "default" plain "%?"
     :target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
		             "#+title: ${title}\n")
     :unnarrowed t)
    ("n" "literature note" plain "* Heading\n %?"
     :target (file+head "%(expand-file-name (or citar-org-roam-subdir \"\") org-roam-directory)/${citar-citekey}.org"
		             "#+title: ${citar-citekey} (${citar-date}). ${note-title}.\n#+created: %U\n#+last_modified: %U\n\n")
     :unnarrowed t)))
  :bind (("C-c n l" . org-roam-buffer-toggle)
            ("C-c n f" . org-roam-node-find)
            ("C-c n g" . org-roam-graph)
            ("C-c n i" . org-roam-node-insert)
            ("C-c n c" . org-roam-capture)
            ("C-c n j" . org-roam-dailies-capture-today)
        :map org-mode-map
        ("C-M-i" . completion-at-point))
  :config
  (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
  (org-roam-db-autosync-mode)
  (require 'org-roam-protocol))

(use-package citar
  :custom
  (citar-bibliography '("~/bib/referencess.bib"))
  :hook
  (LaTeX-mode . citar-capf-setup)
  (org-mode . citar-capf-setup))

(use-package citar-org-roam
  :after (citar org-roam)
  :config
  (setq citar-org-roam-note-title-template "${author} - ${title}")
  (setq citar-org-roam-capture-template-key "n")
  (citar-org-roam-mode))

Thanks for any and all suggestions!

  • telepath12OPB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    The citar-org-roam readme didn’t say anything about using org-roam-bibtex, but maybe I will give it a try.