Am 29.04.2015 um 15:05 schrieb Pierre-François Bonnefoi
: Hello,
I've tracked down the problem :
\def\numeroLigneCode#1{\inframed[width=fit,strut=yes,frame=off,rightframe=on]{\switchtobodyfont[9pt]#1}}
\definetyping[code][numbering=line,page=yes,bodyfont=9pt,before={% \begingroup% \setuplinenumbering[location=text,align=left,style=\tt,command=\numeroLigneCode,distance=-.5em,width=2em]% },after={\endgroup},tab=2] \starttext \startcode one two three \stopcode
\stoptext
The result is that the option "command=\numeroLigneCode" is oddly ignored.
If I put the command "\setuplinenumbering[location=text,align=left,style=\tt,command=\numeroLigneCode,distance=-.5em,width=2em]" outside of the definition of the verbatim zone "code", it works.
This behavior seems rather strange and when it collides with using verbatim zone enclosed in "framedtext", it leads to two line numbering overwriting each other.
\defineframed[numeroLigneCode][location=low,width=fit,strut=yes,frame=off,rightframe=on] \definetyping[code][numbering=line,page=yes,bodyfont=9pt,tab=2] \setuplinenumbering[code][location=text,align=left,style={\switchtobodyfont[9pt,tt]},command=\numeroLigneCode,distance=-.5em,width=2em] \starttext \startcode one two three \stopcode \stoptext Wolfgang