I have a document with conditionally-generated content.

There are some situations when I need the section title to change according to 
the content displayed within that section.

For instance, the 14th section that appears in *every* chapter is either called 
"Cause and Effect" if the conditions decide to place macros \altMa, \altMb, or 
\altMc inside, but becomes called "Compare and Contrast" if one of a dozen 
other macros are pladed there.

- The macros are defined in an entirely different macros.tex file.
- The whole document is in a recurse loop, so \recurselevel or \chaptertitleis 
can give the current chapter number.

I tried defining chapter titles inside the macros, 
`\setvalue{title\recurselevel}{Cause and Effect}`, but 
\getvalue{title\recurselevel}` couldn't find the defined value.
I tried just defining in each macro \define\thesectiontitleis{Compare and 
Contrast}, but that only affects things AFTER the macro is called, so the wrong 
titles appear.

How do I very simply make a section title change according to what content is 
inside it?
--Joel

___________________________________________________________________________________
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