ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to define a section title, after the section title appears?
       [not found] <1582295925.1510739.1655053811625.ref@mail.yahoo.com>
@ 2022-06-12 17:10 ` Joel via ntg-context
  0 siblings, 0 replies; only message in thread
From: Joel via ntg-context @ 2022-06-12 17:10 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 1067 bytes --]

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


[-- Attachment #1.2: Type: text/html, Size: 1457 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-12 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1582295925.1510739.1655053811625.ref@mail.yahoo.com>
2022-06-12 17:10 ` How to define a section title, after the section title appears? Joel via ntg-context

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