Export to doc and docx opened in Word 2013 / Win8.1 doesn't format tables correctly
Hi,
new user here.
v2.4 (846) on a Macbook Pro 15" retina. Win8.1 in Parallels with Word 2013.
Export to Word on Windows is one of my main use cases for Marked - ideally would let me work fast and simple on the Mac with Markdown, and only go to Word/Windows when I'm ready to deliver to my corporatist clients.
Steps to repro:
Using example markup from the MultiMarkdown composer syntax help (see below)
Export to doc and to docx and load in WIndows 8.1 / Word 2013
Expected Result
Tables rendered with basic borders/cells
Actual Results (see attached files)
.doc format: Tables are rendered but some cells are incorrectly copied over - second row seconds cell contains non-printing characters and (duplicate) 3rd cell contents.
.docx format: no attempt to render the table. Just variously aligned text (i.e. the alignment marks are handled correctly).
Thanks
Rich
Input markdown:
| First Header | Second Header | Third Header |
| :----------- | :-----------: | -------------------: |
| First row | Data | Very long data entry |
| Second row | **Cell** | *Cell* |
[simple_table]
| | Grouping ||
| First Header | Second Header | Third Header |
| ------------ | :-----------: | -----------: |
| Content | *Long Cell* ||
| Content | **Cell** | Cell |
| New section | More | Data |
[Prototype table][reference_table]
- docm.doc 25.5 KB
- docxm.docx 5.03 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on Sep 29, 2014 @ 05:02 PM
This is a known issue. RTF/DOC formats are very difficult to replicate
from HTML. That being said, there are improvements coming in the next
month or two that may solve this issue entirely.
-Brett
2 Posted by laughingblade on Sep 29, 2014 @ 05:15 PM
Thanks for the speedy reply Brett. I'm more than happy to wait for improvements.
I know rtf/doc are hard - I've had to write converters in the bad old days.
So I could easily live without them if the docx worked: looks like its most of the way there with the text formatting and positioning, 'just' needs the table formatting wrapped around it all.
Office Open XML looks like there's a 1:1 mapping between HTML <table> and <w:tbl> etc... although I'm sure the reality is far more complex.
Regards
Rich
Support Staff 3 Posted by Brett on Sep 29, 2014 @ 05:24 PM
The Open Office XML mapping solution is exactly what's in the works. The
current export uses textutil to generate various formats from a
webarchive version of the preview. The version in the works will
actuallly read the HTML as XML and map it one node at a time to RTF.
It's an improvement I've wanted for a long time, and it's coming
together now.
-Brett
4 Posted by laughingblade on Sep 29, 2014 @ 06:57 PM
That will be awesome, and not a trivial job. Thanks again for the app.
I heard Microsoft were thinking about re-doing the Open Office formats as JSON in a year or two ;)
best
Rich