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.
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.
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”):
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:
: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 ?
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 ?
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
#+title: %\\1 %\\2 %^{Enter book title}
Pattern 2
#+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.