On 18-8-2012 10:13, Henning Hraban Ramm wrote:
Latest beta, MkIV:
I get "! Undefined control sequence." for \FirstNCharacters
If I copy its definition from supp-fun.tex (source.contextgarden.net) to my project, it works.
Hm, I didn't know that anyone was using those macros. Put this in cont-new.mkiv: \def\getsubstring#1#2#3{\cldcontext{utf.sub([[#3]],tonumber("#1"),tonumber("#2"))}} And you can use: \getsubstring{4}{}{Who Wants This} \par \getsubstring{4}{9}{Who Wants This} \par \getsubstring{9}{-2}{Who Wants This} \par \getsubstring{1}{5}{Who Wants This} \par (I've added a slightly different implementation to the not yet uploaded beta.) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------