![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
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}] \starttext ancient\index{ancient} better\index{better} complexity\index{complexity} daemonic\index{daemonic} energic\index{energic} ἄγαν\index{ἄγαν} βεβαιος\index{βεβαιος} γυναικός\index{γυναικός} δαίμων\index{δαίμων} ἐνέργεια\index{ἐνέργεια} \placeindex \stoptext Is there no way to center the head in indices? I tried the creepy usage of \hfill in command, which I can replace with \centerline from TeX. But I wonder whether none before wanted to do this. The align options centers both head and entries. And there is no headalign option. Many thanks for your help, Pablo -- http://www.ousia.tk
![](https://secure.gravatar.com/avatar/e07e15a8be3c4c1723f5a0397bc17424.jpg?s=120&d=mm&r=g)
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}] \starttext ancient\index{ancient} better\index{better} complexity\index{complexity} daemonic\index{daemonic} energic\index{energic} ἄγαν\index{ἄγαν} βεβαιος\index{βεβαιος} γυναικός\index{γυναικός} δαίμων\index{δαίμων} ἐνέργεια\index{ἐνέργεια} \placeindex \stoptext
Is there no way to center the head in indices?
I tried the creepy usage of \hfill in command, which I can replace with \centerline from TeX.
But I wonder whether none before wanted to do this. The align options centers both head and entries. And there is no headalign option.
Many thanks for your help,
Pablo
As to the centering, it works fine here with command=\centerline . Index heads (a, b, ..., β, ἄ, ...) are centered over each of the two columns. 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. -- Rik
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
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
participants (2)
-
Pablo Rodriguez
-
Rik Kabel