Closed matrixfang closed 3 years ago
Hi! Thank you for your request.
Please upgrade to the latest version of org-roam-bibtex
.
The newest changes allow to specify what to use as the slug. See orb-slug-source
variable. It's default value is citekey
, but you can also set it to title
.
(setq orb-slug-source 'title)
(setq orb-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
""
:file-name "${citekey}-${slug}" ;; use the citekey and a slug from the title
:head "#+TITLE: ${title}\n#+ROAM_KEY: ${ref}")))
"jack2020complex-the_community_structure_of_complex_networks.org".
By default org-roam--title-to-slug
is used to create a slug. You can use your own function, which you can set in org-roam-title-to-slug-function
.
When setting my own bib notes' file name, i set "orb-templates '(("r" "ref" plain (function org-roam-capture--get-point) "" :file-name "${slug}-${title}" :head "#+TITLE: ${title}\n#+ROAM_KEY: ${ref}" and then i get an example of "jack2020complex-The Community Structure of Complex Networks.org". How should I do if i want replace the space in the paper title with slash and lowercase all the words?