Home » Questions » Computers [ Ask a new question ]

How can I embed programming source code in Powerpoint slide and keep code highlighting?

How can I embed programming source code in Powerpoint slide and keep code highlighting?

Is it possible to embed programming source code to Powerpoint slide, and keep code highlighting/coloring?

Asked by: Guest | Views: 391
Total answers/comments: 4
Guest [Entry]

"Pygments can format almost every format to rtf:

pygmentize -f rtf -o code.rtf code.py"
Guest [Entry]

"Online syntax highlighter like TextMate seems good as well, http://markup.su/highlighter/

But after pasting into PowerPoint presentation new lines and line spacing is lost, so we can take a screen shot of the preview and paste it in our PowerPoint presentation"
Guest [Entry]

"Copy the code and first paste that code into Microsoft word

Then do the formatting if necessary and then copy from word and paste back to powerpoint by right clicking and choosing use destination theme"
Guest [Entry]

"Here's another approach:

Find an online source code syntax highlighting service.

emn178.github.io/online-tools/syntax_highlight.html
pinetools.com/syntax-highlighter

Paste the code to highlight into the web site.
Copy the highlighted version.
Create a new Word document.
Paste the code into Word (note the background colours may be lost).
Copy the code from Word.
Create a new text area in PowerPoint.
Click the Home menu option.
Open Paste on the ribbon.
Select Keep source formatting.
Optionally, change the text area background colour to taste.

Adjust the font using Inconsolata or other monospace font."