Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm citing an Icelandic guy whose last name has a first character Á (U+00C1). If I write his name in my bibliography with that character code (\char"00C1), the sorting works correctly. If, however, I define the character Á as \auppercaseacute in my preamble with \newcommand, the sorting fails. What is going on here?

\documentclass{article}
\usepackage{fontspec, filecontents}
\usepackage[style=authoryear]{biblatex}
%\newcommand{\auppercaseacute}{\char"00C1}
\begin{filecontents}{\jobname.bib}
@BOOK{mccartney1974,
    AUTHOR = "Paul McCartney",
    TITLE = "A cool book about guitars",
    YEAR = "1974"}
@BOOK{arnason2007,
    TITLE = "Íslensk orðabók",
    YEAR = "2007",
    EDITOR = "Mörður {\char"00C1}rnason"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cites{mccartney1974}{arnason2007}
\printbibliography
\end{document}

enter image description here

\documentclass{article}
\usepackage{fontspec, filecontents}
\usepackage[style=authoryear]{biblatex}
\newcommand{\auppercaseacute}{\char"00C1}
\begin{filecontents}{\jobname.bib}
@BOOK{mccartney1974,
    AUTHOR = "Paul McCartney",
    TITLE = "A cool book about guitars",
    YEAR = "1974"}
@BOOK{arnason2007,
    TITLE = "Íslensk orðabók",
    YEAR = "2007",
    EDITOR = "Mörður {\auppercaseacute}rnason"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cites{mccartney1974}{arnason2007}
\printbibliography
\end{document}

enter image description here

share|improve this question
    
Is there any specific reason why you can't use Á in this instance? I seem to remember to have read something about special treatment of {\char"xxxx} constructs by biblatex, but I can't find it now. –  moewe Oct 17 '13 at 21:33
1  
Biber doesn't perform macro expansion. The entry is alphabetized under "R". –  egreg Oct 17 '13 at 21:34
    
moewe: But as you can see, {\char"xxxx} works fine. As I said in another biblatex question (tex.stackexchange.com/questions/65490/…): I prefer defining my characters in terms of their Unicode codes, cuz then anyone can open my .tex and .bib files on any computer with any fonts, and know exactly what characters I intend to be displayed. That's a big deal in my field. Plus I use a lot of characters you can't just type on the keyboard. –  Sverre Oct 17 '13 at 21:36
1  
@Sverre If you are concerned with sorting, just say \newcommand{\auppercaseacute}[1]{\char"00C1} and use {\auppercaseacute{A}}rnason in the .bib file. But I'd not worry too much: if somebody is UTF-8 impaired it's their fault. –  egreg Oct 17 '13 at 21:44
2  
This should be fixed in biber 1.8. The problem was when wrapped in braces it would try to remove braces first which is fraught with problems. Now it doesn't try to do this. –  PLK Oct 19 '13 at 7:22
show 6 more comments

1 Answer

up vote 4 down vote accepted

This should be fixed in biber 1.8. The problem was when wrapped in braces it would try to remove braces first which is fraught with problems. Now it doesn't try to do this.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.