Re: [NTG-context] Preparing a weird index.

2014-06-27 Thread Gour
Hans Hagen pra...@wxs.nl writes:

 See sort-lan.lua ... you could define a pseudo-language for this and
 use that one for sorting. The actual sorting is driven by a sequence
 of steps that (can) involve uppercase, lowercase, shape, unicode,
 specific order etc.

It looks very good. Congratulations?

Does it mean I can e.g. still use 'hr' as main language for writing and
then use my pseudo language *just* for sorting purposes?


Sincerely,
Gour

-- 
There is no possibility of one's becoming a yogī, O Arjuna, 
if one eats too much or eats too little, sleeps too much 
or does not sleep enough.

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

Re: [NTG-context] Preparing a weird index.

2014-06-27 Thread Wolfgang Schuster

Am 27.06.2014 um 10:05 schrieb Gour g...@atmarama.net:

 Hans Hagen pra...@wxs.nl writes:
 
 See sort-lan.lua ... you could define a pseudo-language for this and
 use that one for sorting. The actual sorting is driven by a sequence
 of steps that (can) involve uppercase, lowercase, shape, unicode,
 specific order etc.
 
 It looks very good. Congratulations?
 
 Does it mean I can e.g. still use 'hr' as main language for writing and
 then use my pseudo language *just* for sorting purposes?

Yes, the register mechanism provides a language key where you can
specify the language which is used for the sorting of the entries.

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
___


Re: [NTG-context] Preparing a weird index.

2014-06-27 Thread Hans Hagen

On 6/27/2014 10:05 AM, Gour wrote:

Hans Hagen pra...@wxs.nl writes:


See sort-lan.lua ... you could define a pseudo-language for this and
use that one for sorting. The actual sorting is driven by a sequence
of steps that (can) involve uppercase, lowercase, shape, unicode,
specific order etc.


It looks very good. Congratulations?

Does it mean I can e.g. still use 'hr' as main language for writing and
then use my pseudo language *just* for sorting purposes?


yes


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


Re: [NTG-context] Preparing a weird index.

2014-06-27 Thread Gour
Wolfgang Schuster schuster.wolfg...@gmail.com writes:

 Yes, the register mechanism provides a language key where you can
 specify the language which is used for the sorting of the entries.

Excellent!!

It's time to dive into ConTeXt again...

Sincerely,
Gour

-- 
One must deliver himself with the help of his mind, and not 
degrade himself. The mind is the friend of the conditioned soul, 
and his enemy as well.

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


Re: [NTG-context] Preparing a weird index.

2014-06-26 Thread Gour
john Culleton j...@wexfordpress.com writes:

Hello,

 I have looked into Xindy for this job but the learning curve is pretty
 steep and the documentation pretty opaque. makeindex won't handle
 decimals for locators.

in the past when working on some books with the
English/Croatian/Sanskrit(diacritics) using Xindy in companion with
LyX/LaTeX was the only option to ger proper sorting.

I was playing with the ConTeXt more than 10 years ago, but lack of
proper docs was always keeping me back from fully embracing it.

Today after checking (again) I see that there are even some printed
books and MkIV/LuaTeX seems to be quite stable, so I wonder about
ConTeXt's capabilities to generate index/glossary in regard to xindy
which is powerful, but I never really grokked it properly?

Other typesetting features of ConTeXt are certainly very tempting and
along with Emacs/AUCTeX everything looks as very pleasant typesetting
environment.

@John: I'm curios if you were able to prepare desired index *without*
makeindex/xindy?


Sincerely,
Gour

-- 

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


Re: [NTG-context] Preparing a weird index.

2014-06-26 Thread Hans Hagen

On 6/26/2014 4:17 PM, Gour wrote:


Today after checking (again) I see that there are even some printed
books and MkIV/LuaTeX seems to be quite stable, so I wonder about
ConTeXt's capabilities to generate index/glossary in regard to xindy
which is powerful, but I never really grokked it properly?


i don't know xindy but normally the context mkiv index mechanism is 
flexible enough (and it can be configured)


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
___


Re: [NTG-context] Preparing a weird index.

