From: Hans Hagen <pragma@wxs.nl>
Subject: Re: \digits
Date: Sun, 31 Aug 2003 23:56:43 +0200 [thread overview]
Message-ID: <5.2.0.9.1.20030831235459.02171e88@localhost> (raw)
In-Reply-To: <m28ypcwdit.fsf@levana.de>
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
-------------------------------------------------------------------------
next prev parent reply other threads:[~2003-08-31 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-29 17:59 \digits Patrick Gundlach
2003-08-31 21:48 ` \digits Hans Hagen
2003-08-31 21:56 ` Hans Hagen [this message]
2003-09-01 11:01 ` \digits Patrick Gundlach
2003-09-04 19:42 ` \digits Hans Hagen
2009-02-24 20:06 \digits Wolfgang Schuster
2009-02-24 21:10 ` \digits Taco Hoekwater
2009-02-24 22:33 ` \digits Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.2.0.9.1.20030831235459.02171e88@localhost \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).