GithubHelp home page GithubHelp logo

martinstefanik / latexeur Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 6.47 MB

Minimal Dockerized version of XeLaTeX for seamless compilation of TEX files with modern font technologies.

Dockerfile 100.00%

latexeur's Introduction

Latexeur

An easily customizable, minimal TeX Live image for building TEX files. As opposed to installing a full TeX Live installation that is too large for many purposes, the image is built from the minimal TeX Live installation with the addition of commonly used packages.

Building the image

The image can be built by executing the following command inside the project directory:

docker build --tag latexeur .

The image allows for configuring the CTAN mirror that should be used for the installation of TeX Live in case the default mirror is down or any other issue. This is done using the REPOSITORY build argument, which defaults to https://mirror.foobar.to/CTAN/systems/texlive/tlnet. The full list of CTAN mirrors can be found here.

Extensions

If the list of installed packages is not satisfactory for the user, it can be easily extended by adding more packages to packages.txt. Furthermore, your own custom classes, fonts, and packages can be easily added by placing the source files into the fonts, classes, and packages directories, respectively. Hidden files (dot files) in these directories are ignored.

For instance, one could build the application with Source Code Pro font by running:

wget https://www.fontsquirrel.com/fonts/download/source-code-pro.zip
unzip -d fonts source-code-pro.zip
docker build --tag latexeur

Quickstart

Given a LaTeX document trial.tex, one can compile it as follows:

docker run \
    --rm \
    --user $(id -u):$(id -g) \
    --volume "$(pwd):/app" \
    xelatex-docker latexmk -xelatex trial.tex

This will ensure that all files generated by latexmk persist on the host after the container is (automatically) removed as well as that these files are owned by the current user on the host.

Note also that the quotation marks in the argument passed to the --volume option above are needed in case the name of the current working directory (obtained by pwd) contains uppercase letters or spaces.

The above can also be easily wrapped into a command line application, if necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.