After various tentatives to write drafts of article directly in org-mode for Emacs, hoping to take advantage of various of its features (e.g. exporting to html, easier scope exporting than with \includeonly, automatically generating example based on inline code, etc...), I decided that I was more at ease writing my articles directly in latex (under auctex mode in Emacs).

Yet I find myself still converting large fragments of latex code to orgmode (e.g. \textemf{blabla} to /blabla/) for inclusion in org-mode documents (e.g. to export to a webpage). I do so via search and replace with regular expression, and I am thinking about writing a general script to automatize the task, but I thought that someone else might have done so already. A quick search on Google and Stacks Exchange did not yield any useful answer.

  • 1
    Pandoc is the best way I'm aware of. – jon Aug 11 '14 at 19:21

You are right: Writing in orgmode and exporting to LaTeX may work for text, but as soon as you get into realms of more sophisticated layout, you think half of the time about how to export it properly from orgmode to LaTeX.

Meanwhile I write my drafts with orgmode. After finishing the draft, I export it to LaTeX and stick to LaTeX.

You probably won't export your whole text to a website, will you? So take the time to copy and paste a short version for the website. That saves much time in the end, compared to head scratching about export from orgmode to LaTeX for the whole document.

|improve this answer|||||
  • That's the plan, but when copy pasting short versions to the website, I find myself repeatitively translating \emph{blah} in /blah/ and \texttt{blah} in =blah= and so on. I will program a script to automatize it (and but it on github) if I don't find that someone already made one :) – Jeremy Aug 15 '14 at 12:53

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.