🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #2623

Re: detecting missing arguments in latex

#2623
From: Navindra S Gambhir
Date: Sat, 12 Sep 1992 04:45
35 lines
1507 bytes
In article <11SEP199219213030@msr.triumf.ca> asnd@msr.triumf.ca (Donald Arseneau) writes:
>In article <6725@vtserf.cc.vt.edu>, gbol@rglnext.geol.vt.edu (Gregory Lampshire) writes...
>> 
>> 
>>I want to set up a macro 
>>	\if <argument #1 is null> do this etc.
>>	\else etc.
>>	\fi
>
>There are a number of ways to do this, but the following is the best.
>(Best in most senses...but not in clarity!)
>There are two types of syntax to check for null parameters:
>\ifnull{#1}\then ... \else...\fi
>\if\naught{#1}...\else...\fi
>Choose the definitions that correspond to the desired syntax.
>
> [bunch of complicated stuff deleted]
>

Won't the following work?  (Yes, I need an answer.)

  \def\\{#1}
  \ifx\empty\\
    % null
  \else
    % not null
  \fi

where \empty is already \defn'd to be {}.

-- 
---------------------------------------------------------------------------
Navindra S Gambhir                                   gambhir@cs.cornell.edu

I would rather write programs to help me write programs than write programs      
Technical Details
Message-ID: <1992Sep12.044540.21398@cs.cornell.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!gambhir
References: <6725@vtserf.cc.vt.edu> <11SEP199219213030@msr.triumf.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!gambhir
From: gambhir@cs.cornell.edu (Navindra S Gambhir)
Subject: Re: detecting missing arguments in latex
Message-ID: <1992Sep12.044540.21398@cs.cornell.edu>
Organization: Cornell University, Ithaca  NY 14853
References: <6725@vtserf.cc.vt.edu> <11SEP199219213030@msr.triumf.ca>
Date: Sat, 12 Sep 1992 04:45:40 GMT
Lines: 35