Adding "container-title" and "volume" to macro name "author"
I'd like to add
But if I add one
How can I fix this?
Thanks in advance.
"container-title" and "volume" to <macro name="author">.But if I add one
text variable string after another, only the first shows up as a reference.How can I fix this?
Thanks in advance.
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
Upgrade Storage
I'm editing American Psychological Association 6th Edition in order to support references to Swedish legislations. As such, I'm trying to create a version of the item type statute where I can refer to, for example, a Swedish law as per this model:
SFS 19XX:XX. Name of Act. http://foo.bar
By using the following Zotero fields:
Item type: Statute
Name of Act: "Name of Act"
Code: SFS
Code Number: 19XX:XX
URL: http://foo.bar
Since I want to have "code" and "code number" in the beginning of the reference and citation, I have tried to add this to the macro field "author", but with no luck yet.
<substitute>, which only prints the first element that's present. You'll want them outsides the entire<names>complex.My issue is that the Name of Act is still showing up as per (SFS 19XX:XX“Name of Act”)
<macro name="author-short"><if type="legislation" match="any">
<text variable="container-title" suffix=" "/>
<text variable="volume"/>
</if>
<names variable="author">
<name form="short" and="symbol" delimiter=", " initialize-with=". "/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<choose>
<if type="report">
<text variable="publisher"/>
<text variable="title" form="short" font-style="italic"/>
</if>
<else-if type="legal_case">
<text variable="title" font-style="italic"/>
</else-if>
<else-if type="book graphic motion_picture song" match="any">
<text variable="title" form="short" font-style="italic"/>
</else-if>
<else-if type="bill" match="any">
<text variable="title" form="short" font-style="italic"/>
</else-if>
<else-if variable="reviewed-author">
<choose>
<if variable="reviewed-title" match="none">
<text variable="title" form="short" font-style="italic" prefix="Review of "/>
</if>
<else>
<text variable="title" form="short" quotes="true"/>
</else>
</choose>
</else-if>
<else>
<text variable="title" form="short" quotes="true"/>
</else>
</choose>
</substitute>
</names>
</macro>
<choose>tags around the<if>condition.http://validator.citationstyles.org/
If not, you'd need to fix that. If it does, I'd need to see the whole thing. Post to gist.github.com (no need to register), create a secret gist, post the link here.
Here's a gist. https://gist.github.com/bjornekstrom/284917253810479289f1344a409272d9
SFS 19XX:XX"Name of Act") for the citation, correct?
To avoid having the title appear, use something like
<else-if type="legislation"/>in the substitute section of the author-short macro.
<else-if type="legislation" match="any">
<text variable="container-title" suffix=" "/>
<text variable="volume"/>
</else-if>
in-between substitute, I only end up with "(SFS )" as a citation. I.e., the "container-title" but not the "volume" variable.
<else-if type="legislation"/>was meant literally.