Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upQuestion about combining multiple conditions #4882
Open
Comments
(I'd generally put "how to" questions on our discourse forum discourse.citationstyles.org/ but it doesn't matter terribly). I think the shortest version is <macro name="locator">
<choose>
<if type="legislation legal_case" match="none">
<group delimiter=" ">
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</if>
<else-if locator="section paragraph" match="any">
<text variable="locator" prefix=" § "/>
</else-if>
<else>
<group delimiter=" ">
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</else>
</choose>
</macro> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
danmichaelo commentedJun 23, 2020
•
edited
Hope this is the right place to ask questions, CONTRIBUTING.md seemed to suggest it is.
I'm working on an update to
universitetet-i-oslo-rettsvitenskap.csl
and struggle a bit with combinations of conditions. I'm also quite new to CSL. My goal is to format the locator in a special way if (locator is "section" OR "paragraph") AND (type is "legislation" OR "legal_case" OR "bill").This matches too much:
(for instance locator=section, type=book)
While this matches too little / nothing(?):
Is there a way I can express this without resorting to multiple levels of s and having to repeat the
<else>
section? Here's my full macro at the moment: