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 provide certain bibliography entries with the option frg to achieve a bit of a different format than for the rest of my entries. Among other things, I want to have them sorted by editor instead of by author. My idea was to automatically copy the editor field to the sortname field to achieve this, so I used the following code in my bbx-file:

\newbool{cbx:frg}
\DeclareEntryOption{frg}[true]{\csuse{bool#1}{cbx:frg}}%
\AtDataInput{%
  \ifbool{cbx:frg}{%
     \savename*{editor}{\bbx@blah}%
     \restorename{sortname}{\bbx@blah}%
   }{}%
}%

but this does not seem to work.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

To ignore the author field for sorting (and use editor resp. title instead), simply add options = {useauthor=false}, to the respective bibliography entries. See section 3.3.3.1 of the biblatex manual for details.

\documentclass{article}

\usepackage{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  options = {useauthor=false},
  author = {Author, A.},
  editor = {Zuthor, Z.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  editor = {Yuthor, Y.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  editor = {Xuthor, X.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}
share|improve this answer
    
Is there a possibility to make my option frg imply the option useauthor=false? I'm trying to avoid having to alter the bib file.... Thanks! –  Jonathan Jul 4 '11 at 16:25
    
@Jonathan: I don't know how to do this. Sounds like a new question. –  lockstep Jul 4 '11 at 16:28

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.