New line break attribute "clear"
vmiklos at collabora.com
Mon Mar 28 08:09:48 UTC 2022
On Thu, Mar 17, 2022 at 12:16:42PM +0100, Miklos Vajna <vmiklos at collabora.com> wrote:
> No, so far I only added layout for the "all" case, and tested only with
> top->bottom left->right. But I'll take a look at RTL once the plain
> left/right clear types are done.
Plain left/right will be in master soon (pending in gerrit). I checked
RTL, and it seems to me that RTL is not special here. This is probably
expect, start and end maps to left/right based on RTL, but "left" means
"left" unconditionally. Feel free to double-check if I missed anything.
> > b) Does your "work in progress" includes a UI?
> Both of these are currently missing, but I plan to add them.
The insert break dialog now has a dropdown list to decide the type.
> I'll get back to this thread when I think the feature is in a reasonable
> state, because when it would make sense to file an ODF proposal for
> this. (And then you can play around with the layout / UI.)
I wrote up some text for the ODF proposal, attached.
Could you please file a JIRA ticket for this?
-------------- next part --------------
= Summary =
Proposal owner: Miklos Vajna
Proposal short name: Clear attribute for line breaks
= Rationale =
The clear attribute for a line break defines where a next line should appear
after line break in case anchored objects intersect with the current line.
Users sometimes want to make sure that the next line continues at the next
full line, below an anchored object, without starting a new paragraph.
It is possible to have a similar (but not exactly the same) layout by
expressing the same content with two paragraphs, and enabling "anchor only"
wrapping for the anchored object. The problem is that this works with two
paragraphs, so it's different layout when it comes to various paragraph
properties (spacing, etc).
= Requested changes to the ODF Standard =
Text changes/additions (compared to ODF 1.3):
6.1.5 <text:line-break> (existing section)
Append to the end of allowed attributes: text:clear.
20.436 text:clear (new section)
Specifies where the next line should appear after a line break. Possible values:
- none: default, continue right after the current line
- all: continue at the next full line, i.e. below all of the anchored objects
intersecting with the current line
- left: continue at the next line which is unblocked on the left hand side
- right: continue at the next line which is unblocked on the right hand side
<rng:define name="paragraph-content" combine="choice">
<!-- default value: none -->
In other words, allow text:clear as a new attribute of the existing
= Impacts =
This proposal will not add any mandatory features or behaviors.
This change will not impact existing ODF processors, the usage of the new
attribute value is optional.
This change will not impact accessibility.
OOXML's wordprocessingML has a <w:br w:clear="..."/> markup to describe
the same, this proposal allows roundtripping that feature in ODF. LibreOffice
7.4 implements this layout feature in its ODF extension namespace.
HTML, combined with CSS also allows to describe the same, this proposal allows
roundtripping that feature in ODF.
More information about the LibreOffice