Difference between revisions of "Character unit"

From Apache OpenOffice Wiki
Jump to: navigation, search
(UOF support)
(UOF support)
Line 61: Line 61:
 
== UOF support ==
 
== UOF support ==
 
* Line Spacing In Line Units. (Part of schema)
 
* Line Spacing In Line Units. (Part of schema)
 +
 +
 +
  <xsd:element name="段间距" minOccurs="0">
 +
        <xsd:annotation>
 +
                <xsd:documentation>Line Spacing</xsd:documentation>
 +
        </xsd:annotation>
 +
        <xsd:complexType>
 +
                <xsd:all>
 +
                        <xsd:element name="段前距" minOccurs="0">
 +
                                <xsd:annotation>
 +
                                        <xsd:documentation>Line Spacing Above Paragraph</xsd:documentation>
 +
                                </xsd:annotation>
 +
                                <xsd:complexType>
 +
                                        <xsd:choice>
 +
                                                <xsd:element name="自动">
 +
                                                        <xsd:annotation>
 +
                                                                <xsd:documentation>Automatically Determine Spacing Above Paragraph</xsd:documentation>
 +
                                                        </xsd:annotation>
 +
                                                        <xsd:complexType>
 +
                                                                <xsd:attribute ref="uof:locID" use="required" fixed="t0198"/>
 +
                                                        </xsd:complexType>
 +
                                                </xsd:element>
 +
                                                <xsd:element name="绝对值">
 +
                                                        <xsd:annotation>
 +
                                                                <xsd:documentation> Spacing Above Paragraph In Absolute Value</xsd:documentation>
 +
                                                        </xsd:annotation>
 +
                                                        <xsd:complexType>
 +
                                                                <xsd:attribute ref="uof:locID" use="required" fixed="t0199"/>
 +
                                                                <xsd:attribute name="值" type="uof:长度类型" use="required"/>
 +
                                                                <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
 +
                                                        </xsd:complexType>
 +
                                                </xsd:element>
 +
                                                <xsd:element name="相对值">
 +
                                                        <xsd:annotation>
 +
                                                                <xsd:documentation> Spacing Above Paragraph In Relative Value</xsd:documentation>
 +
                                                        </xsd:annotation>
 +
                                                        <xsd:complexType>
 +
                                                                <xsd:attribute ref="uof:locID" use="required" fixed="t0200"/>
 +
                                                                <xsd:attribute name="值" type="xsd:float" use="required"/>
 +
                                                                <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
 +
                                                        </xsd:complexType>
 +
                                                </xsd:element>
 +
                                        </xsd:choice>
 +
                                        <xsd:attribute ref="uof:locID" use="required" fixed="t0196"/>
 +
                                </xsd:complexType>
 +
                        </xsd:element>
 +
                        <xsd:element name="段后距" minOccurs="0">
 +
                                <xsd:annotation>
 +
                                        <xsd:documentation>Line Spacing Below Paragraph</xsd:documentation>
 +
                                </xsd:annotation>
 +
                                <xsd:complexType>
 +
                                        <xsd:choice>
 +
                                                <xsd:element name="自动">
 +
                                                        <xsd:annotation>
 +
                                                                <xsd:documentation>Automatically Determine Spacing Below Paragraph</xsd:documentation>
 +
                                                        </xsd:annotation>
 +
                                                        <xsd:complexType>
 +
                                                                <xsd:attribute ref="uof:locID" use="required" fixed="t0201"/>
 +
                                                        </xsd:complexType>
 +
                                                </xsd:element>
 +
                                                <xsd:element name="绝对值">
 +
                                                        <xsd:annotation>
 +
                                                                <xsd:documentation> Spacing Below Paragraph In Absolute Value</xsd:documentation>
 +
                                                        </xsd:annotation>
 +
                                                        <xsd:complexType>
 +
                                                                <xsd:attribute ref="uof:locID" use="required" fixed="t0202"/>
 +
                                                                <xsd:attribute name="值" type="uof:长度类型" use="required"/>
 +
                                                                <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
 +
                                                        </xsd:complexType>
 +
                                                </xsd:element>
 +
                                                <xsd:element name="相对值">
 +
                                                        <xsd:annotation>
 +
                                                                <xsd:documentation> Spacing Below Paragraph In Relative Value</xsd:documentation>
 +
                                                        </xsd:annotation>
 +
                                                        <xsd:complexType>
 +
                                                                <xsd:attribute ref="uof:locID" use="required" fixed="t0203"/>
 +
                                                                <xsd:attribute name="值" type="xsd:float" use="required"/>
 +
                                                                <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
 +
                                                        </xsd:complexType>
 +
                                                </xsd:element>
 +
                                        </xsd:choice>
 +
                                        <xsd:attribute ref="uof:locID" use="required" fixed="t0197"/>
 +
                                </xsd:complexType>
 +
                        </xsd:element>
 +
                </xsd:all>
 +
                <xsd:attribute ref="uof:locID" use="required" fixed="t0058"/>
 +
        </xsd:complexType>
 +
    </xsd:element>
  
 
