Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Why do *nix-y folks tend to singe-quote like `this' instead of like 'this'?

I'm referring to the opening "backtick" ` instead of '.

And I'm talking about writing prose in email or documentation -- not coding in any specific language.

Is this mere custom, or, is there some technical reason/motivation (and if so, what is it)?

share|improve this question
2  
Five primate troop members flung off topic votes at an unwelcome visiting question. I'll award an answer, wipe off the votes, and move on. – Greg Hendershott May 12 '11 at 0:48

migrated from stackoverflow.com May 10 '11 at 23:05

closed as off topic by Steve Evers, NickC, Walter, Tim Post, Macneil May 11 '11 at 17:49

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

5 Answers

up vote 25 down vote accepted

Possible explanation. In LaTex, one uses `stuff' to enclose the word stuff in single-quotes. LaTeX usage is fairly common in the *nix world.

share|improve this answer
6  
That would be my guess too, plus the added advantage that with two distinct opening and closing characters, nesting quotes is not a problem: `He said `Hello.' to me.' – Aasmund Eldhuset May 10 '11 at 23:04
That's why I do it (muscle memory from writing LaTeX), and I'd guess the same for others. – jimwise May 11 '11 at 1:12
What's interesting is that for decades I've always used straight single quotes like 'this' in plain text. It never even occurred to me to open with a backtick. As I've been exposed recently to Linux docs, I've started to use open backticks unconsciously -- almost like how living somewhere you can pick up the local accent (no pun intended). Which got me wondering, what is this custom? – Greg Hendershott May 11 '11 at 1:46
@Aasmund. I see. Although writing in American English I'd do the nesting with single vs. double: "He said, 'Hello' to me." Anyway, the examples I'm referring to a plain text tech docs, especially for Unix or GNU utilities. – Greg Hendershott May 11 '11 at 1:49
2  
@Greg I would "Double quote \"this\" way" in english. I'm silly that way... – Max May 11 '11 at 1:56
show 1 more comment

As mentioned in this answer to basically the same question on English.SE, it’s a holdover from the not-too-distant past of computing, when limited character sets encouraged font authors to design ` (backquote) to display as  (open-quote) and ' (apostrophe) as  (close-quote), in order to cheaply achieve improved typographic effects on the screen.

There’s no reason to abuse characters this way any longer. Some notes:

  • The Xerox Alto (1973–1981) had proper curved quotes in its character set.

  • TeX came out in 1978.

  • The IBM PC (1981) had a curved grave accent in its MDA (monochrome display adapter) font, which was present in all subsequent graphics adapter upgrades. Code page 437 did not include real curved quote characters.

  • The X Window System core fonts had curved grave accents until 2004, when X.Org surpassed XFree86 as the preeminent X implementation.

Further reading:

share|improve this answer
Thank you for the link, it hadn't occurred to me to search english.se. – Greg Hendershott May 11 '11 at 1:40
It's not necessarily easy to produce non-ASCII characters with a standard US keyboard, so there's strong reason for somebody typing fast to stick to ASCII. – David Thornley May 11 '11 at 21:44
@DavidThornley: And in that case they should use straight quotes (just apostrophes), because modern fonts have backtick and apostrophe looking how they ought. – Jon Purdy May 12 '11 at 2:25
@JonPurdy it's a throw over from roff and it's legacy all the way through to latex, it's got nothing to do trying to look like open/close it's about formatting markup. - This answer is a bit like saying people put angle brackets in xml, because they look nice. – Slomojo Mar 29 at 8:11
@Slomojo: Okay. I’m just deducing from what I know and can learn through research. It‘s hard to find information on this topic. I’ve updated the answer with more information. – Jon Purdy Mar 29 at 9:34
show 2 more comments

In Unix, it goes back to the *roff (roff, nroff, troff, groff) family of text formatters, which trace their lineage back to the runoff program in Multics.

Most "real" fonts have different glyphs for quotation marks, and the backtick and apostrophe were used to differentiate between them. TeX followed this convention about eight years later.

share|improve this answer

In emacs, you can produce doc strings for functions, something like javadoc or xml doc in C#, or the similar feature in python (I forget the name). Within the doc string in emacs, if you backtick quote a symbol name, it inserts a hyperlink into the generated documentation. Not sure if this came from LaTeX or vice versa.

share|improve this answer

I don't particularly associate this usage with unix. The first thing that comes to mind with unix and quotes is shells, and ` and ' have completely different meanings there.

The ‘single quotation marks’ are standard typography (depending on your side of the Atlantic, you may be more used to “double quotation marks”). In ASCII, there are three quote-like characters: " (the symmetric double quote), ` (the opening quote, also a grave accent0, and ' (the closing single quote, also a symmetric quote, an apostrophe and an acute accent). If you're a single quoter, `this' is the natural ASCII approximation of quotation marks.

One specific programming usage where `single-quotation-mark' quoting is the norm is Lisp. This is familiar to Emacs users. Maybe those unix-y folks you have in mind are in fact Emacs folk?

share|improve this answer
I disagree with "standard typography." For most of the last century, in the US at least, casual typography was with typewriters where the ` character was almost never available, so an opening single-quote was '. In formal typography an opening single-quote was (and is) ‘ (U+2018) and a closing single-quote was (and is) ’ (U+2019). The ` character has only seen common use in computing, and with the carryover of typewriter typing habits for the first few computer decades and, since then, with carryover teaching and/or general laziness, I rarely see ` outside of *nix use. – Matthew Frederick May 10 '11 at 23:52
@Matthew: By “standard typography”, I mean formal typography, of course. The single quotes are ‘’, which in HTML is ‘’ or ‘&#8217, so we're not disagreeing there. You're right that the `` ` `` and ' usage in ASCII in fact comes from typewriters. – Gilles May 11 '11 at 0:00
Well in Scheme (and AFIK Lisp) code you don't single-quote words like `this'. In code, the ' is shorthand for (quote) and ` for (quasiquote). String literals use "double quotes". However in plain text documentation written ostensibly by someone with a *nix background, I almost always see `quote' or `quasiquote'. Which is what motivated my original question, what is the source of this custom. – Greg Hendershott May 11 '11 at 1:35
@Greg: As I wrote, there's nothing like `foo' in Lisp code, but there is in Lisp documentation. In my experience, it's not tied with unix, but with Emacs (a different culture altogether). – Gilles May 11 '11 at 6:52
Now I understand what you meant. Thank you. Yes: Over the last couple years, I've dived into Scheme, Emacs, and Linux, all for pretty much the first time. In those 2 years I've seen more backtick open-quotes than in the preceding 25. :) – Greg Hendershott May 11 '11 at 19:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.