I am writing a manual using Word / LibreOffice's Writer.
As part of the manual, I'd like to include python code snippets.
Naturally, I want these to be included in a nice way.
How can I paste python code into Word / LibreOffice's Writer while keeping its nice format?
Libre Office should be able to import HTML code. You can use any Highlighter that can output HTML highlighted code. You may try an online highlighter like http://www.tohtml.com/python/ for example.
Edit: Somehow Libre Office is missing HTML code in the Paste Special menu, but here is some trick to get html into the document:
This is cumbersome, but I didn't find another way, though I can remember, that there was a HTML option in the Paste Special menu in Open Office. May be there is some plugin or similar stuff to do it easier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With