Non-breaking hyphen for citation number range

Hello,

I have an issue with line breaks in word and citation number ranges, resulting in the split of the citation number range in e.g. "1-" on the first line and "5" alone on the next line.

What I would like to to is to customise the range-delimiter for citation-numbers with the non-breaking hyphen like this:


<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout vertical-align="sup" delimiter="," range-delimiter="&h2011">
<text variable="citation-number"/>
</layout>
</citation>


However, the range-delimiter option seems not to do anything at all in my test csl file. I tried it also with dummy values like "---".

Can someone please give me a hint how to apply this option to a csl ?

Thank you :)
  • edited May 15, 2020
    try range-delimiter="&#160;". (I'm also not sure if you can put range-delimiter there actually)
  • Though generally you would want to use an en dash (which is non breaking) rather than a hyphen of any sort as a range delimiter.
  • Thank you for the reply.

    The exchange with " " did not help.
    Unfortunately I am really struggling with the syntax myself.
    It seems to be incorrect as the exchange with a dummy value like "a" as range-delimiter still results in a "1-5" in my word document.
  • btw, it's page-range-delimiter, not range-delimiter.

    You can also put it into a locale section like so and it'll work:

    <locale xml:lang="en">
    <terms>
    <term name="page-range-delimiter">-</term>
    </terms>
    </locale>

  • Thank you!

    I had to modify it, but your suggestion gave me the proper idea!

    For anyone wondering, the correct term is this:


    <locale xml:lang="en">
    <terms>
    <term name="citation-range-delimiter">&#8209;</term>
    </terms>
    </locale>
  • I don't actually think the page-range-delimiter affects the citation collapse delimiter (it certainly wouldn't according to the specs and doesn't in my tests) and I wouldn't see how it can be customized at all.

    The default collapse delimiter should be an en-dash, which is not non-breaking (it will stay with the first number in a range. Split numeric ranges are usually OK in English typography, though.
  • Ah, didn't know there was a citation range. We all learned something here.
  • I guess the CSL org needs to modify its specs urgently.
Sign In or Register to comment.