Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!psuvm!awiwuw11!nn1 From: NN1@awiwuw11.wu-wien.ac.at Newsgroups: comp.text.tex Subject: uppercase Message-ID: <90306.105506NN1@awiwuw11.wu-wien.ac.at> Date: 2 Nov 90 21:38:04 GMT Organization: Wirtschaftsuniversitaet Wien, Vienna, Austria Lines: 39 Suppose I have the following code \author{John Doe \address{Michigan State Univ.} \and Mike Deer \address{Ohio State Univ.} } and suppose further, that the \author macro is called by another macro, say, \doauthor. The goal is to end up with only the names in uppercase letters, but the expansion of \address (or anything else, for that matter) unaffected. The simplistic approach for \doauthor, e.g., \def\doauthor{\uppercase\expandafter{\author}} obviously will not work, since the uppercase is a rather late operation and will apply to anything in the expansion of \author. Question 1: How to accomplish this? This raises the following interesting aspect: Question 2: How can one apply certain macro operations only to the toplevel arguments? For example, if my argument is {a b c \xxx{d e f} g}, only a, b, c, and g should be affected. In futilely trying to solve question 1, I also attempted to split the argument to author into pieces that are top level elements, and pieces that are csnames or arguments (i.e., within braces). This raises Question 3: How can on split a piece of text into words? How can one split a piece of text into logical units (say into: text, csnames, brace-delimited things). Thanks, thw. Thomas Weigert, RISC-Linz, Johannes Kepler University Linz, Austria. email: k316670@aearn.bitnet, weigert@mcs.anl.gov