1
votes

Say I use markdown to write a memo, and convert it with pandoc to a DOCX, which my non-technically-inclined collaborator uses, and say the collaborator changes a few things while tracking changes.

Now I want to accept some changes and reject some others, then get the new version back into markdown to work on the next draft. But converting docx -> markdown with pandoc tends to be lossy--viewed as functions, the functions are not inverses; ToMarkdown(ToWord(md_file)) != md_file.

With this limitation, the pandoc/markdown workflow is basically a dead-end after draft 1. It's great to use vim and plaintext instead of Word for the first draft, but if there are a significant number of changes, then it's often just as much work to recover and verify them and correct unintentional losses in v2 of a markdown file from the collaborator's DOCX as it is just to put up with MS Word from the get-go.

Does anyone have a workaround for this situation that gets them to "v2" or higher using markdown / plaintext with minimal manual work in Word?

1
there is the --track-changes flag, also see groups.google.com/d/topic/pandoc-discuss/ujtaJaNpF7o/discussion But some lossiness is inherent in the conversions... - mb21

1 Answers

1
votes

There is a long discussion at pandoc-discuss about the issue. The short answer is no, there is no support for to docx and back to md without losses.

That said, @mb21 mentions the --track-changes flag, which allows for a little bit more control, however you would have to incorporate changes manually.

The solution for your problem is either:

  1. Convince collaborators to use md instead of Word, or;
  2. Start using Authorea which uses pandoc in the background to generate the documents. You can even make it sinc with github, while your collaborator uses the webversion.

I have been experimenting with option 2, but it is super hard to convince most of the collaborators to move to an online interface.