ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* is it possible to have first and last line numbers from page?
@ 2012-03-04 10:20 Pablo Rodríguez
  2012-03-04 11:04 ` Wolfgang Schuster
  2012-03-05 10:39 ` Hans Hagen
  0 siblings, 2 replies; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-04 10:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I have asked this question before (more than twice), after I found no
answer in the ConTeXt reference manual, the wiki or the mailing list.

I wanted to be able to have in the headers the first and last line
number from page. This feature is extremely useful when typesetting some
kinds of poetry.

The most basic sample would be:

\starttext
\startlinenumbering
\dorecurse{10}{\input zapf\par\input knuth}
\stoplinenumbering
\stoptext

Is that possible to achieve with ConTeXt?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-04 10:20 is it possible to have first and last line numbers from page? Pablo Rodríguez
@ 2012-03-04 11:04 ` Wolfgang Schuster
  2012-03-04 12:15   ` Pablo Rodríguez
  2012-03-05 10:39 ` Hans Hagen
  1 sibling, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2012-03-04 11:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 04.03.2012 um 11:20 schrieb Pablo Rodríguez:

> I have asked this question before (more than twice), after I found no
> answer in the ConTeXt reference manual, the wiki or the mailing list.
> 
> I wanted to be able to have in the headers the first and last line
> number from page. This feature is extremely useful when typesetting some
> kinds of poetry.
> 
> The most basic sample would be:
> 
> \starttext
> \startlinenumbering
> \dorecurse{10}{\input zapf\par\input knuth}
> \stoplinenumbering
> \stoptext
> 
> Is that possible to achieve with ConTeXt?


Yes but it’s not usable because the numbers are always shown on the next page.

\definemarking[linenumber]

\define\LinenumberCommand
  {\normalexpanded{\setmarking[linenumber]{\linenumber}}}

\setuplinenumbering[command=\LinenumberCommand]

\startsetups linenumber

	\doiftext {
		\getmarking[linenumber]
	}
	{
		\getmarking[linenumber][first] – \getmarking[linenumber][last]
	}

\stopsetups

\setupheadertexts[\texsetup{linenumber}]

\starttext

\dorecurse{6}{\input tufte\par}

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\resetmarking[linenumber]

\dorecurse{6}{\input tufte\par}

\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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-04 11:04 ` Wolfgang Schuster
@ 2012-03-04 12:15   ` Pablo Rodríguez
  2012-03-04 13:44     ` Wolfgang Schuster
  2012-03-05 14:12     ` luigi scarso
  0 siblings, 2 replies; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-04 12:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 03/04/2012 12:04 PM, Wolfgang Schuster wrote:
> Am 04.03.2012 um 11:20 schrieb Pablo Rodríguez:
>>
>> I wanted to be able to have in the headers the first and last line
>> number from page. This feature is extremely useful when typesetting some
>> kinds of poetry.
>> [...]
>> Is that possible to achieve with ConTeXt?
> 
> Yes but it’s not usable because the numbers are always shown on the next page.

Many thanks for your reply, Wolfgang.

If you allow me one more question: is showing the numbers on the same
page they refer to beyond the limits of TeX/LuaTeX?

I'm asking this to know whether such a feature could be implemented some
day in ConTeXt.

Many thanks for your help again,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-04 12:15   ` Pablo Rodríguez
@ 2012-03-04 13:44     ` Wolfgang Schuster
  2012-03-04 17:36       ` Pablo Rodríguez
  2012-03-05 14:12     ` luigi scarso
  1 sibling, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2012-03-04 13:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 04.03.2012 um 13:15 schrieb Pablo Rodríguez:

> On 03/04/2012 12:04 PM, Wolfgang Schuster wrote:
>> Am 04.03.2012 um 11:20 schrieb Pablo Rodríguez:
>>> 
>>> I wanted to be able to have in the headers the first and last line
>>> number from page. This feature is extremely useful when typesetting some
>>> kinds of poetry.
>>> [...]
>>> Is that possible to achieve with ConTeXt?
>> 
>> Yes but it’s not usable because the numbers are always shown on the next page.
> 
> Many thanks for your reply, Wolfgang.
> 
> If you allow me one more question: is showing the numbers on the same
> page they refer to beyond the limits of TeX/LuaTeX?
> 
> I'm asking this to know whether such a feature could be implemented some
> day in ConTeXt.

It’s a problem with the way how line numbering works.

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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-04 13:44     ` Wolfgang Schuster
@ 2012-03-04 17:36       ` Pablo Rodríguez
  0 siblings, 0 replies; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-04 17:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/03/12 14:44, Wolfgang Schuster wrote:
> Am 04.03.2012 um 13:15 schrieb Pablo Rodríguez:
>> [...]
>> If you allow me one more question: is showing the numbers on the same
>> page they refer to beyond the limits of TeX/LuaTeX?
>>
>> I'm asking this to know whether such a feature could be implemented some
>> day in ConTeXt.
> 
> It’s a problem with the way how line numbering works.

Thanks for your reply, Wolfgang.

Would it be possible to make something similar with margin data or pure
margin sectioning commands? Only interested in knowing whether this
could work.

Thanks again for your help,


Pablo

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-04 10:20 is it possible to have first and last line numbers from page? Pablo Rodríguez
  2012-03-04 11:04 ` Wolfgang Schuster
