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!
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.
<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...)