ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: two buglets
Date: Tue, 5 Oct 2010 23:17:59 +0200	[thread overview]
Message-ID: <20101005211759.GE13466@aides> (raw)
In-Reply-To: <27D66F2D-88F8-438F-909F-73CF8B17679A@uni-bonn.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 1781 bytes --]

On 2010-10-05 <15:29:38>, Thomas A. Schmitz wrote:
>                                            And someone (me) might
> say that they want three Greek terms in their German index at
> logical places. 

Try the definitions in the attachment. For three words only they
will be fine. But if the count increases you will soon run into a
situation where it’s not easy to determine where those “logical
places” are. E.g. would you want the letter “υ” under latin “y”
or “u”? Phonologically (might depend on your stance on historical
phonology -- could be a minefield) you might find it reasonable
to treat “ου” as “u” (or “ū” if that matters), but your audience
might expect it at the graphetic location, latin “ou”, instead.
As you can see in the example, when mapping both omega and
omicron onto Latin “o” the result is that “χρῶμα” will appear
before “Χρόνος”, which looks a bit odd.

This ad-hoc solution is troublesome when two words (a German and
a Greek one) occupy the same spot in the search order, like
“Polyneikes” and “Πολυνείκης”. My index output is:

Polyneikes 2
Πολυνείκης 2
Polyneikes 3
Πολυνείκης 3

which should rather be

Polyneikes 2, 3
Πολυνείκης 2, 3

I guess there is some testing going on in order to determine
whether to proceed with the current entry or switch to the next
one. The position is the same, however the comparison with the
last item fails and a new one is created instead. (Only
guessing.)

If you run into this problem you might have to ask Hans for
advice.

Hth,

Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.1.2: greek-german.tex --]
[-- Type: text/x-tex, Size: 6773 bytes --]


\startluacode
sorters.definitions["de-gr"] = {
    method  = "before",
    replacements = {
        -- German
        { "ä", 'ae' }, { "Ä", 'Ae' },
        { "ö", 'oe' }, { "Ö", 'Oe' },
        { "ü", 'ue' }, { "Ü", 'Ue' },
        { "ß", 'ss' },

        -- Greek
        { "α", "a"  }, { "ά", "a"  }, { "ὰ", "a"  }, { "ᾶ", "a"  }, { "ᾳ", "a"  },
        { "ἀ", "a"  }, { "ἁ", "a"  }, { "ἄ", "a"  }, { "ἂ", "a"  }, { "ἆ", "a"  },
        { "ἁ", "a"  }, { "ἅ", "a"  }, { "ἃ", "a"  }, { "ἇ", "a"  }, { "ᾁ", "a"  },
        { "ᾴ", "a"  }, { "ᾲ", "a"  }, { "ᾷ", "a"  }, { "ᾄ", "a"  }, { "ᾂ", "a"  },
        { "ᾅ", "a"  }, { "ᾃ", "a"  }, { "ᾆ", "a"  }, { "ᾇ", "a"  }, { "β", "b"  },
        { "γ", "g"  }, { "δ", "d"  }, { "ε", "e"  }, { "έ", "e"  }, { "ὲ", "e"  },
        { "ἐ", "e"  }, { "ἔ", "e"  }, { "ἒ", "e"  }, { "ἑ", "e"  }, { "ἕ", "e"  },
        { "ἓ", "e"  }, { "ζ", "z"  }, { "η", "e"  }, { "η", "e"  }, { "ή", "e"  },
        { "ὴ", "e"  }, { "ῆ", "e"  }, { "ῃ", "e"  }, { "ἠ", "e"  }, { "ἤ", "e"  },
        { "ἢ", "e"  }, { "ἦ", "e"  }, { "ᾐ", "e"  }, { "ἡ", "e"  }, { "ἥ", "e"  },
        { "ἣ", "e"  }, { "ἧ", "e"  }, { "ᾑ", "e"  }, { "ῄ", "e"  }, { "ῂ", "e"  },
        { "ῇ", "e"  }, { "ᾔ", "e"  }, { "ᾒ", "e"  }, { "ᾕ", "e"  }, { "ᾓ", "e"  },
        { "ᾖ", "e"  }, { "ᾗ", "e"  }, { "θ", "th" }, { "ι", "i"  }, { "ί", "i"  },
        { "ὶ", "i"  }, { "ῖ", "i"  }, { "ἰ", "i"  }, { "ἴ", "i"  }, { "ἲ", "i"  },
        { "ἶ", "i"  }, { "ἱ", "i"  }, { "ἵ", "i"  }, { "ἳ", "i"  }, { "ἷ", "i"  },
        { "ϊ", "i"  }, { "ΐ", "i"  }, { "ῒ", "i"  }, { "ῗ", "i"  }, { "κ", "k"  },
        { "λ", "l"  }, { "μ", "m"  }, { "ν", "n"  }, { "ξ", "x"  }, { "ο", "o"  },
        { "ό", "o"  }, { "ὸ", "o"  }, { "ὀ", "o"  }, { "ὄ", "o"  }, { "ὂ", "o"  },
        { "ὁ", "o"  }, { "ὅ", "o"  }, { "ὃ", "o"  }, { "π", "p"  }, { "ρ", "r"  },
        { "ῤ", "r"  }, { "ῥ", "r"  }, { "σ", "s"  }, { "ς", "s"  }, { "τ", "t"  },
        { "υ", "y"  }, { "ύ", "y"  }, { "ὺ", "y"  }, { "ῦ", "y"  }, { "ὐ", "y"  },
        { "ὔ", "y"  }, { "ὒ", "y"  }, { "ὖ", "y"  }, { "ὑ", "y"  }, { "ὕ", "y"  },
        { "ὓ", "y"  }, { "ὗ", "y"  }, { "ϋ", "y"  }, { "ΰ", "y"  }, { "ῢ", "y"  },
        { "ῧ", "y"  }, { "φ", "ph" }, { "χ", "ch" }, { "ψ", "ps" }, { "ω", "o"  },
        { "ώ", "o"  }, { "ὼ", "o"  }, { "ῶ", "o"  }, { "ῳ", "o"  }, { "ὠ", "o"  },
        { "ὤ", "o"  }, { "ὢ", "o"  }, { "ὦ", "o"  }, { "ᾠ", "o"  }, { "ὡ", "o"  },
        { "ὥ", "o"  }, { "ὣ", "o"  }, { "ὧ", "o"  }, { "ᾡ", "o"  }, { "ῴ", "o"  },
        { "ῲ", "o"  }, { "ῷ", "o"  }, { "ᾤ", "o"  }, { "ᾢ", "o"  }, { "ᾥ", "o"  },
        { "ᾣ", "o"  }, { "ᾦ", "o"  }, { "ᾧ", "o"  },

        { "Α", "A"  }, { "Ά", "A"  }, { "Ὰ", "A"  }, { "ᾼ", "A"  }, { "Ἀ", "A"  },
        { "Ἁ", "A"  }, { "Ἄ", "A"  }, { "Ἂ", "A"  }, { "Ἆ", "A"  }, { "Ἁ", "A"  },
        { "Ἅ", "A"  }, { "Ἃ", "A"  }, { "Ἇ", "A"  }, { "ᾉ", "A"  }, { "ᾌ", "A"  },
        { "ᾊ", "A"  }, { "ᾍ", "A"  }, { "ᾋ", "A"  }, { "ᾎ", "A"  }, { "ᾏ", "A"  },
        { "Β", "B"  }, { "Γ", "G"  }, { "Δ", "D"  }, { "Ε", "E"  }, { "Έ", "E"  },
        { "Ὲ", "E"  }, { "Ἐ", "E"  }, { "Ἔ", "E"  }, { "Ἒ", "E"  }, { "Ἑ", "E"  },
        { "Ἕ", "E"  }, { "Ἓ", "E"  }, { "Ζ", "Z"  }, { "Η", "E"  }, { "Η", "E"  },
        { "Ή", "E"  }, { "Ὴ", "E"  }, { "ῌ", "E"  }, { "Ἠ", "E"  }, { "Ἤ", "E"  },
        { "Ἢ", "E"  }, { "Ἦ", "E"  }, { "ᾘ", "E"  }, { "Ἡ", "E"  }, { "Ἥ", "E"  },
        { "Ἣ", "E"  }, { "Ἧ", "E"  }, { "ᾙ", "E"  }, { "ᾜ", "E"  }, { "ᾚ", "E"  },
        { "ᾝ", "E"  }, { "ᾛ", "E"  }, { "ᾞ", "E"  }, { "ᾟ", "E"  }, { "Θ", "Th" },
        { "Ι", "I"  }, { "Ί", "I"  }, { "Ὶ", "I"  }, { "Ἰ", "I"  }, { "Ἴ", "I"  },
        { "Ἲ", "I"  }, { "Ἶ", "I"  }, { "Ἱ", "I"  }, { "Ἵ", "I"  }, { "Ἳ", "I"  },
        { "Ἷ", "I"  }, { "Ϊ", "I"  }, { "Κ", "K"  }, { "Λ", "L"  }, { "Μ", "M"  },
        { "Ν", "N"  }, { "Ξ", "X"  }, { "Ο", "O"  }, { "Ό", "O"  }, { "Ὸ", "O"  },
        { "Ὀ", "O"  }, { "Ὄ", "O"  }, { "Ὂ", "O"  }, { "Ὁ", "O"  }, { "Ὅ", "O"  },
        { "Ὃ", "O"  }, { "Π", "P"  }, { "Ρ", "R"  }, { "Ῥ", "R"  }, { "Σ", "S"  },
        { "Σ", "S"  }, { "Τ", "T"  }, { "Υ", "Y"  }, { "Ύ", "Y"  }, { "Ὺ", "Y"  },
        { "Ὑ", "Y"  }, { "Ὕ", "Y"  }, { "Ὓ", "Y"  }, { "Ὗ", "Y"  }, { "Ϋ", "Y"  },
        { "Φ", "Ph" }, { "Χ", "Ch" }, { "Ψ", "Ps" }, { "Ω", "O"  }, { "Ώ", "O"  },
        { "Ὼ", "O"  }, { "ῼ", "O"  }, { "Ὠ", "O"  }, { "Ὤ", "O"  }, { "Ὢ", "O"  },
        { "Ὦ", "O"  }, { "ᾨ", "O"  }, { "Ὡ", "O"  }, { "Ὥ", "O"  }, { "Ὣ", "O"  },
        { "Ὧ", "O"  }, { "ᾩ", "O"  }, { "ᾬ", "O"  }, { "ᾪ", "O"  }, { "ᾭ", "O"  },
        { "ᾫ", "O"  }, { "ᾮ", "O"  }, { "ᾯ", "O"  },
    },

    entries = {
        ["a"] = "a", ["b"] = "b", ["c"] = "c", ["d"] = "d", ["e"] = "e",
        ["f"] = "f", ["g"] = "g", ["h"] = "h", ["i"] = "i", ["j"] = "j",
        ["k"] = "k", ["l"] = "l", ["m"] = "m", ["n"] = "n", ["o"] = "o",
        ["p"] = "p", ["q"] = "q", ["r"] = "r", ["s"] = "s", ["t"] = "t",
        ["u"] = "u", ["v"] = "v", ["w"] = "w", ["x"] = "x", ["y"] = "y",
        ["z"] = "z",
    },
    orders = {
        "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
        "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
        "u", "v", "w", "x", "y", "z",
    },
}

\stopluacode

\unexpanded\def\ind#1{\index{#1} #1}

\setupbodyfont[cmu]

\starttext

\startcolumns[n=3]
  \placeregister[index][language=de-gr,method={zm,pc,uc}]
\stopcolumns

\dorecurse {2} {
  \page\title{Iteration No. \recurselevel}
    
    \ind{Adrastos}      \ind{Ἄδραστος}\par
    \ind{Amphiaraos}    \ind{Ἀμφιάραος}\par
    \ind{Hippomedon}    \ind{Ἱππομέδων}\par
    \ind{Kapaneus}      \ind{Καπανεύς}\par
    \ind{Parthenopaios} \ind{Παρθενοπαῖоς}\par
    \ind{Polyneikes}    \ind{Πολυνείκης}\par
    \ind{Tydeus}        \ind{Τυδεύς}\par

    \ind{ἀναλύειν}    \ind{Ἀναλυτικὰ}
    \ind{analysiert}  \ind{Analytik}  \ind{analytisch}\par

    \ind{ψυχὴ} \ind{Psyche} \ind{psychisch} \par

    \ind{Χρόνος}  \ind{χρόνιος}     \ind{χρῶμα}
    \ind{Chronos} \ind{Chronometer} \ind{chronologisch} \ind{chronisch} 
    \ind{Chrom}   \ind{Chromatik}   \ind{chromatisch}
}

\stoptext


[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 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
___________________________________________________________________________________

  reply	other threads:[~2010-10-05 21:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 15:52 Thomas A. Schmitz
2010-02-11 17:17 ` Hans Hagen
2010-02-11 17:35   ` Thomas A. Schmitz
2010-02-11 19:29     ` Hans Hagen
2010-02-11 21:27       ` Thomas A. Schmitz
2010-02-11 18:14   ` David Rogers
2010-10-03  8:24   ` Thomas A. Schmitz
2010-10-03 10:29     ` Hans Hagen
2010-10-03 10:58       ` Thomas A. Schmitz
2010-10-03 15:10         ` Hans Hagen
2010-10-03 15:43           ` Thomas A. Schmitz
2010-10-05 12:15             ` Philipp Gesang
2010-10-05 12:39               ` Hans Hagen
2010-10-05 13:29               ` Thomas A. Schmitz
2010-10-05 21:17                 ` Philipp Gesang [this message]
2010-10-05 21:27                   ` Hans Hagen
2010-10-05 21:55                     ` Philipp Gesang
2010-10-06  7:50                       ` Hans Hagen
2010-02-11 17:19 ` 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=20101005211759.GE13466@aides \
    --to=pgesang@ix.urz.uni-heidelberg.de \
    --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).