Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: ODF 1.3
    • Component/s: Styles
    • Labels:
      None
    • Environment:
      This is an enhancement, described in terms of changes to OpenDocument-v1.2
    • Proposal:
      Hide
      1. RATIONALE
         1.1 Use cases:
             Users sometimes don't want to add space between paragraphs of the same style.
         1.2 Alternatives considered:
             None.

      2. REQUESTED CHANGES TO THE ODF STANDARD
         2.1 Text changes/additions:
             In section 17.6 <style:paragraph-properties> append to the end of its attribute list:

             style:contextual-spacing

             20.x: style:contextual-spacing (new section):

             The style:contextual-spacing attribute specifies that any space above or
             below this paragraph, specified using fo:margin-top or fo:margin-bottom,
             should be ignored if the previous and following paragraphs have the same
             paragraph style.

             The default value for this attribute is false.

         2.2 Schema changes/additions:

             <define name="style-paragraph-properties-attlist">
                 <interleave>
                     <optional>
                         <attribute name="style:contextual-spacing">
                             <ref name="boolean"/>
                         </attribute>
                     </optional>
                 </interleave>
             </define>

      3. IMPACTS
         3.1 Conformance:
             This proposal will not add any mandatory features or behaviors.

         3.2 Backwards compatibility:
             This element was not available in previous versions and is optional.
             Existing ODF processors may ignore it.

         3.3 Accessibility impact:
             None.
      Show
      1. RATIONALE    1.1 Use cases:        Users sometimes don't want to add space between paragraphs of the same style.    1.2 Alternatives considered:        None. 2. REQUESTED CHANGES TO THE ODF STANDARD    2.1 Text changes/additions:        In section 17.6 <style:paragraph-properties> append to the end of its attribute list:        style:contextual-spacing        20.x: style:contextual-spacing (new section):        The style:contextual-spacing attribute specifies that any space above or        below this paragraph, specified using fo:margin-top or fo:margin-bottom,        should be ignored if the previous and following paragraphs have the same        paragraph style.        The default value for this attribute is false.    2.2 Schema changes/additions:        <define name="style-paragraph-properties-attlist">            <interleave>                <optional>                    <attribute name="style:contextual-spacing">                        <ref name="boolean"/>                    </attribute>                </optional>            </interleave>        </define> 3. IMPACTS    3.1 Conformance:        This proposal will not add any mandatory features or behaviors.    3.2 Backwards compatibility:        This element was not available in previous versions and is optional.        Existing ODF processors may ignore it.    3.3 Accessibility impact:        None.

      Description

      Improve interoperability with other text processors, by enabling round-trip of additional paragraph attributes.

        Activity

        Hide
        Robert Weir added a comment -
        It is not clear what this feature does. Maybe an example would help:

        margin:top
        Paragraph A
        margin:bottom

        margin:top
        Paragraph B
        margin:bottom

        margin:top
        Paragraph C
        margin:bottom

        If the new proposed attribute was added to the paragraph style for Paragraph B, what would be the result? Does it suppress only Paragraph B's margins? Or Paragraph A's and C's as well?

        Also what does "have the same paragraph style" mean? Is this only if they reference the identical style name? Or would different style names, but with the same effective values also trigger this?

        I'm not sure I like the name "contextual-spacing". That term is rather vague. I believe this technique is generally referred to as "collapsing" the margins for adjacent paragraphs, e.g., : http://www.w3.org/TR/CSS21/box.html#collapsing-margins So I'd prefer something like "style:collapse-margins"
        Show
        Robert Weir added a comment - It is not clear what this feature does. Maybe an example would help: margin:top Paragraph A margin:bottom margin:top Paragraph B margin:bottom margin:top Paragraph C margin:bottom If the new proposed attribute was added to the paragraph style for Paragraph B, what would be the result? Does it suppress only Paragraph B's margins? Or Paragraph A's and C's as well? Also what does "have the same paragraph style" mean? Is this only if they reference the identical style name? Or would different style names, but with the same effective values also trigger this? I'm not sure I like the name "contextual-spacing". That term is rather vague. I believe this technique is generally referred to as "collapsing" the margins for adjacent paragraphs, e.g., : http://www.w3.org/TR/CSS21/box.html#collapsing-margins So I'd prefer something like "style:collapse-margins"
        Hide
        Thorsten Behrens added a comment -
        To the first question (regarding the example):
         - adding the new attribute to paragraph B, there should be no spacing between paragraph A and paragraph B (as that's the top margin of
           paragraph B) and no spacing between paragraph B and paragraph C, either (as that's the bottom margin of paragraph B)

        To the second question (same paragraph style):
         - I would think most consistent with the remainder of the spec would simply be string equality of the style names

        And yep, style:collapse-margins sounds perfect to me, thanks for the reference!
        Show
        Thorsten Behrens added a comment - To the first question (regarding the example):  - adding the new attribute to paragraph B, there should be no spacing between paragraph A and paragraph B (as that's the top margin of    paragraph B) and no spacing between paragraph B and paragraph C, either (as that's the bottom margin of paragraph B) To the second question (same paragraph style):  - I would think most consistent with the remainder of the spec would simply be string equality of the style names And yep, style:collapse-margins sounds perfect to me, thanks for the reference!
        Hide
        Patrick Durusau added a comment -
        @Thorsten, "no spacing between paragraph A and paragraph B" ?

        Using Rob's examples:

        Present:

        margin:top
        Paragraph A
        margin:bottom
        margin:top
        Paragraph B
        margin:bottom

        Proposed:
        If the styles of paragraph A and B are equivalent, that is margin:bottom = margin:top, you get only one (1) margin and not both?

        margin:top
        Paragraph A
        margin:bottom-margin:top combine, only one margin value
        Paragraph B
        margin:bottom

        So there is spacing but only one margin top/bottom spacing.

        Is that the proposal?

        Q: Should this be an attribute on the paragraph (structure) or an attribute of a style? That is A and B are subject to the same style and that style has style:collapse-margins attribute.


        Show
        Patrick Durusau added a comment - @Thorsten, "no spacing between paragraph A and paragraph B" ? Using Rob's examples: Present: margin:top Paragraph A margin:bottom margin:top Paragraph B margin:bottom Proposed: If the styles of paragraph A and B are equivalent, that is margin:bottom = margin:top, you get only one (1) margin and not both? margin:top Paragraph A margin:bottom-margin:top combine, only one margin value Paragraph B margin:bottom So there is spacing but only one margin top/bottom spacing. Is that the proposal? Q: Should this be an attribute on the paragraph (structure) or an attribute of a style? That is A and B are subject to the same style and that style has style:collapse-margins attribute.
        Hide
        Thorsten Behrens added a comment -
        > Patrick: Is that the proposal?

        No, as stated above, if this new attribute is enabled, and Paragraph A and B have the same style, then there is no top/bottom margin at all. For example if you have five paragraphs, and the inner three are list items:

        A
         * B
         * C
         * D
        E

        Then it is handy to define a style for the list items that has both top / bottom margins, but have this attribute, so there will be no space between B and C, and C and D, but there *will* be some between A and B, as well as between D and E.
        Show
        Thorsten Behrens added a comment - > Patrick: Is that the proposal? No, as stated above, if this new attribute is enabled, and Paragraph A and B have the same style, then there is no top/bottom margin at all. For example if you have five paragraphs, and the inner three are list items: A  * B  * C  * D E Then it is handy to define a style for the list items that has both top / bottom margins, but have this attribute, so there will be no space between B and C, and C and D, but there *will* be some between A and B, as well as between D and E.
        Hide
        Thorsten Behrens added a comment -
        > Patrick Q: Should this be an attribute on the paragraph (structure) or an
        > attribute of a style? That is A and B are subject to the same style and
        > that style has style:collapse-margins attribute.
        >

        The proposal is about adding a new paragraph style for this, so having it in a style or as a direct paragraph formatting is both acceptable. However, looking at how adjusting other parameters is designed for paragraphs, I think it makes more sense to have it in the style itself.
        Show
        Thorsten Behrens added a comment - > Patrick Q: Should this be an attribute on the paragraph (structure) or an > attribute of a style? That is A and B are subject to the same style and > that style has style:collapse-margins attribute. > The proposal is about adding a new paragraph style for this, so having it in a style or as a direct paragraph formatting is both acceptable. However, looking at how adjusting other parameters is designed for paragraphs, I think it makes more sense to have it in the style itself.
        Hide
        Patrick Durusau added a comment -
        Thorsten: Quick question:

        So in your example, assuming p-style-margin and p-style-no-margin for the new style:

        A - p-style-marging
        * B - p-style-no-margin
        * C - p-style-no-margin
        * C - p-style-no-margin
        E - p-style-margin

        That is we don't have to craft a specification for when the style is automatically invoked. It is chosen by the user. yes?

        Suggesting the proposal change from:

        ****
        The style:contextual-spacing attribute specifies that any space above or
               below this paragraph, specified using fo:margin-top or fo:margin-bottom,
               should be ignored if the previous and following paragraphs have the same
               paragraph style.

               The default value for this attribute is false.
        ****

        to:

        "The style:contextual-spacing attribute specifies that any space above or below a paragraph, specified using fo:margin-top or fo:margin-bottom attributes on a style, should be ignored.

        The default value for this attribute is false."

        I tried to come up with a specific way to say following previous and following, adjacent that covered all cases but gave up. What if a list intervenes? Or an image? Or a drawing? - The suggested wording generalizes it a bit but not too much I hope. (could do the same thing with fo:margin-top and fo:margin-bottom = 0 on a style)
         
        Show
        Patrick Durusau added a comment - Thorsten: Quick question: So in your example, assuming p-style-margin and p-style-no-margin for the new style: A - p-style-marging * B - p-style-no-margin * C - p-style-no-margin * C - p-style-no-margin E - p-style-margin That is we don't have to craft a specification for when the style is automatically invoked. It is chosen by the user. yes? Suggesting the proposal change from: **** The style:contextual-spacing attribute specifies that any space above or        below this paragraph, specified using fo:margin-top or fo:margin-bottom,        should be ignored if the previous and following paragraphs have the same        paragraph style.        The default value for this attribute is false. **** to: "The style:contextual-spacing attribute specifies that any space above or below a paragraph, specified using fo:margin-top or fo:margin-bottom attributes on a style, should be ignored. The default value for this attribute is false." I tried to come up with a specific way to say following previous and following, adjacent that covered all cases but gave up. What if a list intervenes? Or an image? Or a drawing? - The suggested wording generalizes it a bit but not too much I hope. (could do the same thing with fo:margin-top and fo:margin-bottom = 0 on a style)  
        Hide
        Patrick Durusau added a comment -
        Louis asked if we use "adjoining" elsewhere.

        Yes, yes we do.

        table:number-columns-repeated, see <table:covered-table-cell>, <table:table-cell> (those two might be able to merge) and <table:table-column> (all say "adjoining" without more)

        table:number-rows-repeated - "If two or more rows are adjoining, and have the same content and style"

        Those are the only uses of "adjoining" in part 1.

        Saying "adjoining" with cells, rows and columns, without more, makes sense.

        Saying it with paragraphs is more difficult. To illustrate, the <text:p> element can be used within the <style:footer> element, which contains the content of a footer in a <style:master-page> element.

        Within <style:footer> you may find: (in no particular order) <style:region-center> 16.15, <style:region-left> 16.14, <style:region-right> 16.16, <table:table> 9.1.2, <text:alphabetical-index> 8.8, <text:alphabetical-index-auto-mark-file> 8.8.3, <text:bibliography> 8.9, <text:change> 5.5.7.4, <text:change-end> 5.5.7.3, <text:change-start> 5.5.7.2, <text:dde-connection-decls> 14.6.2, <text:h> 5.1.2, <text:illustration-index> 8.4, <text:index-title> 8.2.3, <text:list> 5.3.1, <text:object-index> 8.6, <text:p> 5.1.3, <text:section> 5.4, <text:sequence-decls> 7.4.11, <text:table-index> 8.5, <text:table-of-content> 8.3, <text:tracked-changes> 5.5.1, <text:user-field-decls> 7.4.7, <text:user-index> 8.7 and <text:variable-decls> 7.4.2.

        So if I say, adjoining paragraphs with the same style (assume that to be true in these examples), which of these are "adjoining" paragraphs:

        <text:p></text:p>
        <text:p></text:p>

        <text:p></text:p>
        <text:user-index></text:user-index>
        <text:p></text:p>

        <text:p></text:p>
        <style:region-right></style:region-right>
        <text:p></text:p>

        And that is just one place where paragraphs can occur.

        I am not objecting to the change but I don't think it is going to be easy to specify.

        Show
        Patrick Durusau added a comment - Louis asked if we use "adjoining" elsewhere. Yes, yes we do. table:number-columns-repeated, see <table:covered-table-cell>, <table:table-cell> (those two might be able to merge) and <table:table-column> (all say "adjoining" without more) table:number-rows-repeated - "If two or more rows are adjoining, and have the same content and style" Those are the only uses of "adjoining" in part 1. Saying "adjoining" with cells, rows and columns, without more, makes sense. Saying it with paragraphs is more difficult. To illustrate, the <text:p> element can be used within the <style:footer> element, which contains the content of a footer in a <style:master-page> element. Within <style:footer> you may find: (in no particular order) <style:region-center> 16.15, <style:region-left> 16.14, <style:region-right> 16.16, <table:table> 9.1.2, <text:alphabetical-index> 8.8, <text:alphabetical-index-auto-mark-file> 8.8.3, <text:bibliography> 8.9, <text:change> 5.5.7.4, <text:change-end> 5.5.7.3, <text:change-start> 5.5.7.2, <text:dde-connection-decls> 14.6.2, <text:h> 5.1.2, <text:illustration-index> 8.4, <text:index-title> 8.2.3, <text:list> 5.3.1, <text:object-index> 8.6, <text:p> 5.1.3, <text:section> 5.4, <text:sequence-decls> 7.4.11, <text:table-index> 8.5, <text:table-of-content> 8.3, <text:tracked-changes> 5.5.1, <text:user-field-decls> 7.4.7, <text:user-index> 8.7 and <text:variable-decls> 7.4.2. So if I say, adjoining paragraphs with the same style (assume that to be true in these examples), which of these are "adjoining" paragraphs: <text:p></text:p> <text:p></text:p> <text:p></text:p> <text:user-index></text:user-index> <text:p></text:p> <text:p></text:p> <style:region-right></style:region-right> <text:p></text:p> And that is just one place where paragraphs can occur. I am not objecting to the change but I don't think it is going to be easy to specify.

          People

          • Assignee:
            Thorsten Behrens
            Reporter:
            Thorsten Behrens
          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: