davidmerfield / Typeset

An HTML pre-proces­sor for web ty­pog­ra­phy
https://typeset.lllllllllllllllll.com/
Creative Commons Zero v1.0 Universal
2.41k stars 52 forks source link

En-dash for number ranges #72

Open samhenrigold opened 2 years ago

samhenrigold commented 2 years ago

I was planning to add a line in punctuation.js to replace a hyphen between two numbers without a space with an en-dash (14-31 days"14–31 days").

It looks like for ranges with a space, we're expecting it to be replaced with an em-dash. I'm unsure if this is by design but the test HTML (and the Chicago style) calls for an en-dash. Should this be corrected or is there a different rule for ranges with spaces that I'm missing?

Thanks!

danielhaim1 commented 1 year ago

That sounds interesting, I would like to investigate this further. Found some very nice notes here too, I'm adding some others below:

Dash in Dates & Numbers

Dash in any range:

Do's and Don'ts

Don't use "From" or "To"

Don't use the word "from" or "to" if you're using a dash to show a range. If you're not using a dash, then you can use "from" and "to." Don't mix these conventions.

Another example:

samhenrigold commented 1 year ago

I’ve been referencing this blog post a lot lately, thin spaces with an en-dash looks nice. https://clagnut.com/blog/2419

danielhaim1 commented 1 year ago

That's a great resource. How can I help implement this?