summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/strc-syn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/strc-syn.lua')
-rw-r--r--tex/context/base/mkiv/strc-syn.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/strc-syn.lua b/tex/context/base/mkiv/strc-syn.lua
index c0ebb556c..6b50da4ac 100644
--- a/tex/context/base/mkiv/strc-syn.lua
+++ b/tex/context/base/mkiv/strc-syn.lua
@@ -193,9 +193,12 @@ function synonyms.prepare(data)
local entry = result[i]
local definition = entry.definition
if definition then
- local tag = definition.tag
- local key = tag ~= "" and tag or definition.synonym
- entry.split = splitter(strip(key))
+ local srt = definition.sortkey or ""
+ local tag = definition.tag or ""
+ local key = (srt ~= "" and srt) or (tag ~= "" and tag) or definition.synonym
+ if key then
+ entry.split = splitter(strip(key))
+ end
end
end
end
@@ -310,6 +313,7 @@ implement {
{ "tag" },
{ "synonym" },
{ "meaning" },
+ { "sortkey" },
{ "used", "boolean" }
}
}