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 have a biblatex entry with eventdate defined as:

eventdate = {2012-09-01/2012-09-04}

Using the apa style, which does not have definitions for a date range, \printeventdate results in

September 1, 2012– 4

How do I format it such that it produces:

1-4 September, 2012

for

eventdate = {2012-09-01/2012-09-04}

and

28 September, 2012 - 3 October, 2012

for

eventdate = {2012-09-28/2012-10-03}

?

In another words, the day and month need to be reversed, and it needs to decide whether the month and year are both the same, if so compress the day field such that eventday-eventendday eventmonth, eventyear. Otherwise use eventday eventmonth, eventyear-eventendday eventendmonth, eventendyear.

MWE

\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes} 
\usepackage[style=apa,sorting=none,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
%Add eventdate
\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{title}%
  \ifthenelse{\NOT\iffieldundef{title}\OR\boolean{bbx:titleinauthpos}}{\newunit}{\setunit{\addspace}}\newblock
  \usebibmacro{editor+trans}%
  \setunit*{\addcomma\addspace}\newblock
  \usebibmacro{maintitle+booktitle}%
  \setunit{\addcomma\addspace}\newblock
  \printeventdate%
  \setunit*{\addspace}\newblock
  \usebibmacro{addinfo}%
  \newunit\newblock
  \printfield{series}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \printfield[apacase]{eventtitle}%
  \newunit
  \printfield{venue}%
  \newunit\newblock
  \usebibmacro{location+publisher}%
  \newunit\newblock 
  \usebibmacro{origyear}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \printfield{addendum}%
  \newunit\newblock
  \usebibmacro{related}%
  \usebibmacro{apa:pageref}%
  \usebibmacro{apa:finpunct}%
  \usebibmacro{finentry}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@INPROCEEDINGS{anon1,
  author = {Anon, A. N.},
  title = {A very interesting paper},
  booktitle = {Proc. {UKACC} International Conference on Control},
  date = {2010-09},
  eventdate = {2010-09-07/2010-09-10},
  venue = {Coventry},
  pages = {1--3}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

Anon, A. N. (2010, September). A very interesting paper. In Proc. UKACC international conference on control, September 7, 2010– 10 (pp. 1–3). Coventry.

share|improve this question

closed as too localized by Andrew Swann, lockstep, Claudio Fiandrino, Thorsten, Stephen Dec 18 '12 at 18:23

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Sorry it seems that asserting the default permeable option of eventdate=comp to biblatex fixes the problem. I don't know why since that should be the default! –  Mobius Pizza Dec 18 '12 at 14:56
    
biblatex-apa applies the custom apalong format to all dates. Default style settings in the biblatex manual generally don't carry over to style packages. For a question like this one it is important to create a MWE using the style and language in your actual document. –  Audrey Dec 18 '12 at 15:22
    
I see, the MWE does include the babel and declarelanguagemapping commands to illustrate the problem. In anycase since eventdate=comp fixes the above, this question can be closed. –  Mobius Pizza Dec 18 '12 at 15:30
    
I have also noticed biblatex-apa incorrectly handles booktitle by preceeding with "In" and eventdate field for inproceedings in terms of both the bug mentioned in the question here and that it is not printed. I have email these concerns to the maintainer. –  Mobius Pizza Dec 18 '12 at 16:31

Browse other questions tagged or ask your own question.