[XeTeX] XeTeX Digest, Vol 136, Issue 7

Apostolos Syropoulos asyropoulos at yahoo.com
Fri Jul 3 17:52:35 CEST 2015

On Friday, July 3, 2015 7:39 AM, S. venkataraman <svenkat at ignou.ac.in> wrote:


>I have a naive question? There is a possibility of calling PERL or Python from latex using perltex package. 

>Is this possible in xetex? Will this feature be good enough?


Yes it is possible to use perltex with xelatex. The command to call perltex with xelatex is:

$ perltex --latex=xelatex YourXeLaTeXFile.tex

However, it is necessary to add the following two lines into perltex.pl

use utf8;
use feature 'unicode_strings';

since XeLaTeX files are UTF-8 encoded. On pages 3-4 of the perlex manual there is an example
that prints a table. The Perl macro uses somewhere the expressions $header++ Unfortunately,
this does not work when one initially sets 

$header = "α";

A simple solution to solve this problem is to use the following code:

$tabular .= "}{" . $header . "}"; #<---- originally $header++
$header = chr(ord($header)+1);    #<---- added to get the effect


----------------------Apostolos Syropoulos
Xanthi, Greece

More information about the XeTeX mailing list