summaryrefslogtreecommitdiff
path: root/support/lualibs/lua-uca/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'support/lualibs/lua-uca/README.md')
-rw-r--r--support/lualibs/lua-uca/README.md38
1 files changed, 12 insertions, 26 deletions
diff --git a/support/lualibs/lua-uca/README.md b/support/lualibs/lua-uca/README.md
index b3cef273ea..37343a83af 100644
--- a/support/lualibs/lua-uca/README.md
+++ b/support/lualibs/lua-uca/README.md
@@ -1,15 +1,9 @@
+\iffalse
# The `Lua-UCA` package
+\fi
This package adds support for the [Unicode collation algorithm](https://unicode.org/reports/tr10/) for Lua 5.3.
-## Install
-
-The package needs to download Unicode collation data and convert it to a Lua table. It depends on `wget` and `unzip` utitilities.
-
-To install the package in the local TEXMF tree, run:
-
- make
- make install
## Usage
@@ -43,18 +37,17 @@ The output:
> chochol
> jasan
-More samples of use can be found in the `spec` directory.
-`tools/indexing-sample.lua` is a simple indexing processor.
+More samples of the library usage can be found in the source repository of this package on [Github](https://github.com/michal-h21/lua-uca).
+% See `HACKING.md` file in the repo for more information.
## Use with Xindex processor
[Xindex](https://www.ctan.org/pkg/xindex) is flexible index processor written
-in Lua by Herbert Voß. It supports Lua configuration files, which enables use
-of Lua-UCA for sorting of the index entries, as shown in [this
-example](https://tex.stackexchange.com/a/524014/2891) for Norwegian text.
+in Lua by Herbert Voß. It has built-in `Lua-UCA` support starting with version
+`0.23`. The support can be requested using the `-u` option:
+
+ xindex -u -l no -c norsk filename.idx
-The `xindex` directory in the [source repository](https://github.com/michal-h21/lua-uca/tree/master/xindex) contains more advanced version of such configuration
-file together with several examples. Run `make xindex` command to compile them.
## Change sorting rules
@@ -90,7 +83,7 @@ It is also possible to expand a letter to multiple letters, like this example fo
tailoring "&Ö=Oe"
tailoring "&ö=oe"
-Some languages, like Norwegian sort uppercase letters before lowercase. This
+Some languages, like Norwegian, sort uppercase letters before lowercase. This
can be enabled using `collator_obj:uppercase_first()` function:
local tailoring = function(s) collator_obj:tailor_string(s) end
@@ -102,14 +95,8 @@ can be enabled using `collator_obj:uppercase_first()` function:
tailoring("&ǀ<æ<<<Æ<<ä<<<Ä<ø<<<Ø<<ö<<<Ö<<ő<<<Ő<å<<<Å<<<aa<<<Aa<<<AA")
tailoring("&oe<<œ<<<Œ")
-The `data/common/collation/` directory contains files from the `CLDR` project.
-They contain rules for many languages. The files needs to be normalized to the
-[NFC form](https://en.wikipedia.org/wiki/Unicode_equivalence), for example
-using:
-
- cat cs.xml | uconv -x any-nfc -o cs.xml
-
-The `uconv` utility is a part of the [ICU Project](http://userguide.icu-project.org/).
+% More information on a new language support is in the `HACKING.md`
+% document in the [`Lua-UCA` Github repo](https://github.com/michal-h21/lua-uca/blob/master/HACKING.md).
### Script reordering
@@ -117,7 +104,7 @@ Many languages sort different scripts after the script this language uses. As
Latin based scripts are sorted first, it is necessary to reorder scripts in
such cases.
-The `collator_obj:reorder` function takes table with scripts that need to be reorderd.
+The `collator_obj:reorder` function takes table with scripts that need to be reordered.
For example Cyrillic can be sorted before Latin using:
collator_obj:reorder {"cyrillic"}
@@ -132,6 +119,5 @@ will be sorted at the very end.
# What is missing
-- Tailorings for most languages.
- Algorithm for setting implicit sort weights of characters that are not explicitly listed in DUCET.
- Special handling of CJK scripts.