ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik <rik@panix.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: \preventmode does not work
Date: Sat, 30 Aug 2014 13:58:28 -0400	[thread overview]
Message-ID: <540210C4.4050809@panix.com> (raw)


[-- 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
___________________________________________________________________________________

             reply	other threads:[~2014-08-30 17:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-30 17:58 Rik [this message]
2014-11-19 16:48 ` Rik Kabel
2014-11-21 19:18   ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540210C4.4050809@panix.com \
    --to=rik@panix.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).