Skip to content

Commit 2e08f44

Browse files
author
Michaël Dupont
committed
fix: documentation about paragraph indentation
1 parent b8346af commit 2e08f44

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/styles.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ Available Paragraph style options:
7575
- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012.
7676
See ``\PhpOffice\PhpWord\SimpleType\Jc`` class constants for possible values.
7777
- ``basedOn``. Parent style.
78-
- ``hanging``. Hanging in *twip*.
79-
- ``indent``. Indent in *twip*.
78+
- ``hanging``. Hanging indentation in *half inches*.
79+
- ``indent``. Indent (left indentation) in *half inches*.
80+
- ``indentation``. An array of indentation key => value pairs in *twip*. Supports *left*, *right*, *firstLine* and *hanging* indentation.
81+
See ``\PhpOffice\PhpWord\Style\Indentation`` for possible identation types.
8082
- ``keepLines``. Keep all lines on one page, *true* or *false*.
8183
- ``keepNext``. Keep paragraph with next paragraph, *true* or *false*.
8284
- ``lineHeight``. Text line height, e.g. *1.0*, *1.5*, etc.

src/PhpWord/Style/Paragraph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function setStyleValue($key, $value)
198198
{
199199
$key = Text::removeUnderscorePrefix($key);
200200
if ('indent' == $key || 'hanging' == $key) {
201-
$value = $value * 720;
201+
$value = $value * 720; // 720 twips is 0.5 inch
202202
}
203203

204204
return parent::setStyleValue($key, $value);

0 commit comments

Comments
 (0)