Take the 2-minute tour ×
Writers Stack Exchange is a question and answer site for authors, editors, reviewers, professional writers, and aspiring writers. It's 100% free, no registration required.

I'm writing a master thesis (Sociology) and I'm really penalized by distractions. I would happily shift to a markdown full-screen environment but I wrote an half of the thesis in .odt via LibreOffice, so I would like to know if it's possible to convert from .odt to Markdown, maintaining the footnotes (which are the most important thing in my work) and also the formatting of the bibliographical notes.

Maybe It could be useful to revert the process and, at the end of the work, go back to .odt file to reformat pages, line height and other things.

Is there a way to do so?

Alternatively, there is a way to write full-screen directly in a .odt file maintaining footnotes (because FocusWriter and TextRoom doesn't have this feature)?

share|improve this question
If this is the direction you're heading, I hope you've heard of Pandoc. Conversion will not be flawless--you'll definitely have to do a bit of cleanup. But the reward you'll get is being able to output to a variety of formats very easily. I would suggest converting the .odt to an HTML file and converting the HTML file to markdown using Pandoc as a starting point. –  Ananda Mahto Oct 1 '13 at 16:40
@AnandaMahto thank you for your comment. I've heard of Pandoc, but I didn't know a way to convert from .odt to markdown. Actually, I'll try the intermediate step you suggest and report if It works. –  Kropot Oct 2 '13 at 14:25
Are the bibliographical notes separable (like in an appendix at the end), or interspersed (like footnotes are)? If the former, you might be able to just leave that in .odt and work on the rest in Markdown (assuming you can convert the rest without losing your footnotes). –  Monica Cellio Oct 3 '13 at 0:28

4 Answers 4

Your first option is, really, Pandoc, which was already mentioned. Its usage is quite straightforward. I've done some converting along these lines myself, and it's brilliant. It's included in Debian repositories, so I'd think acquiring an installation wouldn't be a problem.

You indeed want to convert to HTML first:

pandoc OdtFile.odt -o HtmlFile.html

and then proceed to create markdown file the same way:

pandoc HtmlFile.html -o MarkDown.text

and yes, you could go back from markdown to odt the same way. You also could enforce your own style set by mentioning style template odt file, the README will tell you, how.

Another option is to forego markdown for some kind of TeX solution (to which format you also could convert your already written text with Pandoc), the advantages being the abilities to insert images, tables and math equations in text, though, I'm afraid, that will close the way back to odt.

share|improve this answer
The first command results in pandoc: Cannot decode byte '\xc6': Data.Text.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream, at least in the ubuntu version ( What version are you using to do that? There is another program, odt2html, in the unoconv package that works well though. –  naught101 Jun 20 '14 at 13:06
I get a similar error: pandoc: Cannot decode byte '\x9d': Data.Text.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream. –  Nordlöw Aug 20 '14 at 20:04
What version of the program do you use? Can you send me an example file which produces such an error? –  Undespairable Aug 21 '14 at 21:28

I've been playing around with odt2txt. It strips out all formatting, leaving just plain text, perfect for diffs, and an acceptable starting place for doing your markup, and if you combine it with @AnandaMahto's suggestion to use Pandoc to convert it back, I have some ugly papers to try this on.

share|improve this answer

Have you looked into WriteMonkey? There doesn't seem to be a plug-in to do what you want, but it is a robust distraction free markdown environment.

If converting to html and then to MD works, this might be the ideal editing environment for you. WriteMonkey will export MD to MS Word, which could then be opened in LibreOffice when you're done.

share|improve this answer

Pandoc only works in utf8 mode. If you have other codification in your writing, you must to convert it well using your editor or using iconv. Also, you should use before file on your texts to know the codification.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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