[NTG-context] how to do adaptation
wolfgang.schuster.lists at gmail.com
Mon Oct 14 22:07:01 CEST 2019
Susanne G. Loeber schrieb am 14.10.2019 um 15:16:
> I am looking for ways to adapt the layout and content of texts while
> using ConTeXt. Put simple: show part of a text and sort these parts
> based on data from the user and the author (.dat file). The biggest
> problem is not knowing which part of the text will be first and how
> many parts will be shown.
Can you ask a separate question for each individual problem.
> So far, I am trying to get a hang of \setupdocument
> (https://wiki.contextgarden.net/Project_structure), \startmode
> (https://wiki.contextgarden.net/Modes), \definecolor
> (https://wiki.contextgarden.net/Color) and \defineparagraphs
> I hope there are more ways to create adaptation.
> I would also like to know whether certain combination don't work
> together. For example, I cannot seem to get \doifmodeelse to work
> inside a \defineparagraphs environment.
When you enable or disable a mode the state is local to the current group,
e.g. the state at the begin of a environment will be the same at the end
and changes in the environment are local to it. In most document this isn't
a problem because you enable/disable a mode at the begin of the document
and use the state at the whole document.
In your case you want the changed state to remain after the environment
has ended, to do this you have to use \globalenablemode[...] and
More information about the ntg-context