The short version:

I'd like to set up a context document with multiple user-defined heads, such that they can be conditionally compiled and/or altered. It seems that modes are what I want, but I'm having trouble figuring out how to automatically set up a particular section to be wrapped in a particular mode (if that makes any sense at all).

Is this possible?

The long version:

What I think I want is something like:

--- begin foo.tex ---

\startenvironment foo

\definemode[showexamples][keep]

% Can I add some magic here in the following setup to automagically
% wrap these sections with commands to start and stop a particular mode?
\definehead[example][subject][style=\bfc]

---  end foo.tex  ---

--- begin bar.tex ---

\environment foo

\enablemode[showexamples]

\starttext

\startexample[title={I'd like to be able to use modes to enable or disable this section}]

I'd like to have a mode to conditionally show all of the {\tt example} sections (without affecting other content, etc.).

\stopexample

\stoptext

---  end bar.tex  ---

The added difficulty here is that I need three kinds of modes (A, B, And C) with the need to support changing the layout, etc. based on what modes are enabled.

I've gotten this to work by including \startmode[example] and \stopmode commands in the document, but I'd love to find a way to have this happen automatically by some clever setups for user defined heads, as above. (I tried playing around with before= and after=, with disastrous results...)

I've worked through the discussion about using blocks against enumerations, found here:

        http://www.mail-archive.com/ntg-context@ntg.nl/msg83818.html

...but I'm hoping that there's a simpler solution (without the external file, etc.)

Is there a way to do this within the current framework, or should I be wrapping all of this in new commands? Or something else entirely?

Thanks!

     -Paul
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to