🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #5274

Outputting `pretty' numbers from TeX

#5274
From: Greg McGary
Date: Thu, 06 Oct 1988 00:59
28 lines
1086 bytes
Has anyone out there attacked the problem of generating english
spelling of numbers from TeX?

Such an animal would work like so:

	\count255=123
	\englishnum\count255	==>	one-hundered twenty three

How about a numeric `pretty printer' like so:

	\count255=1234567
	\prettynum\count255	==>	1,234,567

Or a `dollar printer' like so:

	\count255=1234567
	\dollarnum		==>	$12,345.67

These seem like logical companions to \number and \romannumeral, and
would be *much* easier to implement as built-ins; though they are
probably doable with some hairy set of macros.  I'm trying to avoid
getting too deeply involved in TeXarcana, but I'll give it a whirl
if no one else has done so.

--gm
-- Greg McGary	
--		{decvax,ihnp4,mcnc}!duke!gm
--					 gm@cs.duke.edu
Technical Details
Message-ID: <12559@duke.cs.duke.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!ukma!rutgers!mcnc!duke!romeo!gm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!ukma!rutgers!mcnc!duke!romeo!gm
From: gm@romeo.cs.duke.edu (Greg McGary)
Newsgroups: comp.text
Subject: Outputting `pretty' numbers from TeX
Keywords: TeX
Message-ID: <12559@duke.cs.duke.edu>
Date: 6 Oct 88 00:59:44 GMT
Sender: news@duke.cs.duke.edu
Lines: 28