* \preventmode does not work
@ 2014-08-30 17:58 Rik
2014-11-19 16:48 ` Rik Kabel
0 siblings, 1 reply; 3+ messages in thread
From: Rik @ 2014-08-30 17:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1281 bytes --]
At least in MKIV. I haven't tried MKII.
The following example should demonstrate this. With no mode specified on
the command line, this should enable mode three and prevent and disable
the other modes. It seems that \preventmode is not only ineffective in
what it is described as doing, but also disables the following \disablemode!
Or perhaps I am misusing this or misunderstand what it should do.
(2014-08-29 20:57 standalone)
\definemode[one][keep]
\definemode[two][keep]
\definemode[three][keep]
\define\ModeOne{nil}
\define\ModeTwo{nil}
\define\ModeThree{nil}
\startmode[one]
\define\Mode{one}
\define\ModeOne{set}
\disablemode[two,three]
\stopmode
\startmode[two]
\define\Mode{two}
\define\ModeTwo{set}
\disablemode[one,three]
\preventmode[one]
\stopmode
\startnotmode[one,two]
\define\Mode{three}
\define\ModeThree{set}
\enablemode[three]
\preventmode[one,two]
\disablemode[one,two]
\stopnotmode
\starttext
Mode is \Mode.
ModeOne is \ModeOne.
ModeTwo is \ModeTwo.
ModeThree is \ModeThree.
Mode \doifmode{one}{one}\doifmode{two}{two}\doifmode{three}{three}
is active.
\stoptext
--
Rik Kabel
[-- Attachment #1.2: Type: text/html, Size: 2548 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] 3+ messages in thread
* Re: \preventmode does not work
2014-08-30 17:58 \preventmode does not work Rik
@ 2014-11-19 16:48 ` Rik Kabel
2014-11-21 19:18 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Rik Kabel @ 2014-11-19 16:48 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]
(This is a bump, with an improved example, of my earlier note on the
subject.)
In MKIV, \preventmode does not work. It appears to do the opposite of
what is intended, and enable the specified mode. It also does not
prevent the explicit enablement of a mode (as can be seen by
uncommenting the commented line in the MWE).
I have not tested it with MKII , where it might work. (Will ConTeXt
online ever be restored?)
This goes back to TL14 and likely earlier.
Do I misunderstand what \preventmode should do, or have I misused it?
And why are there {curlies} instead of [squares] around the mode name in
\doifmode and friends?
MWE, run context MWE.tex:
\starttext
\preventmode[X]
%\enablemode[X]
\doifmode{X}{!}
\stoptext
--
Rik Kabel
[-- Attachment #1.2: Type: text/html, Size: 1204 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] 3+ messages in thread
* Re: \preventmode does not work
2014-11-19 16:48 ` Rik Kabel
@ 2014-11-21 19:18 ` Hans Hagen
0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2014-11-21 19:18 UTC (permalink / raw)
To: ntg-context
On 11/19/2014 5:48 PM, Rik Kabel wrote:
> (This is a bump, with an improved example, of my earlier note on the
> subject.)
>
> In MKIV, \preventmode does not work. It appears to do the opposite of
> what is intended, and enable the specified mode. It also does not
> prevent the explicit enablement of a mode (as can be seen by
> uncommenting the commented line in the MWE).
>
> I have not tested it with MKII , where it might work. (Will ConTeXt
> online ever be restored?)
>
> This goes back to TL14 and likely earlier.
>
> Do I misunderstand what \preventmode should do, or have I misused it?
>
> And why are there {curlies} instead of [squares] around the mode name in
> \doifmode and friends?
>
> MWE, run context MWE.tex:
>
> \starttext
> \preventmode[X]
> %\enablemode[X]
> \doifmode{X}{!}
> \stoptext
fixed in next beta (there was actually a note in the source that it
needed checking)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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:[~2014-11-21 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-30 17:58 \preventmode does not work Rik
2014-11-19 16:48 ` Rik Kabel
2014-11-21 19:18 ` Hans Hagen
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).