Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!dce.ie!em From: em@dce.ie (Eamonn McManus) Newsgroups: comp.text.tex Subject: Re: removing \outerness (was: \lowercase error) Message-ID: Date: 10 Jan 91 11:59:20 GMT References: <53698@eerie.acsu.Buffalo.EDU> <1991Jan8.023743.28965@csrd.uiuc.edu> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 80 eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) writes: >The idea behind \outer is sensible. It's just that Knuth chose to >make some macros (\newetcetera) \outer that he shouldn't have. My principal concern about \outer is indeed that too many Plain macros are marked that way (\proclaim is another inexplicable example). \outerness provides a useful way of stopping runaway definitions and the like, but the other problem is that there is no easy way to include an \outer macro when you really do want it. Admittedly the religious fervour with which unouter.tex excises \outerness is a bit extreme. I went to the effort to retrieve my original TeXhax article and an interesting reply to it, which I include here. The reply shows a simpler way of getting around \outer than my unouter.tex macros. Note that METAFONT allows the outerness of a macro to be switched on and off independently of its definition. This is a better design. , Eamonn --------------------------------------------------------------------- To: TeXhax Digest Subject: \outer considered painful Lines: 58 Date: Tue, 10 Jan 89 17:13:29 +0000 From: Eamonn McManus Am I alone in thinking that \outer macros are a mistake in the design of TeX? There are no macros marked so in plain.tex that I couldn't imagine wanting to use in the definition of another macro. About the only thing I can think of that should be \outer is the end of file, or maybe ^^L as well. I can't see why I should not be able to define a macro that makes use of \newcount, or use \beginsection or \proclaim in conditional text. The additional diagnostic information provided by \outerness cannot make up for its painfulness to macro writers (OK, so I'm a macro writer). I'm inclined to think Leslie Lamport would agree with me, given that the LaTeX package doesn't define any new \outer macros, and it must redefine some existing ones so it can use them in other macros. A \nonouter that could be placed before \outer macros to cancel their \outerness just for that occurrence would be enough to make me happy. Failing that, here is a TeX source that redefines all of Plain's \outer macros not to be. Any better technique that accomplishes this for macros with parameters would interest me greatly. -- Eamonn McManus emcmanus@cs.tcd.ie Distributed Systems Group, TCD ...!uunet!mcvax!cs.tcd.ie!emcmanus [unouter.tex appeared here] --------------------------------------------------------------------- Date: Wed, 1 Feb 89 13:26 EST From: "Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU)" Subject: re: \outer definitions To: emcmanus@cs.tcd.ie, TEXHAX@june.cs.washington.edu In a recent TeXhax, Eamonn McManus complains that \outer macros are more trouble than they are worth, and provides a means of "un-\outer'ing" a macro definition. I won't get into the debate on how valuable \outer is - to each his own - but I do offer a much simpler way to get the "\outer'ing" effect he desires, which is most useful when you want to keep the \outer form around but have a new non-\outer form as well. Here is a particular example, from which a general solution can be built. Suppose you want a \declareif, which is the same as \newif but is NOT \outer. (I wanted this as an extension to J E Pittman's set of \declarexxx macros.) You can define it easily by doing: {\let\newif\relax \gdef\declareif{\newif}} (Technically, \declareif is not "the same" as \newif - it requires an extra level of expansion. For most purposes, this should be fine.) -- Jerry