Problem with parentheses in a bibliographic template

Writing a style for a journal which has the same problem with several different reference types. In each case it requires the formatted reference to include either or both of two fields within a single set of parentheses – e.g.

(Field 1 Field 2)  OR  (Field 1) if Field 2 is empty  OR (Field 2) if Field 1 is empty (or of course nothing at all – no parentheses – if Field 1 and Field 2 are both empty).

It gets worse. In one case, for example (for a Web Page reference) it requires formatting part of the reference as

"… (retrieved Access Date Access Year) … " (but not with the quotes). How to cope with a reference that has nothing in either the Access Date or Access Year fields? Or has both of them empty? I’d like to build a solution into the style template if it’s possible. Is it?

You want to utilize the Special Formatting Characters in the style, and that will eliminate any punctuation that is associated with an empty field.  The Link adjacent text (is really a non-breaking space and in the style appears as a centered little circle) and the Forced Separation (verticle bar).  For example  “|volVolume|:Issue|.” where  represents the non-breaking space/link adjacent and if there is no information in the record for Issue, then there is no : and then there is the period.  If there were no volume or issue, then that would end with just the period.  So in your example


(|Field1|Field2|)  (In endnote, you will have to replace the with the “link adjacent” from the insert field dropdown.)  It appears that endnote can “clear up” the resulting paired parenthesis if there is neither a Field1 nor a Field2. 


and try for your "… (retrieved Access Date Access Year) … " 


(|RetrievedAccess Date,|Access Year|)  (but if there is no Access Date (ie May 17), the “Retrieved” doesn’t appear either, but I assume that would rarely be the case)

I copied the main part of this from Annotated and modified to include the ( ). I assume that Retrieved is in the ... because in some record styles it just might be a field name.  To distinguish inserting the words from inserting the field names, the words to appear are put between ...s.

Message Edited by Leanne on 06-13-2009 08:28 AM

Thanks Leanne. I was surprised to find that putting the parentheses outside the pipes (rather than in with the fields they are to enclose) works correctly. I had expected otherwise.

The problem of “…(retrieved Access Date Access Year)…” still remains (and that’s the one that was really bothering me). As you note, if you set it up as you recommended then “retrieved” is lost if there is no Access Date. The Access Year then appears simply bounded by parentheses. Moving the retrieved outside the left pipe along with the left parenthesis doesn’t seem to work like putting the parenthesis there alone does? While this (no Access Date but an Access Year) should be the case only rarely, I have simply been trying to cover all possibilities. There’s no way to ensure that EndNote users will always carefully enter the Access Date (e.g. 25 March) and the Access Year (e.g. 2007) into the separate fields provided in the default Web Page reference type. But those that don’t are, I hope, much more likely to enter “25 March 2007” into the Access Date field and then leave the Access Year field empty. In which case there will be no problem. I’m going to rely on that!

Thanks for your usual timely help and real assistance. 

I was a bit surprised too, and had first constructed them with the pipes inside and outside the parentheses.  But I decided to see what would happen , and presto, it worked!  While undocumented, it is probably part of the  punctuation clean up facility that endnote uses.