From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13040 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \digits Date: Sun, 31 Aug 2003 23:56:43 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5.2.0.9.1.20030831235459.02171e88@localhost> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1062412073 13868 80.91.224.253 (1 Sep 2003 10:27:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2003 10:27:53 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Mon Sep 01 12:27:51 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19tluZ-0007Vr-00 for ; Mon, 01 Sep 2003 12:27:51 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 6798810AE7; Mon, 1 Sep 2003 12:27:48 +0200 (MEST) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id D487B10ABB for ; Mon, 1 Sep 2003 12:20:39 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id h81AKY307056 for ; Mon, 1 Sep 2003 12:20:34 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 70B521A591; Mon, 1 Sep 2003 12:20:29 +0200 (CEST) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id BBB6E17848 for ; Mon, 1 Sep 2003 10:20:26 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Original-To: ntg-context@ntg.nl In-Reply-To: Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:13040 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13040 At 19:59 29/08/2003 +0200, you wrote: >Hello, > >while browsing the source, I came across the very nice \digits >macro. > >But I have some comments: In my opinion some characters don't look right > >\starttext >\digits 123.222,= % short, OK >\digits 123.222,== % should be em dash (?) >\digits +123.222,22 % OK >\digits -123.222,33 % too small >\stoptext > >The + and - should be the same size. > >Any comments? \def\scandigits#1% {\if#1.\digitsep1\else \if#1,\digitsep2\else \if#1@\digitnop \else \if#1_\digitnop \else \if#1/\digitsgn{\hphantom{+}}\chardef\skipdigit0\else \if#1-\ifcase\skipdigit\digitsgn-\else %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \skipdigit instead of \digitsepbox \box\digitsepbox\digitzeroamount \fi\chardef\skipdigit0\else \if#1+\digitsgn+\chardef\skipdigit0\else \if#1=\box\digitsepbox\digitzeroamount \chardef\skipdigit0\else \if#1s\digitsgn{\hphantom{\positive}}\chardef\skipdigit0\else \if#1p\digitsgn\positive\chardef\skipdigit0\else \if#1m\digitsgn\negative\chardef\skipdigit0\else \if#1n\digitsgn\negative\chardef\skipdigit0\else \box\digitsepbox #1\chardef\skipdigit0\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} Not that tested -) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------