Skip to content

Latest commit

 

History

History
142 lines (92 loc) · 5.36 KB

INSTALL.md

File metadata and controls

142 lines (92 loc) · 5.36 KB

Building and installing TeXpresso

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.

Supported systems

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:

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.

Ubuntu

(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 library
  • libmupdf-dev libmujs-dev libfreetype-dev libgumbo-dev libjbig2dec0-dev libjpeg-dev libopenjp2-7-dev: libmupdf and its dependencies
  • cargo libssl-dev libfontconfig-dev: rust package manager, and dependencies needed by texpresso-tonic rust code

Debian 12

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

Arch Linux (and Manjaro)

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

Fedora

(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

OSX

(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.

Download

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.

Build TeXpresso

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 in Makefile.config (automatically called during first build)
  • dev produces build/texpresso-dev which supports hot-reloading to ease development
  • debug produces debugging tools in build/
  • clean to remove intermediate build files
  • distclean to remove all build files (build/ and Makefile.config)

If the build fails, try tweaking the configuration flags in Makefile.config.

Build TeXpresso-tonic (Tectonic)

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.

Testing TeXpresso

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.

Using TeXpresso

README.md has information on supported editors and how to control the TeXpresso viewer.