Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
what application are you copying from? –  John T Dec 21 '09 at 4:26
    
I use textmate, e-texteditor and eclipse the most. –  Yousui Dec 21 '09 at 4:58
add comment

7 Answers

After pasting, a small "Paste Options" icon appears below the pasted text.

Click this icon and choose "Keep Source Formatting" :

enter image description here

share|improve this answer
    
I don't see such a Paste Options icon. I don't see a button to give me these options. I'm using PowerPoint:mac 2011. I think I have seen it in Windows versions, however. –  A-B-B Jul 19 '13 at 21:49
    
I tried different suggested methods and tools to copy from, but was actually missing that word/powerpoint was messing up the format by using "Destination Theme". Thanks! –  Tim Büthe Jan 22 at 11:23
add comment

Pygments can format almost every format to rtf:

pygmentize -f rtf -o code.rtf code.py
share|improve this answer
add comment

If the source code does not need to be copied and pasted out of the presentation, a quick and dirty solution could be to simply take screenshots of the source code.

share|improve this answer
3  
Image can be fuzzy when zoom in. –  Yousui Dec 21 '09 at 4:58
add comment

Pasting from Eclipse should retain formatting if the app supports it. I know Word does... not sure about PPT.

share|improve this answer
1  
Works from Eclipse Juno to Word 2010, but not to Powerpoint 2010 - it loses the colours and converts some of them to bold text –  DNA Sep 4 '13 at 17:21
add comment

May I commend an excellent html service by ookii.org:

http://www.ookii.org/software/formatc/

it works for C/C#/VB/HTML only though.

share|improve this answer
add comment

I've had no success pasting into Powerpoint 2010 on Windows.

However, pasting from Eclipse into Word 2010 works.

You can then save this formatted text as an RTF file, then embed the RTF into a Powerpoint 2010 slide using Insert Object (and optionally select 'link' so you can edit and update the text in Word).

share|improve this answer
add comment

Use Notepad++ with add-on NppExport.

  • Select the source code

  • Use Copy RTF to clipboard of NppExport

  • Paste into empty PPT slide (do not select any textfiled)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.