ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \doifnotmodeelse - undefined control sequence error?
@ 2015-09-15  9:31 Jaroslav Hajtmar
  2015-09-15 13:33 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Jaroslav Hajtmar @ 2015-09-15  9:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello ConTeXist.

I do not know if I'm not mistake somewhere, but it seems to me that the 
macro \doifnotmodeelse does not work. Can anyone verify this?


Jaroslav Hajtmar


Here is a simple example:


\enablemode[mymode]
% \disablemode[mymode]

\starttext

\startmode[mymode]
mode 'mymode' is enabled!
\stopmode

\startnotmode[mymode]
mode 'mymode' is disbled!
\stopnotmode


\doifmodeelse{mymode}{mode 'mymode' is enabled!}{mode 'mymode' is disbled!}

% Undefined control sequence error ???
% \doifnotmodeelse{mymode}{mode 'mymode' is disbled!}{mode 'mymode' is 
enabled!}


\stoptext


___________________________________________________________________________________
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] 4+ messages in thread

* Re: \doifnotmodeelse - undefined control sequence error?
  2015-09-15  9:31 \doifnotmodeelse - undefined control sequence error? Jaroslav Hajtmar
@ 2015-09-15 13:33 ` Wolfgang Schuster
  2015-09-15 13:49   ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2015-09-15 13:33 UTC (permalink / raw)
  To: hajtmar, mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 918 bytes --]

> Jaroslav Hajtmar <mailto:hajtmar@gyza.cz>
> 15. September 2015 11:31
> Hello ConTeXist.
>
> I do not know if I'm not mistake somewhere, but it seems to me that 
> the macro \doifnotmodeelse does not work. Can anyone verify this?
There is no command with this name because there is no need for it and 
it won’t be different from \doifmodeelse with the exception that the 
second and third arguments are switched. Below is a short summary of the 
available mode tests.

The \doifmode{}{} command is used when you want to show/enable something 
when the requested mode is enabled.

The \doifnotmode{}{} command is used when you to show/enable something 
when the requested mode is disable or not set.

With the \doifelsemode{}{}{} (you can also use the alternative name 
\doifmodeelse) you can show/enable different things dependent whether 
the requested mode is enabled or disabled.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1916 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 4+ messages in thread

* Re: \doifnotmodeelse - undefined control sequence error?
  2015-09-15 13:33 ` Wolfgang Schuster
@ 2015-09-15 13:49   ` Aditya Mahajan
  2015-09-16  3:43     ` Jaroslav Hajtmar
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2015-09-15 13:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1111 bytes --]

On Tue, 15 Sep 2015, Wolfgang Schuster wrote:

>> Jaroslav Hajtmar <mailto:hajtmar@gyza.cz>
>> 15. September 2015 11:31
>> Hello ConTeXist.
>> 
>> I do not know if I'm not mistake somewhere, but it seems to me that the 
>> macro \doifnotmodeelse does not work. Can anyone verify this?
> There is no command with this name because there is no need for it and it 
> won’t be different from \doifmodeelse with the exception that the second 
> and third arguments are switched. Below is a short summary of the available 
> mode tests.
>
> The \doifmode{}{} command is used when you want to show/enable something 
> when the requested mode is enabled.
>
> The \doifnotmode{}{} command is used when you to show/enable something when 
> the requested mode is disable or not set.
>
> With the \doifelsemode{}{}{} (you can also use the alternative name 
> \doifmodeelse) you can show/enable different things dependent whether the 
> requested mode is enabled or disabled.

My bad. I thought that I had checked this when writing the article on 
modes. I'll update the wiki accordingly.

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 4+ messages in thread

* Re: \doifnotmodeelse - undefined control sequence error?
  2015-09-15 13:49   ` Aditya Mahajan
@ 2015-09-16  3:43     ` Jaroslav Hajtmar
  0 siblings, 0 replies; 4+ messages in thread
From: Jaroslav Hajtmar @ 2015-09-16  3:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanx to Wolfgang and Aditya too,
I was a little confused, because in wiki is this command mentioned. 
Thanx for explanation and correction in wiki too.
Jaroslav Hajtmar


Dne 15. 9. 2015 v 15:49 Aditya Mahajan napsal(a):
> On Tue, 15 Sep 2015, Wolfgang Schuster wrote:
>
>>> Jaroslav Hajtmar <mailto:hajtmar@gyza.cz>
>>> 15. September 2015 11:31
>>> Hello ConTeXist.
>>>
>>> I do not know if I'm not mistake somewhere, but it seems to me that 
>>> the macro \doifnotmodeelse does not work. Can anyone verify this?
>> There is no command with this name because there is no need for it 
>> and it won’t be different from \doifmodeelse with the exception that 
>> the second and third arguments are switched. Below is a short summary 
>> of the available mode tests.
>>
>> The \doifmode{}{} command is used when you want to show/enable 
>> something when the requested mode is enabled.
>>
>> The \doifnotmode{}{} command is used when you to show/enable 
>> something when the requested mode is disable or not set.
>>
>> With the \doifelsemode{}{}{} (you can also use the alternative name 
>> \doifmodeelse) you can show/enable different things dependent whether 
>> the requested mode is enabled or disabled.
>
> My bad. I thought that I had checked this when writing the article on 
> modes. I'll update the wiki accordingly.
>
> Aditya

___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2015-09-16  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15  9:31 \doifnotmodeelse - undefined control sequence error? Jaroslav Hajtmar
2015-09-15 13:33 ` Wolfgang Schuster
2015-09-15 13:49   ` Aditya Mahajan
2015-09-16  3:43     ` Jaroslav Hajtmar

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).