[NTG-context] Using \dorecheckindentation inside a group

Aditya Mahajan adityam at umich.edu
Fri Aug 10 21:49:09 CEST 2018


On Fri, 10 Aug 2018, Wolfgang Schuster wrote:

> Aditya Mahajan schrieb am 10.08.18 um 19:41:
>> Hi,
>> 
>> In t-filter module, I use a group inside \startfilter ... \stopfilter to 
>> keep various definitions local. However, as reported on [1], this breaks 
>> the `indentnext` option. The following minimal example illustrates the 
>> issue:
>> 
>> \unprotect
>> \definenamespace
>>   [whatever]
>>   [
>>     name=whatever,
>>     command=yes,
>>     setup=list,
>>     parent=whatever,
>>   ]
>> 
>> \appendtoks
>> \setuevalue{\e!start\currentwhatever}{\start_whatever[\currentwhatever]}%
>>     \setuvalue {\e!stop\currentwhatever}{\stop_whatever}%
>> \to \everydefinewhatever
>> 
>> \starttexdefinition start_whatever
>>     \dodoubleargument\start_whatever_indeed
>> \stoptexdefinition
>> 
>> \starttexdefinition start_whatever_indeed[#1][#2]
>>   \begingroup % to keep assignments local
>>   \edef\currentwhatever{#1}
>>   \setupwhatever[#1][#2]
>> \stoptexdefinition
>> 
>> \starttexdefinition stop_whatever
>>   \useindentnextparameter\whateverparameter
>>   \dorechecknextindentation
>>   \endgroup
>> \stoptexdefinition
>
> Move \dorechecknextindentation after \endgroup.
>
> \starttexdefinition stop_whatever
>  \useindentnextparameter\whateverparameter
>  \endgroup
>  \dorechecknextindentation
> \stoptexdefinition

Thanks! I didn't realize that \useindentnextparameter was "global".

Aditya


More information about the ntg-context mailing list