Weird Gray Spaces Between Words

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.


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

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.

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.

i keep all alarms off and didnt check mail so went into a zone and took my time to log the ticket: that tab was open easily 2-3 hours before submitting due to various reasons, watching tv in the background, taking a meal break, whatever else before i returned to this page again. i said today i was ‘just seeing the post’ aka responding in real-time, but i cant make you believe me.

Ctrl+F8 to toggle off the Field Shading works! a workaround existed all these years deep under the hood. so the enhancement would simply be to turn Field Shading ‘off’ by default. that tip from V Stuart Foote, but learned a lot from everyone.

1 Like

… and I say you again, that 24.2 has the “off by default” implemented. Do I need to repeat it again?

i guess so, thanks for repeating, may have read too fast, missed ‘visible only when Formatting Marks is turned on’. will install it.

Just read the part of this thread/topic before you added to this…