ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Sort register (index) by Bible book
@ 2009-11-16 18:50 berend
  2009-11-17  7:48 ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: berend @ 2009-11-16 18:50 UTC (permalink / raw)
  To: ConTeXt mailinglist

Hi All,

I'm typesetting a book that has a register of Bible verses. I like to
order them by Bible book as per the order the books are customarily
listed.

The index is created like \index{1 Samuel 1:1} and retrieved with
\placeindex, so that's all standard.

Are there any tools to sort this index? How can I make this part of
the regular "build"? Or is this something you do once, at the end, by
hand?

-- 
Thanks for any pointers,

Berend de Boer
___________________________________________________________________________________
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: Sort register (index) by Bible book
  2009-11-16 18:50 Sort register (index) by Bible book berend
@ 2009-11-17  7:48 ` Taco Hoekwater
  2009-11-17 16:18   ` Jelle Huisman
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2009-11-17  7:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users



berend@pobox.com wrote:
> Hi All,
> 
> I'm typesetting a book that has a register of Bible verses. I like to
> order them by Bible book as per the order the books are customarily
> listed.
> 
> The index is created like \index{1 Samuel 1:1} and retrieved with
> \placeindex, so that's all standard.

Using

  \index[Samuel 1 1:1]{1 Samuel 1:1}

Should change the sort order. Untested, though.

Best wishes,
Taco
___________________________________________________________________________________
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: Sort register (index) by Bible book
  2009-11-17  7:48 ` Taco Hoekwater
@ 2009-11-17 16:18   ` Jelle Huisman
  2009-11-17 16:23     ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Jelle Huisman @ 2009-11-17 16:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 17/11/2009 07:48, Taco Hoekwater wrote:
> Using
>    \index[Samuel 1 1:1]{1 Samuel 1:1}
>
> Should change the sort order. Untested, though.
>    

He probably wants to get Genesis before Exodus (etc.) instead. So would 
it be possible to tell the index mechanism to sort certain items in an 
arbitrary order?  (I don't know what \sort and \loadsorts do?)

Jelle
___________________________________________________________________________________
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: Sort register (index) by Bible book
  2009-11-17 16:18   ` Jelle Huisman
@ 2009-11-17 16:23     ` Taco Hoekwater
  2009-11-20 19:15       ` berend
  0 siblings, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2009-11-17 16:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Jelle Huisman wrote:
> On 17/11/2009 07:48, Taco Hoekwater wrote:
>> Using
>>    \index[Samuel 1 1:1]{1 Samuel 1:1}
>>
>> Should change the sort order. Untested, though.
>>    
> 
> He probably wants to get Genesis before Exodus (etc.) instead. So would
> it be possible to tell the index mechanism to sort certain items in an
> arbitrary order?  (I don't know what \sort and \loadsorts do?)

You could pre-assign a zero-padded number to each book (Genesis=001,
Exodus=002), and use that number inside the square brackets.

Best wishes,
Taco
___________________________________________________________________________________
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: Sort register (index) by Bible book
  2009-11-17 16:23     ` Taco Hoekwater
@ 2009-11-20 19:15       ` berend
  2009-11-20 19:38         ` Hans Hagen
  2009-11-20 19:55         ` Taco Hoekwater
  0 siblings, 2 replies; 7+ messages in thread
From: berend @ 2009-11-20 19:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>>>>> "Taco" == Taco Hoekwater <taco@elvenkind.com> writes:

    Taco> You could pre-assign a zero-padded number to each book
    Taco> (Genesis=001, Exodus=002), and use that number inside the
    Taco> square brackets.

Right, but that would be extremely annoying to type in all the time
:-)

I'm looking for a more automated solution, but given that even you
don't know one, it seems I have to write some sorting mechanism
myself.

Or perhaps use the trick above as the input is XML, and the verses are
clearly marked, so I could generate ConTeXt with the proper sort
codes.

Who does the index sorting, is that texexec?

-- 
Cheers,

Berend de Boer
___________________________________________________________________________________
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: Sort register (index) by Bible book
  2009-11-20 19:15       ` berend
@ 2009-11-20 19:38         ` Hans Hagen
  2009-11-20 19:55         ` Taco Hoekwater
  1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2009-11-20 19:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

berend@pobox.com wrote:
>>>>>> "Taco" == Taco Hoekwater <taco@elvenkind.com> writes:
> 
>     Taco> You could pre-assign a zero-padded number to each book
>     Taco> (Genesis=001, Exodus=002), and use that number inside the
>     Taco> square brackets.
> 
> Right, but that would be extremely annoying to type in all the time
> :-)
> 
> I'm looking for a more automated solution, but given that even you
> don't know one, it seems I have to write some sorting mechanism
> myself.
> 
> Or perhaps use the trick above as the input is XML, and the verses are
> clearly marked, so I could generate ConTeXt with the proper sort
> codes.
> 
> Who does the index sorting, is that texexec?

in mkii yes, and in mkiv it's done in lua

if you go for xml, an duse mkiv, then you can write your own sorting 
code as you can access the tree

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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] 7+ messages in thread

* Re: Sort register (index) by Bible book
  2009-11-20 19:15       ` berend
  2009-11-20 19:38         ` Hans Hagen
@ 2009-11-20 19:55         ` Taco Hoekwater
  1 sibling, 0 replies; 7+ messages in thread
From: Taco Hoekwater @ 2009-11-20 19:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

berend@pobox.com wrote:
>>>>>> "Taco" == Taco Hoekwater <taco@elvenkind.com> writes:
> 
>     Taco> You could pre-assign a zero-padded number to each book
>     Taco> (Genesis=001, Exodus=002), and use that number inside the
>     Taco> square brackets.
> 
> Right, but that would be extremely annoying to type in all the time
> :-)

\def\Genesis#1{\index[001 #1]{Genesis #1}} etc.

Takes only 66 macros and it even saves you typing :)


> I'm looking for a more automated solution, but given that even you
> don't know one, it seems I have to write some sorting mechanism
> myself.
> 
> Or perhaps use the trick above as the input is XML, and the verses are
> clearly marked, so I could generate ConTeXt with the proper sort
> codes.
> 
> Who does the index sorting, is that texexec?
> 

___________________________________________________________________________________
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:[~2009-11-20 19:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16 18:50 Sort register (index) by Bible book berend
2009-11-17  7:48 ` Taco Hoekwater
2009-11-17 16:18   ` Jelle Huisman
2009-11-17 16:23     ` Taco Hoekwater
2009-11-20 19:15       ` berend
2009-11-20 19:38         ` Hans Hagen
2009-11-20 19:55         ` Taco Hoekwater

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