[Solved] Paragraph styles: 'around para' vs 'inside para'

Discuss the word processor
Post Reply
zenlord
Posts: 51
Joined: Tue Dec 22, 2009 5:50 pm

[Solved] Paragraph styles: 'around para' vs 'inside para'

Post by zenlord »

Hello,

I'm styling some templates, and I'm not sure how to put this into words (that's probably why I cannot find the answer).

I want to make a default paragraph style, with spacing below every paragraph to stop my colleagues from using hard returns for formatting.

But, if I employ such a default paragraph style, then (ordered/unordered) lists also have the same spacing below every child, which is definitely a no-go. This might be solved using conditional styles (something I've only recently found out about).

The second problem with paragraph styles I'm having is that I want to make a style "quotation", which I would like to stand out from the default paragraphs by simple indenting before and after AND spacing above and below. But: everytime a quotation is made out of several paragraphs itself, there is this spacing above and below every paragraph inside the quotation.

Maybe I can express this better by referring to HTML-code: I would like to place padding around the whole quotation without adding padding around each line of text inside the quotation.

THX for all your help / hints / suggestions.

PS: Maybe anyone knows where to find a good tutorial with best practices etc. to style some templates?
Last edited by zenlord on Sun May 08, 2011 7:31 pm, edited 1 time in total.
LibreOffice 4.1 on Linux (Debian Wheezy backports)
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by jrkrideau »

zenlord wrote:Hello,

I'm styling some templates, and I'm not sure how to put this into words (that's probably why I cannot find the answer).

I want to make a default paragraph style, with spacing below every paragraph to stop my colleagues from using hard returns for formatting.

But, if I employ such a default paragraph style, then (ordered/unordered) lists also have the same spacing below every child, which is definitely a no-go. This might be solved using conditional styles (something I've only recently found out about).

The second problem with paragraph styles I'm having is that I want to make a style "quotation", which I would like to stand out from the default paragraphs by simple indenting before and after AND spacing above and below. But: everytime a quotation is made out of several paragraphs itself, there is this spacing above and below every paragraph inside the quotation.

Maybe I can express this better by referring to HTML-code: I would like to place padding around the whole quotation without adding padding around each line of text inside the quotation.

THX for all your help / hints / suggestions.

PS: Maybe anyone knows where to find a good tutorial with best practices etc. to style some templates?
I think for the list problem you would need to use a list style not your default style here.

For the second problem, you might want to have two quotation styles with Quote1 then next style set to Quote2 with the proper spacing.
LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
aqualung
Volunteer
Posts: 308
Joined: Mon Dec 20, 2010 10:35 pm

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by aqualung »

zenlord wrote:PS: Maybe anyone knows where to find a good tutorial with best practices etc. to style some templates?
Chapter 6 and chapter 7 of the Writer Guide 3.3 for OpenOffice.org discuss styles; equivalent documentation for LibreOffice can be found here.

Recently I stumbled upon this discussion of working with styles in OOo and it's definitely worth reading.
OOo 3.3.0, Windows 7 64-bit SP1, planning to add LibreOffice after a bug-fix version of 3.4 is released.
Has your question been answered? Please go back to the message at the top of the thread and mark it as [SOLVED].
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by acknak »

You can use a conditional style to change the spacing between list items--however, I'm not sure that will actually solve the problem.

It sounds like you want to use your template to somehow make styles easier for people who are new to using them. If so, I'm afraid the effort is doomed to fail. Where MS has invested heavily in making productive users from the profoundly ignorant, OOo is soaked through with the assumption that the user knows and understands how the software works. There is no way to cure that assumption with a template or "smart" styles. The hard truth is, to use Writer effectively, you have to be comfortable using styles, and once you're at that point, you just apply the proper style(s) manually. Depending on something like a conditional style for list spacing just complicates the situation because it's not smart enough.

That brings us to your second question. Here, the point is that Writer's paragraph styles handle lists very awkwardly. To do it thoroughly, you need four paragraph styles: first item, last item, interior items, and (possibly) single item. There's no way for a conditional style to deal with that, so again, you might as well deal with it manually.

Spacing in quotations is exactly the same problem--you can think of a quotation as a list without numbers.

This is why you find the groups of pre-defined paragraph styles, for example: "Numbering 1", "Numbering 1 Cont", "Numbering 1 Start", "Numbering 1 End", etc.

You can get away with fewer styles if you put the list inside a frame and let the frame style handle the spacing around the borders of the list. But that's almost a cure that's worse than the disease.

For small documents, I generally just handle the list spacing manually--select all but the last item and reduce the "space below" as needed. Or, apply a special list paragraph style to all the items, then change the spacing on the last item manually.
AOO4/LO5 • Linux • Fedora 23
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by Bill »

zenlord wrote:The second problem with paragraph styles I'm having is that I want to make a style "quotation", which I would like to stand out from the default paragraphs by simple indenting before and after AND spacing above and below. But: everytime a quotation is made out of several paragraphs itself, there is this spacing above and below every paragraph inside the quotation?
One way to do this is with borders. On the Indents & Spacing tab of the Paragraph Style dialog, remove the spacing above and below the paragraph. On the Borders tab, put a white border above and below the paragraph, set the "Spacing to contents" and check the "Merge with next paragraph" box. The borders will then be added above the first paragraph and below the last paragraph, but not between paragraphs, resulting in extra space above and below the block of paragraphs.
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by RoryOF »

Set your default text para to have space below, and your quotation para to have space below. All should now be well.

You may say that the second quotation para is spaced off the first quotation para, and you don't want that. But you have to have it, because otherwise, not using a paragrapgh indent on the first line, how are you going to tell where the first quote para ends and the second quote para starts, in the event that the first quote para's last line fills the para width exactly? Don't say "this will never happen!" - it is waiting around the corner to catch you out. This is one reason why it is better to indent the first line of each para by 1em, or to tick the automatic indent box. It also uses less paper.

If you are setting a style for extended quotes, I suggest setting a space before and after text of about 1cm (depends on your page, of course), a space after the para of about one line height, _and_ reducing the font used from say 12 pt to 10 or 10.5 pt. I normally do this, but do not insert any space after the para, entering one empty para or adjusting the after space of the last extended quote para to let the extended quote set off from the body.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by jrkrideau »

acknak wrote: Where MS has invested heavily in making productive users from the profoundly ignorant, OOo is soaked through with the assumption that the user knows and understands how the software works.
I had never thought of it that way but it's a good point. This must be why one usually has to spent a significant amount of time cleaning up Word documents before they are usable.
LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: paragraph styles: 'style around par' vs 'style inside pa

Post by RGB »

Bill wrote:One way to do this is with borders. On the Indents & Spacing tab of the Paragraph Style dialog, remove the spacing above and below the paragraph. On the Borders tab, put a white border above and below the paragraph, set the "Spacing to contents" and check the "Merge with next paragraph" box. The borders will then be added above the first paragraph and below the last paragraph, but not between paragraphs, resulting in extra space above and below the block of paragraphs.
Very clever!! Only possible drawback is if your page have an image background, but 99% of the time this trick will work!!
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
zenlord
Posts: 51
Joined: Tue Dec 22, 2009 5:50 pm

Re: Paragraph styles: 'style around par' vs 'style inside pa

Post by zenlord »

OK, I'm very glad that I finally asked this question in here:

1. I now know I was searching for something that is not provided per se

2. I have gotten an answer that solves both my problems: playing with spacing on the one hand and borders / space to content on the other hand has proven very efficient in both cases.

If only there was a way to set the border color to transparent or, better yet, to be able to use this functionality when 'border-width = 0'. Maybe this could be a feature request to the devs...

THX all of you for the very helpful answers!
LibreOffice 4.1 on Linux (Debian Wheezy backports)
User avatar
therabi
Volunteer
Posts: 763
Joined: Wed Sep 01, 2010 10:01 pm
Location: USA

Re: Paragraph styles: 'style around par' vs 'style inside pa

Post by therabi »

You can use the borders without actually seeing the borders by setting the border tab to 'none' in the Paragraph style.
OpenOffice.org v3.3, LibO v3.32 on Ubuntu 10.10 and Win7
zenlord
Posts: 51
Joined: Tue Dec 22, 2009 5:50 pm

Re: [Solved] Paragraph styles: 'around para' vs 'inside para

Post by zenlord »

That might be possible in v 3.3.0, but in version 3.2.1 (debian squeeze) you have to set a border to a minimumsize of 0.5 before you can actually change the 'space to contents'-setting. Setting the border first, then setting the 'spacing to contents' and finally removing the border is also removing the 'spacing to contents'...

Good to know though that this feature is added in a current release!

THX!
LibreOffice 4.1 on Linux (Debian Wheezy backports)
User avatar
RGB
Posts: 1456
Joined: Mon Oct 08, 2007 1:34 am

Re: [Solved] Paragraph styles: 'around para' vs 'inside para

Post by RGB »

zenlord wrote:That might be possible in v 3.3.0, but in version 3.2.1 (debian squeeze) you have to set a border to a minimumsize of 0.5 before you can actually change the 'space to contents'-setting. Setting the border first, then setting the 'spacing to contents' and finally removing the border is also removing the 'spacing to contents'...

Good to know though that this feature is added in a current release!
It's not, sorry: on 3.3 if you set "no line" borders will not apply.
There are two types of people: those who believe that there are two types of people and those who do not.

openSUSE Leap with KDE Plasma / LibreOffice
zenlord
Posts: 51
Joined: Tue Dec 22, 2009 5:50 pm

Re: [Solved] Paragraph styles: 'around para' vs 'inside para

Post by zenlord »

No prob - this means it could be a nice feature request to the LibO-devs...

Made a bugreport (enhancement): https://bugs.freedesktop.org/show_bug.cgi?id=37033
LibreOffice 4.1 on Linux (Debian Wheezy backports)
Post Reply