1

I have a question concerning printing of citekeys (from citestyle) and an authors name in the text and bibliography. Consider the following MWE

\documentclass{scrartcl}
\usepackage[style=authoryear-comp,backend=biber]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib} @article{key1, author = {Art, Bee and Cee, De}, title = {F}, journal = {G}, year = {2020} } \end{filecontents}

\addbibresource{\jobname.bib}

\begin{document} \cite{key1}

\printbibliography

\end{document}

And say I am “Bee Art” and on my slides I would like to not show my name in full but an abbreviation. That is

  1. The current text key prints as “Art and Cee 2020” which I would like to postprocess to “AB and Cee 2020”
  2. The Bibliography “Art, Bee and De Cee (2020). “F”. In: G.” should read as “AB and De Cee (2020). “F”. In: G.”

I would like to be able to identify the author by Firstname (Given name) and Lastname, so let's assume the author “Bee Art” is unique.

Can something like the steps 1 and 2 be done in post processing, i.e. without modifying the .bib file?

For best of cases I would like to have two commands to set this i.e. setting

\renewcommand{\shortenFirstName}{Bee}
\renewcommand{\shortenLastName}{Art}

does the two points above (or in other words setting these two to De and Cee respectively shortens the second author as described above).

How can I hook into BibLaTeX like this?

Until now I Modified the .bbl manually, but this has to be redone after every biber, run, so I would like to see, whether it'S possible to do this directly.

Ronny
  • 6,110
  • 1
    Have a look at https://tex.stackexchange.com/q/519654/35864. – moewe Aug 08 '20 at 05:06
  • That works like a charm. I noticed that I did not use the name consistently in my bib (once with first name was abbreviated in the bib), after that it works really neat. So this is a duplicate of said link. I just did not think to search for that title :) – Ronny Aug 08 '20 at 14:00
  • Well, I guess the other question turned out to be an XY-problem, so finding it is tricky. You can use \replacenamewith several times, so different name versions in the .bib are no problem and need not be changed. Since you say this question is a duplicate I will close it as such. (Even though the titles are different, there is little point in copying the answer from there over here, so I think closing is sensible.) – moewe Aug 08 '20 at 14:04
  • I think this question might be found by some, they then get over to your solution, and that really solves this. Ah – I did not yet check for multiple replacements, will do that, too. But it's also nice to have one author unified in a bib-file. Thanks again for the help (since I can't accept an answer now!) – Ronny Aug 08 '20 at 14:28

0 Answers0