[XeTeX] String manipulation (substr and similar) in XeLaTeX
Ross Moore
ross at ics.mq.edu.au
Tue Dec 4 22:49:29 CET 2007
Hello Jan,
On 04/12/2007, at 11:14 AM, Jan Zahornadsky wrote:
> Hi!
>
> I've just came over this problem -- is there a package or method
> how to
> manipulate strings (as packages like coolstr, substr and similar do)?
> They seem to work with XeLaTeX as long as the parameter contains no
> special symbols (the 128 same-mapped characters, I suppose).
>
> How to perform similar manipulations in the unicode? Are there some
> built-in functions in XeLaTeX? Is it at least possible (by updating
> existing packages)?
You can use the TeX primitives \openout and \write to write the
string to a file, then use the \write18 shell-escape facility
to run a unix (or DOS) command on that file; e.g.,
some Perl string processing commands, or sed or awk , etc.
Then use \openin and \read to get the resulting data back
into your Xe(La)TeX document.
I'd guess that this is how PerlTeX works.
>
> Thanks a lot in advance for any answer, any idea!
Hope this helps,
Ross Moore
> Jan
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 +2 9850 8955
Sydney, Australia 2109 fax: +61 +2 9850 8114
------------------------------------------------------------------------
More information about the XeTeX
mailing list