Sitemap | EndNote
Showing results for 
Search instead for 
Do you mean 
Reply
Regular
Posts: 11
Registered: ‎12-31-2018
0
Accepted Solution

Do forced separators not work before the last item in a template if that item is empty?

I am trying to get an EndNote style to play nice with inline citations. There are two citation templates defined for this style, Default and Author (Year). These are their definitions:

 

Default:

Author|⬦Year|⬦: Cited Pages

 

Author (Year):

Author|⬦(Year|⬦: Cited Pages|)

 

Of these two, the latter works precisely as expected: if the Cited Pages field is filled out, it yields James (2009: 195–97); otherwise it yields James (2009).

 

If the Cited Pages field is filled out, the Default template also works as expected, yielding James 2009: 195–97. But if the Cited Pages field is empty, it yields James 2009: , apparently ignoring the forced separator ‘|’ (the extra space at the end also gets included).

 

The only relevant difference between the two templates is that in the Author (Year) template the Cited Pages field is followed by another forced separator and an ending parenthesis. If I add a forced separator at the end of the Default template, EndNote automatically removes it, which indicates that, as expected, it has no function at the end (it would separate the citation from… nothing).

 

But it seems that it’s the presence of an ‘absolute’ element (i.e., plain text, an element that is guaranteed not to be empty) at the end of the template that makes the last forced separator work. If the last element in a template is a field, anything ‘attached’ to that field by forced separators seems to be output even when the field is empty.

 

Obviously, since the Default template should not contain any text at all after the year if the Cited Pages field is empty, that doesn’t work for me – but is there some way around it?

Mentor
Posts: 8,084
Registered: ‎04-10-2008
0

Re: Do forced separators not work before the last item in a template if that item is empty?

the space behind the colon needs to be "link adjacent" to work properly I think.  Attach the zipped output style to the message?

(long time Endnote user)
Regular
Posts: 11
Registered: ‎12-31-2018
0

Re: Do forced separators not work before the last item in a template if that item is empty?

So simple!

 

I thought I’d experimented my way through pretty much every single variation in existence, but apparently not this one. So I guess a regular space also acts as a separator, then, and forced separators are only to indicate a separation where there is no space?