[Solved] Last word on line drops to open space

Discuss the word processor

[Solved] Last word on line drops to open space

Postby jeffrey3600 » Sat Apr 25, 2020 7:36 pm

I'm using Text with 1.5 space between lines.
When editing, I add a word to a full line of text and the last word in the line drops into the space not onto the next line of text.

thx.
Last edited by jeffrey3600 on Mon Apr 27, 2020 12:13 am, edited 1 time in total.
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby JeJe » Sat Apr 25, 2020 8:01 pm

Can you post a sample document with a paragraph the text where this happens? Plus say where in the paragraph (after what) you type which word
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: Last word on line drops to open space

Postby RoryOF » Sat Apr 25, 2020 8:09 pm

Are you allowing the lines to wrap automatically to the next line, or do you press Enter key at the end of each line?
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31543
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Last word on line drops to open space

Postby jeffrey3600 » Sun Apr 26, 2020 1:08 am

I am not using enter between lines. The words are not wrapping and my Wrap setting is grayed out! I started a new document and this problem is not happening. I believe that it's a setting issue, but I can't find the correct setting.
Thanks.
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby Bill » Sun Apr 26, 2020 2:42 am

jeffrey3600 wrote:The words are not wrapping and my Wrap setting is grayed out!

Wrap settings control wrapping around objects like pictures, not wrapping at the margin. Wrap settings should be grayed out if no object is selected.

I don't know how to interpret "... the last word in the line drops into the space...". Please upload a sample document so we can see what is happening.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7918
Joined: Sat Nov 24, 2007 6:48 am

Re: Last word on line drops to open space

Postby jeffrey3600 » Sun Apr 26, 2020 2:54 am

Below is a before and after sample. I added the word two to the second example at the end of the line.


beneath them. The tabletops were made of a smooth black slate, the stools below were

made of a light brown wood with round seats. The room was empty. Harry walked in
--------------------------------------------------------------------------------------------------------------------

beneath them. The tabletops were made of a smooth black slate, the stools below were
two
made of a light brown wood with round seats. The room was empty. Harry walked in
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby RusselB » Sun Apr 26, 2020 3:25 am

Your example is useless as the forum puts in it's own formatting.
To properly show us what is happening, attach a sample document.
See How to attach a document for more instructions.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RusselB
Moderator
 
Posts: 6164
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Last word on line drops to open space

Postby Bill » Sun Apr 26, 2020 11:53 am

The sample appears to be 3 lines with the middle line blank. The word "two" is not at the end of the blank line, so it's not dropping down. It is wrapping to the start of the blank line. Without a real document to examine the settings, it's impossible to give you a definite answer about what's actually happening.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7918
Joined: Sat Nov 24, 2007 6:48 am

Re: Last word on line drops to open space

Postby JeJe » Sun Apr 26, 2020 12:00 pm

Copying and pasting into writer what you say happens - but that's because the text has line feed characters in it. (character 10). If you go to View menu/non-printing characters these won't be hidden.

Remove those and it will wrap properly.

Edit:

What's the origin of the text - have you pasted it in from a different application?
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: Last word on line drops to open space

Postby jeffrey3600 » Sun Apr 26, 2020 3:17 pm

I did a snip see the attachments.

Thanks.
Attachments
Clip_890.png
Clip_890.png (9.05 KiB) Viewed 885 times
Clip_888.png
Clip_888.png (8.99 KiB) Viewed 885 times
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby RoryOF » Sun Apr 26, 2020 3:23 pm

Please make the same screenshots once again, but this time _after_ turning on /View /non printing characters. That same command will turn off the new display, but we need to see what it tells us.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31543
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Last word on line drops to open space

Postby Zizi64 » Sun Apr 26, 2020 3:43 pm

And please (PLEASE!) upload a real .odt type sample file here...
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9602
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Last word on line drops to open space

Postby jeffrey3600 » Sun Apr 26, 2020 4:24 pm

ZiZi And please (PLEASE!) upload a real .odt type sample file here...

Thanks. How?
Attachments
Clip_903.png
Clip_903.png (5.74 KiB) Viewed 870 times
Clip_904.png
Clip_904.png (6.23 KiB) Viewed 870 times
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby JeJe » Sun Apr 26, 2020 4:34 pm

As there's a paragraph mark after "were" its doing what its meant to. To change that, position the caret by clicking before "made", do a backspace to remove it and type a space. It will then wrap as you want it to.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: Last word on line drops to open space

Postby RoryOF » Sun Apr 26, 2020 4:36 pm

