Can I get syntax highlighting for javacode, bash, etc. in Writer?

I would like to add some javacode and some bash (console) output into my writer. Well thats not so hard, I can copy the stuff. But I would like to make them look like javacode and bash. Something like in latex: \lstset{language=Java} ...

you could try the COOoder extension - I didn’t check whether it still works with current versions of OOo and LibreOffice, but just give it a try.

It looks like it requires Java - I couldn’t get it to work in 3.5.

it does require java, but that doesn’t hinder the extension from working with my copy of 3.5 :slight_smile: - you just need to make sure that you have a matching java runtime installed (64bit for 64bit LibreOffice, 32bit for 32bit LibreOffice). I’m using java version 1.6.0 from OpenJDK without any problem.

Just stepped into this problem. I found this question in an Internet Search Engine and tested it. As of the date, this is working perfectly for GNU/Linux Debian _Wheezy_ LibreOffice 3.5.4.2. There is a bug when highlighting code in a cell inside a table, but this is a less than minor issue.