Another line spacing question

Discuss the word processor
Post Reply
j61i69m65
Posts: 9
Joined: Fri Apr 02, 2021 6:49 am

Another line spacing question

Post by j61i69m65 »

I am one of those people who wishes to have the 'enter' key act as a line break or 'shift enter' in Writer. I've read several threads and get the jest that it's not good to use as a rule (character limits and whatnot). At times I do want an extra space between lines, but don't need it formatted as a paragraph. I've been a past MS Word user but that option is coming to an end. My use is primarily to make notes, lists, etc, then save as an html file. But the extra line space shows up when viewed in a browser.

I've read that using paragraph styles and setting the 'below paragraph' to zero would help my situation, but it doesn't. Or am I misinterpreting something about styles? I'm referring to this thread:
viewtopic.php?f=7&t=75705

Or is there a way to make Writer interpret hitting the 'enter' key as a 'shift enter'?
Thanks for your help.
J
OpenOffice 4.1.9 Win 10
User avatar
Hagar Delest
Moderator
Posts: 32655
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Another line spacing question

Post by Hagar Delest »

Hi and welcome to the forum!

What is wrong with defining the default paragraph style with no space "below paragraph"?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Another line spacing question

Post by RoryOF »

In the paragraph style you can set it to use double line spacing by default, and a different paragraph style for single line spacing. These can have space below paragraph set as you require, either to nothing (zero) or an amount of whitespace equal to one or two lines or whatever.

It appears you are trying to use OpenOffice as a typewriter. If that is your wish, then OpenOffice may be an over complex program for your needs; perhaps MS Office WordPad might be more suitable.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
j61i69m65
Posts: 9
Joined: Fri Apr 02, 2021 6:49 am

Re: Another line spacing question

Post by j61i69m65 »

Hagar Delest wrote:Hi and welcome to the forum!

What is wrong with defining the default paragraph style with no space "below paragraph"?
Sorry, what I meant to say is I tried setting the 'below paragraph' setting to 0.0 and 0.1, but no difference. I'm changing it via Format>Styles and Formatting, then modifying the style type I'm using.
Thanks,
J
OpenOffice 4.1.9 Win 10
User avatar
floris v
Volunteer
Posts: 4430
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Another line spacing question

Post by floris v »

The HTML editor of AOO was never very good, and it won't get better. You might give LibreOffice a try to see if that works better. Or try to export to XHTML, which gives much better HTML than Save as HTML, if that option is still available.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Another line spacing question

Post by RoryOF »

Setting values "below paragraph" to 0.0 and 0.1 are such slight adjustments they may not be easily visible. A line of text is typically 12 pts, so if one wishes a line space below paragraph, one should enter "12 pt." (no quotes) as the value, or an equivalent dimension (0.167 inches or 0.43 cm) or such other values as you require.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
JeJe
Volunteer
Posts: 2779
Joined: Wed Mar 09, 2016 2:40 pm

Re: Another line spacing question

Post by JeJe »

You need to use a macro which has something called a keyhandler to make Writer insert a linefeed instead of a return when the return key is pressed. I've put one in the attached document - open it and try the buttons and pressing return.

Caution though - there's no error handling... there could be any number of unforeseen circumstances in which running the macro causes problems.
Attachments
line break return.odt
(11.48 KiB) Downloaded 133 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Another line spacing question

Post by RoryOF »

LineFeeds can be dangerous in OpenOffice. They do not count as "Paragraph markers", and one can reach a limit of 64K characters, which is the inbuilt paragraph size in OpenOffice, after which no further entry is easily possible. Because of the use of linefeeds the entered text looks to be separate paragraphs, but in fact is not.

A linefeed is useful in very specialised circumstances, but only then. Best to stay away from them.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
floris v
Volunteer
Posts: 4430
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Another line spacing question

Post by floris v »

Back to the original question. You don't want any space between paragraphs, no space above or below. That's easy to fix, you just have to get used to navigating dialog boxes with the settings for direct or styled paragraph formatting (the first applies to the paragraph where your cursor is, overriding the settings in the paragraph style, the second to all paragraphs with the same style applied to it).
The truth is that actually messing around with those settings is a lot easier to do that trying to understand how people describe what you have to do. So, start a new document that you will use as a sandbox / playground, paste some of your existing document in it, and start modifying the settings of the Default paragraph style or the paragraph style that you use for the body text. Select the Indents & Spacing tab, then play with the values. You just need zeroes in Above paragraph and Below paragraph, but playing with the values for Indents (before and after text) will give you a feeling for the mechanics, and that may come in handy later on. IIRC, those settings panes aren't very different from the MS Word dialog boxes from the 80s and 90s. While you are at it, play with the settings on the other tabs as well, so you know what's there and you won't have to hunt for "hidden" formatting features later, when you need them and face a deadline.
Make sure that you don't use direct formatting. It overrides the settings in the paragraph style, so if you later modify the paragraph style, you get that oddity that the changes don't show, because the direct formatting overrides them. If you have used direct formatting a lot, you will have to get rid of that, using the Ctrl+M command (on selected text).

