![](https://secure.gravatar.com/avatar/e07e15a8be3c4c1723f5a0397bc17424.jpg?s=120&d=mm&r=g)
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. -- Rik
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 13.08.2014 um 20:56 schrieb Rik Kabel
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
![](https://secure.gravatar.com/avatar/e07e15a8be3c4c1723f5a0397bc17424.jpg?s=120&d=mm&r=g)
On 2014-08-14 00:26, Wolfgang Schuster wrote:
Am 13.08.2014 um 20:56 schrieb Rik Kabel
mailto: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
Thank you again, Wolfgang. I notice that, while the _contents_ of the setup are removed, and using the reset setup introduces nothing into the text, there is no error or warning generated. (This is also the case, I learned, with an undefined buffer.) I can see that this can be very useful in a number of situations. Can \resetsetups reset more than one setup in a single execution? When I try \resetsetups[setupA,setupB] it appears to reset neither. I only ask because of the plural name. It does not appear to be a burden to use multiple \resetsetups commands. Are there equivalent commands to \resetsetups and \doifsetupelse for buffers? I could find nothing obvious. The following example shows what I mean by the above statements. My examples are often clearer than my descriptions. \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 -- Rik Kabel
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 14.08.2014 um 20:23 schrieb Rik Kabel
I notice that, while the _contents_ of the setup are removed, and using the reset setup introduces nothing into the text, there is no error or warning generated. (This is also the case, I learned, with an undefined buffer.) I can see that this can be very useful in a number of situations.
Can \resetsetups reset more than one setup in a single execution? When I try \resetsetups[setupA,setupB] it appears to reset neither. I only ask because of the plural name. It does not appear to be a burden to use multiple \resetsetups commands.
No, you can only reset a single environment with the command.
Are there equivalent commands to \resetsetups and \doifsetupelse for buffers? I could find nothing obvious.
\resetbuffer[<name>] and \doifelsebuffer{<name>}{…}{…} Wolfgang
![](https://secure.gravatar.com/avatar/bc68bd7791a2261e6e59722afea6a5d0.jpg?s=120&d=mm&r=g)
On 2014-08-14 14:35, Wolfgang Schuster wrote:
Am 14.08.2014 um 20:23 schrieb Rik Kabel
: I notice that, while the _contents_ of the setup are removed, and using the reset setup introduces nothing into the text, there is no error or warning generated. (This is also the case, I learned, with an undefined buffer.) I can see that this can be very useful in a number of situations.
Can \resetsetups reset more than one setup in a single execution? When I try \resetsetups[setupA,setupB] it appears to reset neither. I only ask because of the plural name. It does not appear to be a burden to use multiple \resetsetups commands. No, you can only reset a single environment with the command.
Are there equivalent commands to \resetsetups and \doifsetupelse for buffers? I could find nothing obvious. \resetbuffer[<name>] and \doifelsebuffer{<name>}{…}{…}
Wolfgang Thank you again.
I was looking for \doifbufferelse and \resetbuffers as analogous to the setups commands. While such consistency is nice, it is rare to find. While I appreciate learning about these from the list, I must echo recent comments about the state of documentation. If these are user commands, as these appear to be, one should be able to find them in at least the advanced documents. -- Rik
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Thu, 14 Aug 2014, Rik wrote:
While I appreciate learning about these from the list, I must echo recent comments about the state of documentation. If these are user commands, as these appear to be, one should be able to find them in at least the advanced documents.
Please add the relavant information to the wiki, and then one will be able to find them in the advanced documents :-) Aditya
![](https://secure.gravatar.com/avatar/e07e15a8be3c4c1723f5a0397bc17424.jpg?s=120&d=mm&r=g)
On 2014-08-14 15:10, Aditya Mahajan wrote:
On Thu, 14 Aug 2014, Rik wrote:
While I appreciate learning about these from the list, I must echo recent comments about the state of documentation. If these are user commands, as these appear to be, one should be able to find them in at least the advanced documents.
Please add the relavant information to the wiki, and then one will be able to find them in the advanced documents :-)
Aditya
When I understand a command enough to wikify it, or note an issue that might be problematic for somebody else, I have done just that. I do not know the syntax of these commands enough to do that now, and cannot be sure from the code just what it is. Providing incomplete or inaccurate documentation does not benefit anyone. -- Rik
![](https://secure.gravatar.com/avatar/cedc4d83943006afe3994fb0a0455f82.jpg?s=120&d=mm&r=g)
On Thu, Aug 14 2014, Aditya Mahajan wrote:
Please add the relavant information to the wiki, and then one will be able to find them in the advanced documents :-)
You can also send patches for the ConTeXt Manual: https://foundry.supelec.fr/svn/contextman/context-reference/ -- Peter
participants (5)
-
Aditya Mahajan
-
Peter Münster
-
Rik
-
Rik Kabel
-
Wolfgang Schuster