Include series title if (and only if) vol. number exists

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
nicka
Posts: 226
Joined: Thu Feb 03, 2005 6:56 pm
Location: Oslo
Contact:

Include series title if (and only if) vol. number exists

Post by nicka »

I'm trying to tweak the APA 6th ed formats for book chapter and edited book to deal with those weird edited books that are halfway between books and journals.

What I want (for edited book) is something like this:

French, P. A. & Wettstein, H. K. (Eds.). (2001). Figurative Language. (Midwest Studies in Philosophy: Vol. 25) Boston, Mass.: Blackwell.

For book chapter, I need something like this:

Bezuidenhout, A. (2001). Metaphor and what is said: a defense of a direct expression view of metaphor. In P. A. French & H. K. Wettstein (Eds.), Figurative language. (Midwest Studies in Philosophy: Vol. 25, pp. 156–186). Boston, Mass.: Blackwell.

That is, I want the series title to show up, but only if there is a volume number.

Why? Well, it can be useful to keep series titles in references (and too much work to weed them all out) but I never want them to show up in the bibliography except for these cases where a journal is effectively a series of books.

I could create two new types, of course, but what I want is such a minor tweak it hardly seems worth it.
ozean
Posts: 461
Joined: Fri Mar 04, 2005 11:53 am
Location: Norway
Contact:

Re: Include series title if (and only if) vol. number exists

Post by ozean »

I am not 100% sure in which fields the series information in your example are, but it would be as simple as adjusting that section of the format by putting it into {} brackets. Here is an example:

{`(`seriesname_field`: Vol. `seriesnumber_field`)`}

This works since Bookends only produces output of these conditional brackets if _all_ of the fields that are requested inside are actually defined.

Usually this is used to provide alternative formatting in cases one field is missing (and then you need to separate the alternatives with ^ characters), but you can also make use of this logic for your demands.
nicka
Posts: 226
Joined: Thu Feb 03, 2005 6:56 pm
Location: Oslo
Contact:

Re: Include series title if (and only if) vol. number exists

Post by nicka »

Many thanks, Ozean. That works nicely. There's a complication, though, because the format that I am trying to modify has some other stuff that goes inside the same set of brackets.

Here's the APA 5th edition format for Edited Book:

e $(Ed++.)$. (d). t. `(`u2~ ed.~ $Vol. $v`)`. l: u`.`

The part I'm interested in is the bit that produces the parentheses if and only if there is an edition number (in field u2) or a volume number (in field v). That is, this part:

`(`u2~ ed.~ $Vol. $v`)`

What I'd like is to produce these brackets if there is an edition number or (there is a series title in field j _and_ a volume number), and otherwise have no brackets here. Is that possible?
Jon
Site Admin
Posts: 10073
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Include series title if (and only if) vol. number exists

Post by Jon »

I would think so. As ozean mentioned, you can use conditional groups to create hierarchies. For example,

{(a, d)^a}

tells Bookends to output

(author, date)

if the reference has both, and

author

(notice without the parentheses) if the date is missing. If both are missing nothing is output.

This is a simple example, but should illustrate the power of conditional groups.

Please see the User Guide for more details and examples of conditional groups in formats.

Jon
Sonny Software
Post Reply