Weird Gray Spaces Between Words

Hi guys!

More often than not I do not type right in Libre Writer, I usually write someplace else, usually one of two places and transfer it over. Actually, that’s probably a really bad habit lol. Anyway, I usually write in either Notepad or in Google Docs (and sometimes grammarly). Usually everything transfers perfectly. But, last night I was having a weird issue transferring from Notepad OR Google Docs where 99% of the time it’s creating this really odd “space” that is gray after every comma, colon, explanation mark, etc. And 1% of the time between regular words with no punctuation. I am wondering if anyone else has had this issue and how I get rid of it without having to go through and fix it one by one.

I am attaching an example so you can see what I mean. At first I thought it might be a formatting issue so I selected the text and did the “remove formatting” option, all that did was remove my custom font and it kept the gray space lol.

I have never ever ever had this happen so if someone knows a quick fix, I would greatly appreciate it. Thanks ahead of time.

I also have the earliest version of Writer and I am on Windows 10.

1 Like

They always expect us to go thru a huge document deleting all those annoying grey spaces. MS Word doesn’t do it, no other program I found does it. Why can’t LibreOffice not insert grey boxes all over a document?

@Gallienus: what do you mean? Using NO-BREAK SPACE instead of SPACE is author’s error. You always have the possibility of Edit>Find & Replace to restore the correct character.
New question here without more details.

Most probably it’s a “non-breaking space” (U+00a0). In Writer you introduce it by pressing Ctrl Shift Space but for some reason it’s quite common on many web pages/applications, so when you copy/paste text it appears in your document. Just delete them.

Unless you actively use some of the “non standard spaces” (n-space, m-space, word joiners, etc.) on purpose, it’s quite easy to convert all those spaces in “normal spaces” by using regular expressions: open the S&R tool (Ctrl H), check “regular expression” box under “more options,” write [:space:] in the search box (this expression search for all the different kinds of spaces), a normal space in the replace box and press “replace all.”

2 Likes

Just a note: [:space:] (alternative POSIX-like syntax for \p{space}) matches tabs, among other things. If needed, tabs may be excluded from the match using this regex: [\p{space}--\t] (or [[:space:]--\t]). See regex help page of the engine used in LibreOffice for more details.

1 Like

Just delete them !!! are you out of your f***//g mind? deleting all those gray spaces out of a 20 page document

1 Like

The “comment” by @ahjaan_jeffrey above really tells much about poster’s level of reading abilities, comprehension, and politeness. Possibly we should find a way to keep such people away.

I’m having a similar issue. I needed to copy an article I’m writing from G Docs to LO Writer. (I normally avoid this because I know G Docs creates formatting issues.) I used the Search & Replace tool to get rid of the gray spaces. (Thanks Mike!)

Now, when I insert footnotes and end-notes, they are still highlighted in that gray color. (I can’t post a pic here, but the superscripts indicating foot/end notes are highlighted in gray.) The S&R tool doesn’t remove it on them either.

Is this a carryover from G Docs?
Is there a way to remove it?

Thank you for your help.

(Please let me know if it would be better to start this in a new thread. If so, my apologies.)

I like his comment. It’s a critical error of LibreOffice that it inserts weird grey boxes on all text copied from online and other sources.

Any text processor (like Word) just copies anything that is in the clipboard. When a copied page contains non-breaking spaces (which is often the case), they get pasted into Word just as well as into Writer.

Writer highlights them on screen by default, for user’s convenience (because their behavior is indeed different from usual spaces, and people often want to be informed early about their presence). Word does not, unless formatting marks are shown. These are two slightly different strategies in showing otherwise confusingly similarly-looking characters; and Writer allows to configure the behavior (e.g., OptionsWriterFormatting AidsNon-breaking spaces). In any case, these highlights are not shown on any final material (on print, in exported PDFs, etc.) - they are only a visual aids when editing.

No, it is not an “error of LibreOffice”, let alone “critical”. Not knowing your tool is normal at first, but not learning is a critical user error.

3 Likes

librewriter post-punctuation gray space on text pasted from any editor ex gmail

ideally, libreoffice would not show most writers/users post-punctuation gray space. it’s the most annoying thing that makes thousands avoid using librewriter more or exclusively.

RGB-S says Just delete them, but means take the extra step to ‘replace all’ using ‘ctrl+H’ > ‘more options’ > ‘regular expression’.

