# Make Org-Roam work with Org-Noter and Org-Ref

**URL:** <https://org-roam.discourse.group/t/make-org-roam-work-with-org-noter-and-org-ref/1968>\
**Category:** How To\
**Created:** [August 23, 2021, 9:47am UTC](https://org-roam.discourse.group/t/make-org-roam-work-with-org-noter-and-org-ref/1968 "2021-08-23T09:47:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainshoots](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@rainshoots](https://org-roam.discourse.group/u/rainshoots)\
**Post date:** [August 23, 2021, 9:47am UTC](https://org-roam.discourse.group/t/make-org-roam-work-with-org-noter-and-org-ref/1968/1 "2021-08-23T09:47:12Z")

</div>

I was trying to get `org-noter` to work within `org-roam` using the capture template below:

```auto
(setq org-roam-capture-templates
        '(;; store literature notes under `~/org/roam/reading_notes` directory.
          ("r" "reference" entry
"* ${title}\n:PROPERTIES:\n:NOTER_DOCUMENT:\n:END:\n%?" ;; custom variables like ${file} DO NOT work over here.
           :if-new (file+head "reading_notes/${citekey}.org"
                              "#+type: ${entry-type}\n#+author: ${author}\n#+title: ${title}\n#+file:${file}\n#+filetags: ")
           :unnarrowed t)))

```

This resulted in a very peculiar “peculiar error”. It seems that expansion variables like `${file}` DO NOT work in the 4th (i.e. `template`) section of the capture-template argument list.

After some trial-and-error, I came up with the hack below:

```auto
(setq org-roam-capture-templates
        '(;; store literature notes under `~/org/roam/reading_notes` directory.
          ("r" "reference" plain
           "%?"
           :if-new (file+head "reading_notes/${citekey}.org"
                              "#+type: ${entry-type}\n#+author: ${author}\n#+title: ${title}\n#+filetags:\n\n* ${title}\n:PROPERTIES:\n:NOTER_DOCUMENT: ${file}\n:END:\n")
           :unnarrowed t)))

```

This works as expected when I invoke the reference template via `orb-insert-link`, which would launch `ivy-bibtex` and let me choose a citekey.

Just wondering if there is a better way of getting org-roam, org-noter and org-ref work together so that reference notes are always created with org-noter in mind.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![mshevchuk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@mshevchuk](https://org-roam.discourse.group/u/mshevchuk)\
**Post date:** [August 23, 2021, 9:57am UTC](https://org-roam.discourse.group/t/make-org-roam-work-with-org-noter-and-org-ref/1968/2 "2021-08-23T09:57:52Z")

</div>

Hi, the 4th element of the list is the vanilla Org-capture template section, so Org-roam-style placeholders do not work there. This may change in the future. You can still use Org-capture prompt wildcards `%^{title}`. To keep your template clean you may want to use a file template specification instead of a template string. More details on how to use file templates can be found in the `org-capture-templates` docstring and an example of such a file in [the ORB manual](https://github.com/org-roam/org-roam-bibtex/blob/master/doc/orb-manual.org).
