←back to thread

650 points Stratoscope | 2 comments | | HN request time: 0s | source
Show context
mmooss ◴[] No.43499567[source]
Here's an easy, if not always precise way to remember:

* Hyphens connect things, such as compound words: double-decker, cut-and-dried, 212-555-5555.

* EN dashes make a range between things: Boston–San Francisco flight, 10–20 years: both connect not only the endpoints, but define that all the space between is included. (Compare the last usage with the phone number example under Hyphens.)

* EM dashes break things, such as sentences or thoughts: 'What the—!'; A paragraph should express one idea—but rules are made to be broken.

Unicode has the original ASCII hyphen-minus (U+002d), as well as a dedicated hyphen (U+2010), other functional hyphens such as soft and non-breaking hyphens, and a dedicated minus sign (U+2212), and some variations of minus such as subscript, superscript, etc.

There's also the figure dash "‒" (U+2012), essentally a hyphen-minus that's the same width as numbers and used aesthetically for typsetting, afaik. And don't overlook two-em-dashes "⸺" and three-em-dashes "⸻" and horizontal bars "―", the latter used like quotation marks!

replies(12): >>43499795 #>>43500096 #>>43500276 #>>43500389 #>>43500958 #>>43501074 #>>43502495 #>>43503176 #>>43504564 #>>43507109 #>>43512927 #>>43570687 #
lxgr ◴[] No.43500276[source]
> EM dashes break things, such as sentences or thoughts

Some style guides recommend "space, en dash, space" for this, and I prefer that myself – mainly because some software doesn't treat em dashes correctly as word separators for double click selection purposes.

For example, I'm pretty sure that at least some Kindle models would highlight both the word before and after the em dash when selecting one of them, which makes using the dictionary very annoying.

replies(7): >>43500598 #>>43501460 #>>43501482 #>>43501556 #>>43501772 #>>43503947 #>>43503958 #
krick ◴[] No.43503947[source]
It's actually only your post that made me realize people don't normally put spaces around em dash. In French, Russian and a bunch of other languages proper typesetting is to use em dash as a standard dash character, and you always put spaces around them. So I did it in English as well, for many years now.

(I also now looked up and found out that in Spanish, apparently, you are supposed to put space only on one side of the dash, when used as a direct speech separator.)

replies(3): >>43505058 #>>43506008 #>>43508474 #
rmunn ◴[] No.43505058[source]
I also put spaces around em dashes. It looks wrong—subtly wrong—to me to have the words glued together around the dash. It looks right — completely right — to me to have the dash standing on its own, as if it was a word in its own right.
replies(4): >>43505363 #>>43505552 #>>43509146 #>>43513256 #
lashloch ◴[] No.43505363{3}[source]
Funny—I'm the exact opposite. The extra spaces distract my eyes. To each their own! :)
replies(3): >>43505414 #>>43505425 #>>43509350 #
1. rmunn ◴[] No.43505414{4}[source]
To each their own: fully agreed, even though our tastes differ. I will mention one advantage of the spaces-around-dashes method: word wrap with default settings will break on the spaces around the dashes so that the entire word one, dash, word two combo doesn't end up pulled onto the next line as a whole unit. Whereas the advantage of the no-spaces method that you prefer is that word wrap will pull the entire word one, dash, word two combo onto the next line as a whole unit.

Why yes, I did list the opposite behavior as an advantage of each. Because that, too, is up to individual preference. :-)

replies(1): >>43506839 #
2. lxgr ◴[] No.43506839[source]
That depends on the layout engine, I believe. Just tried it in Firefox (on macOS; not sure if it uses Core Text or something custom there), and it does sometimes break around the em dash in "foo—bar" style, not just "foo – bar" style.

I've definitely noticed the behavior you describe on some layout engines, too, and it's another reason why I personally prefer "foo – bar" style.