w3c / manual-of-style

The W3C Manual of Style
https://www.w3.org/Guide/manual-of-style/
Other
9 stars 13 forks source link

em dashes: with our without surrounding spaces #26

Open frivoal opened 7 months ago

frivoal commented 7 months ago

https://speced.github.io/bikeshed/#typography tells us:

Ending a line with -- will turn it into an em dash (—) and pull the following line upwards so there’s no space between the surrounding words and the dash.

in https://github.com/w3c/w3process/pull/851#discussion_r1567542467, @tallted said:

Ugh. In my world, em dashes should be surrounded by spaces; en dashes and hyphens typically should not.

The W3C Style Guide points to the Chicago Manual of Style, and "CMOS says no spaces, but importantly their typography actually does have spacing around the em-dash, so basically they’re cheating a bit. AP says spaces."

I don't care strongly either way, but I'm pretty sure that if it should be fixed, it should be fixed globally, and not on a ad hoc basis. Hence reporting it here, as well as against bikeshed.

tabatkins commented 6 months ago

I'm happy to do whichever pattern we decide on. They're both equal effort in the Bikeshed code, honestly.

(Tho note - in the "put spaces around them" camp, there's also the possibility that they're non-breaking spaces, which I think is somewhat the point of the "no spaces" behavior. That's also equally easy.)

TallTed commented 6 months ago

Non-breaking spaces could be used, though I would only put one before an em-dash, so it stays on the same line as the preceding word; there's no need for one after.

The result would be more like this — which I think flows and looks better — than like this.

Hopefully that's only a little more work to achieve.