2

I'm trying to cite a paper where there's an umlaut in the name of both one of the authors and of the journal.

I've looked here and here and I've tried:

@article{ResonantBhabhafor1980,
    Author = {Reinhardt, J. and Scherdin, A. and M{\"{u}}ller, B. and Greiner, W.},
    Journal = {Zeitschrift f{\"{u}}r Physik A Atomic Nuclei},
    Number = {4},
    Pages = {367--381},
    Title = {Resonant Bhabha scattering at MeV energies},
    Volume = {327},
    Year = {1987}
 }

But I'm getting the error Extra }, or forgotten \endgroup. How can I avoid this?

In case it's relevant, I'm including

\usepackage[backend=biber,sorting=none]{biblatex}

Extra context: putting the umlaut in the author field works, putting it in the journal field doesn't

More context: i finally got a mwe going:

\documentclass[]{report}
\usepackage[UKenglish]{babel} % useful to change date format
\usepackage{csquotes} % prevents a warning with babel
\usepackage{hyperref}
\usepackage[backend=biber,sorting=none]{biblatex}
\usepackage[capitalise]{cleveref}
\addbibresource{Bibliography.bib}
\usepackage{ulem}

\begin{document} As discussed in \cite{ResonantBhabhafor1980}, Bhabha scattering provides an excellent method to study the potential existence of a particle of this nature.

\newpage
\printbibliography

\end{document}

commenting either \usepackage{ulem} or \usepackage[UKenglish]{babel} stops the error

Mico
  • 506,678
Beth Long
  • 297
  • 1
  • 10
  • I am unable to replicate the issue you say you've encountered using solely the information you've provided so far. Please extend your code snippet to create a minimally compilable example, starting with \documentclass and ending with \end{document}, that generates the problem behavior you wish to fix. – Mico Jun 11 '23 at 14:50
  • 1
    You actually don't need f{\"{u}}r in the journal field, f\"ur suffices. I get no error, however. If you plan to use BibTeX in other documents, write {Bhaba} and {MeV} in the title field. – egreg Jun 11 '23 at 14:51
  • I also cannot for the life of me reproduce the error in a minimal example. All I can say is that when I replace the \"u with just u it compiles without errors, but when i put the umlaut back it give me the error above. – Beth Long Jun 11 '23 at 15:20
  • 1
    Just a guess, but I suspect the problem is in a different .bib file item than the one you're showing. – Alan Munn Jun 11 '23 at 15:51
  • There's only one .bib file in the project – Beth Long Jun 11 '23 at 15:52
  • I mean a different record of the bib file, not a different .bib file. But when I compile your example I get an error unless load fontenc with the [T1] encoding (using pdflatex). – Alan Munn Jun 11 '23 at 15:56
  • @AlanMunn - which error message do you get? – Mico Jun 11 '23 at 15:57
  • @AlanMunn that works, post it as an answer and i'll mark it correct – Beth Long Jun 11 '23 at 15:58
  • @Mico "Extra } or forgotten \endgroup". I've reordered the package loading though, so that hyperref and cleveref are loaded last (as is usually good practice.) – Alan Munn Jun 11 '23 at 15:58
  • 1
    Often \usepackage{ulem} is not what people actually want. More often than not people actually want \usepackage[normalem]{ulem}. But maybe you don't even need ulem at all: Underlining is generally disliked in the world of typography (or in the LaTeX corner of that world, anyway). – moewe Jun 11 '23 at 20:52
  • it was the only way i could find to get strike-outs, which is only needed in the editing process, not the final document, but is still useful. This is good to know though. – Beth Long Jun 12 '23 at 14:05

1 Answers1

5

Compiling your example with pdflatex produces an error

 Extra }, or forgotten \endgroup.
 \UL@stop ... \UL@putbox \fi \else \egroup \egroup 
                                              \UL@putbox \fi \ifnum \UL@...

This can be overcome by adding

\usepackage[T1]{fontenc}

to the preamble.

In my example, I've moved the loading of hyperref and cleveref to the end, as is best practice with those packages. In this case, hyperref must be loaded before cleveref.

\documentclass[]{report}
\usepackage[UKenglish]{babel} % useful to change date format
\usepackage{csquotes} % prevents a warning with babel
\usepackage[T1]{fontenc}
\usepackage[backend=biber,sorting=none]{biblatex}
\usepackage{ulem}
\usepackage{hyperref}
\usepackage[capitalise]{cleveref}

\begin{filecontents}[overwrite]{\jobname.bib} @article{ResonantBhabhafor1980, Author = {Reinhardt, J. and Scherdin, A. and M{"{u}}ller, B. and Greiner, W.}, Journal = {Zeitschrift f{"{u}}r Physik A Atomic Nuclei}, Number = {4}, Pages = {367--381}, Title = {Resonant Bhabha scattering at MeV energies}, Volume = {327}, Year = {1987} } \end{filecontents} \addbibresource{\jobname.bib} \begin{document} \autocite{ResonantBhabhafor1980} \printbibliography \end{document}

Alan Munn
  • 218,180