In my bibliography, I need to abreviate first names keeping digraphs and trigraphs.
- John should be abreviated as J.
- Clare should be abreviated as Cl.
- Charles should be abreviated as Ch.
- Christine should be abreviated as Chr.
- Philippe should be abreviated as Ph.
- etc.
The solution is to modify the first name in the bibliographical data from
Charles
to
{\relax Ch}arles
The following example uses the \DeclareSourcemap customization macro in Biblatex to change Charles to {\relax Ch}arles but I'm looking for a more generic solution that would automatically modify all first names starting with two or three consonants.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Book1,
author = {Doe, Charles},
title = {An Important Book},
publisher = {Publisher},
date = {2012},
}
@book{Book2,
author = {Doe, Charlotte},
title = {Another Important Book},
publisher = {Publisher},
date = {2014},
}
@book{Book3,
author = {Smith, Theodore},
title = {A very Important Book},
publisher = {Publisher},
date = {2016},
}
\end{filecontents}
\usepackage[style=verbose,firstinits=true, backend=biber]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=author,
match={Charles},
replace=\regexp{\{\\relax \x20Ch\}arles}]
}
}
}
\addbibresource{\jobname.bib}
\begin{document}
\cite{Book1}
\cite{Book2}
\cite{Book3}
\end{document}

droit-fr. – ienissei Feb 23 '16 at 14:09