| 1 |
# The unibidi-lua Package |
| 2 |
unibidi-lua version 1.0, 2026-05-19 |
| 3 |
|
| 4 |
## Description |
| 5 |
The unibidi-lua Lua module is an implementation of the Unicode Bidirectional Algorithm, |
| 6 |
based on the ConTeXt project's implementation for various LuaTeX formats, and plain lua. |
| 7 |
|
| 8 |
## Conformance |
| 9 |
The unibidi-lua package aims to fully conform to the |
| 10 |
[Unicode Bidirectional Algorithm](https://www.unicode.org/reports/tr9/) |
| 11 |
(Unicode Standard Annex #9). It is tested against the official Unicode |
| 12 |
conformance test files |
| 13 |
[BidiTest.txt](https://www.unicode.org/Public/UCD/latest/ucd/BidiTest.txt) and |
| 14 |
[BidiCharacterTest.txt](https://www.unicode.org/Public/UCD/latest/ucd/BidiCharacterTest.txt). |
| 15 |
|
| 16 |
|
| 17 |
At the time of this writing, Unicode 17.0 was the latest version, and all the tests pass. |
| 18 |
|
| 19 |
## Maintenance |
| 20 |
This package is currently maintained at https://codeberg.org/polyglossia/unibidi-lua. |
| 21 |
|
| 22 |
Issues can be reported at the issue tracker. |
| 23 |
|
| 24 |
### Testing |
| 25 |
Testing can be done with `l3build check`. Note that you need the files |
| 26 |
[BidiCharacterTest.txt](https://www.unicode.org/Public/UCD/latest/ucd/BidiCharacterTest.txt) and |
| 27 |
[BidiTest.txt](https://www.unicode.org/Public/UCD/latest/ucd/BidiTest.txt) somewhere LuaTeX |
| 28 |
can find them. If you don't have them, you can run `l3build getunicodetests` to download them to |
| 29 |
"./testfiles/unicode/support". If you wish you can also ignore these tests by passing the -c flag |
| 30 |
to `l3build check`. |
| 31 |
|
| 32 |
### Updating the Data File |
| 33 |
To update "unibidi-lua-data.lua", run `l3build gendata`, this will parse |
| 34 |
the files [BidiMirroring.txt](https://www.unicode.org/Public/UCD/latest/ucd/BidiMirroring.txt), |
| 35 |
[BidiBrackets.txt](https://www.unicode.org/Public/UCD/latest/ucd/BidiBrackets.txt), and |
| 36 |
[DerivedBidiClass.txt](https://www.unicode.org/Public/UCD/latest/ucd/extracted/DerivedBidiClass.txt). |
| 37 |
Usually they exist in a TeX installation (in the unicode-data package), but |
| 38 |
if they are not they will be downloaded temporarily. |
| 39 |
|
| 40 |
## Documentation |
| 41 |
To print the documentation run `optex -jobname unibidi-lua-doc '\docgen unibidi-lua'` |
| 42 |
|
| 43 |
## Installation |
| 44 |
To install for the use of LuaTeX, you can either run `l3build install`, put the files |
| 45 |
"unibidi-lua.lua", "unibidi-lua-data.lua", "unibidi-lua-interface.lua", "unibidi-lua.tex", "unibidi-lua.opm" |
| 46 |
and "unibidi-lua.sty" in a place LuaTeX can find, or install with your TeX distribution. |
| 47 |
|
| 48 |
For the use of plain lua, put the files "unibidi-lua.lua" and "unibidi-lua-data.lua" |
| 49 |
somewhere the lua interpreter can find it. |
| 50 |
## License |
| 51 |
The unibidi-lua package, as a derived work of ConTeXt, is distributed under the GNU GPLv2 license: |
| 52 |
|
| 53 |
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
| 54 |
|
| 55 |
This license requires the license itself to be distributed with the work. |
| 56 |
For its full text see the file COPYING. |
| 57 |
|
| 58 |
Parts of unibidi-lua.lua are |
| 59 |
© PRAGMA ADE / ConTeXt Development Team. |
| 60 |
## DISCLAIMER |
| 61 |
|
| 62 |
This program is free software; you can redistribute it and/or |
| 63 |
modify it under the terms of the GNU General Public License |
| 64 |
as published by the Free Software Foundation; version 2. |
| 65 |
This program is distributed in the hope that it will be useful, |
| 66 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 67 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 68 |
GNU General Public License for more details. |