How to Install Baseprinter
Baseprinter is developed and tested to run locally on Linux, specifically Fedora. For Mac and Windows you should run Baseprinter via containers. Installing Baseprinter locally on distributions other than Fedora may require additional effort. Looking at the files used to create the Baseprinter container images may be helpful.
Consider the alternative of running Baseprinter via OCI/Docker container.
Basic Installation
The following common tools must be installed: git
, pip
and npm
.
Installing pandoc is required, with a minimum version of 3.1.6.2.
Baseprinter is a Python package and can be installed as a user-specific package using the following command:
python3 -m pip install --user baseprinter@git+https://gitlab.com/perm.pub/baseprinter.git
You also need to install the following NPM package:
npm install pandoc-katex-filter
PDF Support
The basic installation only provides HTML previews, which give you an idea of how the generated PDF will appear. To enable PDF support, you need to install two additional packages:
- WeasyPrint Installation.
- The
pdf
extra from thebaseprinter
package:
python3 -m pip install --user baseprinter[pdf]@git+https://gitlab.com/perm.pub/baseprinter.git
System Installation
If you prefer system-wide installations instead of user-specific ones, make the following replacements to the above instructions:
- Replace
python3 -m pip install --user ...
withsudo python3 -m pip install ...
. - Replace
npm install ...
withsudo npm install -g pandoc-katex-filter ...
.