5

I've stumbled upon a weird incompatibility between the and packages and . If there is an added citation with more authors than the maxcitenames parameter, then I get two pairs of errors when compiling:

Extra }, or forgotten \endgroup. }

Missing } inserted. }

MCVE:

\documentclass{memoir}
%DIF LATEXDIFF DIFFERENCE FILE

\usepackage{hyperref}

\usepackage[
            backend=bibtex,
            style=authoryear-ibid,
            defernumbers=true,
            maxnames=1,  %%% OPTION ONE: Change this to a number greater or equal to the maximal number of authors
            ]
{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{dr1957cat,
    title={The Cat in the Hat},
    author={Seuss, Dr. and Ginsburg, Avi},
    series={Beginner books},
    year={1957},
    publisher={Random House}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF and edited by me for the MCVE

\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFaddtex}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE

\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE

% OPTION THREE: Define this as:{\DIFadd}[1]{#1} and lose the intent
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF

\begin{document}

\DIFaddbegin
  \DIFadd{  %%% OPTION TWO: Comment out this line and the corresponding }
    \textcite{dr1957cat}
  }         %%% OPTION TWO: This is the corresponding }
\DIFaddend
. 'twas a good book.

\end{document}

I've figured out a few workarounds (noted in the MCVE), but can't figure out if this is a bug, by design, or why it happens. So, why do I have to use the workarounds?

P.S. The error occurs after this sequence (i.e. not before compiling the bibtex)

pdflatex mcve.tex
bibtex mcve
pdflatex mcve.tex

The problem can also be reproduced in

\documentclass{article}
\RequirePackage[normalem]{ulem} 
\usepackage[backend=bibtex]{biblatex}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{cite}{{\penalty-1}\space}

\begin{document}
  \uwave{\cite{sigfridsson}}

  \uwave{{\penalty-1}\space}
\end{document}

where the first line in the document environment causes the error, the second one is fine.

6
  • Interesting problem. A bit of experimenting shows that it is specifically the \bibstring{andothers} (which gives "et al.") command that causes trouble. Not sure why though ... (Also \bibstring{ibidem} for example is fine)
    – moewe
    Apr 17, 2016 at 12:43
  • A bit more digging shows that the problem is probably with \addabbrvspace (which is used in the andothers bibstring) and that someone here doesn't like explicit penalties set via \penalty.
    – moewe
    Apr 17, 2016 at 12:48
  • @moewe I must say that I have no idea what you're talking about. But I guess I asked for that when I asked the question. :) Apr 17, 2016 at 12:55
  • Unfortunately, my knowledge about what is going on here is pretty much exhausted with the two comments above. Would you mind if I edited your question with a slightly more stripped down version of your code example?
    – moewe
    Apr 17, 2016 at 13:01
  • 2
    The second example is pretty clear MWE and needs attention.
    – percusse
    Aug 13, 2016 at 21:30

0

You must log in to answer this question.

Browse other questions tagged .