From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81092 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: new beta Date: Mon, 11 Mar 2013 00:46:38 +0100 Message-ID: <513D1B5E.1020206@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1362959211 19774 80.91.229.3 (10 Mar 2013 23:46:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Mar 2013 23:46:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 11 00:47:16 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UEpxS-0006D2-C8 for gctc-ntg-context-518@m.gmane.org; Mon, 11 Mar 2013 00:47:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BAF64101F3; Mon, 11 Mar 2013 00:46:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hfkLSjyt7-pe; Mon, 11 Mar 2013 00:46:50 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EC246101E3; Mon, 11 Mar 2013 00:46:49 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8242C101E3 for ; Mon, 11 Mar 2013 00:46:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qFye67kO9yyK for ; Mon, 11 Mar 2013 00:46:47 +0100 (CET) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 60544101E2 for ; Mon, 11 Mar 2013 00:46:47 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2ANkjac010096 for ; Mon, 11 Mar 2013 00:46:46 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 10768-1713362 for ; Mon, 11 Mar 2013 00:46:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=11; city=Den Haag; latitude=52.0833; longitude=4.3000; http://maps.google.com/maps?q=52.0833,4.3000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04J9XKJbU - 42ab8a304cec - 20130311 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81092 Archived-At: Hi, I uploaded a beta. The most important change is that the 'context' function now uses the formatters mechanism instead of Lua's format. This has several benefits. First of all it's in most cases faster (I measured upto 3 times) but it also permits us to support some more: integer %...i number integer %...d number unsigned %...u number utf character %...c number hexadecimal %...x number HEXADECIMAL %...X number octal %...o number string %...s string number float %...f number exponential %...e number exponential %...E number autofloat %...g number autofloat %...G number force tostring %...S any force tostring %Q any force tonumber %N number (strip leading zeros) signed number %I number rounded number %r number 0xhexadecimal %...h character number 0xHEXADECIMAL %...H character number U+hexadecimal %...u character number U+HEXADECIMAL %...U character number points %p number (scaled points) basepoints %b number (scaled points) table concat %...t table boolean (logic) %l boolean BOOLEAN %L boolean whitespace %...w More info can be found in cld-mkiv.pdf. There I also explain how to create specific formatters and how to extend them. In the default formatter there are two extensions that can be used as: string.formatters["whatever %!tex! and %!xml!"]("$ 100","a&b") or local mf = string.formatters["whatever %!tex! and %!xml!"] ... mf("$ 100","a&b") or context("whatever %!tex! and %!xml!","$ 100","a&b") (Someone should add that to the wiki I guess). 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 ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________