Am 20.11.2011 um 00:56 schrieb Aditya Mahajan:

> Hi,
> 
> I have a tex file that looks like follows:
> 
>  \startsection[title=...][review=yes]
>     ...
>  \stopsection
> 
>  \startsection[title=...][review=no]
>     ...
>  \stopsection
> 
> When I compile the document with --mode=review, I want that all sections that 
> have `review=no` should not be displayed. What is the best way of achieving 
> this? In particular, can we have an option that'll let us say:
> 
> \setuphead[section][placebody=hidden] (analogous to placehead=hidden).


To hide the content of the section you can use this (maybe a buffer would be 
better) but to hide the title of the section together with the list entry Hans 
has to modify the heading macros.

\def\gobblesection
  {\doif{\structureuservariable{review}}{no}
     {\gobbleuntil\stopsection}}

\setuphead[section][insidesection=\gobblesection]

\starttext

\startsection[title=Knuth][review=yes]
\input knuth
\stopsection

\startsection[title=Zapf][review=no]
\input zapf
\stopsection

\stoptext

Wolfgang
___________________________________________________________________________________
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 via email to