perhaps this is a bit uncool - but have you tried using TextWrangler to do this? it's free. I don't care for it as a IDE but there are some text manipulations that are far easier to do (as one off's) in TextWrangler...
On Apr 15, 2011, at 9:19 AM, Thomas Krajacic wrote:
I am sure it was asked before, but a search in the archives didn't turn up a solution. I am writing my master's thesis and I need to include C-code in my document. I would like it to be colored and have line numbers.
There is a nice Copy as RTF command in Textmate that would do everything I need, except it doesn't work, if I add line numbers manually because this obviously breaks the code structure and highlighting breaks. So the line numbering will have to be done after the code is colorized.
I would like to have RTF text since I want to paste it into Word later. (Maybe I shouldn't use Word O_o )
I am sure some of you have had the same problem and maybe someone has a working solution. I also couldn't find any commandline tool that would read and write rtf line by line, which would be a simple post-processing step then to add the numbering. It might be possible to change the original Copy as RTF Bundle, but having a quick look inside it was a bit tricky to find where to add the necessary code.
Help is greatly appreciated.
Thomas
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate