I want to write full names of authors in the LaTeX source, but assign different roles to them, and then via macro decide whether to print the full first name or just initials:
In the work of \artist{Iannis Xenakis}, as analysed by \researcher{John Doe}.
I think in the end I want as output:
In the work of Iannis Xenakis, as analysed by J Doe.
But I might want J. Doe or John Doe or just Doe -- and I want to keep this decision open, therefore the macros...
I am using biblatex, but I don't want to use \citeauthor because often the mentions are not directly related to a particular paper cited. Nevertheless, maybe I can reuse some macros that come with biblatex?
Here is my idea: I see that \DeclareNameFormat might provide a good way to define custom formats. But how would a macro using such a format to insert the name into the text look like? Might I use \citename{⟨key⟩}[⟨format⟩]{⟨name list⟩}? I understand that name list would be my source name as above, but what should I use as key?


biblatexhas implementations for this the other answer probably already does support those kinds of names – cgnieder Feb 16 '14 at 17:15biblatexwhich already has styles for the various name types. – cgnieder Feb 16 '16 at 09:41