@ 2012-03-05 10:39 ` Hans Hagen
  2012-03-06 17:04   ` Pablo Rodríguez
  1 sibling, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2012-03-05 10:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Pablo Rodríguez

On 4-3-2012 11:20, Pablo Rodríguez wrote:
> \starttext
> \startlinenumbering
> \dorecurse{10}{\input zapf\par\input knuth}
> \stoplinenumbering
> \stoptext

currently it's not possible but it's no big deal to add that feature at 
some point as it's a matter of keeping track of first/last numbers; for 
the page it's trivial but as we also support numbering in columns and 
other places some housekeeping is needed (read: a quick hack is possible 
but I will only do a proper solution)

Hans

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-04 12:15   ` Pablo Rodríguez
  2012-03-04 13:44     ` Wolfgang Schuster
@ 2012-03-05 14:12     ` luigi scarso
  2012-03-06 17:01       ` Pablo Rodríguez
  2012-03-06 17:33       ` Pablo Rodríguez
  1 sibling, 2 replies; 16+ messages in thread
From: luigi scarso @ 2012-03-05 14:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2983 bytes --]

2012/3/4 Pablo Rodríguez <oinos@web.de>

> On 03/04/2012 12:04 PM, Wolfgang Schuster wrote:
> > Am 04.03.2012 um 11:20 schrieb Pablo Rodríguez:
> >>
> >> I wanted to be able to have in the headers the first and last line
> >> number from page. This feature is extremely useful when typesetting some
> >> kinds of poetry.
> >> [...]
> >> Is that possible to achieve with ConTeXt?
> >
> > Yes but it’s not usable because the numbers are always shown on the next
> page.
>
> Many thanks for your reply, Wolfgang.
>
> If you allow me one more question: is showing the numbers on the same
> page they refer to beyond the limits of TeX/LuaTeX?
>

Absolutely no. As Hans said, a quick/dirty trick is possible: just mark the
object
with \pagereference[<unique id>]. The data is stored into the *tuc file,
which can be read
from  the second pass.
Then always run with
$>context --purgeall ; context <yourfile>.mkiv
Of course, "it's possible " doesn't mean "it's the right context way".

\startluacode
document.my_name_space = document.my_name_space or {}
document.my_name_space.pages = document.my_name_space.pages or {}
local f =  io.open(file.addsuffix(tex.jobname,"tuc") )
print('>>>>> ',f)
if f==nil then
 --[=[ do nothin ]=]
else
 f:close()
 local tuc = dofile(file.addsuffix(tex.jobname,"tuc"))
 local data =  tuc.structures.references.collected[""]
 local  w
 local pages = document.my_name_space.pages
 local realpage,ref
 for k, v in  pairs(data) do
   w=string.gmatch(k,'LIN:(\%d+):\%d+')
   ref = tonumber(w())
   realpage = tostring(v.references.realpage)
   pages[realpage]= pages[realpage] or {}
   table.insert(pages[realpage],ref)
 end
 for page,array in pairs(pages) do
   table.sort(array)
 end
end
\stopluacode


\definemarking[linenumber]
\define\LinenumberCommand
 {\normalexpanded{\setmarking[linenumber]{\linenumber}}\pagereference[LIN:\linenumber:\currentpage]}

\setuplinenumbering[command=\LinenumberCommand]

\startsetups linenumber
%       \doiftext {
%               \getmarking[linenumber]
%       }
%       {
%               \getmarking[linenumber][first] –
\getmarking[linenumber][last]
%       }
 \startluacode
 local l=0;
 if document.my_name_space == nil then return end;
 if document.my_name_space.pages == nil then return end;
 local pages = document.my_name_space.pages;
 for _,_ in  pairs(pages) do l=l+1 end;
 if l== 0 then return end;
 --[=[ OK, we have some data to print ]=]
 local array = pages[tostring(tex.count.realpageno)]
 l=0;
 if array ==nil then return end;
 for _,_ in  pairs(array) do l=l+1 end;
 if l>0 then context(" nr. "..array[1].." --- "..array[l]) end;
 \stopluacode
\stopsetups

\setupheadertexts[\texsetup{linenumber}]

\starttext

\dorecurse{6}{\input tufte\par}

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\resetmarking[linenumber]

\dorecurse{6}{\input tufte\par}

\stoptext

--
luigi

[-- Attachment #1.2: Type: text/html, Size: 3779 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
___________________________________________________________________________________

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

* Re: is it possible to have first and last line numbers from page?
  2012-03-05 14:12     ` luigi scarso
