, before the words, and or , but

I’m new and cannot seem to find the answer I am looking for anywhere. I even got the, “Your conversation is similiar to…”

So here is my question. I am using writer, and I have many instances where the words, “and” or “but” do not have a comma before them.

I can go into Edit - Find and Replace - but when I change the word from “but” to “, but” it does not put the comma after the preceeding word but instead will have a space.

So for example; if I write the sentce, “I was going to go to the mall but I decided not to.” It should look like, “I was going to go to the mall, but I decided not to.” with the comma after the word mall.

Using the Edit - Find repalace however gives me this sentence, “I was going to go to the mall , but I decided not to.”

So the question is, is there a way to have the comma come after the previous word (mall without a space) and yet keep my spacing between the comma and the word but?

Thank you in advance.

Given that not every but or and or other FANBOY (For, And, Nor, But, Or, Yet) will be preceded by a comma, then a decision has to be made on each instance. In your example you have an independent clause, “I was going to go to the mall" followed by a dependent clause, "but I decided not to.” so it does not take a preceding comma.

Because you need to make a decision on each find that means using Find and only clicking Replace if it is needed then you could search on: but (that is spacebut) and Replace with , but. But, of course, it might take a trailing comma as in this sentence.

1 Like

Works for me. So, either you have multiple spaces between your words, or some “compatibility” with M$O is enabled which adds a space. It is difficult to tell without OS name, LO version and save format. Additionally, since some form of “compatibility” may be involved, your detailed configuration in Tools>Options needs to be checked.

1 Like

I only used the sentence as an example of the spacing, not the punctuation, but I do thank you for your input. I’m just trying to eliminate the [space] , [space] but, and, or, etc.

Thank you again.

I am currently using version 7.6.4.1 (X86_64

I am looking over Tools - Options now. I’ll let you know how it works out. Thank you.

LibreOffice About Page

So I played around as it was suggested and went to Tools - Options and finall found this change to make.

Once I made the change to “Left Paragraph Margin”, all was fixed.

Thank you again for your help.

You must search for " but" (note the space) and replace with “, but”.

1 Like