News for hackers. Stuff that matters.
Re:HN Mining or: How I Learned that there are some among us ... by drfuchs on Saturday October 29, 2022 @11:40PM (#33390801)
This has been driving me nuts for decades: "Smart Quotes" first appeared as the name of a feature of interactive document editing tools, wherein the user would always keyboard the "vertical" single or double quote ASCII character, and the software would look at the context of where that quote character was being inserted, and choose the correct "left-quote" or "right-quote" character to actually insert into the document.

Unfortunately, users misinterpreted the label in the check-box in the UI that enabled this feature, and thought that "Smart Quotes" meant that the name of the quote characters somehow had the word "smart" in it. But, no, it just meant "turn on the intelligent logic for which quote to insert into the document."

Source: Me, 1988 or so, working on FrameMaker. I don't think there's a reference to the word pair "Smart Quotes" anywhere earlier than the FrameMaker ~2 manual, and certainly not in any book on typography. I'd be happy to learn that I am wrong, if anybody has a pointer.

Re:HN Mining or: How I Learned that there are some among us ... by neilv on Sunday October 30, 2022 @12:07AM (#33390964)
TeX (as a mostly batch formatter) didn't do this, but it did map ASCII quote characters to the typesetting ones. Including mapping a sequence of two single quote or backquote characters to the typeset double quotes.

(FrameMaker was great, BTW. It was what got me into developing fancy layout style sheets and templates, which I later also did with Interleaf, MS Word, LaTeX, and various Web stuff. Somewhere in there, I worked on DynaText and DynaWeb at EBT, so overlapped a bit with Frame as it got into SGML.)

Re:HN Mining or: How I Learned that there are some among us ... by drfuchs on Sunday October 30, 2022 @01:04AM (#33391264)
Interestingly, the logic of mapping of two single quotes into a double quote was not built into TeX; rather, the metadata in each of the standard fonts simply used the ligature mechanism to handle it, just as they would specify that "f" followed by "t" should turn into the single-character "ft" ligature.

It's a shame that ASCII (and its visual representation on terminals from most manufacturers) has a wonderfully slanty left-quote character, but the right-quote character is typically shown as vertical. This makes TeX input files that contain quotations look kind of yucky, which is all the more galling as the original SAIL terminals had symmetric quotes, so everything looked beautiful there (never mind also having proper uparrow and downarrow characters to indicate superscript and subscript, rather than the ugly caret and underscore characters that we're all stuck with in ASCII-land TeX).

Source: Me, 1980 or so, working on TeX and Metafont.

Re:HN Mining or: How I Learned that there are some among us ... by bombcar on Sunday October 30, 2022 @02:32AM (#33391782)
I suspect if you dug back you'd find that very old monospace fonts had ` and ' looking like mirrors of each other, but once they realized that nobody uses ` and instead always uses ' and ", they made them vertical so that they wouldn't look "that bad".
Re:HN Mining or: How I Learned that there are some among us ... by anjbe on Sunday October 30, 2022 @06:08AM (#33392978)
In the old days of ASCII several characters were heavily overloaded. On teletypes it was not unusual to create accented characters by typing ` or ' (which looked more like ´), then backspacing and typing a vowel, to get (e.g.) è or é. The same could be done with ~ to create ñ, if the tilde were high up like ˜, or with " to simulate an umlaut.

And of course there’s the overload of hyphen and minus, such that Unicode gave up and named U+002D “hyphen‐minus,” and created two separate characters U+2212 “minus” (−) and U+2010 “hyphen” (‐) to use in situations where the typography matters. Most fonts seem to use identical glyphs for hyphen‐minus and minus, but I’ve seen some that try to split the difference, giving hyphen‐minus a glyph with a height and width somewhere in between hyphen and minus.

If you find minus and hyphen‐minus hard to distinguish visually, just remember that a true minus sign looks just like a plus without the vertical part. Compare the alignments:

- example (U+002D hyphen‐minus)

+ example (plus)

− example (U+2212 minus)

Re:HN Mining or: How I Learned that there are some among us ... by drfuchs on Sunday October 30, 2022 @06:08PM (#33399353)
And typewriters, before that. They all had only a single key for Apostrophe as well as Single Left Quote and Single Right Quote. In fact, since most(?) manual typewriters also lacked a "One / Exclamation" key, there was a fourth use: for "1" you typed lower-case L (yikes); while to get an exclamation point, you had to type a period, then backspace, then overstrike with an apostrophe (which is yet another reason the apostrophe et. al. character was vertical!)
Re:HN Mining or: How I Learned that there are some among us ... by thangalin on Sunday October 30, 2022 @02:37AM (#33391801)
KeenWrite[0] is my free, open-source plain text Markdown editor that exports to XHTML. That XHTML is passed into ConTeXt (typesetting software) to produce beautifully typeset PDFs. On the way from Markdown to XHTML, KeenWrite passes the XHTML through KeenQuotes[1], my straight quote curling library, to encode quotation marks as HTML entities. This means ' becomes lsquo, rsquo, or apos, depending on the context (pun intended, sorry).

Those HTML entities are then curled correctly when any theme[2] is applied.

What bytes is not having a separate glyph for a curled apostrophe because it makes detection of British (or nested) quotations a difficult chore for natural language processors. To get a curled apostrophe, word processors inject the semantically incorrect right-curled single quote, which ought to be reserved for a closing quotation mark exclusively.

There are a few fonts that do curl the apostrophe, such as GFS Didot[3].

[0]: https://github.com/DaveJarvis/keenwrite

[1]: https://whitemagicsoftware.com/keenquotes/

[2]: https://github.com/DaveJarvis/keenwrite-themes/blob/main/xht...

[3]: https://fonts.google.com/specimen/GFS+Didot

Re:HN Mining or: How I Learned that there are some among us ... by svat on Sunday October 30, 2022 @02:54AM (#33391880)
About your middle paragraph: note that ASCII doesn't have left and right quotes; at 0x60 it has GRAVE ACCENT ` (not a left quote), and at 0x27 it has APOSTROPHE ' (not a right quote). Unfortunately for many years, fonts and terminals (like the SAIL ones you mentioned) continued to encourage abusing these characters as symmetric left- and right-quotes (as they were in some character sets pre-ASCII and even an early version of ASCII), despite their updated definitions.

See Markus Kahn's page at https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html which explains it well. (Also: the one-page documentation (plus one page implementation) of the LaTeX “upquote” package: http://mirrors.ctan.org/macros/latex/contrib/upquote/upquote... )

Re:HN Mining or: How I Learned that there are some among us ... by anjbe on Sunday October 30, 2022 @06:23AM (#33393083)
That’s the Unicode way of doing things (which I heartily subscribe to), but in ASCII’s original conception what you describe as “abuse” was a feature. For instance, in RFC 20 which is dated 1969, 0x27 is named “Apostrophe (Closing Single Quotation Mark/Acute Accent)” and 0x60 is named “Grave Accent (Opening Single Quotation Mark)”. Additionally, double quote also served as a diaeresis, and comma as a cedilla.

Of course, your links are right: it makes no sense to overload these characters anymore now that we have character sets and software capable of providing typographic niceties. But it’s fun to know the history.

Re:HN Mining or: How I Learned that there are some among us ... by drfuchs on Sunday October 30, 2022 @03:43PM (#33397892)
Yeah, no. ASCII assuredly has had what it officially called "opening single quotation mark" at 0x40, and "closing single quotation mark" at 0x27, for a very long time.

For starters, most easily at hand, see Communications of the ACM, Vol. 8, No. 4, April 1965, page 207, which shows them by those names.

Of course, there are details. It says that the 0x40 character can also be used as a grave accent, but only if "preceded by an alphabetic character and a BS (Backspace) in that sequence." Oh, for the days of hard-copy terminals.

And 0x27 is worse. It is documented there to be used as Apostrophe, closing single quotation mark, and even acute accent (but again, only in the context of the three character sequence alpha-backspace-accent).

Fine, that was 1965, and no controversy. But following the actual ANSI standard along over the years, by 2007 they're still there in "Coded Character Sets - 7-Bit American National Standard Code for Information Interchange (7-Bit ASCII)" ANSI INCITS 4-1986 (R2007) / ANSI X3.4-1986 (R2007), Approved June 14, 2007; Table 7, page 12. (Well, in 1986 they'd been slightly renamed to be Left and Right Single Quotation Mark, so the names would make sense for right-to-left languages, too; just as Paren, Bracket, and Brace pairs had all also changed names from "Open/Close" to "Left/Right".) The subsequent revisions to the ASCII standard, of June 15, 2012 and November 2, 2017, I don't have copies of, but these character designations clearly lasted at least into the "updated definitions" current as of mid 2012.

So, left and right single quotes were clearly in the official standard for almost five full decades beyond "early ASCII". I expect that they survive still, and will soon go into their seventh decade, but happy to hear otherwise from anyone with access to the later standard documents.

(And, yes, of course the Unicode standard has its own (no doubt better) opinions about what goes on with the first 128 characters out of tens of thousands, and what they're called and what they're properly used for; but that's a different issue than what the ASCII standard itself has to say about cramming stuff into its overloaded character set with a grand total of 128 slots.)

Re:HN Mining or: How I Learned that there are some among us ... by svat on Sunday October 30, 2022 @08:58PM (#33400797)
Yeah you're right and good point, and my earlier comment was partly misleading anyway, because there isn't much difference even among typographers between "apostrophe" and "right single quotation mark".

A better way of stating it is to start with appearance: people who started with computers where 0x40 ` and 0x27 ' looked symmetric (like ‘ and ’) would likely end up using them as symmetric quotation marks (thus the conventions used in some software like Emacs and TeX), while everyone else, where they were not symmetric (looking slanted and vertical respectively) would likely not be led down that route. It's a bit unfortunate that there was this divergence, and that it wasn't settled early enough.

An interesting example is The TeXbook itself: the 1979 TeX manual (in the "TeX and METAFONT" book), the precursor to The TeXbook and apparently written with mostly the SAIL environment in mind, simply says (early in Chapter 2):

> In the first place, there are two kinds of quotation marks in books, but only one kind on the typewriter. Even on your computer terminal, which has more characters than an ordinary typewriter, you probably have only a non-oriented double quote mark (") because the standard “ascii” code for computers was not invented with book publishing in mind. However, your terminal probably does have two flavors of single-quote marks, namely ’ and ’, which you can get by typing ` and ´. The second of these is useful also as an apostrophe.

While already in 1984, The TeXbook (second printing, October 1984: the earliest I have access to), written with more awareness of the rest of the world, has more-or-less the same text, but adds:

> American keyboards usually contain a left-quote character that shows up as something like `, and an apostrophe or right-quote that looks like ' or ´.

So already the appearance did differ across different systems.

There's a bit more on another related page of Kuhn at https://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html (this one is about the opposite problem: Europeans using acute accent as apostrophe), and there's a bit more about history of these two ASCII positions at https://jkorpela.fi/latin1/ascii-hist.html

Re:HN Mining or: How I Learned that there are some among us ... by D13Fd on Sunday October 30, 2022 @02:03AM (#33391605)
I think “smart quotes” is fine as a name, since most people who type them still do it automatically via a context-based logic (whether it’s a word processor or text box input on an iPhone). And it works better than “curly quotes” since they are not curly in some fonts.

If you’re going to be pedantic, I’m not sure that “left-quote” or “right-quote” is correct either. Shouldn’t it be “left double quotation mark” or “right double quotation mark”?

Re:HN Mining or: How I Learned that there are some among us ... by svat on Sunday October 30, 2022 @03:15AM (#33391985)
I know you said “most people”, but I always type these typographically correct quotes manually (no automatic substitution or “smart” quotes involved). It's Opt+[ (etc) on macOS, for example. So the name is disorienting for me at least, and as the top comment said, they predate computers and weren't called “smart” then.

But see also https://smartquotesforsmartpeople.com/ :-)

Re:HN Mining or: How I Learned that there are some among us ... by lupire on Sunday October 30, 2022 @09:35AM (#33394387)
If you learn them as "double quote brackets" just like "round brackets", "square brackets", "angle brackets", and "curly brackets" then the key name is not disorienting.
Re:HN Mining or: How I Learned that there are some among us ... by yellow_lead on Sunday October 30, 2022 @04:27AM (#33392387)
Somehow, my chinese language option still uses smart quotes. For instance,

“一個句子”

Re:HN Mining or: How I Learned that there are some among us ... by aendruk on Sunday October 30, 2022 @05:04AM (#33392596)
Thank you. There’s nothing “smart” about my quotation marks; I type them with physical keys just like any other punctuation.

  Left: “
  Right: Shift+“
  Typewriter: AltGr+“
Re:HN Mining or: How I Learned that there are some among us ... by Beltalowda on Sunday October 30, 2022 @07:33AM (#33393503)
Words change; terminology changes; language changes. It is the way of things.

In that sense I think "straight quotes" are fine too, although “smart quotes” arguably look a bit nicer, but that's a matter of personal taste IMO.

Related comment from a few months back: https://news.ycombinator.com/item?id=31792626

Re:HN Mining or: How I Learned that there are some among us ... by rogual on Sunday October 30, 2022 @08:10AM (#33393719)
As a Brit I always used to interpret "Smart Quotes" with the old-fashioned definition of smart that some people still use here, i.e. presentable, nice-looking, clean-cut.