citation-style-language / schema

Citation Style Language schema
https://citationstyles.org/
MIT License
184 stars 61 forks source link

Do not use dashes for sequential numeric citations, i.e. [1,2,3,4] #150

Closed dhimmel closed 6 years ago

dhimmel commented 6 years ago

For reasons described in https://github.com/greenelab/manubot-rootstock/issues/118#issuecomment-375755931, I would like to use specify a numeric citation-format that does not apply dashes to sequences of numbers. For example, I'd like citations to appear as [1,2,3,4] rather than [1–4].

However, when using Pandoc with CSL, sequences of citations use an en-dash. Is there a way to disable this behavior? Is this a CSL issue or a Pandoc issue? I think it's a CSL issue because I see the dashes being added in the CSL online editor (see PLOS example):

Inline citations [1] [1–4] [1,3,5–13]

rmzelle commented 6 years ago

@dhimmel, this is a style-specific setting. See http://docs.citationstyles.org/en/1.0.1/specification.html#cite-collapsing.

To disable the cite collapsing, you would delete collapse="citation-number" on the <citation> tag of the numeric style. See the IEEE CSL style for an example (https://github.com/citation-style-language/styles/blob/7c73f73cf4a3d332c4841382dd7cd192f6cb27fe/ieee.csl#L214)