-
Notifications
You must be signed in to change notification settings - Fork 55
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
Odd margin being added to bullets #224
Comments
OK, will investigate this issue and try to come with a PR. |
Btw @jhubert, what is the desired output for this? We should not have that margin at all? Because I don't see any margin when opening in libreoffice, as you mentioned in first screen. But when converting from libreoffice to html I get: which is a little different from what we have with pydocx. |
I think the desired output is that the inset matches the word document. For this simple case, that should just mean removing the margin on the inner span. |
Hm, but there can be cases when we actually need this margin there? |
@jhubert can you also attach .docx files with this example you mention, just to have some for tests. Thx |
I just don't understand when we need to ignore this margin and when we should not. Maybe @winhamwr @kylegibson can give some advice on this. |
@botzill I can't think of a time where we would want the margin next to the list item. If anything, I think there would be a case where we want the margin on the whole |
When certain docx files that have adjusted margins get imported, the resulting HTML places the margin in the wrong place. This results in oddly formatted HTML.
For example, here are two lists in word:
The first list has been indented, the second one has the standard doc indentation.
Here is the result in HTML:
The resulting HTML has a span inside the
li
with amargin-left
set on it:It seems that the whole
ul
should have the margin, if anything at all.Here is the sample file:
list-item-margin.docx
And here is the cleaned up docx source from the
document.xml
file:The difference seems to be the existence of the
<w:ind w:left="720"/>
value, which I'm assuming is telling pydocx to add an indentation.The text was updated successfully, but these errors were encountered: