Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

syntax-highlighted Perl in Powerpoint 2008

3 views
Skip to first unread message

David N. Blank-Edelman

unread,
May 2, 2009, 11:17:26 PM5/2/09
to perl-t...@perl.org
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

Uri Guttman

unread,
May 3, 2009, 12:18:27 AM5/3/09
to David N. Blank-Edelman, perl-t...@perl.org
>>>>> "DNB" == David N Blank-Edelman <d...@ccs.neu.edu> writes:

DNB> Hi-
DNB> Not sure if this list is still active, but I'm curious if anyone
DNB> has any tips/suggestions for ways to insert syntax-colored Perl code
DNB> into Powerpoint for greater legibility. I realize Powerpoint isn't
DNB> always the tool of choice, but if you use it and have a method you
DNB> like, can you let me know what it is?

i haven't tried this as i don't like syntax highlighting but it may do
what you want. emacs has cperl-mode which does syntax coloring and there
is an emacs command ps-print-buffer-with-faces which prints a buffer
keeping the coloring (emacs calls those things 'faces'). and then you
would have a ps file (if you select a file instead of a printer for the
output) which you could edit later on. or even convert it to some other
format that you could edit more easily.

uri

--
Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------

0 new messages