ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* issue with \doifdefined
@ 2015-05-09 10:36 Pablo Rodriguez
  2015-05-09 10:59 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2015-05-09 10:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

    \def\abcde{123}
    \starttext
    \doifdefinedelse{\abcd}{defined}{undefined}
    \stoptext

\doifdefined crashes when the command isn’t defined.

Sorry, but isn’t this command supposed to check whether the command is
defined or not?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: issue with \doifdefined
  2015-05-09 10:36 issue with \doifdefined Pablo Rodriguez
@ 2015-05-09 10:59 ` Wolfgang Schuster
  2015-05-09 11:49   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2015-05-09 10:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 09.05.2015 um 12:36 schrieb Pablo Rodriguez <oinos@gmx.es>:
> 
> Dear list,
> 
> I have the following sample:
> 
>    \def\abcde{123}
>    \starttext
>    \doifdefinedelse{\abcd}{defined}{undefined}
>    \stoptext
> 
> \doifdefined crashes when the command isn’t defined.
> 
> Sorry, but isn’t this command supposed to check whether the command is
> defined or not?

You have to omit the backslash in the first argument of the command, e.g. \doifdefinedelse{abcd}{…}{…}

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: issue with \doifdefined
  2015-05-09 10:59 ` Wolfgang Schuster
@ 2015-05-09 11:49   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2015-05-09 11:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 05/09/2015 12:59 PM, Wolfgang Schuster wrote:
>> Am 09.05.2015 um 12:36 schrieb Pablo Rodriguez:
>> [...]
>> \doifdefined crashes when the command isn’t defined.
>>
>> Sorry, but isn’t this command supposed to check whether the command is
>> defined or not?
> 
> You have to omit the backslash in the first argument of the command,
> e.g. \doifdefinedelse{abcd}{…}{…}

Many thanks for your help, Wolfgang.

Everything is clear now.


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-09 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-09 10:36 issue with \doifdefined Pablo Rodriguez
2015-05-09 10:59 ` Wolfgang Schuster
2015-05-09 11:49   ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).