Hi guys,
R-Pass
R-Pass (the Ruby Presentation Assistant) is a bundle of small utilities
and
configuration files to assist you when writing talk slides and when
giving
talks and demos. The main utility is a small text filter, based on
CodeRay,
that highlights code in all the CodeRay supported languages, for slides
written in S5/HTML and LaTeX (you’ll need my CodeRay extensions for the
latter, though). R-Pass comes with ready-to-use configuration files to
integrate the highlighter with VIM.
Why?
I give talks and demos from time to time. I use LaTeX a lot
(specifically,
LaTeX-Beamer), and I wanted to highlight all the sample Ruby code in the
slides. Once I found some Makefile-based solution (can’t recall where),
but I
didn’t like it very much, so I decided to write my own generic simple
text
filter to highlight code.
Once I wrote it, I figured out it was a good idea to write a couple
of
tiny utilities and configuration files to assist myself when giving or
writing
talks… and I bundled them together and decided to open up a project at
RubyForge to release them. Although I opened it a week ago or so, I have
just
released the first “stable” version:
http://rubyforge.org/frs/shownotes.php?release_id=7051
Example
Say you have some LaTeX slides open in VIM, and you need to write some
sample
code. You write it this way:
------------------------------------- 8<
%code ruby
% class Something
% attr_reader :foo
% attr_accessor :bar
% def hello
% puts “Hello!”
% end
% end
%endcode
------------------------------------- >8
Then, you hit “\RH” (for “Refresh Highlighting”) in VIM, and you get:
------------------------------------- 8<
%code ruby
% class Something
% attr_reader :foo
% attr_accessor :bar
% def hello
% puts “Hello!”
% end
% end
\begin{semiverbatim}
\synreserved{class} \synclass{Something}
\synident{attr_reader} \synsymbol{:foo}
\synident{attr_accessor} \synsymbol{:bar}
\synreserved{def} \synmethod{hello}
\synident{puts}
\synstring{\syndelimiter{“{}}\syncontent{Hello!}\syndelimiter{”{}}}
\synreserved{end}
\synreserved{end}
\end{semiverbatim}
%endcode
------------------------------------- >8
Links
The project is registered in RubyForge, as “r-pass”, so you have:
Homepage: http://r-pass.rubyforge.org/
Download: http://rubyforge.org/frs/?group_id=2223
RubyForge homepage: http://rubyforge.org/projects/r-pass
The code is in Darcs, at http://www.demiurgo.org/darcs/r-pass/ , so
getting it is a matter of:
darcs get http://www.demiurgo.org/darcs/r-pass/
Enjoy!