From: "Pierre-François Bonnefoi" <bonnefoi@unilim.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: line number overwriting
Date: Thu, 30 Apr 2015 11:24:09 +0200 [thread overview]
Message-ID: <5E96A66E-B6AA-4958-903C-17A1E4B5DA2C@unilim.fr> (raw)
In-Reply-To: <04D5E5CD-E26C-4D51-ADFA-384A7DA12D66@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3689 bytes --]
Hello,
thank you for your solution.
As I understand this code, it's a patch to some internal processing code, so I've integrated it in my environment file.
The result is similar to the previous result :
I've two columns paragraph, with a verbatim zone in the left column that gets two numbering : 1 to 25 then 26 to 50.
If I change the numbering style with the command "\definelinenumbering" associated to the verbatim zone from the global numbering style, I get one numbering with the
particular style and the other with the global style.
I don't know if this gives insight into the process that occurs in the rendering engine.
Thank you very much for your help,
Pierre-François.
> On 29 Apr 2015, at 18:51, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>
>>
>> Am 29.04.2015 um 17:00 schrieb Pierre-François Bonnefoi <bonnefoi@unilim.fr>:
>>
>> Thank you very much for your solution.
>>
>> When using it into a paragraph, the line number disappears :
>>
>> \defineframed[numeroLigneCode][location=low,width=fit,strut=yes,frame=off,rightframe=on]
>>
>> \definetyping[code][numbering=line,page=yes,bodyfont=9pt,tab=2]
>>
>> \setuplinenumbering[code][location=text,align=left,style={\switchtobodyfont[9pt,tt]},command=\numeroLigneCode,distance=-.5em,width=2em]
>>
>> \defineparagraphs[TwoCols][n=2,before=,after=]
>>
>> \starttext
>> \startTwoCols
>> \startcode
>> one
>> two
>> three
>> \stopcode
>> \TwoCols
>> hum
>> \stopTwoCols
>> \stoptext
>>
>> I've tried to use the command "\definelinenumbering" without success.
>>
>> I don't know what happened…
>
> To add line numbers to text in a box some kind of post processing is necessary and the paragraphs
> environment doesn’t perform this yet but it can be added with a single line in the code. I don’t if there
> are side effect from this change and if this is the right place for the line but it works in the following example.
>
> \unprotect
>
> \def\typo_paragraphs_stop_cell_yes
> {\ifvmode
> \removelastskip
> \else
> \removeunwantedspaces
> \endstrut
> \endgraf
> \fi
> \paragraphsparameter\c!bottom
> \egroup % (2)
> % The following is necessary to show line numbers in a paragraphs environment
> \page_postprocessors_linenumbers_box\scratchbox
> \dontleavehmode\hbox{\raise\strutheight\box\scratchbox}%
> \endgroup}
>
> \protect
>
> \defineparagraphs[Test][n=2]
>
> \setuptyping[numbering=line,tab=no]
>
> \starttext
>
> \startparagraphs[Test]
>
> \startparagraphscell
>
> \input ward
>
> \starttyping
> One
> Two
> Three
> \stoptyping
>
> \stopparagraphscell
>
> \startparagraphscell
> Second column
> \stopparagraphscell
>
> \stopparagraphs
>
> \stoptext
>
> Wolfgang
>
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
--
Bonnefoi Pierre-Francois | E-mail : bonnefoi@unilim.fr http://libpfb.so/
Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38
123 av Albert Thomas | Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE | The Avengers.
[-- Attachment #1.2.1: Type: text/html, Size: 54321 bytes --]
[-- Attachment #1.2.2: PastedGraphic-2.png --]
[-- Type: image/png, Size: 94299 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2015-04-30 9:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 21:43 Pierre-François Bonnefoi
2015-04-29 13:05 ` Pierre-François Bonnefoi
2015-04-29 14:40 ` Wolfgang Schuster
2015-04-29 15:00 ` Pierre-François Bonnefoi
2015-04-29 16:51 ` Wolfgang Schuster
2015-04-30 9:24 ` Pierre-François Bonnefoi [this message]
2015-05-01 9:17 ` Wolfgang Schuster
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=5E96A66E-B6AA-4958-903C-17A1E4B5DA2C@unilim.fr \
--to=bonnefoi@unilim.fr \
--cc=ntg-context@ntg.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).