How do I embed source code or HTML in Open Office Org Presentations without using screenshots?


I need to write a lot of class courses presentations to my programming class, and I constantly need to show source code (mainly C code).

enter image description here

I don’t find a easy way to:

  1. Copy my source code from my editor (kate) and
  2. Paste it formated and with source highlighted to an Open Office Presentation (OOP).

What I use to do is a snapshot if the code is small, or to stop presentation and open Kate in the datashow if it is too big.

In this other question some suggest to embed HTML code. So I installed QSource-Highlight that easily convert C code to HTML (also gnu source-highlight, code2html, and so on). None of them can convert source code to a version of a highlighted RTF (rich text format), that would be another way to go.

Having HTML doesn’t help, because I can’t find a easy way to insert HTML into a presentation either. This site show a very trick windows solution. It needs to convert c code to HTML using an specific windows program that has an option to copy the HTML as RTF, after that you need to past the RTF in Word or Wordpad, and after that you special past RTF to PowerPoint. All good, but I’m a linux user, and I think there might be a better way.

Also, there is another possible solution, installing coooder extension to openoffice. I don’t know why, but trying to install this extension in my system gives me an error. Synaptic tell’s me that and a lot of other should be marked. I click next, and it tells me it wants to remove all the packages, and that coooder needs this packages to work, and so it is not going to be installed. Well…

I’m using linux UBUNTU 10.04, and Open Office 3.2


This question is debated in meta-so as possible duplication of the question cited above. But it is my understanding that the older question doesn’t solve this specific problem.

PPS.: About the coooder bug, I’ve launched a bug report here

Edit (2015-08-19)

To insert a RTF text to presentation LibreOffice you can use menu insert, file, and rtf (or HTML).


Some people says that copying code from Eclipse editor works well (UPDATE: Proven FALSE). Another alternative is exporting to RTF (can also export line numbers), or to clipboard, from Highlight and then opening/pasting it in (UPDATE: Proven TRUE)

Here is a Highlight GUI screen shot:
Highlight GUI (KDE)

You can also switch from to LibreOffice, and get COOoder from here.

Answered By – Francisco Alvarado

Answer Checked By – Mildred Charles (AngularFixing Admin)

Leave a Reply

Your email address will not be published.