# Template for reading note

**URL:** <https://org-roam.discourse.group/t/template-for-reading-note/3620>\
**Category:** Requests\
**Created:** [October 16, 2024, 9:11pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620 "2024-10-16T21:11:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Postroutine](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Postroutine](https://org-roam.discourse.group/u/Postroutine)\
**Post date:** [October 16, 2024, 9:11pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/1 "2024-10-16T21:11:14Z")

</div>

Hello,

I try to understand how to make a capture template for taking notes while reading.

My goal is, the first time I read a book/article:

- I create a node representing the book/article
- On the node creation, I get asked source title, author name, year, etc
- If I have a digital copy of the book/article, I attach a copy with attach feature of Org-mode

Then, as I read, I add notes as org heading inside the Org-roam node. If I have attached a copy of the book/article, I use org-noter.

And when I search for the nodes representing the books/articles, I would like to see the title + author + year.

I have done some tries with the org-roam captures templates, but I always have problems.

If I choose to have a node representing a book/article, I didn’t find how to set custom properties of this node to store author, year, etc.

If I create a heading inside the node to represent the book/article, the book is no longer the node and I have only 1 level 1 heading. Which is not optimal. And the title, author and year is asked two times: For the node creation and for the node content creation.

Any suggestions ?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 17, 2024, 6:32am UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/2 "2024-10-17T06:32:21Z")

</div>

You had this solution before: [Try to understand how the templates work in org-roam-capture-templates - #4 by Postroutine](https://org-roam.discourse.group/t/try-to-understand-how-the-templates-work-in-org-roam-capture-templates/3536/4)

And you say this:

> [@Postroutine](#):
>
> I have done some tries with the org-roam captures templates, but I always have problems.

What are the problems?

---

<div class="post-metadata">

**Author:** ![Postroutine](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Postroutine](https://org-roam.discourse.group/u/Postroutine)\
**Post date:** [October 17, 2024, 12:43pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/3 "2024-10-17T12:43:27Z")

</div>

On the previous thread, I have difficulties to understand how org-roam capture templates work. Now, I have a better understanding. I still have some part I’m not sure, but nobodies have replied to my last questions.

After that, I have tried to create a template that I’m not happy with. So, I create a different thread to ask what template would be best for my usage.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 17, 2024, 2:29pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/4 "2024-10-17T14:29:01Z")

</div>

Sure. There is nothing wrong with creating a new thread. What have you tried and what are remaining issues?

Is this the only remaining issue?

> If I choose to have a node representing a book/article, I didn’t find how to set custom properties of this node to store author, year, etc.

If I go back to the previous thread, you seem to have found a solution — that’s how I read it. So I am scratching my head asking: there seems to be a solution but it has some issues? What are they?

> And I added this on the top of my template file (“~/Roam/templates/literature.org”):
> 
> ```auto
> #+title: %^{Year}, %^{Author}: %^{Title}
> #+filetags: :literature:
> 
> ```
> 
> And finally, I replaced each ${key} with %^{key}, so I can use %\1, %\2, etc to reuse asked values.
> 
> With this, I finally have a simple literature note capture

---

<div class="post-metadata">

**Author:** ![Postroutine](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Postroutine](https://org-roam.discourse.group/u/Postroutine)\
**Post date:** [October 17, 2024, 11:26pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/5 "2024-10-17T23:26:01Z")

</div>

The solution I have chosen at the post you have cited, is to not use the target template and only the content template. If I remember correctly.

But I didn’t like this solution, because:

- I create a node without using the node (target) template
- The title is asked to me and not re-used from the node title
- At the end, I still have the problems I have written on this thread first post (except the parts asked twice, if I not define a target template)

If I create a new node with the org-roam capture template I have defined, I get this result:

```auto
:PROPERTIES:
:ID: 9855206c-9ca4-44fb-87f7-29627de915c2
:END:
#+title: 1999, me, test
#+filetags: :literature:

* test
:PROPERTIES:
:Author: me
:Publisher: you
:Release_year: 1999
:URL: https://example.org
:END:

```

I have a node representing the book, then inside it I have a heading also representing the book. The book properties are attached to the heading, not the node. And the node title is only like that so when I search for my noted I can see “YEAR, author, title”.

What I would like to have:

- A node representing a book
- All properties attached to the node
- The only heading inside the nodes should be the notes
- When I search for my notes, each literature note appear in the format “YEAR, author, title”
- Other notes appear in the format “title”
- If I have a digital copy of a book, I attach it to the node

But maybe what I search to do is not the correct way. Maybe I need a separated node with all read books as a heading, repsective properties attached to them and a link to a node representing their notes ?

Or maybe something else ?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 18, 2024, 6:32pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/6 "2024-10-18T18:32:51Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/0/05158108f8d9005afc8bd15ee435475d24a6e735.png)

I am guessing this is what you are after (?).  
I have changed some details:

- File name your content template org file
- Target file name.
- Removed URL property (I thought you’d manually enter it anyway).

```auto
(add-to-list 'org-roam-capture-templates
             '("b" "Literature note (book or article)" plain
               (file "~/tmp/lit.org")
               :target (file+head
                        "lit/%<%Y%m%d%H%M%S>-literature-${slug}.org"
                        ":PROPERTIES:
:Author: %^{Author}
:Release_year: %^{Year}
:END:
#+title: %\\1 %\\2 %^{Title}
#+filetags: :literature:")
               :unnarrowed t))

```

The content of file `~/tmp/lit.org` is as follows.

```org

# If I have the numeric copy of the book, attach it

** Synopsis

%?

** Notes

# Use Org-noter if numeric book is attached"

```

Did I capture what you want correctly?

---

<div class="post-metadata">

**Author:** ![Postroutine](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Postroutine](https://org-roam.discourse.group/u/Postroutine)\
**Post date:** [October 18, 2024, 7:32pm UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/7 "2024-10-18T19:32:23Z")

</div>

Yes, this is what I was searching for.

I was sure it was not possible to set custom properties with target node template. I think I have read it somewhere that it was not possible and my brain have record it. But I’m happy to see it’s possible.

And if was defining a target and a content templates, I had difficulties with re-usable values between the 2 templates.

The slug in the file name and the title are different ?

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [October 19, 2024, 7:50am UTC](https://org-roam.discourse.group/t/template-for-reading-note/3620/8 "2024-10-19T07:50:39Z")

</div>

> [@Postroutine](#):
>
> The slug in the file name and the title are different ?

Yes. I think it’s better to see it for yourself. Replace this part of the template `#+title: %\\1 %\\2 %^{Title}`,with the following two patterns and compare.

Pattern 1

```auto
#+title: %\\1 %\\2 %^{Enter book title}

```

Pattern 2

```auto
#+title: %\\1 %\\2 ${title}

```

For Pattern 1, the text inside the curly brackets is only the text for prompt; for human to see on the screen. For Pattern 2, it’s the name of the node property, which is used by the slug.
