I wrote my thesis in LaTeX and now my advisor would like to go in and manually make changes. I had assumed he would mark up a pdf or printed document, and then hand those changes to me to make, but he insists on actually making the changes himself. However, he does not know how to use LaTeX and does not want to deal with editing a plain text file with all the LaTeX markup everywhere.

What is the best way to convert my LaTeX document into something he can edit (preferably something he can open in Microsoft Word) so that it will still be in a format that I can easily convert it back into a LaTeX document?

  • 2
    @Spike would this help tex.stackexchange.com/questions/8836/…? – Yiannis Lazarides Apr 21 '11 at 21:52
  • 7
    You're going to loose lot of information in the conversion to a Word-like format and then even more in the conversion back to TeX. Marking up the PDF or editing the plain text is seriously the route of least pain for everyone involved. – Sharpie Apr 21 '11 at 21:52
  • 5
    Would giving a LaTeX book to your advisor help ? – raphink Apr 21 '11 at 22:04
  • 3
    @Martin: And I usually ask "whose thesis is it?" – egreg Apr 21 '11 at 22:21
  • 5
    Would LyX be an option? I've never used it, but it would be a WYSIWYG alternative so that he wouldn't be editing the plain text... – TJ Ellis Apr 21 '11 at 22:29

Pandoc can convert between quite a few formats. Extract from the manual:

Pandoc converts files from one markup format to another. It can read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write plain text, markdown, reStructuredText, HTML, LaTeX, ConTeXt, Texinfo, groff man, MediaWiki markup, RTF, OpenDocument XML, ODT, DocBook XML, and S5 HTML slide shows.

It can convert to ODT, which is close enough to DOC, but you'll loose quite a bit by doing so.

To make it easy enough without loosing your soul, I'd convert it to markdown, which is both easy and efficient.

Keep in mind that if you're using tricky things in LaTeX (specific packages, your own macros or environments), you won't get any good conversion results.

  • This looked promising, and I installed it to try it out. For some reason, the conversion didn't like my .tex document and I ended up with a bunch of random characters in the files that made them impossible to read... – Spike Apr 22 '11 at 8:48
  • Actually, the ODT format worked ok, but the other ones such as RTF did not. I then used an online ODT to Docx converter and sent that docx to my advisor. I'm planning on just taking the changes he makes and copy/pasting them into my LaTeX document. Thanks for your help! – Spike Apr 22 '11 at 9:03
  • 1
    pandoc understands a basic subset of LaTeX. Even footnotes might not work great. Like I and others said, you're very likely to loose formatting information (if not more) by converting LaTeX to anything else than PDF with annotations. – raphink Apr 22 '11 at 9:04
  • 1
    @Spike: The important thing here is the word "subset". Pandoc is not a TeX-to-anything converter. – Andrew Stacey Apr 22 '11 at 19:20
  • @Andrew: indeed. In fact, whatever pandoc can produce, it will understand, but you shouldn't expect it to know about any additional packages, and even less so about personal macros. It doesn't interpret TeX, it just translates it as is. When working from markdown or rst down to LaTex in order to produce PDF, you can easily get back to markdown since the LaTeX was produced by pandoc itself. – raphink Apr 22 '11 at 20:50

