ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] line numbering respecting original lines
@ 2024-06-17 12:03 Henning Hraban Ramm
  2024-06-17 16:16 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2024-06-17 12:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

When discussing verses or other texts that have distinct line breaking, 
I need line numbering to adhere to that, even if some lines are too long 
and need breaking. Is that possible?

In my example below the 3rd line is too long and gets line numbers 3 and 4.

Same problem with source code examples, i.e. \starttyping with numbering.
I thought numbering=file (or \setuplinenumbering[method=file]) would 
address that, but apparently not.

Hraban



\mainlanguage[de]
\setuppapersize[A7,landscape]
\setuplayout[topspace=0mm,bottom=0mm,width=90mm,height=70mm]
\setuppagenumbering[location=none,state=stop]
%\setuplinenumbering[method=file]
\starttext

\startlinenumbering
\startlines
Und doch, wie viel wahnsinniger, einen Freund,
weil ers in einer Kleinigkeit versah,
die nur ein Mensch, mit dem gar nicht zu leben ist,
ihm nicht verzeihen konnte, gleich dafür
zu hassen und zu fliehen, wie den Ruso …
\stoplines
\stoplinenumbering
% aus: C. M. Wieland, Horazens Satiren. Weimar 1786 (2. Aufl. 1804)
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: line numbering respecting original lines
  2024-06-17 12:03 [NTG-context] line numbering respecting original lines Henning Hraban Ramm
@ 2024-06-17 16:16 ` Wolfgang Schuster
  2024-06-17 16:46   ` Henning Hraban Ramm
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2024-06-17 16:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
> When discussing verses or other texts that have distinct line breaking, 
> I need line numbering to adhere to that, even if some lines are too long 
> and need breaking. Is that possible?
> 
> In my example below the 3rd line is too long and gets line numbers 3 and 4.
> 
> Same problem with source code examples, i.e. \starttyping with numbering.
> I thought numbering=file (or \setuplinenumbering[method=file]) would 
> address that, but apparently not.
> 
> Hraban
> 
> 
> 
> \mainlanguage[de]
> \setuppapersize[A7,landscape]
> \setuplayout[topspace=0mm,bottom=0mm,width=90mm,height=70mm]
> \setuppagenumbering[location=none,state=stop]
> %\setuplinenumbering[method=file]
> \starttext
> 
> \startlinenumbering
> \startlines
> Und doch, wie viel wahnsinniger, einen Freund,
> weil ers in einer Kleinigkeit versah,
> die nur ein Mensch, mit dem gar nicht zu leben ist,
> ihm nicht verzeihen konnte, gleich dafür
> zu hassen und zu fliehen, wie den Ruso …
> \stoplines
> \stoplinenumbering
> % aus: C. M. Wieland, Horazens Satiren. Weimar 1786 (2. Aufl. 1804)
> \stoptext

\start \setupparagraphnumbering[state=start]
\startlines
...
\stoplines
\stop

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: line numbering respecting original lines
  2024-06-17 16:16 ` [NTG-context] " Wolfgang Schuster
@ 2024-06-17 16:46   ` Henning Hraban Ramm
  2024-06-17 17:07     ` Wolfgang Schuster
  2024-06-17 22:06     ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 7+ messages in thread
From: Henning Hraban Ramm @ 2024-06-17 16:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 17.06.24 um 18:16 schrieb Wolfgang Schuster:
> Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
>> When discussing verses or other texts that have distinct line 
>> breaking, I need line numbering to adhere to that, even if some lines 
>> are too long and need breaking. Is that possible?
>>
>> In my example below the 3rd line is too long and gets line numbers 3 
>> and 4.
>>
>> Same problem with source code examples, i.e. \starttyping with numbering.
>> I thought numbering=file (or \setuplinenumbering[method=file]) would 
>> address that, but apparently not.

> \start \setupparagraphnumbering[state=start]
> \startlines
> ...
> \stoplines
> \stop

Thank you – that works for the minimal example, but the options for 
paragraph numbering are very limited, I can’t even use my own command.
And I can’t combine it with \starttyping.


\def\CodeNumber#1{\hfill\tt\bfx\color[orange]{#1}}

% ok
\setuplinenumbering[
   command=\CodeNumber,
   width=3em,]

% invalid
\setupparagraphnumbering[
   command=\CodeNumber,
   width=3em,]


Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: line numbering respecting original lines
  2024-06-17 16:46   ` Henning Hraban Ramm
