From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81097 Path: news.gmane.org!not-for-mail From: Sietse Brouwer Newsgroups: gmane.comp.tex.context Subject: Re: new beta Date: Mon, 11 Mar 2013 18:13:29 +0100 Message-ID: References: <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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363022051 16144 80.91.229.3 (11 Mar 2013 17:14:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Mar 2013 17:14:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 11 18:14:33 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 1UF6Iz-0000BZ-8U for gctc-ntg-context-518@m.gmane.org; Mon, 11 Mar 2013 18:14:33 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8FED101F9; Mon, 11 Mar 2013 18:14:10 +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 wqKBYq+2kHrh; Mon, 11 Mar 2013 18:14:04 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 63231101E8; Mon, 11 Mar 2013 18:14:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C49F9101E8 for ; Mon, 11 Mar 2013 18:14:03 +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 qIT-Qr4X5uMa for ; Mon, 11 Mar 2013 18:14:01 +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 1563F101E7 for ; Mon, 11 Mar 2013 18:14:00 +0100 (CET) Original-Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2BHDxbC024902 for ; Mon, 11 Mar 2013 18:13:59 +0100 Original-Received: by mail-ee0-f53.google.com with SMTP id e53so2270081eek.12 for ; Mon, 11 Mar 2013 10:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=NKTachY0jc6TluJVgJ+Lnt5NKg9RzM6oGw/t/SJptbs=; b=tYJm+ReWb6vQGHgYInW3yz4nHZPLlLOH6hPudVoQbpOcICTsvI68H1a0vWjIm+m3Az td/kE8FJcx9IuemMPBuVWgPNxs93Mk4Vhn2covuInO8QtNBk1NeOe2CXIHb1Z1JGR4rX HokdHlrqO9OxlVtE4VCu2V37hIQ6FCJzGSXLGenX88oP7Blq7rV3vQhCFJykGN+ADfcy 7NrrmR9UpWqFB6EzODQ065EGWSZnk6Uo0V/EHfoo/krb6H2QXP3IUe9VLmtBHqtwzKKq 4aqHj7R3TB4Y+MHAEm4nFjU0f42HB6uBVGBviV98Gm2sVu5gdGPnYhaBfhPpW9Ydk4u7 MHhw== X-Received: by 10.15.23.193 with SMTP id h41mr38530796eeu.17.1363022039288; Mon, 11 Mar 2013 10:13:59 -0700 (PDT) Original-Received: by 10.14.219.66 with HTTP; Mon, 11 Mar 2013 10:13:29 -0700 (PDT) In-Reply-To: <513D1B5E.1020206@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.53; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04JahdX8Q - 44646ae5640e - 20130311 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:81097 Archived-At: Hi, I chucked it in here, for lack of a better place. http://wiki.contextgarden.net/String_Manipulation#String_formatter I don't understand what they whitespace does: I tried to test it with this code, and changing the number did nothing. \starttext \startluacode x = 999 context("\\type{my%wpoints}", x) context.par() context("my %w points", x) \stopluacode \stoptext And perhaps somebody could add two columns to the wiki with example input and output? Cheers, Sietse -- Sietse Brouwer -- sbbrouwer@gmail.com -- +31 6 13.456.848 Thorbeckehof 101 -- 2343 DR Oegstgeest -- the Netherlands MSN: sietse@gawab.com -- ICQ: 341232104 On 11 March 2013 00:46, Hans Hagen wrote: > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________