Skip to content

Keep table dimensions during conversion from Docx to Native (or Markdown) #11147

@fsoedjede

Description

@fsoedjede

Explain the problem.
Include the exact command line you used and all inputs necessary to reproduce the issue. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.

Considering this example from the manual page:

Pandoc try ok

in the col specs we have the original calculated dimensions to the table (0.2 + 0.2 + 0.2625)

[ ( AlignDefault , ColWidth 0.2 )
    , ( AlignDefault , ColWidth 0.2 )
    , ( AlignDefault , ColWidth 0.2625 )
    ]

When converting from docx to native and the table cells are long, the table width is not correctly processed. It's always 100%
Source docx: table-sample.docx
Result sample:

[ ( AlignLeft , ColWidth 0.602726756296156 )
    , ( AlignLeft , ColWidth 0.397273243703844 )
    ]

Is there a way to keep the real initial width of the table when converting from docx?

Thanks

Pandoc version?
What version of pandoc are you using, on what OS? (If it's not the latest release, please try with the latest release before reporting the issue. Note that many linux distributions have old versions of pandoc in their repositories.)

pandoc 3.8 & pandoc 3.7.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions