ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: index sort question
@ 2010-11-21 21:48 Horacio Suarez
  2010-11-22  7:52 ` Vianney le Clément
  2010-11-23 10:37 ` Jano Kula
  0 siblings, 2 replies; 7+ messages in thread
From: Horacio Suarez @ 2010-11-21 21:48 UTC (permalink / raw)
  To: ntg-context


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














Jano, thankyou very much.
It is a songs book, and I need an author table of content.
Your solution is very good, works fine, but using \pagenumber or incrementing a counter I can´t make it work.

I replace \pagenumber with a incremental number to assure the label sorting.
So using the original sample, instead of:A\index[arbol+\pagenumber]{arbol+rojo}\pageB\index[araña+\pagenumber]{araña+linda}\pageC\index[arbol+\pagenumber]{arbol+verde}\pageD\index[araña+\pagenumber]{araña+grande}\pageE\index[arbol+\pagenumber]{arbol+blanco}\page
it is nowA\index[arbol1]{arbol+rojo}\pageB\index[araña2]{araña+linda}\pageC\index[arbol3]{arbol+verde}\pageD\index[araña4]{araña+grande}\pageE\index[arbol5]{arbol+blanco}\page
Even it´not elegant, the Author index is very nice!
Maybe yo know why I can´t make it work.
Well, thankyou again.

--------------------
Horacio Suarez
Editorial Antropofagia
www.eantropofagia.com.ar



> To: ntg-context@ntg.nl
> From: jano.kula@tiscali.cz
> Date: Fri, 19 Nov 2010 10:49:35 +0100
> Subject: Re: [NTG-context] index sort question
> 
> On 11/19/2010 10:45 AM, Jano Kula wrote:
> > Hello Horacio,
> >
> > if you have only one index item per page, than on the second level you
> > can use \pagenumber for sorting:
> 
> or your own counter increased by every index item, which doesn't 
> restrict it to one item per page.
> 
> J.
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________



 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 3513 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

* Re: index sort question
  2010-11-21 21:48 index sort question Horacio Suarez
@ 2010-11-22  7:52 ` Vianney le Clément
  2010-11-23 10:37 ` Jano Kula
  1 sibling, 0 replies; 7+ messages in thread
From: Vianney le Clément @ 2010-11-22  7:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Nov 21, 2010 at 22:48, Horacio Suarez <horaciosuarez@hotmail.com> wrote:
> A\index[arbol+\pagenumber]{arbol+rojo}\page
> B\index[araña+\pagenumber]{araña+linda}\page
> C\index[arbol+\pagenumber]{arbol+verde}\page
> D\index[araña+\pagenumber]{araña+grande}\page
> E\index[arbol+\pagenumber]{arbol+blanco}\page

I guess you should ensure that \pagenumber is expanded immediately.
Otherwise, it will be expanded on your table of contents page, which
will of course be the same number for every entry.

Maybe try with
   \setupregister[expansion=yes]

If that doesn't work, you could try replacing your \index commands with
   \expanded{\index[arbol+\pagenumber]{arbol+rojo}}

These are only guesses, I may be wrong.

Vianney
___________________________________________________________________________________
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] 7+ messages in thread

* Re: index sort question
  2010-11-21 21:48 index sort question Horacio Suarez
  2010-11-22  7:52 ` Vianney le Clément
@ 2010-11-23 10:37 ` Jano Kula
  2010-11-23 12:27   ` Horacio Suarez
  1 sibling, 1 reply; 7+ messages in thread
From: Jano Kula @ 2010-11-23 10:37 UTC (permalink / raw)
  To: ntg-context

Hi Horacio,

On 11/21/2010 10:48 PM, Horacio Suarez wrote:
> Jano, thankyou very much.
>
> It is a songs book, and I need an author table of content.
>
> Your solution is very good, works fine, but using \pagenumber or
> incrementing a counter I can´t make it work.
>
> I replace \pagenumber with a incremental number to assure the label sorting.
>
> So using the original sample, instead of:
>
> A\index[arbol+\pagenumber]{arbol+rojo}\page
> B\index[araña+\pagenumber]{araña+linda}\page
> C\index[arbol+\pagenumber]{arbol+verde}\page
> D\index[araña+\pagenumber]{araña+grande}\page
> E\index[arbol+\pagenumber]{arbol+blanco}\page
>
>
> it is now
>
> A\index[arbol1]{arbol+rojo}\page
> B\index[araña2]{araña+linda}\page
> C\index[arbol3]{arbol+verde}\page
> D\index[araña4]{araña+grande}\page
> E\index[arbol5]{arbol+blanco}\page
>
>
> Even it´not elegant, the Author index is very nice!
>
> Maybe yo know why I can´t make it work.

Are you using MarkII or MarkIV? In mkiv the above solution works here. 
In mkii \expadned makes it work as Vianney has already suggested.

Jano


___________________________________________________________________________________
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] 7+ messages in thread

* Re: index sort question
  2010-11-23 10:37 ` Jano Kula
@ 2010-11-23 12:27   ` Horacio Suarez
  0 siblings, 0 replies; 7+ messages in thread
From: Horacio Suarez @ 2010-11-23 12:27 UTC (permalink / raw)
  To: ntg-context


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


thankyou Vianney and Jano,
I'm using MarkII.
Anyway \pagenumber is not usefull because there ir more than 1 index item per page.
But using a number and incrementing it each index ocurrence works neither.
Excuse my ignorance, but I don't know what is "expanded" or what does the "expansion" key?

thankyou for your answers.
--------------------
Horacio Suarez




> To: ntg-context@ntg.nl
> From: jano.kula@tiscali.cz
> Date: Tue, 23 Nov 2010 11:37:49 +0100
> Subject: Re: [NTG-context] index sort question
> 
> Hi Horacio,
> 
> On 11/21/2010 10:48 PM, Horacio Suarez wrote:
> > Jano, thankyou very much.
> >
> > It is a songs book, and I need an author table of content.
> >
> > Your solution is very good, works fine, but using \pagenumber or
> > incrementing a counter I can´t make it work.
> >
> > I replace \pagenumber with a incremental number to assure the label sorting.
> >
> > So using the original sample, instead of:
> >
> > A\index[arbol+\pagenumber]{arbol+rojo}\page
> > B\index[araña+\pagenumber]{araña+linda}\page
> > C\index[arbol+\pagenumber]{arbol+verde}\page
> > D\index[araña+\pagenumber]{araña+grande}\page
> > E\index[arbol+\pagenumber]{arbol+blanco}\page
> >
> >
> > it is now
> >
> > A\index[arbol1]{arbol+rojo}\page
> > B\index[araña2]{araña+linda}\page
> > C\index[arbol3]{arbol+verde}\page
> > D\index[araña4]{araña+grande}\page
> > E\index[arbol5]{arbol+blanco}\page
> >
> >
> > Even it´not elegant, the Author index is very nice!
> >
> > Maybe yo know why I can´t make it work.
> 
> Are you using MarkII or MarkIV? In mkiv the above solution works here. 
> In mkii \expadned makes it work as Vianney has already suggested.
> 
> Jano
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 3010 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

* Re: index sort question
  2010-11-19  9:45 ` Jano Kula
@ 2010-11-19  9:49   ` Jano Kula
  0 siblings, 0 replies; 7+ messages in thread
From: Jano Kula @ 2010-11-19  9:49 UTC (permalink / raw)
  To: ntg-context

On 11/19/2010 10:45 AM, Jano Kula wrote:
> Hello Horacio,
>
> if you have only one index item per page, than on the second level you
> can use \pagenumber for sorting:

or your own counter increased by every index item, which doesn't 
restrict it to one item per page.

J.

___________________________________________________________________________________
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] 7+ messages in thread

* Re: index sort question
  2010-11-18 21:50 Horacio Suarez
@ 2010-11-19  9:45 ` Jano Kula
  2010-11-19  9:49   ` Jano Kula
  0 siblings, 1 reply; 7+ messages in thread
From: Jano Kula @ 2010-11-19  9:45 UTC (permalink / raw)
  To: ntg-context

Hello Horacio,

if you have only one index item per page, than on the second level you 
can use \pagenumber for sorting:

A\index[arbol+\pagenumber]{arbol+rojo}\page
B\index[araña+\pagenumber]{araña+linda}\page
C\index[arbol+\pagenumber]{arbol+verde}\page
D\index[araña+\pagenumber]{araña+grande}\page
E\index[arbol+\pagenumber]{arbol+blanco}\page


The first level should be sorted alphabetically, because
1) you need to group index items according to first word (arbol, araña)
2) if the first item in the publication would start with "z", than you 
would have "Z" as the first letterhead in the register (according to 
what you want), not speaking about others, so you could get "Z G I E A N 
L ..." as an alphabet, and nobody would find anything.

Jano


On 11/18/2010 10:50 PM, Horacio Suarez wrote:
> hello all
>
> In a index, is there a way to sort the items inside a letter not
> alphabetically, I mean, in appearance order? or maybe there is another
> way to do it.
>
> I have now:
>
> A
> arbol
> blanco, 15
> rojo, 4
> verde, 23
> araña
> grande, 50
> linda, 12
>
> I want:
>
> A
> arbol
> rojo, 4
> blanco, 15
> verde, 23
> araña
> linda, 12
> grande, 50
>
>
> Thankyou in adavance.
>
> --------------------
> Horacio Suarez
>
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


___________________________________________________________________________________
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] 7+ messages in thread

* index sort question
@ 2010-11-18 21:50 Horacio Suarez
  2010-11-19  9:45 ` Jano Kula
  0 siblings, 1 reply; 7+ messages in thread
From: Horacio Suarez @ 2010-11-18 21:50 UTC (permalink / raw)
  To: ntg-context


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


hello all
In a index, is there a way to sort the items inside a letter not alphabetically, I mean, in appearance order? or maybe there is another way to do it.

I have now:
A arbol   blanco,    15   rojo,         4   verde,     23  araña    grande,   50    linda,      12
I want:
A arbol   rojo,         4   blanco,    15   verde,     23  araña    linda,      12    grande,   50

Thankyou in adavance.
--------------------Horacio Suarez


 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 1878 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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] 7+ messages in thread

end of thread, other threads:[~2010-11-23 12:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-21 21:48 index sort question Horacio Suarez
2010-11-22  7:52 ` Vianney le Clément
2010-11-23 10:37 ` Jano Kula
2010-11-23 12:27   ` Horacio Suarez
  -- strict thread matches above, loose matches on Subject: below --
2010-11-18 21:50 Horacio Suarez
2010-11-19  9:45 ` Jano Kula
2010-11-19  9:49   ` Jano Kula

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