Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


I do this all the time using the syntax highlighter in Notepad++.

If you don't have Notepad++ (my favorite code/text editor), get it here: http://notepad-plus-plus.org/

Here's how to get syntax highlighted code into your LibreOffice documents:

1: Open source file with Notepad++
2: In Notepad++ click Plugins > NppExport > Export to RTF

You will now have a syntax highlighted copy of your source file however, it will be double spaced. To remove the extra spaces proceed as follows:

1: With any editor, open the .rtf file you just created
2: Search and replace "\par" with "\line"
3: Save file

Open the .rtf file with LibreOffice Writer, select all (CTRL-A), copy & paste into your working document.

This sounds like a bit of an ordeal, but I do this quite frequently, and once you've done it a few times, it becomes very fast and easy.

Good luck,

-Bill





On 8/11/2013 9:22 PM, aihaike wrote:
Hey Miguel,

thank you for you reply.
This the kind of macro I need but it does not seem to work with LibreOffice
4 unfortunately.
I think I'm going to make a snapshot of my codes and include them  as a
picture.
Éric.



--
View this message in context: 
http://nabble.documentfoundation.org/Including-code-example-in-documents-tp4069680p4069685.html
Sent from the Users mailing list archive at Nabble.com.



--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.