You can edit Latex sources directly in Word, which is by far the most unproblematic route if you want to convert back to Latex again. A possible issue with doing this is that the Word user has to know what not to touch. By passing the text through a highlighter, you can make this easier to do, by ensuring that Latex markup looks different to regular text; additionally chapter and section headings can be set in a larger size, emphasis is shown in italics, &c. Here is a workflow I use when doing this:

  1. Convert the Latex into highlighted HTML, using Pygments. The following short shell script, which I call quote-latex2html, achieves this:

      #quote-latex shell script: use Pygmentize to turn a Latex file into an
      #HTML file whose text content is the original file.
      die () { echo "$@"; exit 1; }
      test -f "$1" || die "$1 isn't a regular file"
      cat <<EOF
      <TITLE>$1 (style=$pysty)</TITLE>
      <STYLE type="text/css">
      pygmentize -f html -S $pysty
      cat <<EOF
      pygmentize -f html -O style=$pysty "$1"
      echo "</BODY></HTML>"
  2. Import the HTML document into Word, and then save it as a Word format. Word 2007 or later handles the conversion best, but most Word users still seem to prefer Word 2003: check with your supervisor.

  3. Switch on change tracking, send off manuscript, and wait for responses.
  4. Work through changes.
  5. Export as plain text. The result is hopefully a working Latex document; if not, consider looking over the changes at stage 4 to find out what change went wrong.

Of course, you need access to Word for stages 2-5, and some familiarity with Word for stage 4. But you supervisor can work with the output of stage 1 in any case.

  • Woah cool. Thanks for the suggestion. I already went with another one, but I appreciate this idea. Hopefully it'll be useful for someone else. – Spike Apr 23 '11 at 16:27

I used the Latex2rtf to deal with this. You cannot expect to get a 100% correct conversion. However, from my experience, it should be sufficient enough for your advisor to use MS-Word to review your thesis. Just let him or her realize that he or she only need care about the content but not formatting. You can proudly claim that Latex will take care of formatting.

  • I had a bunch of custom stuff in my Latex file, and some not so common includes, and I think these things made Latex2rtf not want to work for me. It just gave me some errors so I gave up on this solution quickly. – Spike Apr 22 '11 at 8:50
  • 1
    You may think about separating your content writing and final formatting in this case. Just use Latex article style to write one and convert to RTF->Word and work with your adviser on content. Then, after content is finalized, switch to your custom style and add fancy eye candy. – Leo5188 Apr 22 '11 at 19:30
  • Yeah, I ended up converting to Word using Pandoc so my advisor could edit the content and then will be copying the revised content back into my LaTeX doc. – Spike Apr 23 '11 at 16:25

I would second LyX. Very little code to be seen although nothing is formatted before you compile (but you can track changes as well).

  • LyX is pretty awesome and is exactly what I need. Thanks for pointing that out! It easily converts a LaTeX file to the LyX format, gives a gui editor for editing LyX, and can then export a file right back into LaTeX. The problem with this solution was that after I converted it from a LyX file back to LaTeX file, LyX renamed all of my refs throughout the file, breaking all the custom stuff I wrote... Thus it wouldn't compile again. It'd be a pain for my current situation. In the future, I'll definitely be using this, especially for smaller files with little to no customization. – Spike Apr 22 '11 at 8:54

I'll add a suggestion I've yet to see here: use tex4ht. It can convert to OpenOffice (see here for instructions) which can then be further converted to word, and as it works by hooking in to TeX's output then it is much closer to the original than the other converters around.

(And I'd also recommend taking the changes and manually importing them back in to the thesis, so I'm not considering the question of conversion back again.)

  • Very cool. If I didn't already use Pandoc for this I would have definitely tried this first. – Spike Apr 23 '11 at 16:30

I would convert to a format your advisor will accept. Let him make changes. Then put his changes in the latex file yourself.

  • Yep, it looks like that's what I'll have to do. – Spike Apr 22 '11 at 9:03

What a strange behaviour from your advisor! Did his/her own advisor do the same ?

I would advise the following: converting the TeX file to plain text or rtf (and make sure with your advisor he does not want to make typesetting and page layout changes), then use a diff utility (there are many freeware on all platforms) to outline and check all the edits made when the modified file is back and enter them yourself in your thesis according to your own judgment.

If he wants to suggest page layout changes, warn that this cannot be done on plain text and discuss those changes on typical pages printout with pencil then implement what you believe is sound or mandatory for the submission of your thesis.

  • haha yeah... kind of strange. He's very hands on, and that's just his personality. – Spike Apr 23 '11 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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