home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / text / 1378 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  2.6 KB

  1. Path: sparky!uunet!stanford.edu!rutgers!cmcl2!panix!bergman
  2. From: bergman@panix.com (Mark Bergman)
  3. Newsgroups: comp.text
  4. Subject: Re: groff: copy/clone environments
  5. Message-ID: <1992Nov10.173136.13553@panix.com>
  6. Date: 10 Nov 92 17:31:36 GMT
  7. References: <1992Nov10.083231.6018@rc.nokia.fi>
  8. Organization: PANIX Public Access Unix & Internet, NYC
  9. Lines: 61
  10.  
  11. In article <1992Nov10.083231.6018@rc.nokia.fi> sverre@rc.nokia.fi (Sverre Slotte Jr.) writes:
  12. >Hi groff-users (and James Clark specifically)!
  13. >
  14. >I have recently had the need to save many parameters of the current
  15. >flow of text, do something else (possibly something long and complicated)
  16. >and then return to the original flow. This "something else" could
  17. >for instance be creating a list with new values for line lengt, font,
  18. >point size, indent, justification etc. "Something else" could also
  19. >occur recursively. E.g.
  20. >
  21.         [EXAMPLES DELETED]
  22. >
  23. >One solution would be to identify the parameters that have to be
  24. >saved and somehow push them on/pop them off a stack (as in -mgm).
  25. >
  26. >Partly because I don't know which parameters I need to save, partly
  27. >because the idea "feels right" I would like to use environments to
  28. >do this. By cloning the current environment and then doing the
  29. >necessary ".ll", ".in" etc. commands I could easily create an
  30. >environment for "Something_else_1". A simple ".ev" would then give me
  31. >back my original environment.
  32. >
  33. >A command ".ev newenvironment" unfortunately creates a new environment
  34. >with uninteresting defaults (like a 6.5 inch line lengh, not my
  35. >current one). Hence, I need to copy the current environment into the
  36. >new one (or copy the old one into the new one).
  37. >
  38.         [PROGRAMMING CONCEPTS DELETED]
  39. >
  40. >Sverre
  41. >
  42. >--------------------------------------------------------------------------
  43. >Sverre Slotte Jr.                            Internet:  sverre@rc.nokia.fi
  44. >Nokia Research Center                        Phone:        + 358 0 4376208
  45. >P.O.Box 156, 02101 Esbo, FINLAND             Phax:         + 358 0 4376227
  46. >X.400 mail:          G=sverre  S=slotte  OU=rc  O=nokia  ADMD=fumail  C=fi
  47. >--------------------------------------------------------------------------
  48. >
  49. >Wer nich liebt Wein, Weib und Gesang, der bleibt ein Narr sein Leben lang.
  50. >                                                             Martin Luther
  51.  
  52. What about setting up each environment in a separate file,
  53. and .so'ing each file:
  54.     .so environment
  55.     text
  56.     text
  57.     .so environment1
  58.     text style 1
  59.     text style 1
  60.     .so environment2
  61.     text style 2
  62.     .so environment
  63.     text 
  64.     text
  65.  
  66. ----
  67. Mark Bergman
  68. 718-855-9148
  69.  
  70. bergman@panix.com
  71. {cmcl2,uunet}!panix!bergman
  72.