# \twoacc fails in bibliography

I've used the \twoacc macro from covington.sty for years. Now I've upgraded to the latest texlive, and I get this error:

Runaway argument?
\u {|}\={y}] and \emph {\={e}o} in south-eastern Middle English\blx@endunit \ET
C.
! File ended while scanning use of \twoacc.
<inserted text>
\par
<*> twoacc


A MWE is:

twoacc.tex:

\documentclass[12t,a4paper]{article}
\usepackage{covington}
\usepackage[backend=biber]{biblatex}
\bibliography{twoacc}
\begin{document}
The development of OE \twoacc[\u|\={y}] and \emph{\=eo} in south-eastern     Middle English. % ok
\textcite{Ek}
\printbibliography % fails
\end{document}


twoacc.bib:

@book{Ek,
title=    {The development of OE \twoacc[\u|\={y}] and \emph{\=eo} in south-eastern Middle English},
author=   "Karl-Gustav Ek",
year=     "1972",
publisher="C. W. K. Gleerup",
series="Lund Studies in English",
volume="42",
}

• Apparently, Biber “normalizes” \u| into \u{|}, as if it were like \u a – egreg May 20 '17 at 16:58
• It is very difficult to make utf8<->latex macro encoding/decoding cover all cases. If the new version of covington makes this work again, I'd rather not put more special cases into biber. It is preferable to use UTF8 in the bibliography directly when possible as this is one of the main original motivations of biber in the first place. – PLK May 21 '17 at 13:18
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – samcarter is at topanswers.xyz Oct 26 '18 at 14:24

The new versions of Biber normalize \u x into \u{x}; I don't think there's any safe way for disabling this. A workaround:

\begin{filecontents*}{\jobname.bib}
@book{Ek,
title=    {The development of OE \mytwoacc{\u}{\=}{y} and \emph{\=eo} in south-eastern Middle English},
author=   "Karl-Gustav Ek",
year=     "1972",
publisher="C. W. K. Gleerup",
series="Lund Studies in English",
volume="42",
}
\end{filecontents*}

\documentclass[12pt,a4paper]{article}
\usepackage{covington}
\usepackage[backend=biber]{biblatex}

\newcommand{\mytwoacc}[3]{\twoacc[#1|#2{#3}]}

\begin{document}

The development of OE \twoacc[\u|\={y}] and \emph{\=eo} in south-eastern Middle English.
\textcite{Ek}

\printbibliography

\end{document}


In the .bbl file you'll find

\mytwoacc{\u{}}{\=}{y}


but it seems to be good enough for covington, when it does \twoacc[\u{}|\={y}].

By the way, I find such syntax very peculiar.

It seems to suffice to embrace the two arguments:

\begin{filecontents*}{\jobname.bib}
@book{Ek,
title=    {The development of OE \twoacc[{\u}|{\=y}] and \emph{\=eo} in south-eastern Middle English},
author=   "Karl-Gustav Ek",
year=     "1972",
publisher="C. W. K. Gleerup",
series="Lund Studies in English",
volume="42",
}
\end{filecontents*}

\documentclass[12pt,a4paper]{article}
\usepackage{covington}
\usepackage[backend=biber]{biblatex}

\begin{document}

The development of OE \twoacc[\u|\={y}] and \emph{\=eo} in south-eastern Middle English.
\textcite{Ek}

\printbibliography

\end{document}


However, I think this is something that needs to be fixed on the biber side.

• For the record, the next version of covington will introduce a new macro with a less odd syntax: \twodias{<upper diacritic>}{<lower diacritic>}{<char>}. The old macro \twoacc is kept for backwards compatibility but discouraged in the manual. – JSpitzm May 21 '17 at 10:00