Thank you again, Wolfgang.
Am 13.08.2014 um 20:56 schrieb Rik Kabel <context@rik.users.panix.com>:
Dear list,
In a number of notes (recent and in the list archive) I have seen \resetsetups, used (always) as in a block of code like this from Gerben Wierde:
\startsetups chapter:before \page[left] \noheaderandfooterlines \startalignment[left,nothyphenated] \startnarrower[4*left] \em \getbuffer[chapter:quote] \stopnarrower \stopalignment \resetsetups[quote:text] \page[right] \noheaderandfooterlines \blank[force,2*big] \stopsetups
What is the purpose of \resetsetups in this code? I see no different result without it, and all I can determine from list and document searches is that this is a vestigal command from x-fo processing.
With the \resetsetups command you can remove a previously created setups environment. As you can see from the following example “mysetups” doesn’t exist anymore after the \resetsetups command.
\startsetups[mysetups]Dummy text.\stopsetups
\starttext
\doifsetupselse{mysetups}{YES}{NO}
\resetsetups[mysetups]
\doifsetupselse{mysetups}{YES}{NO}
\stoptext
Wolfgang
\starttext--
\subject{test 1}
\startsetups[mysetups]
YES
\stopsetups
1. \doifsetupselse{mysetups}{\setup[mysetups]}{NO}
\resetsetups[mysetups]
2. \doifsetupselse{mysetups}{\setup[mysetups]}{NO}
\startsetups[mysetups]
yes
\stopsetups
3. \doifsetupselse{mysetups}{\setup[mysetups]}{NO}
\subject{test 2}
\startsetups[mysetups]
YES
\resetsetups[mysetups]
\stopsetups
1. \doifsetupselse{mysetups}{\setup[mysetups]}{NO}
2. \doifsetupselse{mysetups}{\setup[mysetups]}{NO}
\startsetups[mysetups]
yes
\resetsetups[mysetups]
\stopsetups
3. \doifsetupselse{mysetups}{\setup[mysetups]}{NO}
\subject{test 3}
\startsetups[mysetups]
YES
\stopsetups
1. ¦\setup[mysetups]¦
\resetsetups[mysetups]
2. ¦\setup[mysetups]¦
\startsetups[mysetups]
yes
\stopsetups
3. ¦\setup[mysetups]¦
\subject{test 4}
\startsetups[mysetups]
YES
\resetsetups[mysetups]
\stopsetups
1. ¦\setup[mysetups]¦
2. ¦\setup[mysetups]¦
\startsetups[mysetups]
yes
\resetsetups[mysetups]
\stopsetups
3. ¦\setup[mysetups]¦
\subject{test 5}
1. ¦\setup[neverdefined]¦
2. ¦\getbuffer[neverdefined]¦
\subject{test 6}
\startsetups[mysetupstwo]
, SIR!
\stopsetups
\startsetups[mysetups]
YES
\stopsetups
1. ¦\setup[mysetups]\setup[mysetupstwo]¦
\resetsetups[mysetups,mysetupstwo]
2. ¦\setup[mysetups]\setup[mysetupstwo]¦
\stoptext