home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!news.univie.ac.at!vm.univie.ac.at!A8131DAL
- From: A8131DAL@vm.univie.ac.at (Peter Schmitt)
- Subject: Re: Repeating command in LaTeX
- Message-ID: <1993Jan21.092128.13006@newssrv.edvz.univie.ac.at>
- Sender: news@newssrv.edvz.univie.ac.at (News System - Vienna University)
- Nntp-Posting-Host: helios.edvz.univie.ac.at
- Organization: University of Vienna
- Date: Thu, 21 Jan 1993 09:09:51 GMT
- Lines: 17
-
-
- >I wish to write a LaTeX macro, which expands something like this:
- >\x{abc}
- >gives
- >\y{a}\y{b}\y{c}
- >
- >that is: foreach of the letter in the argument return
- >another macro with the letter as an argument.
-
- Try:
- ¢def¢Y#1{¢ifx#1|¢else¢y{#1}¢fi}
- ¢def¢x#1{¢Y#1|}
- (assuming that | will not appear in the argument of ¢x)
- (I did not test it, but it should work)
-
- Peter
-
-