PDA

View Full Version : Syntax Highlight in OpenOffice



ubuntuubuntu
June 15th, 2007, 12:58 AM
Hi,
I am used to write programs in editors like kate and gedit, which have syntax highlighting for languages like C, C++ and Pascal. Now, I want to put C++ code on a document from OpenOffice, for preparing a studying materal.
What should I do in order to get "formatted code" (with highlighting) in the document?

Thank you.

jyba
June 15th, 2007, 03:24 AM
Okay, you're going to laugh at this but it works...

1. Go to the "File" menu of Kate and "Export as HTML"
2. Open the HTML file up in a web browser.
3. Copy from the web browser and paste into an Open Office Word-Processor document.
4. Save with the '.odt' extension.

There's got to be an easier way. :D

herc83
August 18th, 2010, 10:29 PM
This looks like a solution to your problem:

http://extensions.services.openoffice.org/en/project/coooder