OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: revised proposal for new position and space attributes for the listlevel


Dear TC members,

I want to revise my proposal for new attributes for the list-level
style in order to include the proposed changes from Florian - see
http://www.oasis-open.org/archives/office/200703/msg00014.html.

The new attributes provide a new possibility to specify the position
und spacing of the list label and the list item itself:

The new attributes for the list level style are:
- text:label-followed-by
- text:list-tab-stop-position
- fo:text-indent
- fo:margin-left
These new attributes plus the existing attribute fo:text-align give
the possibility to specify the position and spacing of the list label
and the list item in a new way, which could be called position and
spacing via label alignment.
The existing attributes text:space-before, text:min-label-width and
text:min-label-distance plus fo:text-align defines somehow the
position and spacing via label size and position.

The new attributes are grouped together in a new element, named
style:list-level-label-alignment. This element has to contain the
attribute text:label-followed-by. Attributes
text:list-tab-stop-position, fo:text-indent and fo:margin-left
are optional.

In order to decide, which group of attributes are used to define the
position and spacing of the list label and the list item the new
attribute text:list-level-position-and-space-mode is introduced.

- text:list-level-position-and-space-mode:
<define name="style-list-level-properties-attlist" combine="interleave">
     <optional>
        <attribute name="text:list-level-position-and-space-mode">
	 <choice>
	    <value>label-width-and-position</value>
	    <value>label-alignment</value>
	 </choice>
        </attribute>
     </optional>
</define>

Meaning of these values:
- label-width-and-position:
The existing attributes text:space-before, text:minimum-label-width,
text:minimum-label-distance and fo:text-align are used to define the
position and spacing of the list label and the list item.

- label-alignment:
The new attributes and fo:text-align are used to define the position
and spacing of the list label and the list item. The values of the
existing attributes for text:space-before, text:minimum-label-width
and text:minimum-label-distance are treated as 0.

If attribute text:list-level-position-and-space-mode is missing, which
is hold for documents conforming previous ODF versions, its value is
assumed to be label-width-and-position.


- text:label-followed-by:
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
     <attribute name="text:label-followed-by">
        <choice>
	 <value>listtab</value>
	 <value>space</value>
	 <value>nothing</value>
        </choice>
     </attribute>
</define>

Meaning of the values of attribute text:label-followed-by:
- listtab - a tab stop follows the list label before the text starts.
- space - a space character is inserted after the list label before
the text starts.
- nothing - the text starts directly after the list label.


- text:list-tab-stop-position:
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
     <optional>
        <attribute name="text:list-tab-stop-position">
	 <ref name="nonNegativeLength"/>
        </attribute>
     </optional>
</define>

Attribute text:list-tab-stop-position is only relevant, if attribute
text:label-followed-by is defined and its value equals "listtab". In
all other cases, attribute text:list-tab-stop-position isn't evaluated.
Attribute text:list-tab-stop-position specifies an additional tab
stop, which is inserted into the list item. Typically, this tab stop
is the one, which is applied after the list label. Thus, the text of
the first line of list item typically starts at this tab stop. In
left-to-right layout environments this tab stop is interpreted as a
left tab. While in right-to-left layout environments its interpreted
as a right tab.
There exists two cases in which this additional tab stop isn't applied
to start the text of the first line of the list item after the list label:
- The position of the additional tab stop is before the end of the
list label.
- Between the end of the list label and the position of the additional
tab stop exists already a tab stop at the list item.
In these cases an existing respectively a default tab stop is applied
after the list label. The additional tab stop can be applied by normal
inserted tab characters in the list item in these cases.
The additional tab stop can also been applied in the text lines, which
follow the first line of the list item.


- fo:text-indent
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
     <optional>
        <attribute name="text:text-indent">
	 <ref name="Length"/>
        </attribute>
     </optional>
</define>

- fo:margin-left
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
     <optional>
        <attribute name="fo:margin-left">
	 <ref name="Length"/>
        </attribute>
     </optional>
</define>

The new attributes fo:text:indent and fo:margin-left specify the
indent for the text lines of the list item and the alignment position
for the list label. These attributes have the same meaning as the
paragraph attributes fo:text-indent an fo:margin-left.
Position fo:text-indent + fo:margin-left specifies the indent of the
first text line of the list item. This position is the alignment
position for the list label. Because value of text:minimum-label-width
is treated as 0, the values of fo:text-align have to be interpreted as
follows:
- fo:text-align = "left": The list label starts at the alignment position.
- fo:text-align = "center": The center of the list label is positioned
at the alignment position.
- fo:text-align = "right": The list label ends at the alignment position.

The new attribute fo:margin-left specifies the indent of the text
lines of the list item following the first line.


The new attributes fo:text-indent and fo:margin-left for a list
level style are competing with the paragraph indent attributes
fo:text-indent and fo:margin-left. The same is hold for the
corresponding paragraph indent attributes for a paragraph style.
These paragraph indent attributes are used to calculate the indent of
first line of the paragraph and the indent of the following lines:
- first line indent = fo:text-indent + fo:margin-left
- following lines indent = fo:margin-left

In the following is described how this competition is solved.

In general the indent attributes of the paragraph respectively the
paragraph styles are used to determine the indent for the
paragraph/list item. But, if neither the paragraph nor the paragraph
style defines fo:text-indent, then the fo:text-indent of the list
level style is used. The same is hold for fo:margin-left.
Thus, the user gets the possibility to define the list item layout by
the new list level style attributes without considering the indent
attributes of the paragraph.

The new attributes inclusive its explanations should be inserted into
chapter 15.12 "List-Level Style Properties", referencing to ODF 1.1
specification document.


The new attributes cover the following use cases. These use cases are
hard or even impossible to be expressed with the existing attributes:
(1) Imagine the following list item layout:
- center align the list label of the list items at absolute position
2cm - center of the actual list label is at absolute position 2cm
- start of the text of the first line and the following lines at
absolute position 3cm.
This list item layout can be expressed using the new attributes:
text:label-followed-by="listtab"
text:list-tab-stop-position="3cm"
fo:text-indent="-1cm"
fo:margin-left="3cm"
fo:text-align="center"

(2) List item layout
- start the list label at absolute position 2cm
- start of the text of the first line at absolute position 3cm
- start of the text of the following lines at absolute position 4cm.
can be expressed by the new attributes:
text:label-followed-by="listtab"
text:list-tab-stop-position="3cm"
fo:text-indent="-2cm"
fo:margin-left="4cm"
fo:text-align="left"

(3) Think of the following list item layout:
- right align the list label at absolute position 2cm - list label end
at absolute position 2cm
- start of the text of the first line directly after the list label
separated by a space
- start of the following lines at absolute position 5cm.
This is easy to be expressed with the new attributes:
text:label-followed-by="space"
text:list-tab-stop-position="5cm"
fo:text-indent="-3cm"
fo:margin-left="5cm"
fo:text-align="right"

Attached are some examples given by Florian. These example show, how
the new list level attributes are interpreted by mapping them into 
plain text and a derived paragraph style.



Regards, Oliver.



numclarification.odt



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]