@ 2012-03-06 17:01       ` Pablo Rodríguez
  2012-03-06 17:33       ` Pablo Rodríguez
  1 sibling, 0 replies; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-06 17:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 05/03/12 15:12, luigi scarso wrote:
> 2012/3/4 Pablo Rodríguez:
> [...]
>     Many thanks for your reply, Wolfgang.
> 
>     If you allow me one more question: is showing the numbers on the same
>     page they refer to beyond the limits of TeX/LuaTeX?
> 
> Absolutely no. As Hans said, a quick/dirty trick is possible: just
> mark the object with \pagereference[<unique id>]. The data is stored
> into the *tuc file, which can be read from  the second pass.

Many thanks for the code, Luigi.

My question was to basic, but I wondered why this didn't worked.

> Of course, "it's possible " doesn't mean "it's the right context
> way".

It does the work until it's implemented in ConTeXt.

Many thanks again for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-05 10:39 ` Hans Hagen
@ 2012-03-06 17:04   ` Pablo Rodríguez
  0 siblings, 0 replies; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-06 17:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 05/03/12 11:39, Hans Hagen wrote:
> On 4-3-2012 11:20, Pablo Rodríguez wrote:
>> \starttext
>> \startlinenumbering
>> \dorecurse{10}{\input zapf\par\input knuth}
>> \stoplinenumbering
>> \stoptext
> 
> currently it's not possible but it's no big deal to add that feature at 
> some point as it's a matter of keeping track of first/last numbers; for 
> the page it's trivial but as we also support numbering in columns and 
> other places some housekeeping is needed (read: a quick hack is possible 
> but I will only do a proper solution)

Many thanks for your reply, Hans.

I think that implemented a proper ConTeXt solution would be useful for
other users.

I would really appreciate it, if a solution could be implemented.

Many thanks again for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-05 14:12     ` luigi scarso
  2012-03-06 17:01       ` Pablo Rodríguez
@ 2012-03-06 17:33       ` Pablo Rodríguez
  2012-03-06 18:48         ` luigi scarso
  1 sibling, 1 reply; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-06 17:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 05/03/12 15:12, luigi scarso wrote:
> 2012/3/4 Pablo Rodríguez
>     If you allow me one more question: is showing the numbers on the same
>     page they refer to beyond the limits of TeX/LuaTeX?
> 
> Absolutely no. As Hans said, a quick/dirty trick is possible: just
> mark the object with \pagereference[<unique id>]. The data is stored
> into the *tuc file, which can be read from the second pass.

Luigi, I'm afraid it doesn't work as expected in the real file

Lines are numbered there with [step=5]. So I get in headers only
actually numbered lines, although it header should contain the real line
numbers (even with the line number isn't shown on that line).

How would it the the code in that case? (Sorry for asking this, but I'm
afraid I cannot code in lua [or in any other language].)

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-06 17:33       ` Pablo Rodríguez
@ 2012-03-06 18:48         ` luigi scarso
  2012-03-06 19:16           ` Pablo Rodríguez
  0 siblings, 1 reply; 16+ messages in thread
From: luigi scarso @ 2012-03-06 18:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 998 bytes --]

2012/3/6 Pablo Rodríguez <oinos@web.de>

> On 05/03/12 15:12, luigi scarso wrote:
> > 2012/3/4 Pablo Rodríguez
> >     If you allow me one more question: is showing the numbers on the same
> >     page they refer to beyond the limits of TeX/LuaTeX?
> >
> > Absolutely no. As Hans said, a quick/dirty trick is possible: just
> > mark the object with \pagereference[<unique id>]. The data is stored
> > into the *tuc file, which can be read from the second pass.
>
> Luigi, I'm afraid it doesn't work as expected in the real file
>
> I'm not surprised....

> Lines are numbered there with [step=5]. So I get in headers only
> actually numbered lines, although it header should contain the real line
> numbers (even with the line number isn't shown on that line).
>
> How would it the the code in that case? (Sorry for asking this, but I'm
> afraid I cannot code in lua [or in any other language].)



> Many thanks for your help,
>
Do you have an example ?

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1647 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
___________________________________________________________________________________

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

* Re: is it possible to have first and last line numbers from page?
  2012-03-06 18:48         ` luigi scarso
@ 2012-03-06 19:16           ` Pablo Rodríguez
  2012-03-06 19:27             ` luigi scarso
  0 siblings, 1 reply; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-06 19:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 06/03/12 19:48, luigi scarso wrote:
> 2012/3/6 Pablo Rodríguez
> 
>     Luigi, I'm afraid it doesn't work as expected in the real file
> 
> I'm not surprised.... 

My fault, because I didn' realize that numbers only appeared on each
fifth line.

>     Lines are numbered there with [step=5]. So I get in headers only
>     actually numbered lines, although it header should contain the real line
>     numbers (even with the line number isn't shown on that line).
> 
>     How would it the the code in that case? (Sorry for asking this, but I'm
>     afraid I cannot code in lua [or in any other language].)
> 
> Do you have an example ?

Adapting from your code:

\startluacode
document.my_name_space = document.my_name_space or {}
document.my_name_space.pages = document.my_name_space.pages or {}
local f =  io.open(file.addsuffix(tex.jobname,"tuc") )
print('>>>>> ',f)
if f==nil then
 --[=[ do nothin ]=]
else
 f:close()
 local tuc = dofile(file.addsuffix(tex.jobname,"tuc"))
 local data =  tuc.structures.references.collected[""]
 local  w
 local pages = document.my_name_space.pages
 local realpage,ref
 for k, v in  pairs(data) do
   w=string.gmatch(k,'LIN:(\%d+):\%d+')
   ref = tonumber(w())
   realpage = tostring(v.references.realpage)
   pages[realpage]= pages[realpage] or {}
   table.insert(pages[realpage],ref)
 end
 for page,array in pairs(pages) do
   table.sort(array)
 end
end
\stopluacode

\definemarking[linenumber]
\define\LinenumberCommand
 {\normalexpanded{\setmarking[linenumber]{\linenumber}}\pagereference[LIN:\linenumber:\currentpage]}

\setuplinenumbering[command=\LinenumberCommand,step=5]

\startsetups linenumber
 \startluacode
 local l=0;
 if document.my_name_space == nil then return end;
 if document.my_name_space.pages == nil then return end;
 local pages = document.my_name_space.pages;
 for _,_ in  pairs(pages) do l=l+1 end;
 if l== 0 then return end;
 --[=[ OK, we have some data to print ]=]
 local array = pages[tostring(tex.count.realpageno)]
 l=0;
 if array ==nil then return end;
 for _,_ in  pairs(array) do l=l+1 end;
 if l>0 then context(array[1].." -- "..array[l]) end;
 \stopluacode
\stopsetups

\setupheadertexts[\texsetup{linenumber}]

\starttext

\dorecurse{6}{\input tufte\par}

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\stoptext

On page 7 lines are numbered from lowest to highest values. A purist
might consider this wrong, but this is unlikely to happen on a real
book, since (I guess) line numbers on headers only make sense when they
two different series cannot be on the same page.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-06 19:16           ` Pablo Rodríguez
@ 2012-03-06 19:27             ` luigi scarso
  2012-03-06 19:42               ` Pablo Rodríguez
  2012-03-18 17:12               ` Pablo Rodríguez
  0 siblings, 2 replies; 16+ messages in thread
From: luigi scarso @ 2012-03-06 19:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 425 bytes --]

2012/3/6 Pablo Rodríguez <oinos@web.de>

>
> On page 7 lines are numbered from lowest to highest values. A purist
> might consider this wrong, but this is unlikely to happen on a real
> book, since (I guess) line numbers on headers only make sense when they
> two different series cannot be on the same page.
>
> Many thanks for your help,
>
> I see but ... how do you want to manage this situation ?
-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 707 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
___________________________________________________________________________________

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

* Re: is it possible to have first and last line numbers from page?
  2012-03-06 19:27             ` luigi scarso
@ 2012-03-06 19:42               ` Pablo Rodríguez
  2012-03-18 17:12               ` Pablo Rodríguez
  1 sibling, 0 replies; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-06 19:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 06/03/12 20:27, luigi scarso wrote:
> 2012/3/6 Pablo Rodríguez
> 
>     On page 7 lines are numbered from lowest to highest values. A purist
>     might consider this wrong, but this is unlikely to happen on a real
>     book, since (I guess) line numbers on headers only make sense when they
>     two different series cannot be on the same page.
> 
>     Many thanks for your help,
> 
> I see but ... how do you want to manage this situation ? 

In that particular case, I have no idea. I number lines by chapter, so
it is impossible that I would face this situation.

The canonical way to handle that would be to get the number from first
line on the page and number from last line on the page. The header would
be in that case "198--27", which doesn't make any sense.

Since this is a hack for other purpose, you can simply ignore it.

Thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-06 19:27             ` luigi scarso
  2012-03-06 19:42               ` Pablo Rodríguez
@ 2012-03-18 17:12               ` Pablo Rodríguez
  2012-03-18 21:33                 ` luigi scarso
  1 sibling, 1 reply; 16+ messages in thread
From: Pablo Rodríguez @ 2012-03-18 17:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 06/03/12 20:27, luigi scarso wrote:
> 2012/3/6 Pablo Rodríguez <oinos@web.de <mailto:oinos@web.de>>
> 
>     On page 7 lines are numbered from lowest to highest values. A purist
>     might consider this wrong, but this is unlikely to happen on a real
>     book, since (I guess) line numbers on headers only make sense when they
>     two different series cannot be on the same page.
> 
>     Many thanks for your help,
> 
> I see but ... how do you want to manage this situation? 

Hi Luigi,

sorry, but it seems that my reply to your question wasn't explaining at all.

I'm really interested in your hack (from
http://www.ntg.nl/pipermail/ntg-context/2012/065588.html).

I would really appreciate, if the hack could print in the header the
numbers from the first or the last lines that appear on page. It might
not be the lowest and highest values and it lines may not show numbers
(due to step=5).

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: is it possible to have first and last line numbers from page?
  2012-03-18 17:12               ` Pablo Rodríguez
@ 2012-03-18 21:33                 ` luigi scarso
  0 siblings, 0 replies; 16+ messages in thread
From: luigi scarso @ 2012-03-18 21:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2012/3/18 Pablo Rodríguez <oinos@web.de>:
> On 06/03/12 20:27, luigi scarso wrote:
>> 2012/3/6 Pablo Rodríguez <oinos@web.de <mailto:oinos@web.de>>
>>
>>     On page 7 lines are numbered from lowest to highest values. A purist
>>     might consider this wrong, but this is unlikely to happen on a real
>>     book, since (I guess) line numbers on headers only make sense when they
>>     two different series cannot be on the same page.
>>
>>     Many thanks for your help,
>>
>> I see but ... how do you want to manage this situation?
>
> Hi Luigi,
>
> sorry, but it seems that my reply to your question wasn't explaining at all.
>
> I'm really interested in your hack (from
> http://www.ntg.nl/pipermail/ntg-context/2012/065588.html).
>
> I would really appreciate, if the hack could print in the header the
> numbers from the first or the last lines that appear on page. It might
> not be the lowest and highest values and it lines may not show numbers
> (due to step=5).
>
> Many thanks for your help,
hm I think to understand, but I need an example ( "I have this but I
want that") with the code that  you are using  .


-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2012-03-18 21:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04 10:20 is it possible to have first and last line numbers from page? Pablo Rodríguez
2012-03-04 11:04 ` Wolfgang Schuster
2012-03-04 12:15   ` Pablo Rodríguez
2012-03-04 13:44     ` Wolfgang Schuster
2012-03-04 17:36       ` Pablo Rodríguez
2012-03-05 14:12     ` luigi scarso
2012-03-06 17:01       ` Pablo Rodríguez
2012-03-06 17:33       ` Pablo Rodríguez
2012-03-06 18:48         ` luigi scarso
2012-03-06 19:16           ` Pablo Rodríguez
2012-03-06 19:27             ` luigi scarso
2012-03-06 19:42               ` Pablo Rodríguez
2012-03-18 17:12               ` Pablo Rodríguez
2012-03-18 21:33                 ` luigi scarso
2012-03-05 10:39 ` Hans Hagen
2012-03-06 17:04   ` Pablo Rodríguez

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