Awesome
Tralics
Tralics is a LaTeX-to-XML translator developed by Inria. This is a fork of Tralics used by Softcover.
Installation
The Softcover ebook production system is distributed via the Ruby gems softcover
and polytexnic
, the latter of which uses Tralics to convert LaTeX to XML (and thence to HTML). The polytexnic
gem ships with precompiled Tralics binaries for OS X and select Linux distributions, so that polytexnic
Just Works™ on most systems, but if your system is not among those supported natively you'll have to compile a version of Tralics yourself. This involves cloning the tralics
repository, running make
, and placing the resulting excutable on the path:
$ git clone https://github.com/softcover/tralics
$ cd tralics/src
$ make
$ cp tralics /usr/local/bin
In the last step, in place of /usr/local/bin
, you can choose any directory on your path. Depending on your system's permissions, you might also have to run sudo
:
$ sudo cp tralics /usr/local/bin
To get make
to execute, you may have to edit the Makefile and customize the CXX
variable. For example, on OS X Mavericks I had to set
CXX=g++ -stdlib=libstdc++
The polytexnic
gem comes with precompiled binaries for OS X, though, so editing the Makefile will not usually be necessary. In particular, it's likely that the current Makefile works fine on most other Unix variants (confirmed for Ubuntu and Debian Linux, probable for *BSD).
Contributing a binary
Ideally, we would like the polytexnic
gem to support as many systems as possible without separate compilation steps. If you needed to compile your own binary and would like to contribute it back to the project, please send an email to michael@softcover.io with the tralics
binary attached and with the result of running the following command:
$ ruby -e 'puts RUBY_PLATFORM'