@ 2024-06-17 17:07     ` Wolfgang Schuster
  2024-06-17 17:30       ` Henning Hraban Ramm
  2024-06-17 22:06     ` Hans Hagen via ntg-context
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2024-06-17 17:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 17.06.2024 um 18:46:
> Am 17.06.24 um 18:16 schrieb Wolfgang Schuster:
>> Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
>>> When discussing verses or other texts that have distinct line 
>>> breaking, I need line numbering to adhere to that, even if some lines 
>>> are too long and need breaking. Is that possible?
>>>
>>> In my example below the 3rd line is too long and gets line numbers 3 
>>> and 4.
>>>
>>> Same problem with source code examples, i.e. \starttyping with 
>>> numbering.
>>> I thought numbering=file (or \setuplinenumbering[method=file]) would 
>>> address that, but apparently not.
> 
>> \start \setupparagraphnumbering[state=start]
>> \startlines
>> ...
>> \stoplines
>> \stop
> 
> Thank you – that works for the minimal example, but the options for 
> paragraph numbering are very limited, I can’t even use my own command.
> And I can’t combine it with \starttyping.
> 
> 
> \def\CodeNumber#1{\hfill\tt\bfx\color[orange]{#1}}
> 
> % ok
> \setuplinenumbering[
>    command=\CodeNumber,
>    width=3em,]
> 
> % invalid
> \setupparagraphnumbering[
>    command=\CodeNumber,
>    width=3em,]

You can use the style and color keys

   \setupparagraphnumbering[state=start,style=\tt\bfx,color=orange]


but the location of the number in the left margin is fixed.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: line numbering respecting original lines
  2024-06-17 17:07     ` Wolfgang Schuster
@ 2024-06-17 17:30       ` Henning Hraban Ramm
  2024-06-17 19:24         ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2024-06-17 17:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 17.06.24 um 19:07 schrieb Wolfgang Schuster:
> Henning Hraban Ramm schrieb am 17.06.2024 um 18:46:
>> Am 17.06.24 um 18:16 schrieb Wolfgang Schuster:
>>> Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
>>>> When discussing verses or other texts that have distinct line 
>>>> breaking, I need line numbering to adhere to that, even if some 
>>>> lines are too long and need breaking. Is that possible?
>>>>
>>>> In my example below the 3rd line is too long and gets line numbers 3 
>>>> and 4.
>>>>
>>>> Same problem with source code examples, i.e. \starttyping with 
>>>> numbering.
>>>> I thought numbering=file (or \setuplinenumbering[method=file]) would 
>>>> address that, but apparently not.
>>
>>> \start \setupparagraphnumbering[state=start]
>>> \startlines
>>> ...
>>> \stoplines
>>> \stop
>>
>> Thank you – that works for the minimal example, but the options for 
>> paragraph numbering are very limited, I can’t even use my own command.
>> And I can’t combine it with \starttyping.
>>
>>
>> \def\CodeNumber#1{\hfill\tt\bfx\color[orange]{#1}}
>>
>> % ok
>> \setuplinenumbering[
>>    command=\CodeNumber,
>>    width=3em,]
>>
>> % invalid
>> \setupparagraphnumbering[
>>    command=\CodeNumber,
>>    width=3em,]
> 
> You can use the style and color keys
> 
>    \setupparagraphnumbering[state=start,style=\tt\bfx,color=orange]
> 
> 
> but the location of the number in the left margin is fixed.

Yes, I’m just documenting line and paragraph numbering, and I wonder why 
the latter is so limited – is it just too old to use the usual 
parameters, or is it so much more complicated internally?

Hraban

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: line numbering respecting original lines
  2024-06-17 17:30       ` Henning Hraban Ramm
