Any tips for displaying source code in your document?

For all things Mellel

Moderators: Eyal Redler, redlers, Ori Redler

Post Reply
kamransoomro84
New to all this
Posts: 3
Joined: Tue Jun 30, 2020 2:49 pm

Any tips for displaying source code in your document?

Post by kamransoomro84 »

I would some ideas on how to show source code in my document. What would be the simplest way to get syntax highlighted code that is visually distinct.

Ideally something like this would be great.
Amontillado
Knows everything, can prove it
Posts: 167
Joined: Fri May 04, 2018 4:00 am

Re: Any tips for displaying source code in your document?

Post by Amontillado »

I think Pandoc will create syntax highlighting. I wasn't able to get it to work, but I suspect that was my fault, not Pandoc's.

Or, if you have a programming editor you might have everything you need.

I opened a Python script in BBEdit and used File->Save as styled text. That created an RTF file Mellel opened without problems. There are web pages that suggest copy from Visual Studio (free, in the Community version) preserves the formatting. You might be able to copy code in Visual Studio and paste directly into Mellel, syntax highlighting preserved.

Good luck - please post your solution. I have some documents to produce and would appreciate learning better efficiency.
Post Reply