ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \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

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