== ODF support ==
 
== ODF support ==
 
ODF does not support Character unit yet. The following proposal will be sent to the ODF TC for discussion.
 
ODF does not support Character unit yet. The following proposal will be sent to the ODF TC for discussion.

Revision as of 06:44, 7 June 2007

Character unit overview

In CJK, especailly in China, character is used as a unit to measure some paragraph attributes, such as indent, line spacing and tab stop. etc. Character unit is most useful in processing Chinese. For example, users are used to use two characters as the indent of first line of the paragraph.

**大家好

大家好,才是真的好

With character unit, users need not worry about the layout confusion due to font size changing.

For line spacing of paragraph, line unit is used.

Feature

Implementation

File format support

Open XML support

  • Line Spacing in Line Units

[xml]

 <xsd:complexType name="CT_Spacing">
   <xsd:attribute name="beforeLines" type="ST_DecimalNumber" use="optional">
     <xsd:annotation>
       <xsd:documentation>Spacing Above Paragraph IN Line Units</xsd:documentation>
     </xsd:annotation>
   </xsd:attribute>
   <xsd:attribute name="afterLines" type="ST_DecimalNumber" use="optional">
     <xsd:annotation>
       <xsd:documentation>Spacing Below Paragraph in Line Units</xsd:documentation>
     </xsd:annotation>
   </xsd:attribute>
 </xsd:complexType>

  • Indentation In Character Units

[xml]

 <xsd:complexType name="CT_Ind">
   <xsd:attribute name="leftChars" type="ST_DecimalNumber" use="optional">
     <xsd:annotation>
       <xsd:documentation>Left Indentation in Character Units</xsd:documentation>
     </xsd:annotation>
   </xsd:attribute>
   <xsd:attribute name="rightChars" type="ST_DecimalNumber" use="optional">
     <xsd:annotation>
       <xsd:documentation>Right Indentation in Character Units</xsd:documentation>
     </xsd:annotation>
   </xsd:attribute>
   <xsd:attribute name="hangingChars" type="ST_DecimalNumber" use="optional">
     <xsd:annotation>
       <xsd:documentation>Indentation Removed From First Line in Character Units</xsd:documentation>
     </xsd:annotation>
   </xsd:attribute>
   <xsd:attribute name="firstLineChars" type="ST_DecimalNumber" use="optional">
     <xsd:annotation>
       <xsd:documentation>Additional First Line Indentation in Character Units</xsd:documentation>
     </xsd:annotation>
   </xsd:attribute>
 </xsd:complexType>

