[NTG-context] line numbering within frame
Thomas A. Schmitz
thomas.schmitz at uni-bonn.de
Thu Jan 23 11:54:49 CET 2020
Hi all,
I want line numbering within a framed environment, and I need two (at least) independent numbering systems. I hit a similar problem in 2016, and Wolfgang provided a solution (defining different numbering environment). However, this does not work within a frame. The example shows the problem:
\starttext
% This works:
\definelinenumbering[One]
\setuplinenumbering[One]
[style=\ss,
distance=-2ex,
step=2,
location=inleft,
start=20,
color=darkblue]
\startlinenumbering[One]
\input knuth
\stoplinenumbering
\blank [line]
\definelinenumbering[Two]
\setuplinenumbering[Two]
[style=\bf,
distance=-2ex,
step=3,
location=inleft,
start=4,
color=darkred]
\startlinenumbering[Two]
\input klein
\stoplinenumbering
% This fails:
\framed
[background=color,
backgroundcolor=gray,
align={normal,hanging,stretch,tolerant},
frame=off,
loffset=6ex,
width=\textwidth,
foregroundstyle=\ss]
{\definelinenumbering[Three]
\setuplinenumbering[Three]
[style=\ss,
distance=-2ex,
step=2,
location=inleft,
start=20,
color=darkblue]
\startlinenumbering[Three]
\input knuth
\stoplinenumbering
\blank [line]
\definelinenumbering[Four]
\setuplinenumbering[Four]
[style=\bf,
distance=-2ex,
step=3,
location=inleft,
start=4,
color=darkred]
\startlinenumbering[Four]
\input klein
\stoplinenumbering}
\stoptext
The framed environment fails with the error message "Missing number, treated as zero.” Does anyone know how this can be fixed?
All best
Thomas
More information about the ntg-context
mailing list