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 currently working on a biblatex style with support for movies, tv series and tv shows. A typical entry for a tv show would look something like this:

@movie{Newton:2012a,
Date = {2012-05-12},
Entrysubtype = {tv},
Organization = {ORF eins},
Title = {Newton}}

entrysubtype = tv is used to mark the entry as a tv show. There's no author or any kind of creator, since tv shows don't have directors in the traditional sense, organization is used for the tv station, date for the air date. An in-text citation would look like this: Newton (ORF eins, May 12 2012). A repeated citation wouldn't show station and date, just Newton.

I have all of this working, there's just one problem: When I have to quote different installments of the same show, I want the date printed for repeated citations to disambiguate the different citations. So a second quotation of the above entry would like look this I another episode of Newton was quoted: Newton (May 12 2012).

To do this I somehow need to determine whether a title is unique, and AFAICS biblatex doesn't offer any tools for this. I thought about working with some kind of dummy author, but I couldn't really figure out how to do this sensibly.

So the question is: How can I tell whether a title is unique.

(If needed, I will provide more code, but I think the general idea should be clear).

share|improve this question
    
A similar question was asked recently. I suspect only biber can provide a fully automatic solution for disambiguating labeltitle. It might be worth posting a feature request at github. –  Audrey May 14 '12 at 19:34

2 Answers 2

up vote 4 down vote accepted

Please try the betas of biblatex 2.0 and biber 1.0 which just been updated. There is now an option labeltitle which enables the extratitle field. This works like extrayear but tracks repeated labelname/labeltitle. For your situation, you could do something like:

\DeclareFieldFormat{citetitle}{%
  \iffieldundef{extratitle}{#1}{#1\space\mkbibparens{\printdate}}}

See the updated biblatex doc. Also, labeltitle is now customisable, like labelyear

share|improve this answer
    
Just tried it, works like a charm. Thanks a lot. –  Simifilm May 15 '12 at 14:31

I came up with something which can only be described as ugly hack, but which actually seems to work.

First I check whether author is undefined; if it is, I copy title to author and then do a \ifsingletitle test which checks whether there is more than one title from a certain author. Since the title of the show then functions as author, \ifsingletitle seems to do the job.

Here's the code in principle:

\ifciteseen % check whether it's a repeated citation
{\ifnameundef{author} % make sure that there is no author
{\savefield*{title}{\titlecheck}% copy the title to a new macro
\restorename{author}{\titlecheck}% copy the macro to author
\ifsingletitle % check whether author/title is unique
{<code for normal repeated citiations>}
{<code for citations which need to disambiguate>}
}
{…}
}
{…}

It isn't nice, but I don't see any essential problems.

UPDATE: Actually, this doesn't work. Seems like I can't copy the content of a field to a name list.

UPDATE 2: See plk's answer which actually works.

share|improve this answer
1  
I am looking into adding extratitle and a configurable labeltitle to biblatex 2.0/biber 1.0 to deal with this. I'll let you know when you can test it. –  PLK May 15 '12 at 9:05

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.