home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / text / tex / 15236 < prev    next >
Encoding:
Text File  |  1993-01-21  |  800 b   |  29 lines

  1. Newsgroups: comp.text.tex
  2. Path: sparky!uunet!news.univie.ac.at!vm.univie.ac.at!A8131DAL
  3. From: A8131DAL@vm.univie.ac.at (Peter Schmitt)
  4. Subject: Re: Repeating command in LaTeX
  5. Message-ID: <1993Jan21.092128.13006@newssrv.edvz.univie.ac.at>
  6. Sender: news@newssrv.edvz.univie.ac.at (News System - Vienna University)
  7. Nntp-Posting-Host: helios.edvz.univie.ac.at
  8. Organization: University of Vienna
  9. Date: Thu, 21 Jan 1993 09:09:51 GMT
  10. Lines: 17
  11.  
  12.  
  13. >I wish to write a LaTeX macro, which expands something like this:
  14. >\x{abc}
  15. >gives
  16. >\y{a}\y{b}\y{c}
  17. >
  18. >that is: foreach of the letter in the argument return
  19. >another macro with the letter as an argument.
  20.  
  21. Try:
  22. ¢def¢Y#1{¢ifx#1|¢else¢y{#1}¢fi}
  23. ¢def¢x#1{¢Y#1|}
  24. (assuming that | will not appear in the argument of ¢x)
  25. (I did not test it, but it should work)
  26.  
  27. Peter
  28.  
  29.