2014-06-26 Thread Gour
Hans Hagen pra...@wxs.nl writes:

 i don't know xindy but normally the context mkiv index mechanism is
 flexible enough (and it can be configured)

Here are some snippets from my old xindy setup...

;; define order of sorting runs
(use-rule-set :run 0
  :rule-set (resolve-sanskrit-diacritics hr-alphabetize 
  hr-ignore-special))
(use-rule-set :run 1
  :rule-set (hr-resolve-diacritics hr-ignore-special))
(use-rule-set :run 2
  :rule-set (hr-resolve-case hr-ignore-special))
(use-rule-set :run 3
  :rule-set (hr-resolve-special))

which says that the sorting should be done in the following order: first
rules for sanskrit diacriticits, then alphabetic sort of Croatian (hr)
characters etc. followed by another set of rules saying to sort Croatian
diacritics (I was using latin2 encoding) etc.

Here is example of resolve-sanskrit-diacritics:

(define-rule-set resolve-sanskrit-diacritics

   :rules  ((\\={(a)} \1 :bregexp :again)
(\\={\\i} i :bregexp :again)
(\\={I} I :bregexp :again)
(\\\.{(.)} \1 :bregexp :again)
(\\d{(r)} ri :bregexp :again)
(\\d{(t)} \1 :bregexp :again)
(\\d{(T)} \1 :bregexp :again)
(\\d{(d)} \1 :bregexp :again)
(\\d{(n)} \1 :bregexp :again)
(\\d{(s)} š :bregexp :again)
(\\d{(S)} Š :bregexp :again)
(\\~{(.)} \1 :bregexp :again)
(\\'{(c)} ć :bregexp :again)
(\\'{(C)} Ć. :bregexp :again)
(\\'{(s)} š :bregexp :again)
(\\'{(S)} Š :bregexp :again)
))

which says that e.g. 'ṣ' which is pronounced similar to Croatian 'š'
should go in the same letter-group, same with 'Ś' which goes to 'Š'. 'ṛ'
is pronounced as 'ri' and it should goes in the letter group 'ri' etc.

Of course, at that time, without proper Unicode support, it was a bit
cumbersome but I was able to see everything properly in LyX as well as
properly sorted in the final PDF/PS outputs.

Is something like that possible in ConTeXt?


Sincerely,
Gour

-- 
The working senses are superior to dull matter; mind is higher 
than the senses; intelligence is still higher than the mind; 
and he [the soul] is even higher than the intelligence.

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

[NTG-context] Preparing a weird index.

2014-04-05 Thread john Culleton

I have a customer that uses a publisher that has
truly weird requirements. The weirdness is
that the locaters are not page numbers but
paragraph numbers. And some paragraph numbers
start with the prefix 'BO' and others with the
chapter number.  so a correct sequence would be 
BO.15 3.2

A finished  sequence would be

goddess @@ BO.15 3.2 3.5

The sort order has to be letter by letter,
as defined in the Chicago Manual of Style.

Can Context sort and summarize these locaters?

I can even change the BO sequence to 0 (zero) and
then change it back later on. The key is can
Context sort by paragraph number rather than
page number for an index. 

I have looked into Xindy for this job but the
learning curve is pretty steep and the
documentation pretty opaque. makeindex won't
handle decimals for locators. I don't mind doing
a little reformatting along the way (I already
have for this project) but I don't want to
rewrite makeindex or xindy just for this
job. 



-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at
http://www.booklocker.com/books/4055.html
___
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
___


Re: [NTG-context] Preparing a weird index.

2014-04-05 Thread Hans Hagen

On 4/5/2014 9:42 PM, john Culleton wrote:


I have a customer that uses a publisher that has
truly weird requirements. The weirdness is
that the locaters are not page numbers but
paragraph numbers. And some paragraph numbers
start with the prefix 'BO' and others with the
chapter number.  so a correct sequence would be
BO.15 3.2

A finished  sequence would be

goddess @@ BO.15 3.2 3.5

The sort order has to be letter by letter,
as defined in the Chicago Manual of Style.

Can Context sort and summarize these locaters?


You can use the BO.15 3.2 3.5 as subentry and it will probably be 
sorted all right; you can then disable page numbers. This kind of 
indexing happens in critical editions.


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
___