-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
docx table with w:firstColumn unmerges cells #10627
Comments
Just to be clear, if |
cbe67b9 is the commit that introduced sensitivity to |
Not sure if I'm looking at the correct thing, but <w:body>
<w:p w14:paraId="0406BEDF" w14:textId="25B6C475" w:rsidR="00BD3F59" w:rsidRDefault="00BD3F59" w:rsidP="00BD3F59">
<w:pPr>
<w:pStyle w:val="Caption" />
<w:ind w:left="0" w:firstLine="0" />
</w:pPr>
</w:p>
<w:tbl>
<w:tblPr>
<w:tblStyle w:val="StandardtabelleRB" />
<w:tblW w:w="5001" w:type="pct" />
<w:tblLayout w:type="fixed" />
<w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1" />
</w:tblPr> Changing it from |
I can confirm that the issue arises in the docx reader, not the HTML writer. , Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Plain
[ Str "Merge"
, Space
, Str "all"
, Space
, Str "columns"
]
]
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
] |
I have localized the issue.
...
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 7)
[ Plain [ Str "Merge" , Space , Str "all" , Space , Str "columns" ]
]
]
...
but the output of ...
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignCenter
(RowSpan 1)
(ColSpan 1)
[ Plain
[ Str "Merge"
, Space
, Str "all"
, Space
, Str "columns"
]
]
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
, Cell
( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
]
... So this has to do with some table normalization that is done by the |
The unfortunate thing is that, in my experience, Word always sets |
I'll say one more thing: conceptually, it's quite odd to have a table that designates the left-hand column as a heading but then has one of those columns span 7 columns. I don't imagine anyone would want that. The problem really arises because of Word's odd default of setting |
Thanks for the excellent analysis. Word's default behavior and the hard to discover "First Column" checkbox/feature are really unfortunate. |
Explain the problem.
docx table with
w:firstColumn
and merged cells converts to html with unmerged cells.Example
colspan.docx
Expected output with pandoc 3.6.1:
Unexpected output with pandoc 3.6.3:
Pandoc version?
OS: Ubuntu (WSL2)
The text was updated successfully, but these errors were encountered: