I had one minor quarrel with this article: The use of spaces (of any kind) before and after the em dash or any dashes.<p>Personally, I am fond of using either a hair space or a thin space before and after the em dash. Not a full space!<p>To explore the various options, I wrote a little program to print the various combinations of dashes and spaces. I think what looks best depends a lot on what typeface you're using. But let's see how they look in the Verdana font used here. You should be able to paste this into your favorite word processor to see it in other fonts:<p>ASCII 0x2D hyphen-with no spaces<p>ASCII 0x2D hyphen - with U+200A hair spaces<p>ASCII 0x2D hyphen - with U+2009 thin spaces<p>ASCII 0x2D hyphen - with 0x20 full spaces<p>Unicode U+2010 hyphen‐with no spaces<p>Unicode U+2010 hyphen ‐ with U+200A hair spaces<p>Unicode U+2010 hyphen ‐ with U+2009 thin spaces<p>Unicode U+2010 hyphen ‐ with 0x20 full spaces<p>Unicode U+2013 en dash–with no spaces<p>Unicode U+2013 en dash – with U+200A hair spaces<p>Unicode U+2013 en dash – with U+2009 thin spaces<p>Unicode U+2013 en dash – with 0x20 full spaces<p>Unicode U+2014 em dash—with no spaces<p>Unicode U+2014 em dash — with U+200A hair spaces<p>Unicode U+2014 em dash — with U+2009 thin spaces<p>Unicode U+2014 em dash — with 0x20 full spaces<p>It looks like HN is really mangling this. Hair spaces are rendered wider than thin spaces?<p>If anyone wants to experiment, here is the Python code:<p><pre><code> from dataclasses import dataclass
@dataclass
class Character:
char: str
name: str
DASHES = [
Character( "-", "ASCII 0x2D hyphen" ),
Character( "\u2010", "Unicode U+2010 hyphen" ),
Character( "\u2013", "Unicode U+2013 en dash" ),
Character( "\u2014", "Unicode U+2014 em dash" ),
]
SPACES = [
Character( "", "no" ),
Character( "\u200A", "U+200A hair" ),
Character( "\u2009", "U+2009 thin" ),
Character( "\x20", "0x20 full" ),
]
for dash in DASHES:
for space in SPACES:
print( f"{dash.name}{space.char}{dash.char}{space.char}with {space.name} spaces\n" )</code></pre>