# Biblatex, capitalization of arabic names and name prefixes

As we know, using the useprefix option, when name prefixes like von, della etc. are present in the bibliography, enables us to change name sorting as well as capitalize those prefixes using commands like \Citeauthor and similar.

Now, let's say I want to cite an arabic author, e.g. Abu Hamid Muhammad al-Ghazali. This name consists of:

1. First name: Abu Hamid Muhammad (not entirely true, but let's say it is)
2. Last name: Ghazali
3. A definite article: al

The problem: I want to write the author's name in the text using \Citeauthor which, just like \citeauthor, produces al-Ghazali. However, this is not proper (at least not in my language) because the rule is: if only the last name is cited, the definite article must be capitalized. Same goes for the bibliography if we have "lastname, firstname" scheme. Not to mention the beginning of the sentence.

One solution might be to define a custom name prefix. This would solve the capitalization problem simply by using the useprefix option, but now sorting of the bibliography would be wrong, since the name should be sorted under "G" (Ghazali), not under "A" (al-Ghazali). So, this isn't a perfect solution, though it may hold water, since I always can use the sortkey field.

So, can anyone advise what to do (except, of course, "you should write his last name manually, not using cite commands")? :-)

-
The name should be sorted under "G" in the bibliography. But should it be typeset as "al-Ghazali, Abu Hamid Muhammad" or as "Ghazali, Abu Hamid Muhammad al"? – lockstep Dec 12 '10 at 17:08
In my language (bosnian), we usually write: "Ebu-Hamid el-Gazali" or "El-Gazali, Ebu-Hamid", but (usually) sorting under "G". We never take the article away from the name (that is move them to separate places; if this is about to happen, we rather remove the article completely). – Meho R. Dec 12 '10 at 22:21
@Joseph, no, I haven't. I recently asked him about the issue with hyperref and spacing after a reference's title and before punctuation, so I don't want to bother him too much. For now, I'll have to do this manually I think. – Meho R. Jan 5 '11 at 13:00

Finally! Using a combination of \autocap, the shortauthor field and the sortkey field does the trick:

• Always typeset as "Al-Ghazali" for in text-citations;
• Typeset as "Al-Ghazali" resp. "al-Ghazali" in the bibliography, in accordance with the chosen naming scheme;
• Sorted under "Ghazali" in the bibliography.

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
@misc{Gha07,
author = {\autocap{a}l-Ghazali, Abu Hamid},
shortauthor = {Al-Ghazali},
sortkey = {Ghazali},
year = {2007},
title = {Gulf},
}
\end{filecontents}

\nocite{*}

\begin{document}

Some text \autocite{Gha07}. \Citeauthor{Gha07} showed that \dots

\DeclareNameAlias{sortname}{first-last}

\printbibliography[title={References with firstname--lastname'' scheme}]

\DeclareNameAlias{sortname}{last-first}

\printbibliography[title={References with lastname--firstname'' scheme}]

\end{document}


EDIT: A note for users that don't need to always capitalize names like "al-Ghazali" in citations, but nevertheless want them to be sorted under "Ghazali" in the bibliography: If you are using biber as a backend to biblatex, it is not necessary to add sortname fields in your .bib file. The hard-coded default configuration of biber will "ignore prefices like 'al-' when sorting name fields" (biber manual, section 2.1).

-
I think that's it. Will do some testing. Thanks a lot, lockstep :) – Meho R. Mar 25 '11 at 13:22
@Meho: You're welcome -- your question served as a constant challenge in the last months. :-) – lockstep Mar 25 '11 at 13:26