Consecutive areas and numbering

Hi,

I have questions about numbering and areas. The attached document explains what I’m trying to do.

  • Is there a way to have round corners in borders of a paragraph? If so, how? (I will try the answer I see below or just nix this item)
  • I have two paragraphs with with a border and an area. They both use the same style but one has numbering and the other doesn’t. Writer treats them as different paragraph styles and separates them with a border. How do I prevent that?
  • Similarly, when using numbering, the area moves to the right so I nolonger have a contiguous background area, but more of a jagged thing. How do I prevent that?

If there is an example document somewhere that I can use as a template that would be great!

Test frames and outlines.odt (37.4 KB)

Thanks,

L

Please edit your question (= modify it so that all relevant elements are at a single location, don’t use a comment) to add OS name, LO version and save format.

To avoid creating a different use case, attach a sample file to show what you’ve already done.

No, there is not. What you can do is to set a rectangle with rounded borders (drawing tools) in the paragraph’s area’s background. In some cases it might be useful to add a text box into a rectangle (rounded corners).
For more background see this topic and the related feature request: Can you style a "span" like this, with rounded border?

Probably the two paragraphs have different (left) indents and so the borders can’t be merged. If you manually correct the indents of the numbered paragraph the border will merge.
What you can do is e.g.: Put the different paragraphs in a (table) cell, apply the border to the cell. (There are other work arounds as well.)

You can do that by correcting the (left) indents. There may be some situations when this is sensible. Regularly indents are automatically inserted for a better readability.
If you don’t want any indents for numbered paragraphs (as in Notepad or other editors) you could correct the automatism manually or better use styles for numbering which you can make as default for new documents. But at this point it seems to be better to RTFM.
.
Advice

https://documentation.libreoffice.org/en/english-documentation/

1 Like

You must understand that creating a numbered list causes many things to happen behind the scene. The most important of which is the application of some list style. The most harmful of all is the implicit direct list style used by the tool bar buttons or Format>Bullet & Numbering. It is “harmful” is the sense it has been tweaked to be as muc compatible with Word behaviour and this deviates quite a lot from the pure theory-based strict behaviour.


When you apply a list style over a paragraph (be it the default unnamed one or a specific list style), the left indent and first line indent (in LTR scripts; read “right” for RTL) is no longer controlled by the paragraph style. These settings are taken over by the list style. Trying to solve alignment issue in the paragraph style creates a real mess. Even trying to change right indent (which should not be impacted by list style) is not possible.

So, @lduperval, once again, attach your sample file in the state where it is presently for an adequate advice or fix.


EDIT:
Anyway, there is still a bug in tab stop distance management in presence of border with spacing to content. Although you can manage to merge your borders with careful configuration of both paragraph and list styles, the first line of list items won’t be formatted as expected because tab stops are not offset by the spacing distance. I have alread submitted a bug report for this but I can’t retrieve the bug number instantly.

I had a look at your sample file.

The key factor for border merging is the left indent which must be strictly identical across paragraphs and combination of styles (paragraph + list). For a non-list paragraph, left indent is defined in Indents & Spacing. For a list item, left indent is defined by Aligned at in Position.

Also, border spacing must be the same. This distance is 0cm in your sample file. You have then no problem with it.

Caution: if you set first line indent to a negative value (to achieve a hanging indent paragraph), the behaviour is faulty and you end up with a real mess in presence of border.

sometimes I want a Text body that’s indented but I still want the frame to match the paragraphs above and below it.

This is incompatible with the present Writer box model. Indents determine the position of the borders. Therefore the border is offset relative to paragraph borders above and below.

It looks to me you want in fact a border (and background) around your page. This can be done by configuring page style Borders. Give more information about your global purpose.

My global purpose is to present ChatGPT input and output on a page. I don’t want to just take screenshots. My initial though was to put borders around user input and background+border around the output. The Input is pretty standard, byt the output includes a bunch of formatting that I want to preserve as much as possible. That’s the reason for saying

sometimes I want a Text body that’s indented but I still want the frame to match the paragraphs above and below it.

I am not looking at putting a border around the whole page. Just around a subset of consecutive paragraphs.

I looked at the Writer document and there’s nothing in there that looks like what I see in my mind. Maybe I’ll put everything in a single-cell table. Or maybe I would need to use a floating frame and format the frame.

I’ll have to think about it, but I’m open to suggestions. Ideally, something other than “don’t do what you have in your head.” :smile:

Since you want to make a distinction between input and output, first thing to do is to apply a different paragraph style to these data. Styling is first a “semantic meta markup” before being a display decoration. Doing this, you clearly annotate your data as different. You are free afterwards to think about how they will be shown (without caring ever more about specific paragraph contents). Use as many styles as is relevant (but don’t exaggerate; you rarely have more than 10 different types of data).

Borders, like underline, are usually considered ugly (this is an aesthetic consideration, you are allowed to disagree). I encourage you to find an other way, like using different indents between input and output or italics for one of them.

Anyway, considering the kind of box model implemented in Writer, you won’t be able to achieve what you described in your previous posts. I would then rule out borders and background because they are too dependent on the box model. If you really insist on they, they imply too many restrictions on formatting possibilities which will give a “dull” look to the final document.

@lduperval
As written before there are work arounds to gain your intended results.
.
I have got experiences from former times when I worked on Microsoft Word; same problems. (This has not changed until today - :wink: .)
.
On https://forum.openoffice.org/en -
direct link:
https://forum.openoffice.org/en/forum/viewtopic.php?t=47482
this problem is/was discussed as well and the “solutions” are similar to mine… Have a look at this thread.
.
Applied on your sample file the result could be along this way… (paragraphs in table cell are hard formatted).
.
Test frames and outlines_TableCell.odt (32.6 KB)
.

This issue there is different. Initial question was about a numbered list where numbered items can be followed by unnumbered paragraphs (likely comments or explanations about the item). Strangely enough, the obvious and simple solution was not given.

You must first think about the semantic meaning of a list. A list is a collection of items, each of them consisting of a leading paragraph (which bears the number) followed by secondary paragraphs (which don’t bear numbers). All these items are members of the list. Therefore they must be styled the same because they have the same abstract significance (list item).

This means the secondary paragraphs will also be numbered by default when you start typing them. Just press Bksp at start of the secondary paragraph to get rid of the number. This (legitimate) direct formatting does not change the base styling. Consequently the secondary paragraphs share the same geometric attributes as the leading paragraph and the border “naturally” merges.

This is only a comment which does not solve the present question.

That’s what I ended up doing. It’s close enough to what I wanted. I gave up on some other things I was trying to do. It’s not perfect, but it works.

Thanks!

L

Semantically, I needed a visual distinction between the two core blocks. The res was formatting. The input was less complex, from a formatting point of view, than the output so I kept paragraph styles. For the output I used the Format table content with tweaksto make it look acceptable.

Thanks,

L