-
-
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 writer - support new table features #6315
Comments
Is it worth me raising a ticket for open office writer? |
I'm starting to work on this now. |
I'm wondering how important it is to ensure support for Word 2007? I'm currently writing against the spec and testing with LibreOffice, so I'd miss any incompatibilities. Is this Word 2007 still worth considering? |
E.g., I'm not sure if Word 2007 is able to layout a table automatically. The current version gives bad results, at least in LibreOffice, when no explicit column widths are given. I have a good, working solution, but currently can't test if it works in Word 2007. |
From what I hear no version of Word follows their own specs very well? While I'm not sure about Word 2007, maybe we should test with a relatively recent M$ Word? |
In our current reference.docx we use the 2006 versions of the schemas (that's Word 2007) I guess. <w:document
xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex"
xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex"
xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex"
xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex"
xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex"
xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex"
xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink"
xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex"
xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid"
xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml"
xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk"
xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex wp14"> Personally I think we could consider not supporting Word 2007, especially in the writer. (For the reader, it would be nice to be able to convert old documents, but I don't see why we need to produce them.) But it depends on what the alternative is. Is there a more recent standard that would support the table features you need? |
I hadn't thought that far, my main concern was that I could break the output by not testing with an old enough Word. The docx writer assumes behavior which is not documented in the standard, and I'm worried that I will break things just by relying on the OOXML standard. I don't mind supporting Word 2007 in general, but using a more recent schema might be easier to test. I know fairly little about MS products and formats these days, so I'm not sure. |
I'm not sure either, and I sure don't have a version of Word 2007 lying around. (I've only been testing with the most recent.) |
Support for new table features:
|
Great, I think you've taken care of the most common features already. |
Hi, I was just wondering if there will be support for firstColumn (and last column) styles for the docx tables. One of the documents we need to generate this have this styling but I cannot make them work even though the styles are nicely set in the reference.docx. I looked in the code and did see a mention for firstColumn but I think it i not used, but I cannot really tell as I am not well versed in Haskell. Thanks |
@braadworst I think we can make that work, at least for |
@tarleb sorry for not responding earlier, must have missed the notification. That is great news. So basically I need to set the background color and a right border in my case. I've added an image for reference. Thanks |
@braadworst Note that the specific formating for the first column is defined in the "Table" style, and its on each specific table where you should (somehow, depending on the final implementation) indicate that first-column-formatting should be applied |
Add support for new table features introduced in
jgm/pandoc-types#66
including table attributes (including identifier), rowspan, colspan, table head and foot, multiple header lines, row headers, captions that allow block-level content and include an optional short caption.
The text was updated successfully, but these errors were encountered: