I have macros that can color code Python as well as a few other languages. This 
works by setting character styles with the character style has the color 
association. So maybe that's what you want maybe it's not.

You also might be able to just load it into a Python editor that does color 
coding and then copy and paste, some editors transfer the color when you do 
that.



⁣Get BlueMail for Android ​

On Mar 15, 2022, 10:35 PM, at 10:35 PM, flywire <flywi...@gmail.com> wrote:
>There is a major usability issue I've found with using code from the
>pdf
>documents. Copy/paste replaces any leading space on indented lines with
>a
>single space. This is particularly an issue with python because
>indentation
>is part of the syntax. How can this be fixed in the pdf documents?
>
>I see between adding that draft and posting to the mailing list Olivier
>Hallot has included an earlier draft in the chapter he had checked out.
>I'll check out that chapter and update it to the latest ScriptForge
>draft.
>
>How can python code be formatted in colour?
>
>
>On Wed, Mar 16, 2022 at 1:18 PM flywire <flywi...@gmail.com> wrote:
>
>> I've uploaded a draft ScriptForge proposal and accompanying database
>to
>> NextCloud.
>>
>> Comments:
>>
>>    1. The draft needs checking (one macro example is not supported)
>and
>>    reformatting
>>    2. There is a note about standard colours for code that has been
>>    applied to the basic code except for the last few pages. It needs
>to be
>>    extended to python and sql.
>>    3. Raising spacing at the top and bottom of paragraphs again, and
>>    orphan lines/headings
>>
>>
>
>-- 
>To unsubscribe e-mail to:
>documentation+unsubscr...@global.libreoffice.org
>Problems?
>https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
>Posting guidelines + more:
>https://wiki.documentfoundation.org/Netiquette
>List archive:
>https://listarchives.libreoffice.org/global/documentation/
>Privacy Policy: https://www.documentfoundation.org/privacy

-- 
To unsubscribe e-mail to: documentation+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/documentation/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to