Using subsequent author substitute for more than one name variable

I've been developing a workaround for institutional author abbreviations in Zotero. With my workaround I use the author field as normal and the translator field for the abbreviation where applicable.

Everything works fine except when it comes to duplicate institutional authors in the reference list.
I've got the output so it has the abbreviation followed by the full institution author in brackets like this:

IEA (International Energy Agency) 2008

Here is the macro I am using to achieve this:


<macro name="author">

<choose>
<if variable="translator" match="any">
<names variable="translator">
<name name-as-sort-order="all" and="text" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="never"/>
<label form="short" prefix=" (" suffix=")" strip-periods="true"/>

</names>
<names variable = "author" prefix=" (" suffix=")">
<name form="short" name-as-sort-order="all" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="never" initialize-with="."/>
</names>
</if>
<else>
<names variable="author">
<name name-as-sort-order="all" and="text" sort-separator=", " initialize-with="." delimiter=", " delimiter-precedes-last="never"/>
<label form="short" prefix=" (" suffix=")" strip-periods="true"/>
<substitute>
<text macro="editor"/>
<text macro="noauthor_title"/>
</substitute>

</names>
</else>
</choose>
</macro>



My only problem is that when I come to using the subsequent author code it only substitutes for the abbreviation like so:

IEA (International Energy Agency) 2008
___ (International Energy Agency) 2009


I want it to substitute for both variables like so:

IEA (International Energy Agency) 2008
___ 2009

Is this possible to achieve?
  • The extended version of CSL recognized by Multilingual Zotero (MLZ) has support for long and short forms of an institution name (doc). An external plugin (the Abbreviation Filter) is used to supply the short form. The extended syntax only works in MLZ.

    This is the only way to support this format, as far as I know.

    The downside of using the extended syntax is that it is not valid CSL 1.0.1, and so cannot be hosted through the official CSL archive that stands behind the Zotero Style Repository.
  • Hi Frank

    I've tried the abbreviation filter but found it a bit confusing to be honest.

    Are you sure there's no way to trick the subsequent-author-substitute code into treating two variables as one?

    For instance, is there no way I could concatenate the two name variables into a third variable and run the subsequent-author-substitute on the third?

    Josh
  • For instance, is there no way I could concatenate the two name variables into a third variable and run the subsequent-author-substitute on the third?
    It is not possible to do that in CSL.
Sign In or Register to comment.