On 04/01/2017 04:04 PM, Rik Kabel wrote:
> On 2017-04-01 08:38, Pablo Rodriguez wrote:
>> Dear list,
>>
>> I have the following sample:
>>
>>      \showframe
>>      \definefontfeature[smcp][smcp=yes]
>>      \definefontfamily[mainface][rm][GFS Didot]
>>      \setupbodyfont[mainface]
>>
>>      \setupregister[index][style=\addfs{smcp}, command={\hfill}]
>> [...]
>> Is there no way to center the head in indices?
>> [...]
> 
> As to the centering, it works fine here with command=\centerline . Index 
> heads (a, b, ..., β, ἄ, ...) are centered over each of the two columns.

I got the same results, but I wonder whether this is the right way of
doing it.

> But that last bit is a problem. ἄ is indexed separately from α, and it 
> is placed after β. I don't think you want that. I do not know how you 
> would support more than one language in a single index sort.

It was only a test and the font has some issues with OpenType features.

The real problem comes with this source:
http://www.ousia.tk/grc-index.tex (output in
http://www.ousia.tk/grc-index.pdf).

Each word-starting letter with a different diacritical mark is
considerer a different letter for the index sorting.

It seems to be a problem only related to ancient Greek, since the
following works as expected:

    \mainlanguage[es]
    \define[1]\indx{#1\index{#1}}
    \setupregister[index][n=6, balance=no, command={\centerline}]
    \starttext
    \indx{a} \indx{á} \indx{ñ} \indx{n} \indx{ü} \indx{u}
    \indx{A} \indx{Á} \indx{Ñ} \indx{n} \indx{Û} \indx{u}
    \placeindex
    \stoptext

German is rather tricky (sorting rules in German are tricky, too), but
it works as it should (after fine tuning):

    \mainlanguage[de-at]
    \define[1]\indx{#1\index{#1}}
    \setupregister[index][language=de-AT, balance=no]
    \starttext
    \indx{üben} \indx{Übung} \indx{U-Bahn}
    \currentlanguage
    \placeindex
    \stoptext

I guess having different language names (de-at and de-AT) for
\mainlanguage and index sorting is unnecessarily complex.

If it were possible, I think it would be extremely helpful to be able to
invoke languages by their XML standards (or
https://tools.ietf.org/html/bcp47).

This would mean grc for agr, de-1901, de-AT and de-CH for deo, de-at and
de-CH... and so on.

I mean this as full-working alternatives, not as replacements that would
break existing compatibility.

But even defining a language synonym doesn’t work with index sorting:

    \installlanguage [de-AT] [de-at]
    \mainlanguage[de-AT]
    \define[1]\indx{#1\index{#1}}
    \setupregister[index][balance=no]
    \starttext
    \indx{üben} \indx{Übung} \indx{U-Bahn}
    \currentlanguage
    \placeindex
    \stoptext

Hans, how about improving alternate (standard for the rest of markup)
language invocation and allowing the main language to specify the
sorting order in German indexes too?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to