Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biber 1.7 and \DeclareLabeldate with optional entry type #11

Closed
dfussner opened this issue Aug 6, 2013 · 3 comments
Closed

Biber 1.7 and \DeclareLabeldate with optional entry type #11

dfussner opened this issue Aug 6, 2013 · 3 comments
Assignees

Comments

@dfussner
Copy link

dfussner commented Aug 6, 2013

Using biblatex 2.7a and biber 1.7, a call to \DeclareLabeldate in the
preamble fails if the call includes optional entry types within square
brackets. Any entry of the same type as that included in the
declaration will lack a labelyear field in the .bbl file, and biber -D
reports:

[1681] Biber.pm:1610> DEBUG - labeldate information of entry
james:ambassadors is unset

I also see several lines like this in the output when biber runs:

Use of uninitialized value in string eq at /tmp/.../inc/lib/Biber.pm
line 1552.

Use of uninitialized value in string eq at /tmp/.../inc/lib/Biber.pm
line 1572.

If you use the obsolete \DeclareLabelyear instead, then you do get a
labelyear in the .bbl file, but it's not the correct one, but rather
the one provided by the global definition of \DeclareLabeldate in
biblatex.def instead of the one from the declaration in the document preamble.

\DeclareLabeldate works fine so long as you don't specify entry types
in square brackets, and \DeclareLabeltitle seems to work fine both
with and without optional entry types.

I'm not certain when this began, perhaps with the switch to
\DeclareLabeldate from \DeclareLabelyear. It all worked properly in
biber 1.5. It may be that there is something peculiar to, and wrong
in, my setup?

I'll include a minimum working example below.

Thanks.

*** minexam.tex ***

\nonstopmode
\listfiles
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[latin1]{inputenc}
\usepackage[german,french,american]{babel}
\usepackage[autostyle]{csquotes}
\usepackage[style=authoryear,backend=biber,alldates=comp,%
babel=other,bibencoding=ascii]{biblatex}
\usepackage{ifthen}
\usepackage{setspace}
\usepackage{vmargin} \setpapersize{A4}
\setmarginsrb{1in}{20pt}{1in}{.5in}{1pt}{2pt}{0pt}{2mm}
\usepackage{url}
\DeclareLabeltitle[book]{%
\field{origyear}
\field{title}
\field{shorttitle}}
\DeclareLabeldate[book]{%
\field{eventyear}
\field{origyear}
\field{year}
\field{urlyear}}
\appto\bibsetup{\sloppy}
\appto\citesetup{\sloppy}
\setlength{\dimen\footins}{9.5in}
\setlength{\parindent}{0pt}
\newcommand{\cmd}[1]{\texttt{\textbackslash #1}}
\bibliography{tiny}
\begin{document}

This citation of a \textbf{Book} entry with two dates shows
\cmd{DeclareLabeltitle[book]} working and \cmd{DeclareLabeldate[book]}
failing: \autocite{james:ambassadors} --- this being the origdate of
the entry, italicized as the labeltitle, rather than provided as the
labeldate, absent both here and in the reference list below.

\printbibliography
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

*** tiny.bib ***

@string{cup = {Cambridge University Press}}
@string{oup = {Oxford University Press}}
@string{uchp = {University of Chicago Press}}
@string{hup = {Harvard University Press}}
@string{pup = {Princeton University Press}}
@string{ucp = {University of California Press}}
@string{sup = {Stanford University Press}}

@book{james:ambassadors,
title = {The Ambassadors},
date = 1996,
origdate = 1909,
author = {James, Henry},
publisher = {Project Gutenberg},
url = {ftp://ibiblio.org/pub/documents/books/gutenberg/etext96/ambas10.txt},
annote = {Presents an online edition of a book which, not
being inherently an online text, still uses a Book
entry. The origdate field is the date of the print
publication of the text that is now online.}
}

minexam.bbl:

\refsection{0}
\sortlist{entry}{nyt}
\entry{james:ambassadors}{book}{}
\name{labelname}{1}{}{%
{{uniquename=0,hash=c478ac19353c3947855cd8192165811f}{James}{J\bibinitpe
riod}{Henry}{H\bibinitperiod}{}{}{}{}}%
}
\name{author}{1}{}{%
{{uniquename=0,hash=c478ac19353c3947855cd8192165811f}{James}{J\bibinitpe
riod}{Henry}{H\bibinitperiod}{}{}{}{}}%
}
\list{publisher}{1}{%
{Project Gutenberg}%
}
\strng{namehash}{c478ac19353c3947855cd8192165811f}
\strng{fullhash}{c478ac19353c3947855cd8192165811f}
\field{sortinit}{J}
\field{labeltitle}{1909}
\field{annotation}{Presents an online edition of a book which, not being i
nherently an online text, still uses a Book entry. The origdate field is the dat
e of the print publication of the text that is now online.}
\field{origyear}{1909}
\field{title}{The Ambassadors}
\field{year}{1996}
\verb{url}
\verb ftp://ibiblio.org/pub/documents/books/gutenberg/etext96/ambas10.txt
\endverb
\endentry
\endsortlist
\endrefsection

@ghost ghost assigned plk Aug 6, 2013
@plk
Copy link
Owner

plk commented Aug 6, 2013

Greetings, yes this was a bug, but in biblatex (it was not writing the correct .bcf entry for type-specific labeldate). Please get biblatex 2.8 DEV version from SourceForge - it should work with biber 1.7.

@dfussner
Copy link
Author

dfussner commented Aug 6, 2013

Sorry for posting on the wrong list. I can confirm that the development version of biblatex is working fine here, at least when using \DeclareLabeldate instead of the deprecated \DeclareLabelyear. Many thanks!

@plk
Copy link
Owner

plk commented Aug 6, 2013

No problem - it wasn't clear to me where the problem lay either.

@plk plk closed this as completed Aug 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants