Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation->hanging: PHPWord / MS Word behave differently. #2569

Open
JacobSanford opened this issue Feb 13, 2024 · 0 comments
Open

indentation->hanging: PHPWord / MS Word behave differently. #2569

JacobSanford opened this issue Feb 13, 2024 · 0 comments

Comments

@JacobSanford
Copy link

Describe the Bug

This will likely be considered an documentation bug/deficiency rather than a software bug.

Setting an indentation->hanging value in a Paragraph (and presumably other) style does not replicate what happens when setting a hanging value in MS Word.

Steps to Reproduce

PHPWord

Style Applied:

[
            'indentation' => [
                'hanging' => 168,
            ],
]

Generated XML:

<w:ind w:left="0" w:right="0" w:firstLine="0" w:hanging="168"/>

MS Word

Paragraph Settings / Special -> Hanging (set value).

Generated XML:

<w:ind w:left="168" w:right="0" w:firstLine="0" w:hanging="168"/>

Expected/Current Behavior

One might argue that the PHPWord behavior is expected, as it only applies the 'w:hanging' property.

However, given that Word (secretly) behaves differently when setting a 'hanging' amount, some documentation might be of value.

Context

Please fill in your environment information:

  • PHP Version: 8.1
  • PHPWord Version: 1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant