🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #10576

Re: Repeating command in LaTeX

#10576
From: Peter Schmitt
Date: Thu, 21 Jan 1993 09:09
16 lines
826 bytes
>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
Technical Details
Message-ID: <1993Jan21.092128.13006@newssrv.edvz.univie.ac.at>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.univie.ac.at!vm.univie.ac.at!A8131DAL

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!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