[yapc] Syntax highlighting for presentations

Michael Peters mpeters at plusthree.com
Fri Jul 7 06:27:42 PDT 2006



Dave Rolsky wrote:
> On Thu, 6 Jul 2006, Trey Harris wrote:
> 
>> I noticed a lot of folks had pretty syntax-highlighted/colored code in
>> their presentations.  I've done that too, but I'll bet my process
>> (perltidy to HTML, HTML to PDF, dropped and zoomed/cropped into the slide)
>> is a lot more laborious than what others have worked out.
>>
>> If I may ask, does anyone have nice tools for converting a snippet of code
>> into a pretty graphic?  I use Keynote, but I could probably adapt certain
>> tools that target other presenters.
> 
> I use Spork and the Spork::Hilite plugin. It's not well documented (it's 
> Ingy code!) but it has worked nicely for me.

I used this as well. Also, the weekend before the conference I hacked together a
couple of spork plugins: Spork::Plugin::Syntax::HTML,
Spork::Plugin::Syntax::Perl and Spork::Plugin::Syntax::Javascript. I have plans
for cleaning them up and releasing to CPAN.

It let me do stuff like this

.sytnax_perl
  my %foo = (
    bar => 1,
    baz => 2,
  );
.syntax_perl

and have it highlighted. I also plan to unify them down to one plugin that would
handled multiple languages. If there's enough interest, I might be able to find
more tuits for that.

-- 
Michael Peters
Developer
Plus Three, LP



More information about the yapc mailing list