The Backward P character (recte: a Pilcrow) indicates that you have terminated each line by pressing Enter (or pasted from a source that had done so). Each such line is treated by OpenOffice as a paragraph, and a defined Paragraph Style used for it (probably Default, possibly Text Body). To ascertain this, place cursor in a line and see what style shows in the Formatting Toolbar. The white space below each paragraph, which you are describing as "1.5 Line spacing" is actually a "Space below paragraph", as defined on the "Indents and Spacing" tab of that paragraph style definition. When you enter the extra word it is automatically moved to the next line - the paragraph is extended - and the spacing defined for use within the paragraph is used.

You may find it of help to read
Writer_for_Students
which gives a comprehensive description of using Writer for most purposes.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31543
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Last word on line drops to open space

Postby Zizi64 » Sun Apr 26, 2020 4:43 pm

ZiZi And please (PLEASE!) upload a real .odt type sample file here...


Thanks. How?


Click on the POSTREPLY button (but NOT on the Quick Reply!).
Then you will able to edit a new post. Under the post edit window there are two TAB-s: "Options" and "Upload Attachments".
Click on the second one. Browse the file on your HDD; select it, and then Click on the button "Add the file".

Submit the post.

Note: The file size limit is 128 KiB on this forum.
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9602
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Last word on line drops to open space

Postby jeffrey3600 » Sun Apr 26, 2020 4:57 pm

Thanks Rory.
Almost all of the lines read default, at least one says text. So is there any way to solve (change a setting) the problem on this document. I say this document because on "new documents" this problem does not exist. Also, when writing I never use the enter key to go to the next line. I will read the book, but generally it's difficult to find this specific problem. What would you call this problem for me to find it in the book?

One last question. Is there a way to do a total default to original "factory" settings for entire program?
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby JeJe » Sun Apr 26, 2020 5:18 pm

The issue is not anything to do with the program or its factory settings.

You have two options to remedy unwanted paragraph breaks in a document:

1) Manually as i explained above
2) Using find and replace: Put a $ in the search box, a space in the replace box, and tick More options / regular expressions.

A better remedy would be to not do what you did to get a document with unwanted paragraph marks in the first place.

Edit: someone who knows regular expressions better than I do may be able to come up with a find and replace that clears them only when the next paragraph begins with a lower case letter - which would sort everything easily.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: Last word on line drops to open space

Postby Hagar Delest » Sun Apr 26, 2020 6:19 pm

You can also try that macro: Convert ASCII text files by deleting extra paragraph breaks.

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the *EDIT button if your issue has been fixed.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28998
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Last word on line drops to open space

Postby JeJe » Sun Apr 26, 2020 6:30 pm

Try this macro but MAKE A COPY OF YOUR DOCUMENT FIRST AND RUN IT ON THE COPY - to be on the safe side.
It goes through each paragraph and if it begins with a lowercase letter it changes the previous paragraph mark to a space.

Edit: note it probably won't handle complicated documents with anything other than just normal paragraphs

Code: Select all   Expand viewCollapse view

Sub RemoveBreaks
txt= thiscomponent.text
tc=txt.createtextcursorbyrange(txt.getstart)
res = true
do
res=tc.gotoNextParagraph(false)
if res = false then exit do
tc.goright(1,true)
if tc.string <> Chr(13) and tc.string <> Chr(10) then
if lcase(tc.string) = tc.string then
tc.collapsetostart
tc.goleft(1,true)
if asc(tc.string = 13) then
tc.string = " "
tc.gotoEndOfParagraph(false)
end if
end if
else
tc.goright(1,false)
end if
tc.collapsetoend
loop
End Sub
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: Last word on line drops to open space

Postby jeffrey3600 » Sun Apr 26, 2020 11:09 pm

Thanks to all for your efforts and help. I'm sure that there is more than one solution but the one that worked for me was: 2) Using find and replace: Put a $ in the search box, a space in the replace box, and tick More options / regular expressions. Posted by JeJe. I'll never know what I did that created this problem but it is solved.
Thanks to all again!
open office 4.1.3 on Windows 10
jeffrey3600
 
Posts: 19
Joined: Sat Jan 21, 2017 7:56 pm

Re: Last word on line drops to open space

Postby RoryOF » Sun Apr 26, 2020 11:15 pm

The quick solution is to enter text in OpenOffice and press Enter _only_ when you have finished a paragraph. Formatting within the paragraph is controlled by settings in the paragraph styles used. The text I pointed to will tell you the detail of how to organise this.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31543
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Last word on line drops to open space

Postby John_Ha » Sun Apr 26, 2020 11:36 pm

jeffrey3600 wrote:I'll never know what I did that created this problem ...

You had the cursor located after the final " e " in "were" and you pressed Enter. This inserted an End of Paragraph marker - shown as a ¶ pilcrow - and hence a new paragraph started with "made".

