Bibliography formatter syntax: A question about dates

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
macula
Posts: 167
Joined: Mon Oct 19, 2009 1:14 pm

Bibliography formatter syntax: A question about dates

Post by macula »

Hi,

I am building a BibLaTeX style for Bookends (a sort of doomed effort, generally speaking, given the enormous number of required fields, far higher than the number of Bookends placeholders—but this is another issue altogether).

My definition for articles is the following:

Code: Select all

`@article{`w`,`
~author = {~a~}, ~ 
~translator = {~u3*~}, ~ 
~title = {~t~}, ~ 
{~shorttitle = {~s~}, ~^}
~titleaddon = {~u20~}, ~ 
~journaltitle = {~j~}, ~ 
~volume = {~v~}, ~ 
~number = {~i~}, ~ 
~date = {~d*~}, ~ 
~pages = {~p-~}, ~ 
~urldate = {~u4~}, ~ 
~editor = {~u8*~}, ~ 
~issuetitle = {~u12~}, ~ 
~publisher = {~u~}, ~ 
~url = {~z~}, ~ 
~month = {~u13~}, ~ 
~hyphenation = {~u16~}, ~ 
~note = {~u19~}, ~ 
~entrysubtype = {~u14~}~ 
`}`
¬
Note the asterisk (*) tucked into the date field: it is a symbol that, according to the manual, is used to treat the value it is attached to as a name. One would therefore expect it to be inconsequential when used with dates, yet it turns out that without it I never get the closing curly bracket to display. In other words, instead of

Code: Select all

@article{Winkler2006,
…
date = {2006}, 
…
}
Bookends produces

Code: Select all

@article{Winkler2006,
…
date = {2006 
…
}
While the asterisk works for me, as far as I can tell it is a hack. Am I missing something or did I run into a tiny bug?

Thanks.
Last edited by macula on Tue Mar 05, 2013 2:52 pm, edited 1 time in total.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Bibliography formatter syntax: A question about dates

Post by Jon »

I don't know what you mean by it's a "hack". The asterisk is to be used with user-defined fields, and it tells Bookends to treat that field like a name. It has no meaning with a date field, and may cause problems if used inappropriately (I don't understand why you think telling Bookends something should be treated like a name when it is not would be inconsequential). Don't do it.

Jon
Sonny Software
macula
Posts: 167
Joined: Mon Oct 19, 2009 1:14 pm

Re: Bibliography formatter syntax: A question about dates

Post by macula »

By "it's a hack" I mean that this "misuse" of the asterisk is the only way I know to get the desired result. Of course I am inclined to follow your recommendation and play by the book, Jon, but then how could I get the curly brackets to close? And why don't the curly brackets close when I remove the asterisk from the date field (while they close as expected in all other fields)?

Thanks again.
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Bibliography formatter syntax: A question about dates

Post by Jon »

I don't know why the misuse of the asterisk causes the closing curly bracket to not appear, but it's not worth the effort to figure out. It's not a bug. Don't misuse the asterisk and it won't happen).

Jon
Sonny Software
macula
Posts: 167
Joined: Mon Oct 19, 2009 1:14 pm

Re: Bibliography formatter syntax: A question about dates

Post by macula »

I'm sorry, Jon, perhaps I wasn't clear enough. My point is precisely that misusing the asterisk is the only way I know to get the closing bracket. Removing the asterisk to comply with the specifications actually prevents the closing bracket from appearing, even though according to my understanding of the formatter syntax it should appear. I hope we're on the same page now. :D
Jon
Site Admin
Posts: 10292
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Bibliography formatter syntax: A question about dates

Post by Jon »

No, I had it backwards. I tried your format and see what you do. I replaced the problematic line with

$date = {$d$}, $

and now get the closing bracket. So try that.

The formatting code has been rewritten from the ground up for the next major release, and your original format works properly there, so this will not be a problem in the future.

Jon
Sonny Software
Post Reply