202 lines
11 KiB
HTML
202 lines
11 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang='en'><head><meta charset='utf-8' /><meta name='pinterest' content='nopin' /><link href='../../../../static/css/style.css' rel='stylesheet' type='text/css' /><link href='../../../../static/css/print.css' rel='stylesheet' type='text/css' media='print' /><title>Why I Two-Space / Steve Losh</title></head><body><header><a id='logo' href='https://stevelosh.com/'>Steve Losh</a><nav><a href='../../../index.html'>Blog</a> - <a href='https://stevelosh.com/projects/'>Projects</a> - <a href='https://stevelosh.com/photography/'>Photography</a> - <a href='https://stevelosh.com/links/'>Links</a> - <a href='https://stevelosh.com/rss.xml'>Feed</a></nav></header><hr class='main-separator' /><main id='page-blog-entry'><article><h1><a href='index.html'>Why I Two-Space</a></h1><p class='date'>Posted on October 12th, 2012.</p><p>If you look at <a href="https://bitbucket.org/sjl/stevelosh/src/tip/content/blog">the source code</a> for this blog, you might notice that
|
||
|
all my blog posts (written in <a href="http://daringfireball.net/projects/markdown/">Markdown</a>) have two spaces after every period.</p>
|
||
|
|
||
|
<p>Every so often <a href="http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html">this Slate article</a> makes the rounds and annoys me. This
|
||
|
time I figured I'd write a blog post/rant to get it off my chest once and for
|
||
|
all: two-spacing is equal or superior to one-spacing in all non-trivial ways.</p>
|
||
|
|
||
|
<ol class="table-of-contents"><li><a href="index.html#s1-the-arguments-for-one-spacing">The Arguments for One-Spacing</a></li><li><a href="index.html#s2-effort">Effort</a></li><li><a href="index.html#s3-two-spacing-is-ugly">Two-Spacing is Ugly</a><ol><li><a href="index.html#s4-source-and-presentation">Source and Presentation</a></li><li><a href="index.html#s5-typewriters">Typewriters</a></li></ol></li><li><a href="index.html#s6-power">Power</a></li><li><a href="index.html#s7-final-score">Final Score</a></li></ol>
|
||
|
|
||
|
<h2 id="s1-the-arguments-for-one-spacing"><a href="index.html#s1-the-arguments-for-one-spacing">The Arguments for One-Spacing</a></h2>
|
||
|
|
||
|
<p>If you read the aforementioned Slate article you'll see that it presents a total
|
||
|
of three arguments in favor of single-spacing after a period:</p>
|
||
|
|
||
|
<ol>
|
||
|
<li>Many professional typographers find two-spacing ugly (though they have no
|
||
|
actual evidence of its effects on readability).</li>
|
||
|
<li>It's less work to press the space bar once instead of twice.</li>
|
||
|
<li>It's pretty much arbitrary anyway, so <em>why not</em>?</li>
|
||
|
</ol>
|
||
|
|
||
|
<p>You might also infer from the article's tone that "you get to feel superior to
|
||
|
those Neanderthals that use two spaces" is another argument in favor of it, but
|
||
|
I'll leave that one out because it can go both ways.</p>
|
||
|
|
||
|
<p>Let's go through these arguments one by one and see how they hold up.</p>
|
||
|
|
||
|
<h2 id="s2-effort"><a href="index.html#s2-effort">Effort</a></h2>
|
||
|
|
||
|
<p>I don't think the "it's more effort to press the space bar twice" argument is at
|
||
|
all compelling. The extra space <em>may</em> account for around half a percent of the
|
||
|
keystrokes you type, depending on how long your sentences tend to run (mine
|
||
|
usually end up fairly long, as you can see).</p>
|
||
|
|
||
|
<p>Not only is it not a large portion of your keystrokes, but the space bar has
|
||
|
your two strongest digits dedicated solely to it! If any fingers are going to
|
||
|
wear out from typing, it won't be your thumbs.</p>
|
||
|
|
||
|
<p>You could get pedantic and mention increased file size as a disadvantage of two
|
||
|
spacing, but let's not quibble about a few bytes when I can hold 32 gigabytes on
|
||
|
an SD card the size of a postage stamp.</p>
|
||
|
|
||
|
<h2 id="s3-two-spacing-is-ugly"><a href="index.html#s3-two-spacing-is-ugly">Two-Spacing is Ugly</a></h2>
|
||
|
|
||
|
<p>The Slate article is correct is saying that many professional typographers think
|
||
|
two-spacing is ugly. My copy of <a href="http://www.amazon.com/dp/0881792063/?tag=stelos-20">The Elements of Typographic Style</a>
|
||
|
agrees. However, there's more to the issue than a single blanket rule.</p>
|
||
|
|
||
|
<h3 id="s4-source-and-presentation"><a href="index.html#s4-source-and-presentation">Source and Presentation</a></h3>
|
||
|
|
||
|
<p>If you're reading this in a web browser and look closely, you'll notice that
|
||
|
there's only one space between each sentence. I said I used two, so what
|
||
|
happened?</p>
|
||
|
|
||
|
<p>Web browsers, by default, collapse successive whitespace into a single space when it
|
||
|
renders the HTML. You could put a thousand spaces between sentences in the
|
||
|
source and it would still come out single-spaced.</p>
|
||
|
|
||
|
<p>Another widely-used format, LaTeX, splits the difference and actually uses
|
||
|
somewhere between one and two spaces (by default).</p>
|
||
|
|
||
|
<p>The key idea here is that what you type and what the end user actually reads are
|
||
|
two different things. They don't need to be bound together. It's possible to
|
||
|
type two spaces but get one in your output (or in LaTeX's case: an even more
|
||
|
pleasing "one and a bit").</p>
|
||
|
|
||
|
<p>If you're using a WYSIWYG editor like Microsoft Word this may not be the case.
|
||
|
For the high school students typing up papers for class: sure, go ahead and
|
||
|
single-space. But if you're still using Word to type up things like books, long
|
||
|
blog posts, or technical documentation, you're doing yourself a disservice.
|
||
|
Learn to use a system like LaTeX so your source and rendered output aren't
|
||
|
locked together.</p>
|
||
|
|
||
|
<p>This means that "two-spacing looks ugly" doesn't imply "you should not type two
|
||
|
spaces when you write". It <em>actually</em> implies "you should use a system that
|
||
|
results in single-spacing when rendered", and most of the common ones today will
|
||
|
do exactly that.</p>
|
||
|
|
||
|
<h3 id="s5-typewriters"><a href="index.html#s5-typewriters">Typewriters</a></h3>
|
||
|
|
||
|
<p>So we've seen that the "extra spaces take more effort" argument isn't
|
||
|
convincing, and that "two-spacing in the final output is ugly" doesn't prevent
|
||
|
you from using two spaces in the input.</p>
|
||
|
|
||
|
<p>But so far I haven't given you any reason <em>for</em> using two spaces. That's the
|
||
|
Slate article's third argument: "it's arbitrary anyway, so you may as well use
|
||
|
one".</p>
|
||
|
|
||
|
<p>Let's fix that by examining the common holier-than-thou put-down of "two-spacing
|
||
|
was useful back when people used <em>typewriters</em>, you dinosaur!".</p>
|
||
|
|
||
|
<p>To his credit, the Slate author correctly points out that it's not the fact that
|
||
|
people used typewriters that made two-spacing popular, it was the fact that
|
||
|
<em>typewriters used monospaced fonts</em>. Most people miss that logical leap.</p>
|
||
|
|
||
|
<p>Unfortunately he follows that up with:</p>
|
||
|
|
||
|
<blockquote>
|
||
|
<p>Here's the thing, though: Monospaced fonts went out in the 1970s.</p>
|
||
|
</blockquote>
|
||
|
|
||
|
<p>For the average person typing up a school paper here and there, sure. But for
|
||
|
many people doing a large amount of writing for LaTeX books and papers,
|
||
|
technical documentation, code comments, mailing lists, blog posts, and lots of
|
||
|
other things, it's simply <em>wrong</em> for one big reason:</p>
|
||
|
|
||
|
<p><strong>Text editors use monospaced fonts!</strong></p>
|
||
|
|
||
|
<p>It doesn't matter what editor you use. Vim, Emacs, TextMate, Sublime Text,
|
||
|
Eclipse, Gedit, Notepad++? <em>All</em> of them use monospaced fonts.</p>
|
||
|
|
||
|
<p>Going back to the typewriter quip, this means that if people used two spaces
|
||
|
when writing on typewriters because it looked better, then using two spaces in
|
||
|
a text editor will look better. And we know that because there's a distinction
|
||
|
between source and presentation in non-WYSIWYG contexts, we can use separate
|
||
|
strategies for each.</p>
|
||
|
|
||
|
<p>We can have our cake and eat it too! We can type two spaces after a period to
|
||
|
make our text look better as we write, revise, and edit it, and then render it
|
||
|
to single-spacing (or "space-and-a-half-ing") to give our readers a beautiful
|
||
|
reading experience with pleasant spacing.</p>
|
||
|
|
||
|
<p>So now two-spacing has a real advantage over single-spacing. That's enough to
|
||
|
make it preferable. But let's look at one more advantage for power users, just
|
||
|
to seal the deal.</p>
|
||
|
|
||
|
<h2 id="s6-power"><a href="index.html#s6-power">Power</a></h2>
|
||
|
|
||
|
<p>If you use <a href="http://www.vim.org/">Vim</a> to edit text, you're probably familiar with its "text
|
||
|
objects". Text objects are what let you move and act on whole chunks of text at
|
||
|
a time. For example, instead of deleting a word letter-by-letter you can use
|
||
|
<code>daw</code> to "delete around word".</p>
|
||
|
|
||
|
<p>Vim comes with a "sentence" text object built-in. You can move around your
|
||
|
document sentence-by-sentence with <code>(</code> and <code>)</code>, and yank/delete/change/etc
|
||
|
entire sentences with <code>cas</code> ("change around sentence") and so on.</p>
|
||
|
|
||
|
<p>You can probably guess where this is going. If you single-space sentences Vim
|
||
|
will do its best to "do the right thing", but inevitably gets tripped up when
|
||
|
you've got punctuation in your sentence. For example:</p>
|
||
|
|
||
|
<pre><code>Bob started speaking. Hello, Mr. Smith! How are you today?
|
||
|
^
|
||
|
cursor
|
||
|
</code></pre>
|
||
|
|
||
|
<p>What happens when you tell Vim to "delete around sentence" now?</p>
|
||
|
|
||
|
<pre><code>Bob started speaking. Hello, Mr. How are you today?
|
||
|
^
|
||
|
cursor
|
||
|
</code></pre>
|
||
|
|
||
|
<p>Well that's not right! Vim can't easily tell the difference between the period
|
||
|
after "Mr" and the end of a sentence. What happens if you type your prose with
|
||
|
two-spacing instead?</p>
|
||
|
|
||
|
<pre><code>Bob started speaking. Hello, Mr. Smith! How are you today?
|
||
|
^
|
||
|
cursor
|
||
|
Bob started speaking. How are you today?
|
||
|
^
|
||
|
cursor
|
||
|
</code></pre>
|
||
|
|
||
|
<p>This time Vim is able to delete the sentence correctly! Note that you'll need
|
||
|
to make sure to <code>set cpo+=J</code> in your <code>~/.vimrc</code> file to tell Vim "don't worry,
|
||
|
I'm using two spaces like a sane person" for this to work.</p>
|
||
|
|
||
|
<p>Two-spacing provides more semantic information, which means that software can
|
||
|
parse and work with it more easily. I'm sure Emacs has something similar, and
|
||
|
if you or someone else ever needs to parse your writing programatically they'll
|
||
|
have an easier time.</p>
|
||
|
|
||
|
<h2 id="s7-final-score"><a href="index.html#s7-final-score">Final Score</a></h2>
|
||
|
|
||
|
<p>To recap, the arguments <em>for</em> single-spacing are:</p>
|
||
|
|
||
|
<ol>
|
||
|
<li>Two-spacing is ugly in proportional fonts.</li>
|
||
|
<li>It's less work to press the space bar once instead of twice.</li>
|
||
|
<li>It's pretty much arbitrary anyway, so why bother with two?</li>
|
||
|
</ol>
|
||
|
|
||
|
<p>Number 1 is irrelevant, because writing and rendering are (except in trivial
|
||
|
cases) two orthogonal activities.</p>
|
||
|
|
||
|
<p>Number 2 isn't very convincing.</p>
|
||
|
|
||
|
<p>Number 3 is false, because two-spacing gives you two advantages over
|
||
|
one-spacing:</p>
|
||
|
|
||
|
<ol>
|
||
|
<li>It looks better in your editor.</li>
|
||
|
<li>It gives you more power when editing and parsing.</li>
|
||
|
</ol>
|
||
|
|
||
|
<p>So the next time you see that arrogant Slate article, feel free to be arrogant
|
||
|
right back. Wield your extra spaces proudly, because they give you both comfort
|
||
|
and power!</p>
|
||
|
</article></main><hr class='main-separator' /><footer><nav><a href='https://github.com/sjl/'>GitHub</a> ・ <a href='https://twitter.com/stevelosh/'>Twitter</a> ・ <a href='https://instagram.com/thirtytwobirds/'>Instagram</a> ・ <a href='https://hg.stevelosh.com/.plan/'>.plan</a></nav></footer></body></html>
|