Open dmitrymurashenkov opened 5 years ago
@dmitrymurashenkov, I suspect that there is some constraint in LibreOffice or some setting in number list style which LibreOffice expects that is missing.
If someone has the time and knowledge of DOCX format to point out the problem then I can address it. To me, DOCX is not a format, it is a career decision. On my own, I would only venture into it under duress while wearing a gas mask and hip waders.
I only implemented docx conversion because it was sponsored. Johner Institut needed a way of converting their internal markdown documents to Word for their clients.
I was not familiar with DOCX format and can only claim some familiarity now. I came to the impression that it was a format created by a summer intern not intended as a standard to be independently implemented.
It is a PITA to use, extremely sensitive to interpretation due to lack of documentation and is a nightmare of referential dependencies.
Docx4j library does a good job of simplifying working with it but by no means is it a cake walk. I only test the conversion against MS Word because it is the "standard" for DOCX format.
There are many things in docx I still have not figured out how to properly use and rely on trial and error in figuring out what I need. Sometimes the mistake is trivial and sometimes requires a lot of head scratching.
The job is made much harder by the fact that DOCX is not a standard but a proprietary format. The huge, byzantine XML generated for DOCX makes visual inspection to figure out what is wrong an undertaking of hours.
I think a better solution to DOCX conversion would have been to implement Markdown to RTF converter. RTF is a better documented standard which MS-Word can open.
All that to say that there is probably a ton of differences between how Word and LibreOffice will interpret a converted document. If you need Markdown to DOCX conversion then PanDoc would probably be a more stable choice.
I export nested lists to docx and open them with LibreOffice and Google Docs.
Basic case of nested ordered list:
LibreOffice displays it as list, but no indent for nested items (google docs shows indents in this case):
More complex example:
In LibreOffice (google docs correctly indents it):
But if we add more levels:
then LibreOffice starts to indent from the level 2:
But if I select all text in LibreOffice and copy-paste it to notepad - all levels are correctly indented.
So there may be 2 issues here:
Here is an example export:
https://drive.google.com/file/d/1db_Cx1gi-vOGwYhroELcTBA08FSVwnd_/view?usp=sharing
Options used: