3

I'm getting the microtype-related error ! Argument of \MT@res@a has an extra }. when trying to compile a BibLaTeX bibliography that contains a caracter with a caron accent (\v{a}, i.e., ǎ).

Here's a minimal example (file microtype.tex):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{biblatex}
\usepackage{filecontents}
\begin{filecontents}{microtype.bib}
@Article{         ref,
  author        = {Name, \v{a}},
}
\end{filecontents}
\bibliography{microtype.bib}
\begin{document}
\cite{ref}
\printbibliography
\end{document}

When compiling this file as follows:

pdflatex microtype
biber microtype
pdflatex microtype

I get the following error:

(/usr/share/texlive/texmf-dist/tex/latex/biblatex/lbx/english.lbx)
(./microtype.aux) (/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg
) (./microtype.bbl)
! Argument of \MT@res@a has an extra }.
<inserted text> 
                \par 
l.16 \end
         {document}
? 

Any ideas about how to fix this problem? Thanks a lot in advance!

The problem still occurs if I run biber --output-safechars microtype. Oddly enough, the problem does not happen with other accents, i.e., the document compiles fine with \'{a} instead of \v{a}. The error I'm having was also mentioned in another question but there are no specific insights there.

1 Answer 1

2

The error seems to be similar to the one described in Biber 2.4, microtype, and special characters

The workaround seems to consist in fixing the definition of \ifempty:

\begin{filecontents}{\jobname.bib}
@Article{ref,
  author = {Name, \v{a}},
}
\end{filecontents}

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{biblatex}
\addbibresource{\jobname.bib}

% fix the bad definition of \ifempty 
\makeatletter
\def\ifempty#1{%
  \protected@edef\z{#1}\expandafter\ifblank\expandafter{\z}%
}
\makeatother

\begin{document}

\cite{ref}

\printbibliography

\end{document}
2
  • I had missed the question you were linking to. Indeed, this seems to fix the bug. Thanks a lot for your help!
    – a3nm
    Commented May 9, 2016 at 12:38
  • 1
    This is fixed in version 3.4 which us in beta.
    – PLK
    Commented May 9, 2016 at 14:58

You must log in to answer this question.

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