home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / text / tex / 14229 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.5 KB  |  40 lines

  1. Path: sparky!uunet!news.claremont.edu!ucivax!news.service.uci.edu!unogate!mvb.saic.com!info-tex
  2. From: mroth@afit.af.mil (Mark A. Roth)
  3. Newsgroups: comp.text.tex
  4. Subject: RE: hyphen in math
  5. Message-ID: <9212161420.AA11001@hawkeye.afit.af.mil>
  6. Date: Wed, 16 Dec 92 09:20:05 EST
  7. Organization: Info-Tex<==>Comp.Text.Tex Gateway
  8. X-Gateway-Source-Info: Mailing List
  9. Lines: 29
  10.  
  11. >\def\text#1{\ifmmode\leavevmode\hbox{#1}\else
  12. >   \typeout{Warning: \string\text \space used outside math mode!}
  13. >   \begingroup\hbox{#1}\endgroup\fi}
  14.  
  15. Using \text is a very bad idea since it defined in lfonts.new the replacement
  16. lfonts.tex loaded for the NFSS.  This then affects the definitions of
  17. \pdollar and \ppounds which use \text.  The definitions are
  18. %% \changes{v1.1e}{90/01/25}{Completely redefined.}
  19. \def\${\protect\pdollar}
  20. \def\pdollar{\text{\ifdim \fontdimen\@ne\font >\z@
  21.               \sl \else \normalshape \fi\char`\$}}
  22. \def\pounds{{\protect\ppounds}}
  23. \def\ppounds{\text{\ifdim \fontdimen\@ne\font >\z@
  24.     \it \else \fontshape u\selectfont \fi \char'44}}
  25. %% \changes{v1.1e}{90/01/25}{Macro added.}
  26. %% \changes{v1.1k}{90/06/23}{Changed to `mbox.}
  27. \def\text{\mbox}
  28.  
  29. I'm not sure why \mbox needs to have an alias of \text but this is the way
  30. it is.
  31.  
  32. Be forwarned, this caused me major grief sometime ago when a local macro
  33. had redefined \text and then the user used math ($...$) as part of the
  34. argument to \text.  Very messy!!
  35.  
  36. Note: this is not a problem with the original LaTeX lfonts.tex file.
  37.  
  38. Mark Roth
  39.  
  40.