@ 2024-06-17 19:24         ` Wolfgang Schuster
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2024-06-17 19:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 17.06.2024 um 19:30:
> Am 17.06.24 um 19:07 schrieb Wolfgang Schuster:
>> Henning Hraban Ramm schrieb am 17.06.2024 um 18:46:
>>> Am 17.06.24 um 18:16 schrieb Wolfgang Schuster:
>>>> Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
>>>>> When discussing verses or other texts that have distinct line 
>>>>> breaking, I need line numbering to adhere to that, even if some 
>>>>> lines are too long and need breaking. Is that possible?
>>>>>
>>>>> In my example below the 3rd line is too long and gets line numbers 
>>>>> 3 and 4.
>>>>>
>>>>> Same problem with source code examples, i.e. \starttyping with 
>>>>> numbering.
>>>>> I thought numbering=file (or \setuplinenumbering[method=file]) 
>>>>> would address that, but apparently not.
>>>
>>>> \start \setupparagraphnumbering[state=start]
>>>> \startlines
>>>> ...
>>>> \stoplines
>>>> \stop
>>>
>>> Thank you – that works for the minimal example, but the options for 
>>> paragraph numbering are very limited, I can’t even use my own command.
>>> And I can’t combine it with \starttyping.
>>>
>>>
>>> \def\CodeNumber#1{\hfill\tt\bfx\color[orange]{#1}}
>>>
>>> % ok
>>> \setuplinenumbering[
>>>    command=\CodeNumber,
>>>    width=3em,]
>>>
>>> % invalid
>>> \setupparagraphnumbering[
>>>    command=\CodeNumber,
>>>    width=3em,]
>>
>> You can use the style and color keys
>>
>>    \setupparagraphnumbering[state=start,style=\tt\bfx,color=orange]
>>
>>
>> but the location of the number in the left margin is fixed.
>
> Yes, I’m just documenting line and paragraph numbering, and I wonder 
> why the latter is so limited – is it just too old to use the usual 
> parameters, or is it so much more complicated internally?

Maybe Hans (or somebody) needed this for a single document and the 
current version was enough at the time.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: line numbering respecting original lines
  2024-06-17 16:46   ` Henning Hraban Ramm
  2024-06-17 17:07     ` Wolfgang Schuster
@ 2024-06-17 22:06     ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen via ntg-context @ 2024-06-17 22:06 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 6/17/2024 6:46 PM, Henning Hraban Ramm wrote:
> Am 17.06.24 um 18:16 schrieb Wolfgang Schuster:
>> Henning Hraban Ramm schrieb am 17.06.2024 um 14:03:
>>> When discussing verses or other texts that have distinct line 
>>> breaking, I need line numbering to adhere to that, even if some lines 
>>> are too long and need breaking. Is that possible?
>>>
>>> In my example below the 3rd line is too long and gets line numbers 3 
>>> and 4.
>>>
>>> Same problem with source code examples, i.e. \starttyping with 
>>> numbering.
>>> I thought numbering=file (or \setuplinenumbering[method=file]) would 
>>> address that, but apparently not.
> 
>> \start \setupparagraphnumbering[state=start]
>> \startlines
>> ...
>> \stoplines
>> \stop
> 
> Thank you – that works for the minimal example, but the options for 
> paragraph numbering are very limited, I can’t even use my own command.
> And I can’t combine it with \starttyping.
> 
> 
> \def\CodeNumber#1{\hfill\tt\bfx\color[orange]{#1}}
> 
> % ok
> \setuplinenumbering[
>    command=\CodeNumber,
>    width=3em,]
> 
> % invalid
> \setupparagraphnumbering[
>    command=\CodeNumber,
>    width=3em,]
\starttext

\setuplines[keeptogether=paragraph]

\setupparagraphnumbering[width=3em]

\setuplinenumbering[distance=1em,align=flushright]

\setupparagraphnumbering[state=start,color=red,style=bold]
\startlinenumbering
\startlines
\input tufte
\stoplines
\stoplinenumbering

\stoptext

the keeptogether option is also available for typing and it listens to 
widow and club penalties

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-06-17 22:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 12:03 [NTG-context] line numbering respecting original lines Henning Hraban Ramm
2024-06-17 16:16 ` [NTG-context] " Wolfgang Schuster
2024-06-17 16:46   ` Henning Hraban Ramm
2024-06-17 17:07     ` Wolfgang Schuster
2024-06-17 17:30       ` Henning Hraban Ramm
2024-06-17 19:24         ` Wolfgang Schuster
2024-06-17 22:06     ` Hans Hagen via ntg-context

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).