: From Markdown to .odt and vice-versa: a possible distraction-free writing workflow? I'm writing a master thesis (Sociology) and I'm really penalized by distractions. I would happily shift to a
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)?
More posts by @Berumen699
: Should blog posts be reformatted to past tense after an event? A writer is doing blog coverage of an event which is time sensitive (happens annually). The writer uses present tense for the
: Can Articy Draft be used to write a book? I recently bought Articy Draft to catalog my writing endeavours. It seems good for writing scripts, but what about writing a book? Reference: http://www.nevigo.com/en/articydraft/ove
4 Comments
Sorted by latest first Latest Oldest Best
To augment Undespairable's answer, these commands from the command line convert from markdown to HTML and then HTML to ODT.
pandoc .some-file.md -f markdown -t html -s -o .some-file.html
pandoc .some-file.html -f html -t odt -o .some-file.odt
See also: www.pandoc.org/getting-started.html
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.
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.
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.
Terms of Use Privacy policy Contact About Cancellation policy © selfpublishingguru.com2024 All Rights reserved.