Xindy seems to ignore sort-rules in custom .xdy file
So I am trying the change the way xindy is sorting umlauts in an index file by prescribing custom sort-rules.
This is the myfile.xdy that I use:
(require "lang/german/duden-utf8-lang.xdy")
(sort-rule "Ä" "Ae")
(sort-rule "Ö" "Oe")
(sort-rule "Ü" "Ue")
(sort-rule "ä" "ae")
(sort-rule "ö" "oe")
(sort-rule "ü" "ue")
And here is a minimal example for a document:
documentclass{article}
usepackage{fontspec}
usepackage[ngerman]{babel}
usepackage[xindy, splitindex]{imakeidx}
defxindylangopt{-M lang/german/myfile}
makeindex[name=test, options=xindylangopt]
begin{document}
foo index[test]{Aal} index[test]{Aeal} index[test]{Äal} index[test]{Abal} index[test]{Afal}
index[test]{Ual} index[test]{Ueal} index[test]{Üal} index[test]{Ubal} index[test]{Ufal}
index[test]{Oal} index[test]{Oeal} index[test]{Öal} index[test]{Obal} index[test]{Ofal}
printindex[test]
end{document}
This is what the output looks like:

But this is still the original sorting where the umlauts are treated as if they were their respective vocal, i.e. 'Ä' is treated as 'A' and so on. What I would like is that they are treated as their respective vocal followed by the letter 'e', i.e. 'Äal' would be placed between 'Aeal' and 'Afal' in this example. What am I doing wrong? Can the sorting rules not be overwriten like that? Do I even need a custom file for this or are there already native modules that do this kind of sorting?
sorting xindy
add a comment |
So I am trying the change the way xindy is sorting umlauts in an index file by prescribing custom sort-rules.
This is the myfile.xdy that I use:
(require "lang/german/duden-utf8-lang.xdy")
(sort-rule "Ä" "Ae")
(sort-rule "Ö" "Oe")
(sort-rule "Ü" "Ue")
(sort-rule "ä" "ae")
(sort-rule "ö" "oe")
(sort-rule "ü" "ue")
And here is a minimal example for a document:
documentclass{article}
usepackage{fontspec}
usepackage[ngerman]{babel}
usepackage[xindy, splitindex]{imakeidx}
defxindylangopt{-M lang/german/myfile}
makeindex[name=test, options=xindylangopt]
begin{document}
foo index[test]{Aal} index[test]{Aeal} index[test]{Äal} index[test]{Abal} index[test]{Afal}
index[test]{Ual} index[test]{Ueal} index[test]{Üal} index[test]{Ubal} index[test]{Ufal}
index[test]{Oal} index[test]{Oeal} index[test]{Öal} index[test]{Obal} index[test]{Ofal}
printindex[test]
end{document}
This is what the output looks like:

