Search code examples
emacsexportrtf

export from Emacs in rtf using current font-lock?


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 ?


Solution

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

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