export from Emacs in rtf using current font-lock?

600 Views Asked by At

I'd like to export my latex files (and maybe other files) as rtf files, so that the syntax highlighting will be kept (that is - keep it 'plain text' with colors).

I tried using Org-mode to convert to HTML (thinking later to copy it into LibreOffice and hope for good results), but I couldn't make Org export it with the correct colors.

Is there a way to export buffer to rtf using the current font-lock ?

1

There are 1 best solutions below

1
On BEST ANSWER

I think you're looking for M-x htmlfontify-buffer.

You can also take a look at http://www.emacswiki.org/emacs/Htmlize