But this is still the original sorting where the umlauts are treated as if they were their respective vocal, i.e. 'Ä' is treated as 'A' and so on. What I would like is that they are treated as their respective vocal followed by the letter 'e', i.e. 'Äal' would be placed between 'Aeal' and 'Afal' in this example. What am I doing wrong? Can the sorting rules not be overwriten like that? Do I even need a custom file for this or are there already native modules that do this kind of sorting?
sorting xindy
Welcome to TeX.SE!
– Kurt
Mar 2 at 22:25
In your case(require "lang/german/din5007-utf8-lang.xdy")should be sufficient. Unfortunately,xindyreplaces readable letters by some opaque bytes for sorting (you can see it in anylang/german/*-utf8.xdy), so altering sorting rules by a user becomes complicated.
– Sergei Golovan
Mar 3 at 7:49
Amazing, this seems to do the trick! I see, I already looked at some of the standard modules and was very confused by all these weird symbols and prefixes. I wonder why they do it that way. Xindy syntax seems rather outdated.
– mapf
Mar 3 at 8:46
add a comment |
So I am trying the change the way xindy is sorting umlauts in an index file by prescribing custom sort-rules.
This is the myfile.xdy that I use:
(require "lang/german/duden-utf8-lang.xdy")
(sort-rule "Ä" "Ae")
(sort-rule "Ö" "Oe")
(sort-rule "Ü" "Ue")
(sort-rule "ä" "ae")
(sort-rule "ö" "oe")
(sort-rule "ü" "ue")
And here is a minimal example for a document:
documentclass{article}
usepackage{fontspec}
usepackage[ngerman]{babel}
usepackage[xindy, splitindex]{imakeidx}
defxindylangopt{-M lang/german/myfile}
makeindex[name=test, options=xindylangopt]
begin{document}
foo index[test]{Aal} index[test]{Aeal} index[test]{Äal} index[test]{Abal} index[test]{Afal}
index[test]{Ual} index[test]{Ueal} index[test]{Üal} index[test]{Ubal} index[test]{Ufal}
index[test]{Oal} index[test]{Oeal} index[test]{Öal} index[test]{Obal} index[test]{Ofal}
printindex[test]
end{document}
This is what the output looks like:

But this is still the original sorting where the umlauts are treated as if they were their respective vocal, i.e. 'Ä' is treated as 'A' and so on. What I would like is that they are treated as their respective vocal followed by the letter 'e', i.e. 'Äal' would be placed between 'Aeal' and 'Afal' in this example. What am I doing wrong? Can the sorting rules not be overwriten like that? Do I even need a custom file for this or are there already native modules that do this kind of sorting?
sorting xindy
So I am trying the change the way xindy is sorting umlauts in an index file by prescribing custom sort-rules.
This is the myfile.xdy that I use:
(require "lang/german/duden-utf8-lang.xdy")
(sort-rule "Ä" "Ae")
(sort-rule "Ö" "Oe")
(sort-rule "Ü" "Ue")
(sort-rule "ä" "ae")
(sort-rule "ö" "oe")
(sort-rule "ü" "ue")
And here is a minimal example for a document:
documentclass{article}
usepackage{fontspec}
usepackage[ngerman]{babel}
usepackage[xindy, splitindex]{imakeidx}
defxindylangopt{-M lang/german/myfile}
makeindex[name=test, options=xindylangopt]
begin{document}
foo index[test]{Aal} index[test]{Aeal} index[test]{Äal} index[test]{Abal} index[test]{Afal}
index[test]{Ual} index[test]{Ueal} index[test]{Üal} index[test]{Ubal} index[test]{Ufal}
index[test]{Oal} index[test]{Oeal} index[test]{Öal} index[test]{Obal} index[test]{Ofal}
printindex[test]
end{document}
This is what the output looks like:

But this is still the original sorting where the umlauts are treated as if they were their respective vocal, i.e. 'Ä' is treated as 'A' and so on. What I would like is that they are treated as their respective vocal followed by the letter 'e', i.e. 'Äal' would be placed between 'Aeal' and 'Afal' in this example. What am I doing wrong? Can the sorting rules not be overwriten like that? Do I even need a custom file for this or are there already native modules that do this kind of sorting?
sorting xindy
sorting xindy
asked Mar 2 at 22:19
mapfmapf
113
113
Welcome to TeX.SE!
– Kurt
Mar 2 at 22:25
In your case(require "lang/german/din5007-utf8-lang.xdy")should be sufficient. Unfortunately,xindyreplaces readable letters by some opaque bytes for sorting (you can see it in anylang/german/*-utf8.xdy), so altering sorting rules by a user becomes complicated.
– Sergei Golovan
Mar 3 at 7:49
Amazing, this seems to do the trick! I see, I already looked at some of the standard modules and was very confused by all these weird symbols and prefixes. I wonder why they do it that way. Xindy syntax seems rather outdated.
– mapf
Mar 3 at 8:46
add a comment |
Welcome to TeX.SE!
– Kurt
Mar 2 at 22:25
In your case(require "lang/german/din5007-utf8-lang.xdy")should be sufficient. Unfortunately,xindyreplaces readable letters by some opaque bytes for sorting (you can see it in anylang/german/*-utf8.xdy), so altering sorting rules by a user becomes complicated.
– Sergei Golovan
Mar 3 at 7:49
Amazing, this seems to do the trick! I see, I already looked at some of the standard modules and was very confused by all these weird symbols and prefixes. I wonder why they do it that way. Xindy syntax seems rather outdated.
– mapf
Mar 3 at 8:46
Welcome to TeX.SE!
– Kurt
Mar 2 at 22:25
Welcome to TeX.SE!
– Kurt
Mar 2 at 22:25
In your case
(require "lang/german/din5007-utf8-lang.xdy") should be sufficient. Unfortunately, xindy replaces readable letters by some opaque bytes for sorting (you can see it in any lang/german/*-utf8.xdy), so altering sorting rules by a user becomes complicated.– Sergei Golovan
Mar 3 at 7:49
In your case
(require "lang/german/din5007-utf8-lang.xdy") should be sufficient. Unfortunately, xindy replaces readable letters by some opaque bytes for sorting (you can see it in any lang/german/*-utf8.xdy), so altering sorting rules by a user becomes complicated.– Sergei Golovan
Mar 3 at 7:49
Amazing, this seems to do the trick! I see, I already looked at some of the standard modules and was very confused by all these weird symbols and prefixes. I wonder why they do it that way. Xindy syntax seems rather outdated.
– mapf
Mar 3 at 8:46
Amazing, this seems to do the trick! I see, I already looked at some of the standard modules and was very confused by all these weird symbols and prefixes. I wonder why they do it that way. Xindy syntax seems rather outdated.
– mapf
Mar 3 at 8:46
add a comment |
1 Answer
1
active
oldest
votes
Thanks to @Sergei Golovan, a solution was found. It appears to be sufficient to use the din5007-utf8-lang.xdy-module instead of the duden-utf8-lang.xdy-module as a basis, since the din5007-utf8-lang.xdy-module already sorts the umlauts the way that I was trying to achive. So in case other changes should still be applied to the sorting, the required module needs to be adjusted.
myfile.xdy:
(require "lang/german/din5007-utf8-lang.xdy")
some other custom sort-rules
If no other changes to the sorting need to be applied, it is sufficient to change the xindy language options in the document like so:
defxindylangopt{-M lang/german/din5007-utf8-lang}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477486%2fxindy-seems-to-ignore-sort-rules-in-custom-xdy-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks to @Sergei Golovan, a solution was found. It appears to be sufficient to use the din5007-utf8-lang.xdy-module instead of the duden-utf8-lang.xdy-module as a basis, since the din5007-utf8-lang.xdy-module already sorts the umlauts the way that I was trying to achive. So in case other changes should still be applied to the sorting, the required module needs to be adjusted.
myfile.xdy:
(require "lang/german/din5007-utf8-lang.xdy")
some other custom sort-rules
If no other changes to the sorting need to be applied, it is sufficient to change the xindy language options in the document like so:
defxindylangopt{-M lang/german/din5007-utf8-lang}
add a comment |
Thanks to @Sergei Golovan, a solution was found. It appears to be sufficient to use the din5007-utf8-lang.xdy-module instead of the duden-utf8-lang.xdy-module as a basis, since the din5007-utf8-lang.xdy-module already sorts the umlauts the way that I was trying to achive. So in case other changes should still be applied to the sorting, the required module needs to be adjusted.
myfile.xdy:
(require "lang/german/din5007-utf8-lang.xdy")
some other custom sort-rules
If no other changes to the sorting need to be applied, it is sufficient to change the xindy language options in the document like so:
defxindylangopt{-M lang/german/din5007-utf8-lang}
add a comment |
Thanks to @Sergei Golovan, a solution was found. It appears to be sufficient to use the din5007-utf8-lang.xdy-module instead of the duden-utf8-lang.xdy-module as a basis, since the din5007-utf8-lang.xdy-module already sorts the umlauts the way that I was trying to achive. So in case other changes should still be applied to the sorting, the required module needs to be adjusted.
myfile.xdy:
(require "lang/german/din5007-utf8-lang.xdy")
some other custom sort-rules
If no other changes to the sorting need to be applied, it is sufficient to change the xindy language options in the document like so:
defxindylangopt{-M lang/german/din5007-utf8-lang}
Thanks to @Sergei Golovan, a solution was found. It appears to be sufficient to use the din5007-utf8-lang.xdy-module instead of the duden-utf8-lang.xdy-module as a basis, since the din5007-utf8-lang.xdy-module already sorts the umlauts the way that I was trying to achive. So in case other changes should still be applied to the sorting, the required module needs to be adjusted.
myfile.xdy:
(require "lang/german/din5007-utf8-lang.xdy")
some other custom sort-rules
If no other changes to the sorting need to be applied, it is sufficient to change the xindy language options in the document like so:
defxindylangopt{-M lang/german/din5007-utf8-lang}
edited Mar 3 at 11:53
answered Mar 3 at 8:55
mapfmapf
113
113
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477486%2fxindy-seems-to-ignore-sort-rules-in-custom-xdy-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to TeX.SE!
– Kurt
Mar 2 at 22:25
In your case
(require "lang/german/din5007-utf8-lang.xdy")should be sufficient. Unfortunately,xindyreplaces readable letters by some opaque bytes for sorting (you can see it in anylang/german/*-utf8.xdy), so altering sorting rules by a user becomes complicated.– Sergei Golovan
Mar 3 at 7:49
Amazing, this seems to do the trick! I see, I already looked at some of the standard modules and was very confused by all these weird symbols and prefixes. I wonder why they do it that way. Xindy syntax seems rather outdated.
– mapf
Mar 3 at 8:46