Paragraph formatting is held in style:paragraph-properties, in
paragraph, table-cell, graphic, presentation and chart styles and in default styles.
Its children are style:tab-stops, style:drop-cap and
style:background-image. This page lists every attribute from
OpenDocument 1.3 part 3, sections 17.6 to 17.9, 17.19, 17.20 and chapter 20. Attributes
in the fo: namespace follow XSL-FO 1.0 at the section given, without
the value inherit.
Alignment and indents
| Attribute | Values | Meaning |
|---|---|---|
fo:text-align | start, end, left, right, center, justify | Alignment (XSL §7.15.9); start and end follow the writing direction. If neither this nor style:justify-single-word is given they are start and false. |
fo:text-align-last | start (default), center, justify | Alignment of the last line of a justified paragraph (XSL §7.15.10); ignored without fo:text-align. |
style:justify-single-word | true, false | Stretch a single word on a justified last line. |
fo:margin-left, fo:margin-right | length or percent | Left and right indents (XSL §7.10.3, §7.10.4). A percentage is of the parent style’s value. |
fo:margin-top, fo:margin-bottom | non-negative length or percent | Space above and below (XSL §7.10.1, §7.10.2). |
fo:margin | non-negative length or percent | All four margins (XSL §7.29.14). |
fo:text-indent | length, or percent in common styles | First-line indent, positive or negative. |
style:auto-text-indent | true, false | Indent the first line by an amount based on the font size; fo:text-indent is then ignored. |
style:contextual-spacing | true, false (default) | Drop the space between two paragraphs (the first one’s bottom and the second’s top margin) when both have it set, are in the same area, and use the same common style (for an automatic style, its parent; for a conditional style, the condition’s base style). |
style:vertical-align | top, middle, bottom, auto, baseline | How characters of different sizes line up in a line: by baseline (default), to the top, middle or bottom of the line; auto uses the baseline for text at 0° or 90° and the middle for 270°. |
Line spacing
| Attribute | Values | Meaning |
|---|---|---|
fo:line-height | normal, non-negative length, percent | Line height (XSL §7.15.4): fixed, or a percentage of normal. normal also switches off the two attributes below. |
style:line-height-at-least | non-negative length | Minimum line height. |
style:line-spacing | length | Fixed extra distance between lines (leading). |
style:font-independent-line-spacing | true, false | true: line height from the font size alone; false: from the font’s metrics. |
style:register-true | true, false | Keep lines on the same grid on both sides of the page and across columns (register-true). The reference line spacing is the paragraph style named by the page layout’s style:register-truth-ref-style-name. |
style:snap-to-layout-grid | true, false | Follow the page’s Asian layout grid. |
Breaks and keeps
| Attribute | Values | Meaning |
|---|---|---|
fo:break-before, fo:break-after | auto, column, page | Column or page break before or after (XSL §7.19.2, §7.19.1; odd-page and even-page not allowed). Only one of the two may be used. |
fo:keep-together | auto, always | Do not split the paragraph across pages or columns (XSL §7.19.3). |
fo:keep-with-next | auto, always | Keep with the next paragraph (XSL §7.19.4). |
fo:widows | non-negative integer | Fewest lines at the top of a page. |
fo:orphans | non-negative integer | Fewest lines at the bottom of a page (XSL §7.19.6). |
style:page-number | non-negative integer, auto | When the style’s master page starts a new page here: the new page’s number, or auto (previous plus one). |
Borders, padding, shadow and background
These attributes are shared with header and footer, page layout, table cell and graphic properties.
| Attribute | Values | Meaning |
|---|---|---|
fo:border, fo:border-top, fo:border-bottom, fo:border-left, fo:border-right | an XSL border value (a string) | Borders (XSL §7.29.3, 7.29.10, 7.29.4, 7.29.6, 7.29.7). |
style:border-line-width, -top, -bottom, -left, -right | three positive lengths | For a double border: inner line width, gap, outer line width. |
fo:padding, fo:padding-top, -bottom, -left, -right | non-negative length | Space between border and text. |
style:join-border | true (default), false | Draw one border round this and the next paragraph, when their borders, border widths, left and right padding and right margins are equal and their left margins and first-line indents line up (the standard lists the exact cases). |
style:shadow | none or an XSL shadow (§7.16.5) | A shadow behind the paragraph box (not the text). |
fo:background-color | transparent or colour | Background. transparent switches off a background image; a draw:fill in the same style switches off both. |
style:background-transparency | 0% to 100% | Transparency of the background colour. |
style:background-image (child element): xlink:href or
office:binary-data; style:repeat = repeat
(default), no-repeat, stretch; style:position
= one or two of top/center/bottom and
left/center/right (default
center); style:filter-name; draw:opacity
(0% to 100%). An empty element with no background colour means a transparent
background.
Tab stops
style:tab-stop-distance (non-negative length) is the gap between
default tab stops; it is used only in default styles. Set tab stops are
style:tab-stop elements inside style:tab-stops. A style
that has style:tab-stops replaces its parent’s whole list; otherwise
the whole list is inherited.
| Attribute | Values | Meaning |
|---|---|---|
style:position | length | Position, from the left margin or the left indent depending on the index setting text:relative-tab-stop-position. |
style:type | left (default), center, right, char | Alignment at the stop; char aligns on a character. |
style:char | a character | The character for char stops (such as a decimal point). |
style:leader-type | none, single, double | Leader line: none, single, double. |
style:leader-style | none, solid, dotted, dash, long-dash, dot-dash, dot-dot-dash, wave | Pattern of the leader line. |
style:leader-width | auto, normal, bold, thin, medium, thick, positive integer, percent, length | Leader line thickness. |
style:leader-color | font-color or colour | Leader line colour. |
style:leader-text | one character, default space | A leader made of a character such as .; wins over style:leader-style. A program may substitute a character it supports. |
style:leader-text-style | text style name | Text style for the leader characters. |
Drop capitals
style:drop-cap shows the start of the paragraph in a larger size
across several lines.
| Attribute | Values | Meaning |
|---|---|---|
style:length | positive integer (default 1) or word | How many characters, or the first word (what a word is depends on the locale). |
style:lines | integer, default 1 | How many lines it spans; 1 turns the drop capital off. |
style:distance | length, default 0cm | Gap between the large letters and the rest of the text. |
style:style-name | text style name | Style for the large characters. |
Asian and bidirectional text, line numbers
| Attribute | Values | Meaning |
|---|---|---|
style:writing-mode | lr-tb, rl-tb, tb-rl, tb-lr, lr, rl, tb, page | Paragraph direction for the Unicode bidirectional algorithm (XSL §7.27.7); page takes it from the enclosing section, table or text box, else the page. In lists it also puts the number on the left or right. |
style:writing-mode-automatic | true, false | A program may work out the direction again from the content after each edit. |
style:line-break | normal, strict | Line-breaking rules: anywhere, or not before or after certain characters (which are up to the program). |
style:punctuation-wrap | simple, hanging | Whether punctuation may hang into the margin at the end of a full line. |
style:text-autospace | none, ideograph-alpha | Add space between Asian, Western and complex text. |
fo:hyphenation-keep | auto, page | XSL §7.15.1. |
fo:hyphenation-ladder-count | no-limit or positive integer | Most hyphenated lines in a row (XSL §7.15.2). |
text:number-lines | true, false | Include this paragraph in line numbering. |
text:line-number | non-negative integer | Restart line numbering at this value (only with text:number-lines="true"). |
List level properties
Each level of a list style holds style:list-level-properties, which
places the label (number, bullet or image) and the text. Two models exist, chosen by
text:list-level-position-and-space-mode:
label-width-and-position(default): the label sits in a box of at leasttext:min-label-width, startingtext:space-beforeafter the paragraph’s left margin, and aligned in the box byfo:text-align. If the gap to the text is less thantext:min-label-distance, the label moves within its box, then the text moves.label-alignment: those three attributes count as 0. The childstyle:list-level-label-alignmentgivesfo:margin-leftandfo:text-indentfor the item’s lines (used only when the paragraph style does not set them); margin plus indent is where the first line and the label align.fo:text-alignthen says how the label sits on that point (leftorstart: starts there;rightorend: ends there;center;justify).text:label-followed-by=listtab(a tab),spaceornothing; withlisttab,text:list-tab-stop-positionadds a tab stop where the text starts (left tab in left-to-right text, right tab in right-to-left), unless it falls before the label’s end or another stop comes first.
| Attribute | Values | Meaning |
|---|---|---|
text:space-before | length | Indent of the label box. |
text:min-label-width | non-negative length | Minimum width of the label box. |
text:min-label-distance | non-negative length | Minimum gap between label and text. |
fo:text-align | start, end, left, right, center, justify | Alignment of the label. |
style:font-name | font face name | Font for the bullet. |
fo:width, fo:height | positive length | Size of an image bullet. |
style:vertical-pos, style:vertical-rel, svg:y | as for frames | Vertical position of an image bullet (see graphic formatting). |
<text:list-level-style-bullet text:level="1" text:bullet-char="•">
<style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
<style:list-level-label-alignment text:label-followed-by="listtab"
text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/>
</style:list-level-properties>
</text:list-level-style-bullet>
Source
OpenDocument Version 1.3, OASIS Standard, 27 April 2021, part 3 (schema), sections 17.3, 17.6 to 17.9, 17.19 and 17.20 and the matching attributes in chapters 19 and 20; read in full for this page. Where the standard defers to XSL 1.0 for a value’s syntax (borders, shadows), XSL was not read.