home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / text / tex / 15276 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  2.0 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!news.service.uci.edu!unogate!mvb.saic.com!info-tex
  2. From: Peter Schmitt <A8131DAL%AWIUNI11.BITNET@SHSU.edu>
  3. Newsgroups: comp.text.tex
  4. Subject: Re: Two questions
  5. Message-ID: <10245606@MVB.SAIC.COM>
  6. Date: Thu, 21 Jan 93 18:33:23 MEZ
  7. Organization: Info-Tex<==>Comp.Text.Tex Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 34
  10.  
  11. On Thu, 21 Jan 93 11:31:58 EST you said:
  12. >I have two questions.  The first is answered regularly on this net, but
  13. >I never needed it before, so I haven't kept the solutions.  I don't
  14. >think I've seen the second answered and, while I think I can do it, I am
  15. >kind of pressed right now and don't want to reinvent wheels.  First, how
  16. >to redefine \raggedright so that hyphenation is allowed and even
  17. >encouraged?  This is for very narrow columns.  Second, how to output
  18. >formatted numbers, so that with input either the actual number 1000 or
  19. >a counter containing that number, the output will be 1,000.  The numbers
  20. >I have are all four or five digits, but there is no reason it shouldn't
  21. >be perfectly general.
  22. >
  23. >Michael Barr
  24. (1) I do not remember the recommended settings, but the trick is to
  25. define \rightskip 0pt plus30pt
  26. for some suitable dimension (and not use fil)
  27. (2) I habe not tested it, but try the following:
  28. \newcount\a \newcount\b
  29. \def\fnumber#1{\a=#1 \b=\a
  30.      \divide\a by 1000 \the\a,\multiply\a by 1000 \advance\b by -\a \the\b}
  31. \fnumber {12345}
  32.  
  33. Obviously this should be refined for 7-digit numbers, and for numbers under
  34. 1000 (\ifnum\a<1000) to avoid a leading zero
  35.  
  36. Peter
  37.  
  38.  
  39. Peter Schmitt                             a8131dal@awiuni11.edvz.univie.ac.at
  40.                                                         schmitt@awirap.bitnet
  41. -----------------------------------------------------------------------------
  42. Institute of Mathematics                                     Strudlhofgasse 4
  43. University of Vienna                                              A-1090 Wien
  44.                                                                       Austria
  45.