Hello, I have a short story with a paragraph in it. It returns later in the story but I want to remove words from the paragraph but leave the spaces. Currently in the writer document the words I wanted to remove in the second paragraph I used font color white so they are not visible, I would like to remove the words and leave the gaps so the reader can compare between the first and second paragraph and it’s obvious the words that have been removed, without having the words still there with white font. Thanks for your assistance.
Quite complicated, if you wish to keep layout: One could think to replace words with appropiate number of spaces, but as we use today mostly fonts with individual width per letter the gaps would be not of the same size as before - unless you limit yourself to non-proportional fonts.
I don’t fully understand the question. Can you attach an example? Do you want to duplicate the paragraph and “mask” some words in the second occurrence? Is this one-of-a-kind “event” or is it routinely done on several paragraphs?
My guess was some kind of game, where you fill the gaps, but it should not be possible to cheat by highlighting or copy the white text… (paste unformatted)
Yes that’s it, remove the words and leave the gaps.
No, a short story where I asked somebody to read something for me at an event but they removed what they didn’t like. One time event and the reader can return to the original paragraph and see exactly the words removed. That’s why I need to maintain the size of the gaps correct.
I suppose I can do it with white font that way it will maintain the correct spaces because the white font will still be there. It looks as though it could be quite complicated to accomplish what I want to do - remove the words and leave the gaps. Let me know if you’re aware of an easy way to accomplish it in writer, if not I’ll have to leave the white fonts in place. It’s going in a story that’s going in a book that will be published, if it stays as white font I don’t think it’s going to cause a problem with the book or the publishing, I just would have liked to have done it correctly, before it got to the editing stage. Thanks for your input. Let me know if you come up with an easy way to accomplish it but I need the gaps exactly the same size as if the words were still there but you just can’t see them, (they have been removed but the gaps where the words were remain).
There is a tool to “redact” text, wich might be helpful. But I never used it myself. Usually we are used to see parts blacked out, but it actually can be set to white (according to help).
https://help.libreoffice.org/latest/en-US/text/shared/guide/redaction.html
.
Reverse to the idea of @LeroyG it would not render text transparent, but uses transparency during redaction and will then hide text with opaque black or white. You need to test, if this works after export to .docx
If the issue involves only one paragraph (or a handful of them), just copy and paste the original paragraph (I assume it will be pasted close to its source). Then apply a custom character style over the “suppressed” words.
The custom character style only sets Font Color to background colour in Font Effects
tab. Absolutely don’t “touch” any other attribute lest you change the metrics of the characters disturbing original layout.
You didn’t mention OS name, LO version and save format. Be aware that the trick with character style will work only in .odt format because Word (DOCX) has no equivalent for it. Consequently, although the effect is kept, character style will vanish after save in .doc(x) format making future edits a nightmare. If you don’t know what styles are, read the Writer Guide for an introduction.
No, the short story is written in a word document (writer .docx) and will later be imported into a writing application called “Atticus” to format the book. It needs to work in .docx. Microsoft Windows 11, latest LibreOffice (24.2.3.2 X86_64). All the stories are being written in .docx and I don’t know if Atticus will import .odt but because it’s a collection of short stories that will make up a book, I would like to keep them all the same, .docx.
If I have understood your description correctly, you should definitely work with MS Office. In my opinion, you have the best chance of having your wishes fulfilled there. Nobody will be angry with you if you don’t use LibreOffice. Good luck.
I don’t even know if in MS Office you can accomplish what I am trying to do. I already have 20 other short stories written in LibreOffice .docx, that’s why I am trying to do it in LibreOffice.
Yes, but the native LibreOffice format for Writer is ODT and not docx. Writer is therefore initially a pure ODF machine with the ODT format for Writer. All other formats can be emulated as far as possible, but there is no 100% compatibility. See also:
How to open files from MS-Office 2007 or 2010 (.DOCX, .XLSX,…)?
If you like, you can upload a sample file here for someone to look at and examine.
I don’t even know if in MS Office you can accomplish what I am trying to do.
You have the idea that the native docx format of MS-Office might not work in MS-Office for your purposes, but it should work as a foreign format in LibreOffice? Really?
Yes really. Test .docx document attached as an example. If anybody wants to really assist, I appreciate it. Regards.
Test.docx (6.2 KB)
Thank you for your test file.
The sentences (words) in the file that were set to white with direct formatting, I have reset the direct formatting with Ctrl+M.
I created a new character style (Hidden Text) in which only the font effect was set to white, as @ajlittoz mentioned.
I have selected the text that is to be hidden and by double-clicking on the new character style, all characters are now in white as before.
The advantage of this is that to make this text visible, only the font effect in the Hidden Text character style needs to be changed (e.g. Automatic) and the text is visible.
I have saved the file both as ODT and as DOCX.
106694 HB Test.docx (6,8 KB)
106694 HB Test.odt (28,0 KB)
When opening the Docx file, the predefined function is still available.
However, you should continue to monitor this when you make changes to the file.
If the function cannot be continued, you should possibly write a bug report on Bugzilla.
With me:
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Initial thoughts
The only feasible method for achieving your proposed result reliably is the “white-out” you already have, possibly altered as suggested by @Hrbrgr.
You can safely stop here. TL;DR. Read on if you want to know what I think about the possible alternatives.
Background
It IS possible to calculate a “text length” based on text, font and point size, and create an object of precisely the same size. This requires rather involved macro programming. Any element with a bearing on line flow/break (e.g. space and hyphen) will need special attention.
Furthermore. the behavior of a macro language (and often the language itself) is typically tied to the environment created by software it is used within. Even if there were a common macro language used by LibreOffice, MS Office and Atticus, you would expect the management of spacing and dimensioning to differ slightly between the environments.
Even with your current solution, you cannot be certain that everything is entirely predictable. Balancing your project between three independent platforms (LibreOffice, Microsoft and Atticus) is likely to bring surprises.
Advice
@Hrbrgr already outlined a strategy which you should consider “best practice”. Note that the styles hierarchy in LibreOffice (with separate character, paragraph and page styles, and more) goes deeper (more advanced, but also more restrictive) than MS Word’s hybrid text/paragraph styles. Not all style elements can be conveyed from one context to the other. Hence the importance of the given advice:
To achieve your goal in a more automated fashion, a specialised typesetting system may be the best choice. LaTeX springs to mind. Note that the learning curve is rather tall and steep. Unless you do a LOT of this, your current strategy - using familiar tools - may be your best path ahead.
Or set Transparency to 99%
. This will not reveal the text (like dolor in white font color) if there is a background color or image.
Font color will turn from Automatic to White.
A Transparency value of 100%
will result in Automatic font color and 0% transparency.