Quotation Marks Warning

I’m using Windows 11 and LibreOffice 7.3.5.2

Why not use Menu / Tools / AutoCorrect / Apply ?

1 Like

@sokol92 it would only work for text having “Default” paragraph style :frowning:

1 Like

@mikekaganski , thanks for the clarification. Given that the text is imported from MS Word maybe try? @jimclay75051 needs to select the relevant text and apply the sequence of commands from my previous post. I tried it on my own example - the "straight" double quotes were replaced.

I manually typed in a phrase from your example and cannot reproduce the described behavior. Share a sample file, not a screenshot.

Also, do you have LanguageTool installed/enabled? Then go to options → style rules and check the status of the Smart Quotes option.

@gabix just undo every autocorrection while you type, so that immediately after your typed " was converted to or , you press Ctrl+Z and get the straight double quotes.

See answer by @LeroyG that shows the setting that controls the warning; it was disabled for me by default. Indeed, other grammar checker (like LanguageTool) could also have a similar rule.

I did it. That’s why I wonder if LT might interfere (but still it doesn’t in my case). And that’s why I suggest sharing a sample file. Screenshots are useless in most cases.

Likely it doesn’t exactly because LT is present on your system, substituting the built-in basic grammar checker. I saw the problem when LT is not installed, and the setting from the mentioned answer is set.

Then the simplest solution is to install LT.

However, I can’t reproduce the issue even after disabling LT. I tried turning on and off the option mentioned by LeroyG, still no warning (LO 7.3.4.2).

QuotationsWarning

QuotationsWarning.odt (27.8 KB)

Can’t reproduce with your file with LT disabled. However, when I enable LT, a warning appears (not from LT, though, but from the built-in checker, i. e, with green underlining of the quotation marks, but no blue underlining of the sentences).

Disable Quotation marks (choose Tools - Options - Language Settings).


LibreOffice 7.2.7.2 on Windows 6.1.

EDIT:

Then Save and Reload the document.
There is something similar to the Calc function Recalculate for Writer?

1 Like

I can see that using regular expressions is the way to go. I was surprised LibreOffice allows using regular expressions. The problem with ([^\s])" is that it not only selects the quote but also the before it.

I did read a book on regular expressions, but at the moment I can’t remember anything I read. But I will review it and find an answer I’m sure.

I tried "(?!\s) but this will replace both the opening and the closing quotes. But the important thing is the idea of using regular expressions. I feel confident I can I can find a solution.

Try "(?=\w) for “double quote followed by a word character” instead of the old one “double quote not followed by a space”, which also matched following dots and the like.

Yes, but you compensate for that in the replace string with “\1. The \1 means: use the contents of the first parenthesised group. Consequently, you echo what was matched by ([^\s]).

$1 with me.

This worked for all all the quotes that started a sentence. Although I’m wondering now if may be I could have simply done a search for a space and " to find all the beginning quotes.

For the ending quotes I searched for ." and then ," and finally ?" . I think this captured most of the cases and replaced them with a right quote.

I would have thought this would have worked, but it didn’t. Unselecting “Quatation marks” had no effect.

Anyway, what I want to do is fix the problem not hide it because I may have situations where I do have quotation errors.

I think the two comments with the regular expression suggestions should work.

Thanks for pointing the confusion. I use too many different apps and I wrote my suggestion too quickly without checking (it was very late here).

1 Like