Directory macros/luatex/generic/unibidi-lua
The unibidi-lua Package
unibidi-lua version 1.0, 2026-05-19
Description
The unibidi-lua Lua module is an implementation of the Unicode Bidirectional Algorithm, based on the ConTeXt project's implementation for various LuaTeX formats, and plain lua.
Conformance
The unibidi-lua package aims to fully conform to the Unicode Bidirectional Algorithm (Unicode Standard Annex #9). It is tested against the official Unicode conformance test files BidiTest.txt and BidiCharacterTest.txt.
At the time of this writing, Unicode 17.0 was the latest version, and all the tests pass.
Maintenance
This package is currently maintained at https://codeberg.org/polyglossia/unibidi-lua.
Issues can be reported at the issue tracker.
Testing
Testing can be done with l3build check. Note that you need the files BidiCharacterTest.txt and BidiTest.txt somewhere LuaTeX can find them. If you don't have them, you can run l3build getunicodetests to download them to "./testfiles/unicode/support". If you wish you can also ignore these tests by passing the -c flag to l3build check.
Updating the Data File
To update "unibidi-lua-data.lua", run l3build gendata, this will parse the files BidiMirroring.txt, BidiBrackets.txt, and DerivedBidiClass.txt. Usually they exist in a TeX installation (in the unicode-data package), but if they are not they will be downloaded temporarily.
Documentation
To print the documentation run optex -jobname unibidi-lua-doc '\docgen unibidi-lua'
Installation
To install for the use of LuaTeX, you can either run l3build install, put the files "unibidi-lua.lua", "unibidi-lua-data.lua", "unibidi-lua-interface.lua", "unibidi-lua.tex", "unibidi-lua.opm" and "unibidi-lua.sty" in a place LuaTeX can find, or install with your TeX distribution.
For the use of plain lua, put the files "unibidi-lua.lua" and "unibidi-lua-data.lua" somewhere the lua interpreter can find it.
License
The unibidi-lua package, as a derived work of ConTeXt, is distributed under the GNU GPLv2 license:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
This license requires the license itself to be distributed with the work. For its full text see the file COPYING.
Parts of unibidi-lua.lua are © PRAGMA ADE / ConTeXt Development Team.
DISCLAIMER
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Download the contents of this package in one zip archive (77.8k).
unibidi-lua – Unicode bidi algorithm implementation for various LuaTeX formats
This Lua module is an implementation of the Unicode Bidirectional Algorithm, based on the ConTeXt project's implementation, adapted for use in various LuaTeX formats. The core Lua module also works with texlua and plain Lua.
| Package | unibidi-lua |
| Support | https://codeberg.org/polyglossia/unibidi-lua/issues |
| Bug tracker | https://codeberg.org/polyglossia/unibidi-lua/issues |
| Repository | https://codeberg.org/polyglossia/unibidi-lua |
| Version | 1.0 2026-05-19 |
| Licenses | GNU General Public License, version 2 |
| Maintainer | Udi Fogiel |
| Contained in | TeX Live as unibidi-lua MiKTeX as unibidi-lua |
| Topics | Unicode Bidirectional LuaTeX |