Path: utzoo!attcan!uunet!mcsun!ukc!tcdcs!dce.ie!em From: em@dce.ie (Eamonn McManus) Newsgroups: comp.text.tex Subject: Re: #ifdef equivalent of selective inclusion for TeX/LaTeX??? Message-ID: Date: 22 Oct 90 11:09:03 GMT References: <1990Oct18.021309.22918@cs.umn.edu> <40303@shemp.CS.UCLA.EDU> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 21 In article <40303@shemp.CS.UCLA.EDU> kirkaas@ewa.cs.ucla.edu (paul kirkaas) writes: > >I wonder if there is an equivalent to C's "#ifdef" for TeX --- >that is, if there is something like: > >\ifdef{adef1} > I want to see the first line of text included. >\fi The standard TeX way of doing this relies on the fact that if \thing is undefined then referring to \csname thing\endcsname causes \thing to be implicitly defined as \relax. This is the method used by LaTeX's \if@undefined. As an easier alternative when the name of the control sequence is fixed, you can simply say \ifx\undefined\thing, where \undefined is any control sequence that you know is undefined. I prefer this in general because I don't like things appearing from nowhere. -- Eamonn McManus Are they the pearls of song Dropped by countless angel throng From paradise above? No.