Skip to main content

The PreTeXt Guide

Appendix G LibLouis

liblouis
 1 
liblouis.io
is an open-source library for low-level translation of phrases into braille, supporting many, many languages. We rely on Python bindings for this library to translate all of the literary text (non-math) to braille for a document, so this is an essential piece of the pipeline. Once installed, its use is transparent. This appendix contains some brief notes to help with installation, current as of 2023-06-09, and for Ubuntu Linux 22.04. Contributions of adjustments for other operating systems welcome.
  • Download the liblouis-X.YY.0.tar.gz archive from the downloads page
     2 
    liblouis.io/downloads
    . Releases are tracked at the GitHub release page
     3 
    github.com/liblouis/liblouis/releases
    . The liblouisutdml package is not necessary.
  • tar -xvf liblouis-X.YY.0.tar.gz into a scratch directory like /tmp.
  • Switch to being root (sudo) and cd into the directory created by the extraction.
  • In your terminal run
    # ./configure --enable-ucs4
    # make
    # make install
    
    The “ucs4” flag enables 32-bit Unicode support, which is necessary for running tests later.
  • Read /tmp/liblouis-X.YY.0/python/README.md and perform two steps, still as root, from within the directory structure in /tmp: install the bindings into your Python distribution and run the Python tests.
  • I do not do anything special to clean-up afterwards, and of course, my /tmp goes away on the next reboot. I also do not do anything special when installing the next version, I just follow the same procedure as a fresh install.