Appendix F. Bidirectional (BiDi) Scripts,Numeric
Digits Presentation and Calendars (Non Normative)
This appendix describes how bidirectional (BiDi) scripts and
related information are represented in OpenDocument.
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 and graphic 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 or graphic style, it controls the layout
direction of those pages, text sections, tables and text-boxes to which the
styles is applied.
Section 15.2.19 describes the style:writing-mode
attribute for page styles. It may, among other values, take the the values lr-tb (left-to-right, top-to-bottom) and rl-tb (right-to-left, top-to-bottom). The
writing-mode attribute of a page style specifies the layout direction of page
columns (left-to-right or right-to-left) for pages that are formatted using the
page style.
Section 15.5.36 describes the style:writing-mode
attribute for paragraph styles. It specifies the paragraph direction as defined
in BD5 of [UAX9] for all paragraphs that have the paragraph style assigned. For
paragraphs that are contained in lists, it further specifies whether the list
numbers and bullets are displayed on the left or on the right of the paragraph.
The writing mode attribute for paragraph styles takes the
same values as the writing mode attribute for page styles, but may also take
the value page. This value specifies that the
paragraph direction is inherited from the layout direction of the closest
layout object (section, table or text-box) in which the paragraph is contained,
and which has a layout direction other than page.
If the paragraph is not contained in any of these layout objects, the paragraph
direction is inherited from the page on which the paragraph appears.
The paragraph direction determines 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]).
OpenDocument further has a style:automatic-writing-mode
attributes (described in section 15.5.37) that specifies that an application is
allowed to recalculate the value of the paragraph's writing-mode attribute
based on its content whenever the content changes.
Section 15.7.8 describes the style:writing-mode
attribute for section styles. It may take the same values as the writing mode
attribute for paragraph styles.
The writing-mode attribute of a section style specifies the
layout direction of section columns (left-to-right or right-to-left) for text
sections that have the section style assigned. If the attribute's value is page, then the layout direction is inherited from
the layout direction of the closest layout object (section, table or text-box)
in which the section is contained, and which has a layout direction other than page.
Section 15.8.13 describes the style:writing-mode
attribute for table styles. It may take the same values as the writing mode
attribute for paragraph styles.
The writing-mode attribute of a table style specifies the
layout direction of table cells (left-to-right or right-to-left) for tables
that have the table style assigned. If the attribute's value is page, then the layout direction is inherited from
the layout direction of the closest layout object (section, table or text-box)
in which the table is contained, and which has a layout direction other than page.
Section 14.13.1 describes the style:writing-mode
attribute for graphic styles. It may take the same values as the writing mode
attribute for paragraph styles.
The writing-mode attribute of a graphic style specifies the
layout direction of columns (left-to-right or right-to-left) for text-boxes
that have the graphic style assigned. If the attribute's value is page, then the layout direction for 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 that contains the text-box.
Numeric Digits
Presentation and Calendars
All digits that have a Unicode code point can be included in
an OpenDocument document.
Note: Some office application have a
feature that allows the user to specify whether the ASCII digits U+0030 ...
U+0039 should be displayed as Arabic digits or as Indic digits (U+0660 ...
U+0669). Since this feature effects only what digits are displayed and does not
influence the representation of digits in the document itself, OpenDocument
only allows storing this setting as an application specific setting, not as
document or style content.
For list numbers, that are calculated automatically,
OpenDocument provides a generic mechanism to specify the applicable numbering
formats (see section 12.2.2).
Note: The specification currently
mentions only "1, 2, 3...",
"I, II, III...", and "i, ii, iii" explicitly, but the
schema also allows a generic string here.
OpenDocument further supports data styles, which describe how
different types of data are displayed, for example, a number or a date. Data
styles are described in section 14.7. The presentation of numeric digits can be
controlled by the transliteration attributes described in section 14.7.10. The
presentation of date information can be controlled by the number:calendar
attribute specified in section 14.7.11.