3

I have code blocks written in Open Office Write and want colorize it. How can I do this?

EDIT: When I copy syntax-highlighted code back to open office writer it becomes black again. How can I change this?

kame
  • 20,848
  • 33
  • 104
  • 159
  • Is it because you are using OO as your code editor? Don't. Is it because you want to publish syntax colored code samples in broader document? That will take some fiddling... (or I could just let Mark Byers post an answer;) – msw Apr 24 '10 at 08:05
  • Editors, please add `open-office` and `syntax-highlighting` tags. Possible duplicate: http://stackoverflow.com/questions/2556862/syntax-highlighting-in-ms-word-document – Xavier Ho Apr 24 '10 at 08:09
  • @msw OO isn't my editor. :) Don't worry. @Xavier Ho I forget the word syntax-highlighting. English isn't my mother tongue. Sorry and thanks! My question isn't a duplicate. How can I get syntax highlighted OO? – kame Apr 24 '10 at 08:24
  • No worries. Sounds like you found your solution? – Xavier Ho Apr 24 '10 at 10:37
  • I had some trouble with installing the plugin coooders. But now it works. – kame Apr 24 '10 at 11:33

3 Answers3

2

I think you need to take a look at coooder plugin for LibreOffice(OpenOffice).

Bozhidar Batsov
  • 55,802
  • 13
  • 100
  • 117
  • But nothing happens when I click the <> button. – kame Apr 24 '10 at 08:55
  • @BozhidarBatsov Your link is now dead. I realize it has been four years since you posted it though :) However it would perhaps be more useful to future readers if you included the name of the plugin in your answer instead of just an "anonymous" link. I can see from the URL that it is 'coooder' and thanks for that it's what I needed! – Juicy Apr 23 '14 at 23:42
1

You could try pygments.

Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452
0

I know this works for MS Word, but it may also work for Open Office.

http://www.planetb.ca/2008/11/syntax-highlight-code-in-word-documents/

Xavier Ho
  • 17,011
  • 9
  • 48
  • 52