Skip to content
Martin Baláž edited this page Oct 3, 2023 · 7 revisions

Installation of DeGeŠ is currently not very well supported, as there are multiple dependencies that are not very easy to obtain and build. It has been done before though, and if you are feeling particularly brave, you are welcome to try it as well. There is a GitHub action that successfully creates the environment on GitHub server and runs the tests successfully. It has been tested on both Ubuntu and Debian 11.

This guide assumes

  • a working Linux installation
  • some basic understanding of installing apt packages

Generic system-level packages

First of all you need full installations of XeLaTeX and pandoc. This is not negotiable.

sudo apt update
sudo apt install -y pandoc texlive-full texlive-fonts-extra librsvg2-bin lcdf-typetools

Package librsvg2-bin is used for converting SVG pictures to PDF and PNG.

Python

Python is used throughout the document generation process. We highly recommend using pipenv to manage your virtual environment. First update your pip:

python -m pip install --upgrade pip

Then create the virtual environment using the bundled Pipfile:

pipenv install

Pandoc-crossref

This pandoc filter is used to cross-reference equations and pictures in the documents. To install the supported version, run

wget https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.6.4/pandoc-crossref-Linux-2.9.2.1.tar.xz
tar -xf pandoc-crossref-Linux-2.9.2.1.tar.xz
mv ./pandoc-crossref "/usr/local/bin/pandoc-crossref"

With newer pandoc versions you might need to use a different version. Check the version of your pandoc and pandoc-types, then find an appropriate version in the releases page.

MinionPro fonts (optional but highly recommended)

While DeGeŠ can work with the default Minion Pro installation, it is highly recommended to build the fonts yourself. This greatly improves the appearance of math in PDF.

git clone https://github.com/sebschub/FontPro assets/fonts/FontPro
cd assets/fonts/FontPro
mkdir otf
cp ../../fonts/MinionPro/*.otf otf/
./scripts/makeall MinionPro
yes | sudo ./scripts/install
yes | updmap-user --enable Map=MinionPro.map

Note that this step might take a long time (30 minutes or even more). There are lots of files to be built.

DeGeŠ root class

Now you may want to install the root document class of DeGeŠ to your local TeX, so that you may use \documentclass{dgs}.

DIR=$(dirname $0)
TEXHOME=`kpsewhich -var-value=TEXMFHOME`
mkdir -p $TEXHOME/tex/latex/
ln -s $PWD/core/tex/dgs.cls $TEXHOME/tex/latex/dgs.cls

Testing the installation

Now you should verify the installation by running flake8 and bundled tests. If anything fails, this is most likely a problem on my part.

pipenv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pipenv run python -m pytest

Building something

Try to build something. If you have checked out the submodules and have the correct rights, there should be something in source/seminar/test. Run

`make output/seminar/testing/01/1/1/problems.pdf`

to see if something happens. If there is a deluge of colourful messages and you can open output/seminar/testing/01/1/1/problems.pdf, then it is working.