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 -------------------------------------------------------------------------