1

My co-authors are using Overleaf to prepare a manuscript using the Springer LNCS style (version 2.21). The bibliography entries contain names with various non-ASCII letters, such as the dotted G (Ġ), some (but not all) of which cause "Invalid UTF-8 byte sequence" errors when compiling with pdflatex. (Similar errors are triggered when compiling with xelatex and lualatex.) The problem seems to occur only when using Springer's bst file, but not when using BibTeX's default bibliography styles.

The problem is also reproducible when compiling the document offline with TeX Live 2022, which uses utf8 as its default input encoding. I've verified that the input files are definitely UTF-8–encoded and the offending characters are valid UTF-8 sequences. Using bibtexu instead of bibtex works around the problem, but there doesn't seem to be any way of telling Overleaf to use bibtexu.

What's the cause of the problem and what's the best way of fixing or working around it so that we can continue to use Overleaf? Unfortunately, we are obliged to use the Springer bibliography style, but perhaps there is some way we can patch it?

I suppose one workaround would be to rewrite the offending letters in the bib file with LaTeX command sequences (e.g., ${\mathrm{\dot{G}}}$ for Ġ), though this ends up mixing text and math fonts and prevents us from simply copying and pasting existing bibliography entries into the file. Besides, our bibliography file may contain dozens of different non-ASCII characters and it's not clear to us which need to be replaced. (The problem occurs with some letters but not others.)

Here is a minimal example demonstrating the problem:

\documentclass[runningheads]{llncs}

\begin{filecontents}{\jobname.bib}
  @incollection{foo,
  title = {Foo},
  booktitle = {Bar},
  author = {Mathurin, Élise and Mallia, Ġorġ},
  year = {2022},
}
\end{filecontents}

\begin{document}
\nocite{foo}
\bibliographystyle{splncs04}
\bibliography{\jobname}
\end{document}
12
  • I am quite sure that this accent can be written using tex code without math mode. Not at pc will check later
    – daleif
    Jun 10, 2022 at 12:32
  • 1
    Found it: {\.{G}}or{\.{g}} ought to do the trick
    – daleif
    Jun 10, 2022 at 12:35
  • @daleif Great; that takes care of the specific case of Ġ. But it would still be nice to have a generic solution that allows UTF-8 characters to be used as-is on Overleaf.
    – Psychonaut
    Jun 10, 2022 at 12:38
  • Hi, Tom from Overleaf Support here. There is probably a way how to use bibtexu, but I need to test this first to be sure... I'll be right back :)
    – yo'
    Jun 10, 2022 at 12:46
  • 1
    you can't use utf8 character at the begin of names, as bibtex tries to create initials here. But you can protect them by hiding them inside a command argument, e.g. {\relax{É}}lise Jun 10, 2022 at 13:03

1 Answer 1

1

(Tom from Overleaf Support here.)

There is a way to run bibtexu in place of bibtex in Overleaf, however, as noted by Ulrike Fischer, the tool is not in general well supported and shall be removed from TeX Live.

In order to run is, you can create a file called latexmkrc (without any file extension) in the top folder of your project, and add the following line to it:

$bibtex = `bibtexu %O %S`

However, I wasn't able to get bibtexu to work properly, so I'll leave that part to you, maybe you'll be luckier.

You must log in to answer this question.

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