OK, here's another one. For the code, I must admit: http://www.alyssahiba.com/wp-content/uploads/2012/02/no-idea-what-im-doing-d... I think it was the Wolfgang who helped me with this a couple of months ago. I want a start/stop pair that will take as an argument a key-value to set the beginning of the line numbering. So here's my example: \def\startnumberedblockquote {\dosingleempty\dostartnumberedblockquote} \def\dostartnumberedblockquote[#1]% {\getrawparameters[numberedblockquote][start=1,#1]% \blank[line]% \begingroup \setupindenting[no]% \setuplinenumbering[location=text] \startlinenumbering[width=1cm][\numberedblockquotestart]} \def\stopnumberedblockquote {\stoplinenumbering \endgroup \blank[line]} \starttext \startnumberedblockquote[start=3] \input knuth \stopnumberedblockquote \stoptext This works with 2012.06.30 12:32, but not with 2012.07.07 15:04. All best Thomas
On 9-7-2012 20:50, Thomas A. Schmitz wrote:
\def\startnumberedblockquote {\dosingleempty\dostartnumberedblockquote}
\def\dostartnumberedblockquote[#1]% {\getrawparameters[numberedblockquote][start=1,#1]% \blank[line]% \begingroup \setupindenting[no]% \setuplinenumbering[location=text] \startlinenumbering[width=1cm][\numberedblockquotestart]}
\def\stopnumberedblockquote {\stoplinenumbering \endgroup \blank[line]}
\starttext
\startnumberedblockquote[start=3]
\input knuth
\stopnumberedblockquote
\stoptext
fixed % \startlinenumbering[<startvalue>|continue|settings|name] % \startlinenumbering[name][<startvalue>|continue|settings] btw, you can define linenumberings ... \definelinenumbering [blocked] [width=1cm, location=text, before={\blank[line]}, after={\blank[line]}] \getrawparameters [numberedblockquote] [start=1] \unexpanded\def\startnumberedblockquote {\dosingleempty\dostartnumberedblockquote} \def\dostartnumberedblockquote[#1]% {\begingroup \setupindenting[no]% \getrawparameters[numberedblockquote][#1]% \startlinenumbering[blocked][start=\numberedblockquotestart]} \unexpanded\def\stopnumberedblockquote {\stoplinenumbering \endgroup} -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 7/9/12 10:46 PM, Hans Hagen wrote:
fixed
% \startlinenumbering[<startvalue>|continue|settings|name] % \startlinenumbering[name][<startvalue>|continue|settings]
btw, you can define linenumberings ...
Thanks for the fix, and for the code - I'll play with it later today! All best Thomas
On 07/09/2012 10:46 PM, Hans Hagen wrote:
btw, you can define linenumberings ...
Hi Hans, I finally had time to play a bit with your code, and AFAICS, the settings for "before" and "after" in \definelinenumbering are quietly ignored; at least, I get no blank lines: \definelinenumbering [blocked] [width=1cm, location=text, before={\blank[line]}, after={\blank[line]}] \getrawparameters [numberedblockquote] [start=1] \unexpanded\def\startnumberedblockquote {\dosingleempty\dostartnumberedblockquote} \def\dostartnumberedblockquote[#1]% {\begingroup \setupindenting[no]% \getrawparameters[numberedblockquote][#1]% \startlinenumbering[blocked][start=\numberedblockquotestart]} \unexpanded\def\stopnumberedblockquote {\stoplinenumbering \endgroup} \starttext \input tufte \startnumberedblockquote[start=3] \input knuth \stopnumberedblockquote \input tufte \stoptext All best Thomas
Am 12.07.2012 um 15:57 schrieb Thomas A. Schmitz:
On 07/09/2012 10:46 PM, Hans Hagen wrote:
btw, you can define linenumberings ...
Hi Hans,
I finally had time to play a bit with your code, and AFAICS, the settings for "before" and "after" in \definelinenumbering are quietly ignored; at least, I get no blank lines:
The liner numbering environment has no before/after keys, you should always keep in mind that line numbers are added after the page is finished and the start/stop commands are mark the begin and end of the block where numbers are added. You can always use the annotation module which has space before/spaceafter keys to control the spacing around the environment. \usemodule[annotation] \definelinenumbering [blockquote] [width=1cm, location=text] \define[2]\BlockquoteCommand {\startlinenumbering[blockquote][start=\annotationparameter{start}]% #2% \stoplinenumbering} \defineannotation [numberedblockquote] [alternative=command, command=\BlockquoteCommand] \starttext \input tufte \startnumberedblockquote[start=3] \input knuth \stopnumberedblockquote \input tufte \stoptext Wolfgang
On 07/12/2012 10:34 PM, Wolfgang Schuster wrote:
The liner numbering environment has no before/after keys, you should always keep in mind that line numbers are added after the page is finished and the start/stop commands are mark the begin and end of the block where numbers are added. You can always use the annotation module which has space before/spaceafter keys to control the spacing around the environment.
Thanks, Wolfgang, but that was Hans's code, in fact :-) But that's good to know anyway! Thomas
participants (3)
-
Hans Hagen
-
Thomas A. Schmitz
-
Wolfgang Schuster