[pdftex] Ruby in TeX II.

Nagy Bence tipogral at freemail.hu
Wed Feb 18 18:25:36 CET 2004


Dear All,

I have updated my "Ruby in TeX" patch (it can be downloaded from
http://www.freeweb.hu/gimb/files/pdftex-ruby.tar.gz)

In this patch are two new primitives:

1. \rubyexec - runs its parameter as a Ruby script, and gives back its
output as a TeX string. This string will be tokenized without scaning
again, so backslashes will be backslashes in the output.

Example:

\def\test{Apple}
\rubyexec{"\test"*3}

Output:

AppleAppleApple


2. \rubycalc - the old \calc primitive like \advance or \multiply. It
can assign a Ruby calculated value to a TeX dimen.

\newdimen\testdimen
\rubycalc\testdimen{3*2}
\the\testdimen

Output (\the\testdimen causes):

6.0pt


Installation instructions (Linux):

1. Download the compressed file and extract.

2. Install Ruby 1.8.x (try with ./configure --prefix=/usr
--host=i686-linux-gnu)

3. Copy the pdfTeX source file (pdftex-1.11b.tar.bz2) into the
pdftex-ruby directory (made by the compressed patch) and go into that.

4. Verify the Ruby settings in build.sh (RUBYINCLUDEDIR variable should
point to the directory contains the ruby header files).

5. Run build.sh

(6. Run make install and regenerate your format files)


There are some thing to do and critial errors too, so this is a
pre-pre-alpha version.

Greetings,

Bence


More information about the pdftex mailing list