Skip to content

custom author field in citar-templates #585

Answered by wsavran
wsavran asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for the tip. I'm happy about my first legit customization to my emacs. I'll share what I did in case its useful to anyone else.

edit: added response from below so its correct here.

I defined this function in my config.el

(defun ws.refs/prettify-author-names (names)
  "Makes list of author names prettier for viewing in citar"
  (let ((short-names (split-string (citar-shorten-names names) ", ")))
    (if (< 2 (length short-names))
        (concat (car short-names) " et al.")
      (string-join short-names " and "))))

and I set citar-display-transform-functions in my config.el like this

(setq citar-display-transform-functions
    '((t  . citar-clean-string)
     (("author") . ws.re…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@bdarcus
Comment options

@wsavran
Comment options

Answer selected by bdarcus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants