[HELP] multicitation delimiter
Do someone how to do the next thing in the in-text citation:
when there is only one article there is no problem, it is just 1
the problem is that when there is two articles, there should appear something like 2,3 with the delimiter =","
and when there is 3 articles it should be like
1-3
I have searched other style but I have not found any with this characteristics. I have thought to use an "if", but I do not know how to say {if two citation delimiter =","} {else delimiter="-"}
<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout delimiter="," vertical-align="sup" prefix="" suffix=" ">
<text variable="citation-number"/>
</layout>
</citation>
(modification from the "Journal of Agricultural and Food Chemistry" style)
when there is only one article there is no problem, it is just 1
the problem is that when there is two articles, there should appear something like 2,3 with the delimiter =","
and when there is 3 articles it should be like
1-3
I have searched other style but I have not found any with this characteristics. I have thought to use an "if", but I do not know how to say {if two citation delimiter =","} {else delimiter="-"}
<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout delimiter="," vertical-align="sup" prefix="" suffix=" ">
<text variable="citation-number"/>
</layout>
</citation>
(modification from the "Journal of Agricultural and Food Chemistry" style)
<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout delimiter="," vertical-align="sup">
<text variable="citation-number"/>
</layout>
</citation>
The collapse attribute turns the delimiter into a hyphen for ranges.
I made a stupid error with the citation test (not with the code), that's why it didn't collapse.
I've been wasting a lot of time trying to solve the "problem" :(
Thanks again, "problem" fixed
https://github.com/citation-style-language/styles/wiki/Submitting-Styles