guaranteed nobody is pressing Ctrl+Space or even Shift+Space aka 99% of us did no such thing beyond adding punctuation ex comma, question mark, exclamation point, etc. so that’s the only bad assumption on this thread. this is perfectly normal writing/typing, no extra keys involved after every punctuation.

while it’s a feature not a bug, many writers/users like me would like to submit a feature request to make the default not display these as gray and make the feature an option to toggle on/off as necessary. anyone know the URL to do that? that’s my next step.

Feature requests
Feature requests should go directly to Bugzilla as Enhancements
https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&bug_severity=enhancement

Quoted from:

The gray background is only a warning about “weird” characters. In case of “space” it flags use of U+00A0 NO-BREAK SPACE instead of regular U+0020 SPACE. These two spaces are different and cause different effects regarding spacing and justification.

Most of the time, this is a faulty usage in the source document and Writer is legitimate in drawing author’s attention on these errors.

Window$ is much more sensitive to this kind of error because pressing Ctrl+Space or even Shift+Space is enough to generate the character. In other OSes, two modifiers are needed. And Shift and Ctrl are very close together making more likely to inadvertently generate the wrong character.

If you don’t care for the warning, you can disable View>Field Shading to dismiss the gray background. But IMHO, this is perhaps worse than having the warning.

1 Like

You probably don’t need to do anything. The display of the non-break space is different in 24.2, it is a blue circle at the top of the line, visible only when Formatting Marks is turned on, see between “got” and “louder” below.
NoBreakIN7-6vs24-2

1 Like

but guaranteed nobody is pressing Ctrl+Space or even Shift+Space aka 99% of us did no such thing beyond adding punctuation ex comma, question mark, exclamation point, etc. that’s the only bad assumption being made on this thread. this is perfectly normal writing/typing, no extra keys involved after every punctuation.

so the copy/paste function itself is making wrong assumptions and is potentially introducing its own translations. that’s what it seems like.

1 Like

Non-breaking space is widespread in HTML markup. Copying from web pages would bring those existing NBSPs along.

IIUC (and I’m not a French speaker, I only see this French-specific code in the codebase) non-breaking spaces are auto-inserted in some specific places in French, when autocorrection is on (and it depends on your input language).

But above all, @EarnestAl is correct, and everyone affected should check 24.2, before extending this thread.

EDIT: In the meanwhile @wolfmagic just ignored what was written for them, and filed tdf#160195. A good reason for volunteers to continue trying to help, writing answers that nobody reads.

There are a lot of other options to generate “other” spaces and while seldom “typing” them myself, I know several editors who use them in professional typesetting. We also have spaces of different width, like m-dash and n-dash.
.
A lot of this stuff is created by automatic rules on import to InDesign before publishing, but for typesetting in columns we need manual corrections. TeX had wider space after dot by default. …

My assumption is you have no clue what you paste (unless you use an hex-editor - Notepad++ has a plugin for this).
But with “magic” in the name you may prefer ideas with no proper proof…
.
If one would think of an enhancement it could be another option in paste-special to “clean” text, perhaps with a regular expression as mentioned above. (Should be possible to be done by macro also: paste, then use regexp on selection.) But this requires user wich do not believe in magic changes…

just seeing this now. after my last post i focused on logging bug: 160195

summary: LibreOffice Writer paste function for 10+ years adding gray spaces after punctuation on text pasted from anywhere else ex word, gmail, atlantis (and it doesnt happen pasting into any other editor).

note: 24.2 blue dot would also be an eyesore.

1 Like

just seeing this now, a few here are resorting to character judgements inferring i read and ignored these posts and ignore facts etc, but these again are wrong assumptions. thanks the extra info.

the option to paste-special is OK, but gets confusing as we’d need a) paste “clean with formatting” and paste ‘clean without formatting’ (btw not sure what a ‘regular expression’ means).

btw in a random spot check, pasting content from a long notepad looks clean, no gray spaces.

1 Like

But @EarnestAl posted the information about the newer version several hours before your last post.

This is just wrong assumptions. The blue dots aren’t new in 24.2, only the blue circles are; and both are only visible when you explicitly enable showing formatting marks. Since you didn’t know about “blue dots” in previous versions, you likely didn’t use that feature, and thus wouldn’t see the dots together with circles, if you bothered to test what you were told.