Backspacing deletes End of Paragraph markers as does deleting the text which straddles them - eg delete "were¶made".

Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7831
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Last word on line drops to open space

Postby John_Ha » Sun Apr 26, 2020 11:43 pm

jeffrey3600 wrote:When editing, I add a word to a full line of text and the last word in the line drops into the space not onto the next line of text.

1. Copy a few lines of text from a PDF.
2. Paste into AOO.
3. Note how each line ends with an End of Paragraph mark.
4. Now type something into one line - note what happens when the text spills.

If you have multiple lines like this, that is what happened.

Clipboard01.png
Text copied from PDF pasted into AOO
Clipboard01.png (10.26 KiB) Viewed 787 times
Attachments
text copied from PDF.odt
(11.65 KiB) Downloaded 15 times
test.pdf
A PDF with some text
(26.68 KiB) Downloaded 13 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7831
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Last word on line drops to open space

Postby Bill » Mon Apr 27, 2020 10:13 am

AFAIK, there is no reliable way to automate fixing this particular problem with 100% accuracy.

Replacing paragraph marks with a space turns the whole document into a single paragraph with the potential for losing data if the 64k character limit for paragraphs is exceeded. Loss of formatting can also occur if more than one paragraph style has been used in the document. The user would have to manually reinsert the paragraph breaks.

Replacing paragraph marks followed by a lower-case letter will rejoin sentences that have been split. It won't rejoin paragraphs which have been split by pressing Enter before the start of a sentence in the middle of a paragraph. Those would have to be rejoined manually.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7918
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved] Last word on line drops to open space

Postby RoryOF » Mon Apr 27, 2020 10:26 am

Often a document that has single line paragraphs, as, for example, might be downloaded from some book archive sites, will have an extra blank line inserted to mark where a paragraph ended in the original text. In that case conversion of the document is quite simple:

Find the empty Paragraph as follows:

Use Find and Replace

Find ^$, Replace %%%% (or some similar token that does not occur in the document). More Options, set Regular Expressions on. Replace all

Now convert the single line paragraphs to continuous text:
Find $, Replace <space char>, More Options, set Regular expressions on, Replace all

Now reinstate the original text paragraphing:
Find %%%%, Replace \n, More options, set Regular Expressions on, Replace all.

All done.

I offer this as a general solution for downloaded text files of troublesome formatting- I am not aware that there are blank paragraphs in the document under discussion.

Also, having /View /Non Printing characters enabled is always essential for handling troublesome imported files.

 Edit: It is important to stress that this method should only be applied on a long (i.e., book length) document in which there are regular blank paragraphs, i.e, Backwards P signs on their own. If there are not, it is likely that the entire document will be turned into one large paragraph; OpenOffice really does not like paragraphs longer than 64K characters and you will lose some or all of the document text. 
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31543
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Last word on line drops to open space

Postby JeJe » Mon Apr 27, 2020 10:27 am

Bill - For the last case you suggest, normally you'd put.

End of sentence.[correctly intended paragraph mark]
New sentence.

But if the new paragraph wasn't intended, and a space was added, it would be

End of sentence.[space][paragraph mark]
New sentence.

Or

End of sentence.[paragraph mark]
[space]New sentence.

Which could be used to help fix those. Nothing would be 100% though, computers can't read past intentions.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: [Solved] Last word on line drops to open space

Postby Bill » Mon Apr 27, 2020 12:01 pm

JeJe wrote:But if the new paragraph wasn't intended, and a space was added, it would be

End of sentence.[space][paragraph mark]
New sentence.

Or

End of sentence.[paragraph mark]
[space]New sentence.

Unfortunately, we have no sample document to see if that is the case. The sample screenshot does not show any lines that break between sentences. The two lines shown in the screenshot break in the middle of sentences. One has a space before the paragraph break. The other has no space before the paragraph break and no space at the start of the line after the paragraph break.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7918
Joined: Sat Nov 24, 2007 6:48 am

Re: [Solved] Last word on line drops to open space

Postby JeJe » Mon Apr 27, 2020 12:09 pm

Bill - Yeah, I'm talking generally. not about this specific case.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1192
Joined: Wed Mar 09, 2016 2:40 pm

Re: [Solved] Last word on line drops to open space

Postby Bill » Mon Apr 27, 2020 12:53 pm

The solution would be trivial if every paragraph break that has been added within paragraphs were preceded or followed by a space. In those cases, AltSearch (Find & Replace wouldn't work) could be used to replace the break/space combo with a space. There would be no need to search for punctuation marks or other characters.
AOO 4.1.7 on Manjaro Cinnamon
Bill
Volunteer
 
Posts: 7918
Joined: Sat Nov 24, 2007 6:48 am


Return to Writer

Who is online

Users browsing this forum: No registered users and 11 guests