XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Applied
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ODF 1.4
    • Component/s: Paragraph
    • Labels:
      None
    • Resolution:
      Hide

      1.3 Normative References

      ...
      [CSS4WritingModes] Elika J. Etemad, Koji Ishii, CSS Writing Modes Level 4, https://www.w3.org/TR/css-writing-modes-4, W3C, 2019
      ...
      [UNICODE] The Unicode Consortium. The Unicode Standard, https://www.unicode.org/versions/latest.
      ...

      20.404 style:writing-mode

      20.404.1 General

      The style:writing-mode attribute controls the direction in which characters are ordered within a line (inline direction), the direction in which lines are stacked (block direction) and the glyph orientation of individual characters. Furthermore it controls the order and display direction of columns in layout objects like section, table or page and in text boxes (called here layout direction).

      Note: In context of these sections, the term “character” is to be interpreted to mean a text character as perceived by the user, or a glyph as defined in Unicode.

      The orientation of images and shapes is not affected by the writing mode.

      The defined values for the style:writing-mode attribute are lr-tb, lr, rl-tb, rl, tb-rl, tb, tb-lr, sideways-rl, sideways-lr and page.

      • lr-tb: see §7.27.7 of [XSL].

      Inline direction is left-to-right, block direction is top-to-bottom, all characters are rendered upright.

      Columns are stacked left-to-right, origin of a table is top-left.

      Note: This value is common for latin scripts, such as used for English or Spanish texts, for example.

      * lr: short name for value lr-tb.

      • rl-tb: see §7.27.7 of [XSL].

      Inline direction is right-to-left, block direction is top-to-bottom, all characters are rendered upright.

      Columns are stacked right-to-left, origin of a table is top-right.

      Note: This value is common for complex scripts, such as used for Arabic or Hebrew texts, for example.

      * rl: short name for value rl-tb.

      • tb-rl: see §7.27.7 of [XSL].

      Inline direction is top-to-bottom, block direction is right-to-left. Characters of asian scripts are rendered upright, characters of other scripts are rotated 90deg clockwise.

      Columns are stacked top-to-bottom, origin of a table is top-right.

      Note: This value is used for vertical Korean or Japanese texts, for example.

      * tb: short name for value tb-rl.

      • tb-lr: see Appendix A.1. of [XSL].

      Inline direction is top-to-bottom, block direction is left-to-right. Characters of asian scripts are rendered upright, characters of other scripts are rotated 90deg clockwise.

      Columns are stacked top-to-bottom, origin of a table is top-left.

      Note: This value is used for the traditional Mongolian script, for example.

      * sideways-rl: see §3.2 of [CSS$WritingModes].

      Inline direction is top-to-bottom, block direction is right-to-left. A*ll* characters are rotated 90deg clockwise.

      Columns are stacked top-to-bottom, origin of a table is top-right.

      Note: This writing mode is not intended for specific languages, but can be used for table headers in Arabic or Hebrew texts or for 90deg clockwise rotation of tables, for example.

      * sideways-lr: see §3.2 of [CSS$WritingModes].

      Inline direction is bottom-to-top, block direction is left-to-right, a*ll* characters are rotated 90deg counter-clockwise.

      Columns are stacked bottom-to-top, origin of a table is bottom-left.

      Note: This writing mode is not intended for specific languages, but can be used for table headers in western languages or for 90deg counter-clockwise rotation of tables, for example.

      * page: This value specifies that the writing-mode is inherited from the closest layout object in which the element is contained or from the anchor object of the element. Details are specified in the following sections.

      Note: The style:writing-mode attribute can also be used in chart styles. However, it does not belong to the <style:chart-properties> element, but to the <style:graphic-properties> element or to the <style:paragraph-properties> element and therefore ‘chart-properties’ does not have its own section here.

      20.404.2 <style:graphic-properties>

      The style:writing-mode attribute of a <style:graphic-properties> element specifies the layout direction of columns within text boxes that have the graphic style assigned.

      If the attribute value is page the layout direction of columns within text boxes that are anchored to a page is inherited from the layout direction of the page on which the text box is displayed. For text boxes that have a different anchor type, the layout direction is inherited from the paragraph direction of the paragraph or object that contains the text box.

      If a graphic style is evaluated for the style:writing-mode property of a paragraph as specified in section 16.2, not only the <style:paragraph-properties> element but also the <style:graphic-properties> element is evaluated. If the style:writing-mode attribute is present in both elements, it shall have the same value.

      ...

      20.404.3 <style:page-layout-properties>

      The style:writing-mode attribute of a <style:page-layout-properties> element specifies the layout direction of page columns for pages that are formatted using the page style. It further determines the binding edge and progress direction of books, see style:page-usage [19.509] and it determines the writing mode in the inheritance chain of objects, which have a style:writing-mode attribute with value page applied.

      The location of the header area at top of a page and the footer area at bottom of a page is not affected by the writing mode of the page.

      The value page shall not be use for a style:writing-mode attribute of a <style:page-layout-properties> element..

      ...

      20.404.4 <style:paragraph-properties>

      The style:writing-mode attribute of a <style:paragraph-properties> element specifies the inline direction, block direction and character orientation for all paragraphs that have the paragraph style assigned.

      The style:writing-mode attribute specifies for the paragraph the base direction required by the BiDi Algoritm, see BD5 of [UAX9].

      Note: The inline direction determines the location of “start” and “end” of a paragraph. For paragraphs that are contained in lists, it thus specifies where the list numbers and bullets are displayed, for writing mode rl-tb on the right side, for example.

      If a <style:paragraph-property> element is child element of a graphic style that is assigned to a text box, then it specifies the layout direction of columns within the text box as well. In case the style writing-mode attribute is present in the <style:paragraph-properties> child element and in the <style:graphic-properties> child element of the same graphic style, their values shall be identical.

      The value page specifies that the actual value is inherited from the layout direction of the closest layout object in which the paragraph is contained, and which has a layout direction other than page. For a paragraph element, which is direct child element of a shape, the closest layout object is the shape itself.

      Note: If a paragraph style does not contain a style:writing-mode attribute, then the hierarchical style model as specified in section 16.2 is used to determine a value for the writing mode of the element that has the paragraph style applied. That is different from an attribute with value page.

      ...

      20.404.5 <style:section-properties>

      The style:writing-mode attribute of a <style:section-properties> element specifies the layout direction of section columns for text sections that have the section style assigned.

      ...

      20.404.6 <style:table-cell-properties>

      The style:writing-mode attribute of a <style:table-cell-properties> element specifies a layout directing for any descendant element of the cell that has a style assigned with writing mode page and for which the table cell is the closest containing layout object on which the layout direction is specified.

      Note: OpenDocument further has the table cell style attribute style:direction [20.263] to specify that characters are vertically stacked but not rotated, and it further has the table cell style attribute style:glyph-orientation-vertical [20.297] to specify, that no characters in a vertical writing mode are rotated.

      ...

      20.404.7 <style:table-properties>

      The style:writing-mode attribute of a <style:table-properties> element specifies the layout direction of table columns for tables that have the table style assigned.

      If the attribute value is page the layout direction is inherited from the layout direction of the closest layout object in which the table is contained, and which has a layout direction other than page.

      ...

      E.1 Paragraph and Layout Direction

      In [OpenDocument], the direction of text runs inside a paragraph is calculated using the Unicode BiDi Algorithm. See [UAX9]. The paragraph direction, as required by the BiDi Algorithm (see BD5 of [UAX9]), and the display direction of layout objects like table or page columns (in the following called layout direction) is controlled by a writing mode attribute (style:writing-mode) that can be used within styles.

      The writing mode attribute can be applied individually to paragraph styles, page styles, section styles, table styles, table cell styles, graphic styles and chart styles. If present within a paragraph style, it controls the paragraph direction of those paragraphs, to which the style is applied. If present within a page style, section style, table style, table cell style, graphic style or chart style, it controls the layout direction of those pages, text sections, tables, table cells, text-boxes and chart objects to which the styles is applied.

      The paragraph direction specifies the default bidirectional orientation of the text in that paragraph. The result of the BiDi Algorithm can be manually changed by inserting BiDi embedding control characters (U+202A ... U+202E) and implicit directional marks (U+200E ...U+200F) into the text. See [UTR20].

      Show
      1.3 Normative References ... [CSS4WritingModes] Elika J. Etemad, Koji Ishii, CSS Writing Modes Level 4, https://www.w3.org/TR/css-writing-modes-4 , W3C, 2019 ... [UNICODE] The Unicode Consortium. The Unicode Standard, https://www.unicode.org/versions/latest . ... 20.404 style:writing-mode 20.404.1 General The style:writing-mode attribute controls the direction in which characters are ordered within a line (inline direction), the direction in which lines are stacked (block direction) and the glyph orientation of individual characters. Furthermore it controls the order and display direction of columns in layout objects like section, table or page and in text boxes (called here layout direction). Note: In context of these sections, the term “character” is to be interpreted to mean a text character as perceived by the user, or a glyph as defined in Unicode. The orientation of images and shapes is not affected by the writing mode. The defined values for the style:writing-mode attribute are lr-tb , lr , rl-tb , rl , tb-rl , tb , tb-lr, sideways-rl , sideways-lr and page. lr-tb : see §7.27.7 of [XSL] . Inline direction is left-to-right, block direction is top-to-bottom, all characters are rendered upright. Columns are stacked left-to-right, origin of a table is top-left. Note: This value is common for latin scripts, such as used for English or Spanish texts, for example. * lr : short name for value lr-tb . rl-tb : see §7.27.7 of [XSL] . Inline direction is right-to-left, block direction is top-to-bottom, all characters are rendered upright. Columns are stacked right-to-left, origin of a table is top-right. Note: This value is common for complex scripts, such as used for Arabic or Hebrew texts, for example. * rl : short name for value rl-tb . tb-rl : see §7.27.7 of [XSL] . Inline direction is top-to-bottom, block direction is right-to-left. Characters of asian scripts are rendered upright, characters of other scripts are rotated 90deg clockwise. Columns are stacked top-to-bottom, origin of a table is top-right. Note: This value is used for vertical Korean or Japanese texts, for example. * tb : short name for value tb-rl . tb-lr : see Appendix A.1. of [XSL] . Inline direction is top-to-bottom, block direction is left-to-right. Characters of asian scripts are rendered upright, characters of other scripts are rotated 90deg clockwise. Columns are stacked top-to-bottom, origin of a table is top-left. Note: This value is used for the traditional Mongolian script, for example. * sideways-rl : see §3.2 of [CSS$WritingModes] . Inline direction is top-to-bottom, block direction is right-to-left. A*ll* characters are rotated 90deg clockwise. Columns are stacked top-to-bottom, origin of a table is top-right. Note: This writing mode is not intended for specific languages, but can be used for table headers in Arabic or Hebrew texts or for 90deg clockwise rotation of tables, for example. * sideways-lr : see §3.2 of [CSS$WritingModes] . Inline direction is bottom-to-top, block direction is left-to-right, a*ll* characters are rotated 90deg counter-clockwise. Columns are stacked bottom-to-top, origin of a table is bottom-left. Note: This writing mode is not intended for specific languages, but can be used for table headers in western languages or for 90deg counter-clockwise rotation of tables, for example. * page : This value specifies that the writing-mode is inherited from the closest layout object in which the element is contained or from the anchor object of the element. Details are specified in the following sections. Note: The style:writing-mode attribute can also be used in chart styles. However, it does not belong to the <style:chart-properties> element, but to the <style:graphic-properties> element or to the <style:paragraph-properties> element and therefore ‘chart-properties’ does not have its own section here. 20.404.2 <style:graphic-properties> The style:writing-mode attribute of a <style:graphic-properties> element specifies the layout direction of columns within text boxes that have the graphic style assigned. If the attribute value is page the layout direction of columns within text boxes that are anchored to a page is inherited from the layout direction of the page on which the text box is displayed. For text boxes that have a different anchor type, the layout direction is inherited from the paragraph direction of the paragraph or object that contains the text box. If a graphic style is evaluated for the style:writing-mode property of a paragraph as specified in section 16.2, not only the <style:paragraph-properties> element but also the <style:graphic-properties> element is evaluated. If the style:writing-mode attribute is present in both elements, it shall have the same value. ... 20.404.3 <style:page-layout-properties> The style:writing-mode attribute of a <style:page-layout-properties> element specifies the layout direction of page columns for pages that are formatted using the page style. It further determines the binding edge and progress direction of books, see style:page-usage [19.509] and it determines the writing mode in the inheritance chain of objects, which have a style:writing-mode attribute with value page applied. The location of the header area at top of a page and the footer area at bottom of a page is not affected by the writing mode of the page. The value page shall not be use for a style:writing-mode attribute of a <style:page-layout-properties> element.. ... 20.404.4 <style:paragraph-properties> The style:writing-mode attribute of a <style:paragraph-properties> element specifies the inline direction, block direction and character orientation for all paragraphs that have the paragraph style assigned. The style:writing-mode attribute specifies for the paragraph the base direction required by the BiDi Algoritm, see BD5 of [UAX9] . Note: The inline direction determines the location of “start” and “end” of a paragraph. For paragraphs that are contained in lists, it thus specifies where the list numbers and bullets are displayed, for writing mode rl-tb on the right side, for example. If a <style:paragraph-property> element is child element of a graphic style that is assigned to a text box, then it specifies the layout direction of columns within the text box as well. In case the style writing-mode attribute is present in the <style:paragraph-properties> child element and in the <style:graphic-properties> child element of the same graphic style, their values shall be identical. The value page specifies that the actual value is inherited from the layout direction of the closest layout object in which the paragraph is contained, and which has a layout direction other than page . For a paragraph element, which is direct child element of a shape, the closest layout object is the shape itself. Note: If a paragraph style does not contain a style:writing-mode attribute, then the hierarchical style model as specified in section 16.2 is used to determine a value for the writing mode of the element that has the paragraph style applied. That is different from an attribute with value page . ... 20.404.5 <style:section-properties> The style:writing-mode attribute of a <style:section-properties> element specifies the layout direction of section columns for text sections that have the section style assigned. ... 20.404.6 <style:table-cell-properties> The style:writing-mode attribute of a <style:table-cell-properties> element specifies a layout directing for any descendant element of the cell that has a style assigned with writing mode page and for which the table cell is the closest containing layout object on which the layout direction is specified. Note: OpenDocument further has the table cell style attribute style:direction [20.263] to specify that characters are vertically stacked but not rotated, and it further has the table cell style attribute style:glyph-orientation-vertical [20.297] to specify, that no characters in a vertical writing mode are rotated. ... 20.404.7 <style:table-properties> The style:writing-mode attribute of a <style:table-properties> element specifies the layout direction of table columns for tables that have the table style assigned. If the attribute value is page the layout direction is inherited from the layout direction of the closest layout object in which the table is contained, and which has a layout direction other than page . ... E.1 Paragraph and Layout Direction In [OpenDocument] , the direction of text runs inside a paragraph is calculated using the Unicode BiDi Algorithm. See [UAX9] . The paragraph direction, as required by the BiDi Algorithm (see BD5 of [UAX9] ), and the display direction of layout objects like table or page columns (in the following called layout direction) is controlled by a writing mode attribute ( style:writing-mode ) that can be used within styles. The writing mode attribute can be applied individually to paragraph styles, page styles, section styles, table styles, table cell styles, graphic styles and chart styles. If present within a paragraph style, it controls the paragraph direction of those paragraphs, to which the style is applied. If present within a page style, section style, table style, table cell style, graphic style or chart style, it controls the layout direction of those pages, text sections, tables, table cells, text-boxes and chart objects to which the styles is applied. The paragraph direction specifies the default bidirectional orientation of the text in that paragraph. The result of the BiDi Algorithm can be manually changed by inserting BiDi embedding control characters (U+202A ... U+202E) and implicit directional marks (U+200E ...U+200F) into the text. See [UTR20] .

      Description

      Summary

      Proposal owner: Miklos Vajna

      Proposal short name: Bottom to top, left to right writing direction

      Rationale

      Use cases:

      Users sometimes want to have a text direction which is similar to latin text
      (left to right, then top to bottom), but rotated 90 degrees counter-clockwise.

      Also, this improves consistency, as doing the same in the clockwise direction
      is already possible (the top to bottom, right to left direction is used for
      e.g. Japanese text).

      Alternatives considered:

      It is possible to rotate characters at a span level, but that only gives
      similar result as long as the content fits a single line.

      Requested changes to the ODF Standard

      Text changes/additions (compared to ODF 1.2):

      20.394.2 <style:graphic-properties> (existing section)

      Append to the end of style:writing-mode attribute value list: bt-lr.

      20.394.3 <style:page-layout-properties> (existing section)

      Append to the end of style:writing-mode attribute value list: bt-lr.

      20.394.4 <style:paragraph-properties> (existing section)

      Append to the end of style:writing-mode attribute value list: bt-lr.

      20.394.5 <style:section-properties> (existing section)

      Append to the end of style:writing-mode attribute value list: bt-lr.

      20.394.6 <style:table-cell-properties> (existing section)

      Append to the end of style:writing-mode attribute value list: bt-lr.

      20.394.7 <style:table-properties> (existing section)

      Append to the end of style:writing-mode attribute value list: bt-lr.

      Schema changes/additions:

      <rng:define name="common-writing-mode-attlist">
        <rng:optional>
          <rng:attribute name="style:writing-mode">
            <rng:choice>
              <rng:value>lr-tb</rng:value>
              <rng:value>rl-tb</rng:value>
              <rng:value>tb-rl</rng:value>
              <rng:value>tb-lr</rng:value>
              <rng:value>lr</rng:value>
              <rng:value>rl</rng:value>
              <rng:value>tb</rng:value>
              <rng:value>page</rng:value>
              <rng:value>bt-lr</rng:value>
            </rng:choice>
          </rng:attribute>
        </rng:optional>
      </rng:define>

      In other words, allow bt-lr as a new value of the style:writing-mode
      attribute.

      Impacts

      Conformance:

      This proposal will not add any mandatory features or behaviors.

      Backwards compatibility:

      This change will not impact existing ODF processors, the usage of the new
      attribute value is optional.

      Accessibility impact:

      This change will not impact accessibility.

      Interoperability:

      OOXML's wordprocessingML has a <w:textDirection w:val="btLr"/> markup to
      describe the same, this proposal allows roundtripping that feature in ODF.
      LibreOffice 6.3 implements this layout feature in its ODF extension namespace.

        Attachments

        1. Comparison standards and implementations.odt
          31 kB
          Regina Henschel
        2. overview.ods
          33 kB
          Regina Henschel
        3. Proposal_writing-mode_Version_TC2.odt
          67 kB
          Regina Henschel
        4. Proposal_writing-mode_Version_TC3.odt
          69 kB
          Regina Henschel
        5. Proposal_writing-mode_Version_TC4.odt
          69 kB
          Regina Henschel
        6. Proposal_writing-mode_Version_TC5.odt
          67 kB
          Regina Henschel
        7. Proposal_writing-mode_Version_TC6.odt
          69 kB
          Regina Henschel

          Activity

            People

            • Assignee:
              patrick Patrick Durusau
              Reporter:
              timar Andras Timar (Inactive)
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: