views:

391

answers:

1

I have some big documentation to do that will contain pieces of code I'd like to give the conventional "coding language" syntax highlighting. I've searched the styles feature to do such a thing, but there is no way to do that (in fact I could only found a forum where people were fighting about adding this feature or not, but this is not the point).

There is an abandoned extension for OpenOffice, but using it freezes my installation of OpenOffice.

What's the easiest way to do this? Should I try to recompile the extension and debug it (although I'm already having a hard time compiling another Java project), or maybe I should use a macro? How to implement this?

+1  A: 

One possibility is to use one of the many code to html tools out there and then include the html in your OpenOffice document (using "File..." on the Insert menu).

One possibility is highlight. Vim has a :TOhtml command that will convert the current file to syntax highlighted html using the current colour scheme. I've not tried it, but this looks promising. There are also a few online ones, such as this. I'm sure there are a great many other options.

Al
Thanks for your help, but this is always "external" solutions, which mean I have to do a lot of copy and paste, then maybe change the font or size etc. after formatting... I'm searching for a one-click solution, but I don't know much about OOffice macro and extension so I'm trying to search the simplest method:(
gramm