From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: line numbering respecting original lines
Date: Tue, 18 Jun 2024 00:06:48 +0200 [thread overview]
Message-ID: <6fef30d4-5617-49c2-aeca-71bda04b0275@freedom.nl> (raw)
In-Reply-To: <a177aa6e-782c-4cd2-8a1d-43fd6138a230@fiee.net>
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
___________________________________________________________________________________
prev parent reply other threads:[~2024-06-17 22:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 12:03 [NTG-context] " 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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fef30d4-5617-49c2-aeca-71bda04b0275@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).