[NTG-context] problem with \getparameters

Wolfgang Schuster schuster.wolfgang at googlemail.com
Thu Feb 23 14:00:42 CET 2012


Am 23.02.2012 um 13:51 schrieb luigi scarso:

> On Thu, Feb 23, 2012 at 1:39 PM, Wolfgang Schuster
> <schuster.wolfgang at googlemail.com> wrote:
>> 
>> Am 23.02.2012 um 13:31 schrieb luigi scarso:
>> 
>>> Hm global  effect.. you can use a namespaced one
>>> 
>>> \enabletrackers[lines.numbers]
>>> \starttext
>>> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
>>> tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
>>> vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
>>> gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
>>> \vrule width\textwidth height 1pt\par
>>> \setuplinenumbering[Mine1][width=1cm,start=1]
>> 
>> Better use first \define… and not \setup… which can result in an error for commands which
>> use the commandhandler (e.g. \definelayout[<name>][…] vs. \setuplayout[<name>][…]).
> yes, infact It was only to show the interference... I'm not sure if
> it's a bug or not.
> 
> Anyway for this case \setup.. seems to inglobe \define...
> 
> \unexpanded\def\definelinenumbering
>  {\dosingleempty\dodefinelinenumbering}
> 
> \def\dodefinelinenumbering[#1]%
>  {\edef\currentlinenumbering{#1}%
>   \mkdefinetextlinenumbering}
> 
> \unexpanded\def\setuplinenumbering
>  {\dodoubleempty\dosetuplinenumbering}
> 
> \def\dosetuplinenumbering[#1][#2]%
>  {\ifsecondargument
>     \def\currentlinenumbering{#1}%
>     \getparameters[\??rn#1][#2]%
>   \else
>     \let\currentlinenumbering\empty
>     \getparameters[\??rn][#1]%
>   \fi
>   \mksetuptextlinenumbering}

\definelinenumbering doesn’t use the commandhandler (see mult-aux.mkiv) but this can change.

Wolfgang


More information about the ntg-context mailing list