If all dependencies are installed and out-of-the-box configuration works, make all
should be sufficient to build both texpresso
and texpresso-tonic
in build/
directory.
TeXpresso is in an early stage of development and its configuration logic is a rough hand-made script. So far it has only been tested the following systems, where we expect it to work:
- OSX
- Fedora 39
- Arch Linux: a PKGBUILD is available in the AUR that builds from the latest Git HEAD on installation.
- Debian 12
- Ubuntu 22.04
On other systems you may observe build failures that require modifying the Makefile. Let us know if it works on a system not listed above, or if you can tweak the configuration/build code to support your system without breaking others.
Rerun make config
when you change the build environment, otherwise freshly installed libraries might not be considered by the build system.
(Tested with Ubuntu 22.04 ARM64 and Ubuntu 20.04)
Install all needed dependencies with:
apt install build-essential libsdl2-dev libmupdf-dev libmujs-dev libfreetype-dev libgumbo-dev libjbig2dec0-dev libjpeg-dev libopenjp2-7-dev cargo libssl-dev libfontconfig-dev libleptonica-dev libharfbuzz-dev
Details:
build-essential
install the compiler (GCC) and basic build tools (GNU Make)libsdl2-dev
: SDL2 librarylibmupdf-dev libmujs-dev libfreetype-dev libgumbo-dev libjbig2dec0-dev libjpeg-dev libopenjp2-7-dev
: libmupdf and its dependenciescargo libssl-dev libfontconfig-dev
: rust package manager, and dependencies needed by texpresso-tonic rust code
Debian 12 is quite similar to Ubuntu with the added difficulty that the rust version is too old for TeXpresso to build out of the box.
You can install the other dependencies:
sudo apt install build-essential libsdl2-dev libmupdf-dev libfreetype-dev libjpeg-dev libjbig2dec0-dev libharfbuzz-dev libopenjp2-7-dev libgumbo-dev libmujs-dev libssl-dev libfontconfig-dev
A workaround for rust is to install rustup. Make sure that curl is installed and setup rustup:
sudo apt install curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
After rustup is installed, source the environment before building. E.g:
source $HOME/.cargo/env
Dependencies are listed in the PKGBUILD, but if you need to install them manually:
pacman -S base-devel fontconfig freetype2 gcc-libs glibc graphite gumbo-parser harfbuzz icu jbig2dec libjpeg-turbo libmupdf libpng openjpeg2 openssl sdl2 zlib cargo git libmupdf
(Tested on Fedora 38 ARM64)
Install all dependencies:
sudo dnf install make gcc mupdf-devel SDL2-devel g++ freetype2-devel libjpeg-turbo-devel jbig2dec-devel openjpeg2-devel gumbo-parser-devel tesseract-devel leptonica-devel cargo openssl-devel fontconfig-devel
(Tested on Ventura Intel and Sonoma Apple Sillicon)
Install the following dependencies with homebrew:
brew install rust mupdf-tools SDL2
Note: mupdf-tools
can be replaced by mupdf
, either is fine.
Simply clone the git repository (and its submodules) using one of the following commands:
git clone --recurse-submodules https://github.com/let-def/texpresso.git # cloning by HTTP
git clone --recurse-submodules [email protected]:let-def/texpresso.git # cloning by SSH
(You may want to adjust the URL if you are looking at a different fork.)
Note that while TeXpresso itself (the driver/viewer program) is small (less than 2MiB of sources, about 40MiB once built), the tectonic
LaTeX engine that we include as a submodule is large -- 120MiB of sources, most of it from its harfbuzz
dependency, and about 1.2GiB once built.
First make sure the dependencies are available: pkg-config
, SDL2
, mupdf
(and its own dependencies: libjpeg
, libpng
, freetype2
, gumbo
, jbig2dec
... and possibly leptonica
, tesseract
and mujs
depending on the mupdf version).
Under macOS, brew
is also used to find local files.
If it succeeds, make texpresso
produces build/texpresso
.
Other targets are:
config
to generate configuration inMakefile.config
(automatically called during first build)dev
producesbuild/texpresso-dev
which supports hot-reloading to ease developmentdebug
produces debugging tools inbuild/
clean
to remove intermediate build filesdistclean
to remove all build files (build/
andMakefile.config
)
If the build fails, try tweaking the configuration flags in Makefile.config
.
First you need an environment that is able to build Tectonic: a functional rust and cargo installation, etc. Check tectonic documentation.
Then make sure that the git submodule has been initialized (in the tectonic
directory):
git submodule update --init --recursive
Then make texpresso-tonic
should work.
If both commands built successfully, you can try TeXpresso using:
build/texpresso test/simple.tex
This is just a minimal test to make sure that TeXpresso is installed correctly. If TeXpresso window does not display the document, please report an issue.
README.md has information on supported editors and how to control the TeXpresso viewer.