# How to use extracted %^{keywords} from pdf as seperate filetags in note

**URL:** <https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240>\
**Category:** How To\
**Created:** [November 23, 2021, 2:51pm UTC](https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240 "2021-11-23T14:51:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashantnag93](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@prashantnag93](https://org-roam.discourse.group/u/prashantnag93)\
**Post date:** [November 23, 2021, 2:51pm UTC](https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240/1 "2021-11-23T14:51:22Z")

</div>

Hi @mshevchuk, I have ref template in a file as follows :

```auto
#+filetags: %^{keywords}

* %^{citekey}
:PROPERTIES:
:Custom_ID: %^{citekey}
:URL: %^{url}
:AUTHOR: %^{author-or-editor}
:NOTER_DOCUMENT: %^{file}
:NOTER_PAGE:
:END:

%?

```

which gives filestags as single comma-separated tag entry as  
`#+filetags: keyword1,keyword2,keyword3`

How can I set these keywords as separate tag entries as  
`#+filetags: :keyword1:keyword2:keyword3:`

---

<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:** [November 24, 2021, 10:25am UTC](https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240/2 "2021-11-24T10:25:03Z")

</div>

Hi @prashantnag93 just use the Elisp functionality of Org-capture templates. Something like this:

```auto
#+filetags: %(format ":%s:" (mapconcat #'identity (split-string "%^{keywords}" "," t " ") ":"))

```

You can wrap the Elisp expression into a custom function for brevity.

---

<div class="post-metadata">

**Author:** ![prashantnag93](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@prashantnag93](https://org-roam.discourse.group/u/prashantnag93)\
**Post date:** [November 24, 2021, 11:30am UTC](https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240/3 "2021-11-24T11:30:19Z")

</div>

Thank you @mshevchuk it worked for the citekey which has keywords but it give the following output for the empty keyword citekey  
`#+filetags: ::`

---

<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:** [November 24, 2021, 2:25pm UTC](https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240/4 "2021-11-24T14:25:24Z")

</div>

> [@prashantnag93](#):
>
> it worked for the citekey which has keywords but it give the following output for the empty keyword citekey

And what do you want it to be?

---

<div class="post-metadata">

**Author:** ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://org-roam.discourse.group/u/roi.holtzman)\
**Post date:** [January 7, 2022, 8:14am UTC](https://org-roam.discourse.group/t/how-to-use-extracted-keywords-from-pdf-as-seperate-filetags-in-note/2240/5 "2022-01-07T08:14:19Z")

</div>

I am trying to write a function to split the authors as you suggested in [here](https://org-roam.discourse.group/t/org-roam-bibtex-configuration/2340/4). Can you please explain what exactly is my function’s input?
