put two variables/macros together in brackets if they have a value
Hello dear community.
I try to edit a zotero-style.
Currently, the entry I'm interested in is as follows:
<text macro="issuance" prefix=" (" suffix=")"/>
Now I want to add in the same brackets of "issuance" also the court who rendered the judgment ("authority"), but only if I have specified an authority.
I tried it with the following:
<text variable="authority" prefix=" (" suffix=" "/>
<text macro="issuance" prefix=" " suffix=")"/>
The problem is that a bracket is now missing if I have no authority specified...
Can cou please help me with a "if X then Y"-formulation?
(if "auhority" is defined, then put "authority" before "issuance" in the same brackets).
Many thanks for your valuable help!
I try to edit a zotero-style.
Currently, the entry I'm interested in is as follows:
<text macro="issuance" prefix=" (" suffix=")"/>
Now I want to add in the same brackets of "issuance" also the court who rendered the judgment ("authority"), but only if I have specified an authority.
I tried it with the following:
<text variable="authority" prefix=" (" suffix=" "/>
<text macro="issuance" prefix=" " suffix=")"/>
The problem is that a bracket is now missing if I have no authority specified...
Can cou please help me with a "if X then Y"-formulation?
(if "auhority" is defined, then put "authority" before "issuance" in the same brackets).
Many thanks for your valuable help!
<group delimiter=" " prefix="(" suffix=")">
<text variable="authority"/>
<text macro="issuance"/>
</group>
I very much recommend becoming familiar with groups&delimiters. They'll make your styles much more robust. See my longer discussion on this at my blog:
https://zoteromusings.wordpress.com/2013/10/28/writing-csl-features-and-best-practices/
I promise to read the suggested blog before asking any further questions (and apologize already in advance for possible further stupid questions...)