Tab
Tab class for “text:tab” tag.
Classes:
| Name | Description |
|---|---|
Tab |
Representation of a tabulation, “text:tab”. |
Tab
Bases: MDTab, Element
Representation of a tabulation, “text:tab”.
This element represents the [UNICODE] tab character (HORIZONTAL TABULATION, U+0009). The position attribute indicates the number of the tab-stop to which a tab character refers, where position 0 marks the start margin of a paragraph. Layout-oriented consumers should determine tab positions based on style information.
Methods:
| Name | Description |
|---|---|
__init__ |
Create a tabulation element “text:tab”. |
__str__ |
|
Attributes:
| Name | Type | Description |
|---|---|---|
position |
|
|
text |
str
|
Get the text content, which is always a tab character. |
Source code in odfdo/tab.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
_properties
class-attribute
instance-attribute
_properties: tuple[PropDef | PropDefBool, ...] = (
PropDef("position", "text:tab-ref"),
)
_tag
class-attribute
instance-attribute
_tag = 'text:tab'
position
instance-attribute
position = str(position)
text
property
writable
text: str
Get the text content, which is always a tab character.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The tab character (” “). |
__init__
__init__(
position: int | None = None, **kwargs: Any
) -> None
Create a tabulation element “text:tab”.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
position
|
int | None
|
The position of the tab-stop. If provided, must be a non-negative integer. |
None
|
Source code in odfdo/tab.py
49 50 51 52 53 54 55 56 57 58 | |
__str__
__str__() -> str
Source code in odfdo/tab.py
60 61 | |