3

The code below used to trick biblatex into assuming that the name Charles should be abbreviated as Ch (and not as one letter C.). It still happily works if I replace the backend from biber to bibtex, but emits C. if it's used as it is.

I've tested it on more or less up-to date TeXLive 2020. On the latest TeXLive 2019 it segfaults biber (!). On fairly old TeXLive 2015 it works as supposed to.

Is there any way to create multi-letter initials using the currrent TeXLive and biber?

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{key,
  author={Doe, {\relax Ch}arles},
  title={Some Article Title},
  journal={Some Journal},
  volume={1},
  year={2020}
}
\end{filecontents}
\usepackage[backend=biber,style=authoryear,firstinits=true]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
2
  • See also tex.stackexchange.com/q/422938/35864. This hasn't worked for a long time.
    – moewe
    Sep 1, 2020 at 17:23
  • Right! I've overlooked that question. So, I can create a sourcemap which would process {\relax Ch}arles by biber, and it'll be happily ignored by bibtex. Thank you! Sep 1, 2020 at 17:37

1 Answer 1

6

You can use the extended input method:

\documentclass{article}

\begin{filecontents}[overwrite]{ch-init.bib}
@article{key,
  author={given=Charles, given-i={Ch}, family=Doe},
  title={Some Article Title},
  journal={Some Journal},
  volume={1},
  year={2020}
}
\end{filecontents}
\usepackage[backend=biber,style=authoryear,uniquename=init,giveninits=true]{biblatex}
\addbibresource{ch-init.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

6
  • \usepackage{filecontents} is redundant; also uniquename=init is needed to avoid a warning (biblatex will set it anyway).
    – egreg
    Sep 1, 2020 at 17:02
  • @egreg thanks, I still overlook filecontents ;-). Sep 1, 2020 at 17:03
  • Nice! But totally not compatible with bibtex. So I can't use the same bib database with different backends... Sep 1, 2020 at 17:34
  • The bib files aren't completely compatible anyway. Sep 1, 2020 at 17:35
  • True, but so far I've managed to use only common fields. Sep 1, 2020 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .