ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gour <gour@atmarama.net>
To: ntg-context@ntg.nl
Subject: Re: Preparing a weird index.
Date: Fri, 27 Jun 2014 07:42:25 +0200	[thread overview]
Message-ID: <8761jmnc1q.fsf@atmarama.net> (raw)
In-Reply-To: <53AC46B3.6000906@wxs.nl>

Hans Hagen <pragma@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
___________________________________________________________________________________

  reply	other threads:[~2014-06-27  5:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05 19:42 john Culleton
2014-04-05 21:09 ` Hans Hagen
2014-06-26 14:17 ` Gour
2014-06-26 16:13   ` Hans Hagen
2014-06-27  5:42     ` Gour [this message]
2014-06-27  7:32       ` Hans Hagen
2014-06-27  8:05         ` Gour
2014-06-27  8:09           ` Wolfgang Schuster
2014-06-27 10:15             ` Gour
2014-06-27  8:11           ` Hans Hagen

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=8761jmnc1q.fsf@atmarama.net \
    --to=gour@atmarama.net \
    --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).