Wordprocessing 段落 – 属性
缩进
缩进由 <w:ind> 元素定义。
<w:pPr>
<w:ind w:left="1440" w:right="1440" />
</w:pPr>
值为 20 代表 1 磅(Pt):1440 缇(twips)= 1 英寸(Inch); 567 缇(twips)= 1 厘米(cm)。若要以一个字符的百分比为指定单位,请使用属性 leftChars / endChars,rightChars / endChars 等。可以使用负值。请参阅下面的属性。
Word 2007 示例:
属性:
最常用的属性是:
属性 | 描述 |
---|---|
left/start | 指定要放在左侧的缩进(对于从左到右的段落)。 注意:OOXML 标准的 2006 版本 为 left,2011版本 为 start。 Microsoft Word 2007 无法识别 start。 |
right/end | 指定要放在右侧的缩进(对于从左到右的段落)。 注意:OOXML 标准的 2006 版本 为 __right __,2011 版本 为 end。 Microsoft Word 2007 无法识别 end。 |
hanging | 指定要从第一行删除的缩进。此属性和 firstLine 是互斥的。当两个属性都指定时,此属性生效。 |
firstLine | 指定要应用于第一行的额外缩进。此属性和 hanging 是互斥的。如果指定了 hanging ,则忽略此属性。 |
Word 2007 示例:
<w:pPr>
<w:ind w:left="1440" w:right="1440" w:hanging="1080" />
</w:pPr>
相关的 Open Document Format (ODF)属性:
有两个相关的ODF属性。首先,可以通过在应用于样式的样式内的 style:paragraph-properties 元素上设置 fo:margin, fo:margin, fo:margin-left 或 fo:margin-right 属性来指定段落的缩进。值可以是长度或表示父样式的边距的百分比。
其次,通过在 style:paragraph-properties 元素上设置 fo:text-indent 属性来指定段落第一行的缩进。值可以是长度,如果属性包含在通用样式中,则该值还可以是父样式的文本缩进的百分比。
参考文献:Open Document Format for Office Applications Version 1.2 (May, 2011) §§20.198, 20.200, 20.201, and 20.218.
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0.2402in" style:auto-text-indent="false"/>
</style:style>
相关的 HTML / CSS 属性:
margin-left: 35px;
margin-right: 35px;
text-indent: 15px;