On Apr 27, 2014, at 1:52, Jan David Hauck wrote:

> Thanks Christiaan!
> 
> I've tried to do it but there's one thing I didn't figure out. 
> 
> Here is what I used for book (basically from your suggestion on the other 
> thread):  
> 
> <$pubType=book?>
> <$authors.normalizedName.@firstObject/><$authors.@count=0?><$authors.@count=1?><?$authors.@count=2?>
>  and <$authors.name.@secondObject/><?$authors.@count=3?>, 
> <$authors.name.@secondObject/>, and 
> <$authors.name.@thirdObject/><?$authors.@count?>, 
> <$authors.name.@secondObject/>, <$authors.name.@thirdObject/>, et 
> al.</$authors.@count?>
> 
>       <$fields.Year/> <$fields.Title.stringByDeTeXifyingString/>. 
> <$fields.Address/>: <$fields.Publisher/>.
> 
> It works as it should for two-author / three-author entries but for entries 
> with one single author it gives me now:
> 
> Lastname, Firstname, , , et al.
> 
> What am I doing wrong?
> 

There is a "?" missing in the alternate condition tag <?$authors.@count=1?>

Also, perhaps one small simplification could be:

<$authors.normalizedName.@firstObject/><$authors.@count<1?><?$authors.@count<3?>
 and <$authors.name.@secondObject/><?$authors.@count<4?>, 
<$authors.name.@secondObject/>, and 
<$authors.name.@thirdObject/><?$authors.@count?>, 
<$authors.name.@secondObject/>, <$authors.name.@thirdObject/>, et 
al.</$authors.@count?>

> And: where should I logically place the same stuff for editors?
> 

It depends on what you want exactly. If you want the same template for editors, 
you could simply use "authorsOrEditors" instead of "authors". Otherwise, you 
can specify a different format using something like

<$authors?>
template for authors
<?$authors?>
template for editors
</$authors?>

Christiaan

> Thanks so much for your help! 
> 
> Jan
> 
> 
> 
> 
> 
> 
> On Sat, Apr 26, 2014 at 3:55 PM, Christiaan Hofman <[email protected]> wrote:
> 
> On Apr 26, 2014, at 23:34, Jan David Hauck wrote:
> 
>> Hello everybody, 
>> 
>> Two (hopefully) quick questions on templates: 
>> 
>> 1.) Same problem as: 
>> https://sourceforge.net/p/bibdesk/mailman/message/24924524/
>> trying to get the output for multiple authors:
>> Lastname, Firstname, Firstname Lastname, and Firstname Lastname. YYYY. Title
>> 
>> (FYI, all styles that are following [or inspired by] the Chicago Manual of 
>> Style will have this format, the "logic" behind it is  "always write authors 
>> as Firstname Lastname unless part of a list where Lastname is relevant for 
>> sort order, i.e., bibliographies"). 
>> 
>> Is there a more elegant solution for this than the one suggested:
>> 
>> <$authors.normalizedName.@.../><$authors.@...=0?>
>> <$authors.@...=1?>
>> <?$authors.@...=2?>
>>  and <$authors.name.@.../><?$authors.@...=3?>
>> , <$authors.name.@.../>, and <$authors.name.@.../><?$authors.@...?>
>> , <$authors.name.@.../>, <$authors.name.@.../>, et al.</$authors.@...?>
>> 
>> as it happens that even in the social sciences there are papers with up to a 
>> dozen authors and the above solution is a little cumbersome if you want to 
>> have it universally applicable. 
>> 
> 
> For a format as weird as this style, it must be something as cumbersome as 
> this, because it's not very consistent, to say the least. I am not sure how 
> many authors should be handled by this style, but it shouldn't be really more 
> cumbersome, just proper conditionals, whatever they need to be
>  (this one assumes to use et al after three names.)
> 
> 
>> 2.)  How do I get the "if no author display editor" behavior for templates?
>> 
>> Any help greatly appreciated!
>> 
>> Thank you!
>> 
>> Jan
> 
> 
> Use some conditionals based on the number of authors, and insert a template 
> using editors when there are no authors. For instance, in something like the 
> above you can insert something involving editors in the <$authors.@count=0?> 
> case.
> 
> Christiaan

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to