Smart quotes puzzle

I’ve turned on the smart quotes option in my Keyboard preferences (Big Sur), but this has triggered a puzzle I can’t solve:

When I want to use a single quotation mark to begin a (sub)head—newspaper style—and the first word begins with an N, the MacOS automatically inverts that opening quote so it’s an apostrophe. For instance:

’Nowhere to run.’
That’s what the coach says about …

Doesn’t matter how many times I type, retype or delete what comes before, the OS always overwrites it and changes that initial quotation mark to an apostrophe. Works fine for other letters.

Any clues what’s going on, or how to stop it?

Some options are in System Preferences:Keyboard:Text:Use smart quotes and dashes.

Does it do this in all apps, including TextEdit?

On my Big Sur 11.1 using the Pages app it behaves differently. The first quote mark stays “smart” unless I try to enclose a single letter “n”. No problem with longer strings or with other single letters.

On my system, Pages doesn’t seem to use the setting in the Keyboard preference pane; it uses the settings in its own preferences. What are your smart-quote settings there?

Pages behaves the same way as Tom described above on my system.

(Correcting earlier post: It DOES happen in TextEdit.)

Hm. Not in TextEdit. But in my Microsoft Edge browser, which is where I do most of my writing these days.

Same here. But that’s not right either, is it?

My Keyboard preference pane:

image

My Pages prefs:

image

Ah! Thanks to your insight, I have a lead: ’n’ is in the Mac dictionary.

Now the question is how to remove it. In Big Sur, I don’t see the “Unlearn Spelling” option detailed here.

That is weird. If I type a quote and then an n and then another quote, I see the behavior you describe – but if I type a word that begins with n, I don’t see that behavior.

But smart quotes are often buggy. Almost every day I run into some edge case where they don’t work properly (foot/inch marks, dialogue with apostrophes in it, computer source code where straight quotes are required, etc.). My solutions in those situations is among the following:

  • I type the quote manually after I finish typing the whole word/sentence to allow the smart quote to mess it up the way it wants. Often I can’t leave the editing area with my cursor keys as that triggers the smart quote feature to “fix” what I typed, so I use the mouse/trackpad to move the cursor to a new location and fool it.

  • for a large range of text, I copy and paste the text into BBEdit and use its smart/dumb quote filter to fix the text. (I do this for emailed source code as I want the quote dumb.)

  • for a quoted phrase I use often, I might create a macro or autocomplete text shortcut that pastes in the phrase correctly for me.

Yes, these are a pain, but it’s only occasionally a problem. And typing curled quotes manually isn’t that difficult on the Mac: option [ or ] for double quotes (add in shift for singles).

Because the text I’m creating is live HTML (Blogger’s “Compose” mode), the BBedit solution won’t work, because I need to preserve all the underlying HTML—whose quotes are not smart, of course. (But BBedit is part of my production plan; I have a number of Find/Replace tasks to clean up Blogger’s sloppy composition.)

Macros and autocomplete won’t work here, because a whole host of words that begin with N can occur in my subheads.

If I could manually retype the right punctuation to fix this glitch, I wouldn’t have troubled this group. But I can’t do that, either. Every time I retype the correct opening single quote, it gets reverted to the apostrophe. I can literally find no way (in Edge/Blogger) to begin a single-quote phrase with a word beginning with an N.

Again: Thanks to everyone for deploying brain cells on this small thing!

I don’t know if this would work, but you could try using a third-party text replacement app like Typinator to override the internal dictionary’s insistence on reversing the quote. If you rarely if ever use the “ ’n’ ” contraction, you won’t miss it being removed.

I had to turn off global smart quotes specifically because of its erratic behavior and lack of override capability. I turn it on in apps where I want it if they have the option, but most of the time I end up applying them after the fact through Clean Text or BBEdit. It’s proven to be easier for me to do it that way than to keep being frustrated.

Matthew Butterick has what sounds like good advice about HTML Q tags:

https://practicaltypography.com/straight-and-curly-quotes.html#curly-quotes-on-the-web

I’m not near my Mac so I can’t try it out. His suggestion about Word Press + plug-ins sounds like a good solution too.

Does the problem still occur if you use a different web browser?

Far as I can tell, it happens in all apps that play with Apple’s “Substitutions” preferences—including Edge and Safari and TextEdit …

(I should add that I value Substitutions a lot—it makes a lot of special formatting things effortless.)

1 Like

Oh, I thought you said earlier in the thread that the problem didn’t occur in TextEdit.

I’ve been trying to reproduce your problem in a web browser, but I can’t seem to find an instance where it allows me to type in text with smart quotes. I wonder if it’s not a macOS problem, but a problem with the editor supplied by Blogger.

You’re right, I did say that. And I was wrong. It does happen with TextEdit.

I’m still investigating, but let me say that all of your insight is tremendously helpful.

Thanks.

All right: As so often is the case, your questions have shown me the errors of my ways. Here’s what you’ve helped me learn:

Here’s what I’ve learned—some of which contradicts my statements above:

With Substitutions on for Smart Quotes …

TextEdit appropriately handles longer headlines that begin with a single quote followed by an initial word that begins with N, but it does reverse the quote for a single letter N. (This is appropriate behavior—especially since it can be manually overridden.)

Safari doesn’t work that way. Any single quote before an N (a single letter or a whole word) always turns into an apostrophe. Can be overridden.

Other browsers, including Edge and Chrome, apparently DON’T recognize Substitutions on quotation marks. (But they do recognize other manually entered replacements.) The smart quotes I’ve been getting are apparently generated there by extensions I’d thought weren’t working—like Instant Smart Quotes. But the behavior there is the same—the reason I posted this question in the first place: Can’t have a single opening quote before an N or a word beginning with N—and can’t be overridden.

If you’re confused now, join the club. And thanks again for your probing questions, which have helped bring the glitch into focus.

2 Likes

This looks like a good place for a shout-out to “Plain Clip” which is an app that sits in the dock that when invoked clears formatting from whatever is in the clipboard. It has some options (hold shift when launching) to clean up other stuff (removing trailing and leading white-space for instance.) The shift-launch also give access to the “help” file hidden under a (?) icon in the lower left.

The program used to have a webpage with this type of info, but now I can only find it in a list of software from the author: https://www.bluem.net/en

I never remember to use Option+Shift+Command+V to paste text without any formatting. “Plain Clipp.app” is one of the first things I install on any Mac I am using. I should send the author a few bucks in gratitude.

Thanks! To be clear, the problem I’ve described occurs independently of whether the apostrophe-N is typed or pasted. The change happens immediately after typing or pasting is completed.

And it happens even when I invoke Option+Shift+Command+V, which I use all the time.