ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* line numbering within frame
@ 2020-01-23 10:54 Thomas A. Schmitz
  2020-01-23 11:45 ` Tomas Hala
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas A. Schmitz @ 2020-01-23 10:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-01-26 12:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 10:54 line numbering within frame Thomas A. Schmitz
2020-01-23 11:45 ` Tomas Hala
2020-01-23 21:32   ` Wolfgang Schuster
2020-01-23 21:53     ` Thomas A. Schmitz
2020-01-25 18:17       ` Wolfgang Schuster
2020-01-26 12:49         ` Thomas A. Schmitz
2020-01-24 17:45   ` Thomas A. Schmitz
2020-01-24 17:57     ` Tomas Hala
2020-01-24 19:06       ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).