hi folks, I’m brand new to using libre office. I receive word docs from a dictation service that uses an old version of Word. I would have to open in text edit, then copy/paste to a new word doc. libreoffice was recommended to me to be able to open and edit them. the docs come formatted with returns at the end of every line, like they were typed on and old typewriter. this make editing very difficult. before using office libre, I would edit by using find and replace to get rid of the returns at the end of the lines. the symbol for return in word is ^p, but that does not work in libre. what is the symbol for the return in libre to replace it with a space? thank you!
You can’t do that in Writer because there is no “object” like a paragraph mark. Find & Replace
change feature is limited to the contents of a paragraph. The paragraph delimiter is outside this contents.
It seems you have received a TXT file, i.e. a non-formatted plain text. If it has no .txt extension (in its filename), save it as such with Writer. Then, use TextEdit (you’re under MacOS, aren’t you) to remove all line breaks and “reconstruct” the paragraph structure by inserting line breaks at end of paragraphs. Once done, open it with Writer, do your editing and styling. In the end, save as .odt for further work on it and, optionally, save a copy as .doc or .docx for your external recipients.
For stability and integrity of your document, work only on the .odt version to avoid the repetitive conversion ot/from alien format which damages the document by its cumulative effect.
PS: when asking here, always mention OS name, exact LO version and save format.
You can use Find & Replace (Ctrl+H)
- In Find enter the mark for the end of a paragraph,
$
- In Replace enter a space
- Expand Other options and tick Regular Expressions
- Tick Current Selection if you want to limit it to just a portion of the text
- Click Replace All
Note: if they are line breaks, not paragraph breaks, then in Find enter \n
instead
See Using Regular Expressions in Text Searches and List of Regular Expressions
If indeed you are on a Mac, I’m not, you have access to the command line, I think Mac calls it ‘Command’. Can’t swear to it but likely from the command line you have access to the ‘tr’ command.
tr “\n” “\r” oldfile > newfile
might save you a lot of time.
\n = new line aka linefeed
\r = return aka carriage return
For line endings in text Dos/Windows uses '\r\n", Mac uses “\r”, Unix/Linux uses “\n”.
Should you end up with double spaces due to converting “\r\n” to “\r\r” then just delete the “\n” with
tr -d “\n” oldFile > newFile.
No guarantees since I don’t have a Mac but Brother does and I have to translate files to/from him occasionally.
Should it happen that your old file has really long lines separated by a paragraph character of some sort the fold command might be of use:
fold (1) - wrap each input line to fit in specified width
SYNOPSIS
fold [OPTION]... [FILE]...
-s, --spaces
break at spaces
-w, --width=WIDTH
use WIDTH columns instead of 80
Best of luck,
Mike
If
As an addendum, I just talked with my brother who is a Mac user.
To get to the command line the program is called ‘Terminal’. He initially got scared off by the command prompt which said something like ‘MacAir: his name ~" which is just the OS name: user name and ‘~’ means your home directory.
When I had him enter “man tr”, without the quotes it opened up the text based help page reader describing the “tr” command. man is short for manual as tr is short for translate. There ia also a "man fold’ page and many other man pages if you get interested.
It may be a small challenge but once you get the proper command figured your file translations will take only seconds per file.
Be Well,
Mike
Thanks very much, Mike
Regards, Rick
thank you for the suggestions. yes I’m on a Mac. I’m not familiar with some of the symbols and terms offered above (tr -d \n…), but can have a friend walk me through them.
I just stumbled on something that might help you.
Understand that I’m on a Linux system but many of the utilities in Linux are available to Mac users in the terminal as previously mentioned.
There are a suite of tools, unix2dos, dos2unix, unix2mac, mac2unix that already do what I was suggesting using “tr”.
To go from Dos to Mac would probably look like this: dos2unix file | unix2mac > convertedFile.
I didn’t know about those tools so wrote my own versions years ago.
Be well,
Mike