develooper Front page | perl.trainers | Postings from May 2009

syntax-highlighted Perl in Powerpoint 2008

Thread Next
From:
David N. Blank-Edelman
Date:
May 2, 2009 20:17
Subject:
syntax-highlighted Perl in Powerpoint 2008
Message ID:
99BC61C5-CDE9-452D-A363-A8EDCED5D77A@ccs.neu.edu
Hi-
   Not sure if this list is still active, but I'm curious if anyone  
has any tips/suggestions for ways to insert syntax-colored Perl code  
into Powerpoint for greater legibility. I realize Powerpoint isn't  
always the tool of choice, but if you use it and have a method you  
like, can you let me know what it is?

As a related note, here's the best of what I've tried (and why) so far  
and how it is failing:

One of my goals is to make it so the code is easily cut-and-paste-able  
from the PDF version of my slides participants will receive. I'd also  
like to be able to edit the code in the slide by hand. This eliminates  
the method where you take a screenshot of some tool and paste the  
picture into the slide. The best thing I've found is to use the (oh,  
the horror!) Python tool Pygments to color the code and render it into  
RTF, something like the following:

$ perltidy -st|pygmentize -f rtf -O style=perldoc -l perl |pbcopy

The thing that is driving me batty at the moment is if I paste the  
clipboard into TextEdit or even MSWord, the colors are faithfully  
preserved and the code looks great. If I Paste Special...RTF it into  
Powerpoint 2008, the result has different/incorrect colors and text  
styles for some reason (screen shot available upon request).

If anyone has any suggestions on an alternative method (or a way to  
fix this one), I'd really appreciate it.

     -- dNb

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About