Quotation Marks Warning

I’m new here. I’m attempting to import a file from Microsoft Word to Writer. Mostly, the import seems to gone well. One problem I’m having is with the quotation marks. From the image you can see everything between the quotation marks, including the marks, have a warning. The warning simply says: “Quotation Marks.”

The problem seems to be that Libre wants the fancy quotes - “ ”. Instead of the quotes that hang straight down. I can’t change them manually because I have thousands of them.

Any thoughts about what is causing this and if it can be fixed? I’d rather not use Ignore All because I’m sure I will eventual have an actual quotation error.

image

Please, which operating system and LibreOffice version do you use?

Unfortunately, smart quote replacement is not controlled by “dynamic” options. This means replacement occurs only when quotes are manually typed (initial entry or [T]). The only solution left is regular expressions. And regular expressions will be hard to design because \b (word boundary) can’t be used here to make a distinction between opening and closing quotes. Perhaps something like "([^\s]) or "([:letter:]) for opening quote might do the job but closing quote is more complicated because we can also have punctuation as last character. Is ([^\s])" correct?

I’d suggest to try a simple approach (unless there’s a reason to skip some double quotes): first, replace opening ones with respective opening typographic replacement (use "(?!\s) regex), and then replace all remaining double quotes with closing replacement.

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]).