# page ranges

**URL:** <https://discourse.citationstyles.org/t/page-ranges/925>\
**Category:** CSL Development\
**Created:** [November 27, 2010, 5:53pm UTC](https://discourse.citationstyles.org/t/page-ranges/925 "2010-11-27T17:53:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrea\_Rossato1](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Andrea\_Rossato1](https://discourse.citationstyles.org/u/Andrea_Rossato1)\
**Post date:** [November 27, 2010, 5:53pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/1 "2010-11-27T17:53:59Z")

</div>

Hi,

I saw Frank updated the styles with date ranges so to use en-dash  
instead of hyphens for delimiting ranges.

Shouldn’t we use en-dashes for page (and other numeric) ranges too? (I  
had this thought while implementing the page-range-format option).

Andrea

PS: citeproc-hs now supports bibsection for bibliographic output  
selection, and successfully passes the bibsection group of tests.

---

<div class="post-metadata">

**Author:** ![Andrea\_Rossato1](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Andrea\_Rossato1](https://discourse.citationstyles.org/u/Andrea_Rossato1)\
**Post date:** [November 27, 2010, 6:37pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/2 "2010-11-27T18:37:53Z")

</div>

Another question: is correct to use the “page-range-format” attribute  
also for formatting the locator?

Andrea

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [November 27, 2010, 7:11pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/3 "2010-11-27T19:11:00Z")

</div>

I’d say yes, we should consistently use en-dashes for all numeric ranges.On Nov 27, 2010 12:54 PM, “Andrea Rossato” \<@Andrea\_Rossato1\> wrote:

> Hi,
> 
> I saw Frank updated the styles with date ranges so to use en-dash  
> instead of hyphens for delimiting ranges.
> 
> Shouldn’t we use en-dashes for page (and other numeric) ranges too? (I  
> had this thought while implementing the page-range-format option).
> 
> Andrea
> 
> PS: citeproc-hs now supports bibsection for bibliographic output  
> selection, and successfully passes the bibsection group of tests.

* * *

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 27, 2010, 10:16pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/4 "2010-11-27T22:16:04Z")

</div>

> > Hi,
> > 
> > I saw Frank updated the styles with date ranges so to use en-dash  
> > instead of hyphens for delimiting ranges.
> > 
> > Shouldn’t we use en-dashes for page (and other numeric) ranges too? (I  
> > had this thought while implementing the page-range-format option).
> 
> Another question: is correct to use the “page-range-format” attribute  
> also for formatting the locator?

Good point. At the moment, I’m pretty sure that citeproc-js doesn’t  
touch the locator content, but when the label attribute is set to  
“page”, at least the first run of numbers (with any ampersand, comma,  
or hyphen delimiter cruft) could be reformatted, with the ranges  
normalized. Shall we add that to the specification, and build some  
tests?

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 27, 2010, 10:18pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/5 "2010-11-27T22:18:19Z")

</div>

> Hi,
> 
> I saw Frank updated the styles with date ranges so to use en-dash  
> instead of hyphens for delimiting ranges.
> 
> Shouldn’t we use en-dashes for page (and other numeric) ranges too? (I  
> had this thought while implementing the page-range-format option).
> 
> Andrea
> 
> PS: citeproc-hs now supports bibsection for bibliographic output  
> selection, and successfully passes the bibsection group of tests.

That’s great! With bibsection, you can cover a use case for the  
classics, where standard references in the citations are excluded from  
the bibliography.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 27, 2010, 10:22pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/6 "2010-11-27T22:22:50Z")

</div>

> I’d say yes, we should consistently use en-dashes for all numeric ranges.

Very good. Changes coming up.

> > Hi,
> > 
> > I saw Frank updated the styles with date ranges so to use en-dash  
> > instead of hyphens for delimiting ranges.

Thanks for being tolerant; I know I’ve been playing fast and loose  
with the test suite lately. It’s just been due to time pressure.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 27, 2010, 11:14pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/7 "2010-11-27T23:14:10Z")

</div>

> > I’d say yes, we should consistently use en-dashes for all numeric ranges.
> 
> Very good. Changes coming up.

Done.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 27, 2010, 11:18pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/8 "2010-11-27T23:18:31Z")

</div>

> > > Hi,
> > > 
> > > I saw Frank updated the styles with date ranges so to use en-dash  
> > > instead of hyphens for delimiting ranges.
> > > 
> > > Shouldn’t we use en-dashes for page (and other numeric) ranges too? (I  
> > > had this thought while implementing the page-range-format option).
> > 
> > Another question: is correct to use the “page-range-format” attribute  
> > also for formatting the locator?
> 
> Good point. At the moment, I’m pretty sure that citeproc-js doesn’t  
> touch the locator content, but when the label attribute is set to  
> “page”, at least the first run of numbers (with any ampersand, comma,  
> or hyphen delimiter cruft) could be reformatted, with the ranges  
> normalized. Shall we add that to the specification, and build some  
> tests?

Actually, I’d forgotten that the page range formatting code is a  
little more sophisticated than that. “Number” for this purpose seems  
to include any string that ends in a numeral. Same general logic  
applies, though; we could reformat everything in a page-labeled  
string, accounting for delimiter cruft, up to the first non-number.

---

<div class="post-metadata">

**Author:** ![Andrea\_Rossato1](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Andrea\_Rossato1](https://discourse.citationstyles.org/u/Andrea_Rossato1)\
**Post date:** [November 28, 2010, 10:41am UTC](https://discourse.citationstyles.org/t/page-ranges/925/9 "2010-11-28T10:41:42Z")

</div>

I saw Frank already changed some styles. Not all, though. I’m  
attaching a patch (I’m not able to push to [bitbucket.org](http://bitbucket.org) even though I  
seem to have commit access).

Andrea

[enDash.patch](https://canada1.discourse-cdn.com/flex029/uploads/citationstyles/original/1X/c1d82c276b0dbc75db7c03b6755ef0a85f631e5a.patch) (1.88 KB)

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 28, 2010, 1:02pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/10 "2010-11-28T13:02:03Z")

</div>

> > I’d say yes, we should consistently use en-dashes for all numeric ranges.
> 
> I saw Frank already changed some styles. Not all, though. I’m  
> attaching a patch (I’m not able to push to [bitbucket.org](http://bitbucket.org) even though I  
> seem to have commit access).

The CSL in these tests doesn’t set page-range-format. I wasn’t sure  
how cases like that should be handled (and I was lazy and didn’t look  
further). While puzzling over it just now, I checked the  
specification, and apparently they’re supposed to be left as is:

[Redirecting…](http://citationstyles.org/downloads/specification.html#page-ranges)

If that’s not the right treatment, I guess now is a good time to work  
out how they should be handled. It does seem like a good idea to have  
a literal option, though, in case automated reformatting causes  
headaches under particular conditions.

---

<div class="post-metadata">

**Author:** ![Andrea\_Rossato1](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Andrea\_Rossato1](https://discourse.citationstyles.org/u/Andrea_Rossato1)\
**Post date:** [November 28, 2010, 1:08pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/11 "2010-11-28T13:08:27Z")

</div>

You are perfectly right indeed. This is my fault.

Andrea

---

<div class="post-metadata">

**Author:** ![Andrea\_Rossato1](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Andrea\_Rossato1](https://discourse.citationstyles.org/u/Andrea_Rossato1)\
**Post date:** [November 28, 2010, 1:16pm UTC](https://discourse.citationstyles.org/t/page-ranges/925/12 "2010-11-28T13:16:11Z")

</div>

(obviously forget the patch and bless the fact I don’t have write  
access to the test suite. keep it this way, please!)
