views:

161

answers:

3

I'm in the process of writing a whitepaper, and am about half-way through. I've just realized that it would be far simpler to write this in org-mode and export to latex/pdf than writing it directly in latex-mode. Is there any way I can convert the existing work into an org mode file? It would save a lot of work I'd have to do manually.

A: 

I doubt that there is a tool for your task, but you should be able to save many keystrokes with Emacs.

For many LaTeXisms such as quoted characters, try using query-replace and query-replace-regexp and see how far that gets you. For things that aren't easily solved with regular expressions, you may find keyboard macros useful.

hillu
+2  A: 

Hi,

I doubt as well that you will find a direct tool. You'll need to do some search'n'replace with one tool or the other.

What might help is to use pandoc to convert your LaTeX to something closer to org-mode syntax like "markdown", "reStructuredText" or "MediaWiki" and then do your query-replace-regexp magic or write a small sed script.

Good luck on your journey!

UPDATE: Searching Google for "convert latex to wiki" I found this page with a python script to convert LaTeX source code to Qwiki markup, maybe it gives you some inspiration.

danielpoe
guess the best thing i can do is convert to markdown and work from there... thanks for telling me about pandoc though :)
vedang
+2  A: 

Would it be a little easier to convert the latex file to markdown using pandoc and then manually convert markdown to org-mode with a few query-replaces and emacs macros ?

Raja