Smart Quotes working inconsistently

Not sure if this is a bug or a feature I’m somehow unaware of / not understanding, but smart quotes seem to be behaving really strangely for me. A lot of the time they’re simply not being replaced at all, and it seems to depend on the position in the document, as if somehow Smart Quotes are turned off in particular sections of the document.

For instance: if I type a quote somewhere, it’s not replaced. If I go elsewhere, it is replaced. If I then copy a smart-quoted word over to the former section and hit spacebar to continue typing after the smart-quoted word, Smart Quotes work there again. But only where I’m typing… if I move ahead they stop working again, as if it were part of the style of the text somehow.

It is depends on the locale settings: the language of the applied paragraph style. The quote characters have many localised versions. When you choose an another language, then (maybe) it will be replaced to an another charactar, or it still the typed one. And the character styles what has not any choosen language (option “none”) will preserve the typed in characters.

Please upload an ODF type sample file here.

4 Likes

Note that for some fonts, e.g. Noto Sans or Futura, “curly” quotes look a lot like typewriter quotes, maybe just a gentle offset from vertical

1 Like

Rather, the actual language applied to the text (see the status bar), as it may be different from the paragraph style, say, because of a special character style or because overridden by the text input method.

1 Like

I remember checking for something like that, though it’s possible I’ve missed it. Either way, after loading up the document today Smart Quotes work again everywhere (even though I’d tried restarting LO yesterday and it didn’t help), even in sections where the language is set to [None]. Interestingly, those are the sections where Smart Quotes didn’t work before, even though they now do?

You’ve given me another thing to look for / try should it go wrong again though, so that’s quite helpful. I can’t check whether it was a true solution to my problem though since that problem somehow seems to have gone away overnight for no clear reason.

Also just wanted to add that while this isn’t the issue for me, it’s definitely still a helpful comment, so thank you. I did check that they were in the correct font before posting this topic. All my text is in Liberation Serif.

You might have pasted text from many different sources which gives incoherent formatting. Then you might have reset the hard formatting attributes. Ctrl+A (select all), Ctrl+M (clear direct formatting) does that for the entire text body.
When working with copy-paste prose, you should always paste unformatted text (pure characters) and then apply the paragraph styles that are defined for your document. This way you will get a consistent document structure.

1 Like

I did indeed copy-paste a lot of my text. I’m writing a report that uses a previous report with the same structure as a template, so there’s a lot of back-and-forth between the two as I’m editing them. It’s quite possible something has gone wrong there. I do usually paste my text unformatted, but I can’t be sure that I did so 100% of the time.

If I understand you correctly, “Ctrl+A, Ctrl+M” would solve the issue? I’ll try it if I run into the problem again. I unfortunately haven’t been able to reproduce the issue yet after its magic vanishing act last night, described in my other reply.

Ctr+A, Ctrl+M removes all hard formatting from all text leaving the formatting that has been applied through paragraph styles and character styles. It will also remove any wanted hard formatting. In order to avoid hard formattings you should always use paste-special (Ctrl+Shift+V) and paste unformatted text. This applies the format of the paragraph style at the cursor position.
Ctrl+0 applies "Text Body style, Ctrl+1 applies “Heading 1”, Ctrl+2 applies “Heading 2” and so on. This way you don’t have to bother about formatting. Any modification of a style applies to all the places where the style is in use. This way you can change the formatting of all text bodies, headings, headers, footers, captions, labels in one go. Everything is kept tidy, clean and uniform without significant effort.

1 Like

The straight , curly and other quotes are DIFFERENT CHARACTERS with different character code.

(Curly quotes are not some formatted straight quotes. They are another characters in a font set.
Similarly as the ‘a’ and ‘A’ letters are different characters: the capitalize function is not a formatting method. It will substitute the character ‘a’ to the Character ‘A’.)

Deleting the format properties will not help you to solve the original problem (the smart quotes).

2 Likes

Yes, sorry. I meant it’d fix the Smart Quotes replacement functionality, not the straight quotes I already typed. Thank you for elaborating though. I could’ve been more clear.

Thank you. I forgot this important matter of fact.
Save a backup of your file, just in case.
menu:Edit>Find&Replace…
Extra options:
[X] Regular Expressions
Search "\b([:alnum:]+) [straight quote followed by word boundary and a group of one or more alpha-numerics]
Replace with “$1 [leading curlie followed by the matched group]
[Replace All]
Search ([:alnum:]+)\b" [a group of one or more alpha-numerics followed by word boundary and straight quote]
Replace with $1” [the matched group followed by trailing curlie]
[Replace All]

1 Like

The problem reoccurred just now and I tried the fix Zizi64 originally suggested. It did indeed restore smart quote functionality, so I marked it as the solution.

I still don’t fully understand why sometimes Smart Quotes do work when the language is [None] and sometimes they don’t, but it appears that making sure the language isn’t [None] at least fixes the problem when it does occur.

Thank you all for your help! I don’t think I would have figured this out on my own.

Tha language property maybe applied by a Paragraph Style, or by a Character Style, or by direct (manual) formatting.

See some different quotes for some different languages substituted by my LibreOffice 6.1.6. automatically. The text was formatted (the empty paragraph was PREformatted) by different Paragraph styles:

„German“

„Hungarian”

“English”

"None" 

« French »
1 Like