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.

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")? :-)

share|improve this question
    
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
    
Have you asked Philipp Lehmann about this? –  Joseph Wright Dec 25 '10 at 9:19
    
@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

1 Answer 1

up vote 10 down vote accepted

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}
    
    \addbibresource{\jobname.bib}
    
    \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).

share|improve this answer
    
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

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.