I'm currently working on a large thesis, from which I derive some smaller publications such as papers. The work is in parallel. Often it happens that I copy some paragraphs from the thesis into a paper. Then I work on the paper, rewriting and reorganizing some of the copied text. When I work on the thesis again, I might want to integrate some of those changes. Of course this is a tedious process, because one has to compare sentence by sentence, in two texts that might be organized and structured very differently.

I'm looking for a software tool that can automatically find corresponding sentences in two texts and synchronize them forth and back, probably with me in the loop confirming each modification.

3 Answers 3


WinMerge can help you manually merge documents. It can compare two text documents, highlight similar lines and lines that are slightly different and it allows you to quickly choose which version to keep on a line by line basis.

If you want to automate this process and also keep history and be able to switch between different versions and choose what to merge - use version control systems like SVN or git. (And you may also want some GUI for them like TortoiseSVN/TortoiseGit or SourceTree) This software merges files automatically in the most obvious cases (i.e. in one version you added a new sentence at line 8 and in the other version you deleted a paragraph at line 18 - the software will keep both changes) and prompts you to merge manually if there is some ambiguity (you edited the same line in both versions).

Here is my personal favourite tutorial on git: https://www.atlassian.com/git It is a little geared towards using online hosting (GitHub/GitLab/BitBucket/...) which you may or may not need. But it does a good job explaining different git workflows.


Lyx have some subdocuments abilities that may help. But you'll have to port your work in this new environment and it may not suits your other needs. Nevertheless, it is one of my favorite writing tools.


You might consider using R-Markdown. I can imagine a process where you:

  • Convert all of your current documents to separate markdowns in plain markdown text
  • Identify the components you wish to keep the same between documents
  • Create separate objects containing each piece of text you wish to synchronize
  • Insert those objects into each of the separate documents

This creates one place where each piece of text "lives", allowing for simultaneous editing of the documents by editing the text in that one object. The pros include flexibility in what counts as a "similar sentence" and complete control of what is synchronized and when. However, this could get very messy with what you define as an object. It would take a fair amount of effort to maintain a coherent structure using this approach.

I mistakenly posted that you cannot spellcheck in markdown. This post tells how to perform spellchecking in markdown.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.