Exporting code to text format with syntax highlighting

Hello,

I am trying to export code from SuperCollider to Microsoft Word while preserving the syntax highlighting.

I used to be able to easily do this when SC used .rtf, but I can’t figure how to do it at all now.

Any idea? I need to be able to change the font and size in the target program, but that’s about it.

This is possible by copying a block of code with adjacent text outside the code area in SuperCollider’s help browser or web browser. To do this, don’t always write the code in a help file.

The following is how I get the syntax-highlighted code:

  1. For example, open the SinOsc help document:
    SinOsc | SuperCollider 3.12.2 Help
  2. Replace the code in the Examples section:
  3. Select the block of code with some text outside the code area, e.g. Example as follows:
  4. Paste it into MS Word or equivalent.