-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =pod I have always been unhappy reading source code on the Internet and on slides. The colors are never quite right. It seems like every Perl to HTML converter in existence gets it wrong (my blog is no exception). This bothered me so much that for my last Perl talk, I gave up on the Perl-based slide tools and wrote my slide-generation software in the environment that always highlights things correctly -- emacs. (The result of this is eslide, available from my git repository. It is quite nice; it is sort of a hybrid between tools like Spork and Keynote, and I will be polishing it further as the conference season begins. Check it out and email me or post a comment if you have questions.) Anyway, using emacs for your presentations is nice, but it is hard for people to download the slides after the talk. So part 2 of eslide is a Perl program that converts the slides to HTML and PDF. The hardest part of this is the syntax highlighting, of course, but I finally figured out how to convert arbitrary data in Perl strings to HTML-formatted text with emacs :) The result is C on CPAN. You use it like this: lang:Perl # eww, the colors are wrong here ;) use Text::EmacsColor; my $colorer = Text::EmacsColor->new; my $html = $colorer->format( 'my $foo = 42', # code 'cperl', # the emacs mode to use (cperl, lisp, haskell, ...) ); C<$html> is the HTML and CSS representing the colored string. In the next version, I will parse everything out into a DOM and a CSS::Tiny document, but I wanted to get the proof of concept out onto CPAN for the Testers to have their way with. It currently works with both emacs 22 and emacs 23, and you can either fork off a new emacs process for each string (not as slow as it sounds), or you can talk to a persistent process via emacsclient (really really fast)... so please try it out. It is a pleasant alternative to C for those of us that spend most of our time in emacs. At some point, I will be replacing the syntax-coloring in Angerwhale with this. The result will be so beautiful that just thinking about it brings a tear to my eye ;) (I am working on Angerwhale again, BTW. I fixed the annoying broken captchas last night, so leaving a comment on this article should be much easier. Yay!) It is late, so I will let you know more about all this later. G'nite. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkk2TccACgkQ2rw+dVvzZm1ovgCeKz1wPiXHXsGY4RIjBKwPDXcf 1DQAn3M9ycI++BcHuq7w6cegbjLdg/Gy =rnTt -----END PGP SIGNATURE-----