Path: utzoo!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!uunet!mcsun!hp4nl!dnlunx!pttrnl.nl!braams From: braams@pttrnl.nl (Johannes L. Braams) Newsgroups: comp.text.tex Subject: Re: "Indirect" definitions in TeX Message-ID: <1991Mar12.084306.65019@pttrnl.nl> Date: 12 Mar 91 07:43:06 GMT References: Lines: 22 In article , MBEATTIE@VAX.OXFORD.AC.UK (Malcolm Beattie) writes: > > I would like to be able to define things "indirectly" or > "dynamically" in TeX (in fact, AMSTeX, not LaTeX). More precisely, > I would like to be able to do something like: > > \document > \newcount\chap > \newcount\sect > \define\makemark#1{\define\label#1{\the\chap.\the\sect}} > \define\refermark#1{\label#1} What about \def\makemark#1{\expandafter\def\csname#1\endcsname{\thechap.\the\sect}} -- Johannes Braams PTT Research Neher Laboratorium, P.O. box 421, 2260 AK Leidschendam, The Netherlands. Phone : +31 70 3325051 E-mail : JL_Braams@pttrnl.nl -------------------------------------------------------------------------------