Export the result to xhtml. A plain browser will automatically add whitespace below paragraphs, but in xhtml you can specify that you don't want whitespace below a paragraph, and then the browser won't add it.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Another line spacing question

Post by Bill »

j61i69m65 wrote:But the extra line space shows up when viewed in a browser.
This a browser problem, not a Writer problem. The extra space does not show up in Writer. It only shows up in the browser.

You also mentioned using MS Word. How is this relevant to the problem? AFAIK, MS Word also uses SHIFT+ENTER to insert line breaks.
AOO 4.1.14 on Ubuntu MATE 22.04
j61i69m65
Posts: 9
Joined: Fri Apr 02, 2021 6:49 am

Re: Another line spacing question

Post by j61i69m65 »

floris v wrote:Back to the original question. You don't want any space between paragraphs, no space above or below. That's easy to fix, you just have to get used to navigating dialog boxes with the settings for direct or styled paragraph formatting (the first applies to the paragraph where your cursor is, overriding the settings in the paragraph style, the second to all paragraphs with the same style applied to it).
The truth is that actually messing around with those settings is a lot easier to do that trying to understand how people describe what you have to do. So, start a new document that you will use as a sandbox / playground, paste some of your existing document in it, and start modifying the settings of the Default paragraph style or the paragraph style that you use for the body text. Select the Indents & Spacing tab, then play with the values. You just need zeroes in Above paragraph and Below paragraph, but playing with the values for Indents (before and after text) will give you a feeling for the mechanics, and that may come in handy later on. IIRC, those settings panes aren't very different from the MS Word dialog boxes from the 80s and 90s. While you are at it, play with the settings on the other tabs as well, so you know what's there and you won't have to hunt for "hidden" formatting features later, when you need them and face a deadline.
Make sure that you don't use direct formatting. It overrides the settings in the paragraph style, so if you later modify the paragraph style, you get that oddity that the changes don't show, because the direct formatting overrides them. If you have used direct formatting a lot, you will have to get rid of that, using the Ctrl+M command (on selected text).

Export the result to xhtml. A plain browser will automatically add whitespace below paragraphs, but in xhtml you can specify that you don't want whitespace below a paragraph, and then the browser won't add it.
Thanks for the suggestions and I guess that's what I'm doing. I've been using Writer for awhile for personal use, but now trying to adapt to work requirements. And trying to fix a problem definitely helps me learn the product. :) Yes, the similarities to MS Word do make things easier, though I have to admit I've been surviving on a somewhat dated version on a similarly dated OS. I'll need to install Java but I'll try the xml thing too.
One question: What is direct formattting? I may well be using it, but not familiar with the term. I assume I am going the correct route to permanently change paragraph styles( Format>Styles and Formatting)?
Hagar Delest wrote:Hi and welcome to the forum!
And thanks for the warm welcome!

I will try to make a habit of using 'shift-enter', but that will probably take awhile. It was suggested perhaps Wordpad or Notepad. Those can satisfy much of what I do, but I also need the advanced formatting which an app like Writer can hopefully provide. Using a paragraph marker instead of a simple cr/lf seems nonsensical to me. The browser's just properly interpreting what it's been given. The typewriter's an interesting comparison. I'll give Tom Hanks a call.

J
OpenOffice 4.1.9 Win 10
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Another line spacing question

Post by Bill »

j61i69m65 wrote:Using a paragraph marker instead of a simple cr/lf seems nonsensical to me.
That's one difference between text entered using a typewriter and text entered using a word processor. A CRLF is needed on a typewriter for each line, but text is wrapped automatically by a word processor, so a CRLF is rarely needed. It makes sense to use the Enter key to insert a paragraph break instead of a line break. Note that text formatting is usually done through paragraph and character styles. There are no line styles.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Another line spacing question

Post by RoryOF »

@j61i69m65: You may find it useful to read this document
Writer for students (several languages)
which is helpful on the use of Writer.

You should not be concerning yourself with how you think Writer works internally (cr/lf, paragraph marks, linefeeds). Correct use of the styles supported by OO, which styles can be customised to suit exact requirements, will cover almost all formatting requirements.

"Direct Formatting" is application of changes to a paragraph, character, page style using the Format menu bar. This change is applied only to the text selected or at cursor position. Such direct formatting over-rides the style-applied formatting and means that any change to that style which will be reflected in all instances in the document will not be applied to the directly formatted text. In general there is need for very few instances of direct formatting in any major document.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Post Reply