UOF support

  • Line Spacing In Line Units. (Part of schema)


  <xsd:element name="段间距" minOccurs="0">
       <xsd:annotation>
               <xsd:documentation>Line Spacing</xsd:documentation>
       </xsd:annotation>
       <xsd:complexType>
               <xsd:all>
                       <xsd:element name="段前距" minOccurs="0">
                               <xsd:annotation>
                                       <xsd:documentation>Line Spacing Above Paragraph</xsd:documentation>
                               </xsd:annotation>
                               <xsd:complexType>
                                       <xsd:choice>
                                               <xsd:element name="自动">
                                                       <xsd:annotation>
                                                               <xsd:documentation>Automatically Determine Spacing Above Paragraph</xsd:documentation>
                                                       </xsd:annotation>
                                                       <xsd:complexType>
                                                               <xsd:attribute ref="uof:locID" use="required" fixed="t0198"/>
                                                       </xsd:complexType>
                                               </xsd:element>
                                               <xsd:element name="绝对值">
                                                       <xsd:annotation>
                                                               <xsd:documentation> Spacing Above Paragraph In Absolute Value</xsd:documentation>
                                                       </xsd:annotation>
                                                       <xsd:complexType>
                                                               <xsd:attribute ref="uof:locID" use="required" fixed="t0199"/>
                                                               <xsd:attribute name="值" type="uof:长度类型" use="required"/>
                                                               <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
                                                       </xsd:complexType>
                                               </xsd:element>
                                               <xsd:element name="相对值">
                                                       <xsd:annotation>
                                                               <xsd:documentation> Spacing Above Paragraph In Relative Value</xsd:documentation>
                                                       </xsd:annotation>
                                                       <xsd:complexType>
                                                               <xsd:attribute ref="uof:locID" use="required" fixed="t0200"/>
                                                               <xsd:attribute name="值" type="xsd:float" use="required"/>
                                                               <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
                                                       </xsd:complexType>
                                               </xsd:element>
                                       </xsd:choice>
                                       <xsd:attribute ref="uof:locID" use="required" fixed="t0196"/>
                               </xsd:complexType>
                       </xsd:element>
                       <xsd:element name="段后距" minOccurs="0">
                               <xsd:annotation>
                                       <xsd:documentation>Line Spacing Below Paragraph</xsd:documentation>
                               </xsd:annotation>
                               <xsd:complexType>
                                       <xsd:choice>
                                               <xsd:element name="自动">
                                                       <xsd:annotation>
                                                               <xsd:documentation>Automatically Determine Spacing Below Paragraph</xsd:documentation>
                                                       </xsd:annotation>
                                                       <xsd:complexType>
                                                               <xsd:attribute ref="uof:locID" use="required" fixed="t0201"/>
                                                       </xsd:complexType>
                                               </xsd:element>
                                               <xsd:element name="绝对值">
                                                       <xsd:annotation>
                                                               <xsd:documentation> Spacing Below Paragraph In Absolute Value</xsd:documentation>
                                                       </xsd:annotation>
                                                       <xsd:complexType>
                                                               <xsd:attribute ref="uof:locID" use="required" fixed="t0202"/>
                                                               <xsd:attribute name="值" type="uof:长度类型" use="required"/>
                                                               <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
                                                       </xsd:complexType>
                                               </xsd:element>
                                               <xsd:element name="相对值">
                                                       <xsd:annotation>
                                                               <xsd:documentation> Spacing Below Paragraph In Relative Value</xsd:documentation>
                                                       </xsd:annotation>
                                                       <xsd:complexType>
                                                               <xsd:attribute ref="uof:locID" use="required" fixed="t0203"/>
                                                               <xsd:attribute name="值" type="xsd:float" use="required"/>
                                                               <xsd:attribute ref="uof:attrList" use="required" fixed="值"/>
                                                       </xsd:complexType>
                                               </xsd:element>
                                       </xsd:choice>
                                       <xsd:attribute ref="uof:locID" use="required" fixed="t0197"/>
                               </xsd:complexType>
                       </xsd:element>
               </xsd:all>
               <xsd:attribute ref="uof:locID" use="required" fixed="t0058"/>
       </xsd:complexType>
    </xsd:element>

ODF support

ODF does not support Character unit yet. The following proposal will be sent to the ODF TC for discussion.

Personal tools