{"id":19167662,"url":"https://github.com/thomasweise/docker-texlive","last_synced_at":"2025-05-07T13:42:49.170Z","repository":{"id":90948213,"uuid":"59161747","full_name":"thomasWeise/docker-texlive","owner":"thomasWeise","description":"A docker container containing an installation of texlive as well as several useful scripts.","archived":false,"fork":false,"pushed_at":"2023-04-04T06:13:36.000Z","size":57,"stargazers_count":60,"open_issues_count":2,"forks_count":16,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T10:42:21.319Z","etag":null,"topics":["bibtex","docker","font","latex","pdf","pdflatex","texlive","xelatex"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasWeise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-19T00:49:12.000Z","updated_at":"2025-03-21T16:42:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"e56e9861-a7a2-4f82-9b02-0053f72e932a","html_url":"https://github.com/thomasWeise/docker-texlive","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Fdocker-texlive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Fdocker-texlive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Fdocker-texlive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Fdocker-texlive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasWeise","download_url":"https://codeload.github.com/thomasWeise/docker-texlive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830834,"owners_count":21331355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bibtex","docker","font","latex","pdf","pdflatex","texlive","xelatex"],"created_at":"2024-11-09T09:38:48.881Z","updated_at":"2025-04-19T23:31:00.365Z","avatar_url":"https://github.com/thomasWeise.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [thomasWeise/texlive](http://hub.docker.com/r/thomasweise/texlive/)\n\n[![Image Layers and Size](http://imagelayers.io/badge/thomasweise/texlive:latest.svg)](http://imagelayers.io/?images=thomasweise%2Ftexlive:latest)\n[![Docker Pulls](http://img.shields.io/docker/pulls/thomasweise/texlive.svg)](http://hub.docker.com/r/thomasweise/texlive/)\n[![Docker Stars](http://img.shields.io/docker/stars/thomasweise/texlive.svg)](http://hub.docker.com/r/thomasweise/texlive/)\n\n**This is a major overhaul of the [`thomasWeise/texlive`](http://hub.docker.com/r/thomasweise/texlive/) image.\nIt is now based [`thomasweise/docker-pandoc`](http://hub.docker.com/r/thomasweise/docker-pandoc/), which, in turn, is based on [`thomasweise/docker-texlive-full`](http://hub.docker.com/r/thomasweise/docker-texlive-full/). This means it got bigger, but it now features the newest release of `pandoc`, [`TeX Live`](http://en.wikipedia.org/wiki/TeX_Live), and includes more pandoc filters than before. For the original version of the container, refer to tag [1.0.0](http://github.com/thomasWeise/docker-texlive/releases/tag/1.0.0).**\n\nThis is a Docker image containing a [`TeX Live`](http://en.wikipedia.org/wiki/TeX_Live) installation (version 2015.2016) with several support \u003ca href=\"#user-content-3-scripts\"\u003escripts\u003c/a\u003e for easing the compilation of [LaTeX](http://en.wikipedia.org/wiki/LaTeX) files to [PDF](http://en.wikipedia.org/wiki/Portable_Document_Format). The goal is to provide a unified environment for compiling LaTeX documents with predictable and reproducible behavior, while decreasing the effort needed to install and maintain the LaTeX installation. This image is designed to be especially suitable for a Chinese audience and comes with several pre-installed open Chinese fonts.\n\n## 0. Installing Docker\n\nDocker can be installed following the guidelines below:\n\n* for [Linux](http://docs.docker.com/linux/step_one/), you can run  `curl -fsSL http://get.docker.com/ | sh` on your command line and everything is done automatically (if you have `curl` installed, which is normally the case),\n* for [Windows](http://docs.docker.com/windows/step_one/)\n* for [Mac OS](http://docs.docker.com/mac/step_one/)\n\n## 1. Usage\n\nBelow, we discuss the various parameters that you can pass to this image when running it. If you have installed Docker, you do not need to perform any additional installations: The first time you do `docker run -t -i thomasweise/texlive` or something like that (see below), the image will automatically be downloaded and installed from [docker hub](http://hub.docker.com/).\n\nThere are two basic use cases of this image:\n\n1. Execution of a single command or script\n2. Providing a shell where you can use all the standard LaTeX commands and our helper scripts \n\nAdditionally, there are two ways to provide data to the container:\n\n1. Mounting the folder where the LaTeX document you want to compile is located: This step is necessary..\n2. Mounting a folder with additional fonts needed for compiling your document: This is optional.\n\nThe common form of the command is as follows:\n\n    docker run -v /my/path/to/document/:/doc/ -v /path/to/fonts/:/usr/share/fonts/external/ -t -i thomasweise/texlive COMMAND ARG1 ARG2...\n    \nWhere\n\n* `/my/path/to/document/` must be replaced with the path to the folder containing the LaTeX document that you want to compile. This folder will be made available as folder `/doc/` inside the container. If you use the image without command parameters (see below), you will get a bash command prompt inside this `/doc/` folder.\n* Sometimes you may need additional fonts to compile your LaTeX document. An example for this situation is if you use something like the [USTC thesis template](http://github.com/ustctug/ustcthesis), which needs fonts such as SimHei from Windows, which are not available under Linux. In this case, you can use the *optional* `-v /path/to/fonts/:/usr/share/fonts/external/` parameter. Here, `/path/to/fonts/` must be replaced with a path to a folder containing these fonts. If you do not need additional fonts, you can leave the whole `-v /path/to/fonts/:/usr/share/fonts/external/` away.\n* *Optinally* you can also provide a single command that should be executed when the container starts (along with its arguments). This is what the `COMMAND ARG1 ARG2...` in the above command line stand for. If you specify such a command, the container will start up, execute the command, and then shut down. If you do not provide such a command, the container will start up and provide you a bash prompt in folder `/doc/`.\n\nFor compiling some document named `myDocument.tex` in folder `/my/path/to/document/` with `xelatex.sh` and using additional fonts in folder `/path/to/fonts/`, you would type something like the command below into a normal terminal (Linux), the *Docker Quickstart Terminal* (Mac OS), or the *Docker Toolbox Terminal* (Windows):\n\n    docker run -v /my/path/to/document/:/doc/ -v /path/to/fonts/:/usr/share/fonts/external/ -t -i thomasweise/texlive\n    xelatex.sh myDocument\n    exit\n    \nAlternatively, you could also do\n\n    docker run -v /my/path/to/document/:/doc/ -v /path/to/fonts/:/usr/share/fonts/external/ -t -i thomasweise/texlive xelatex.sh myDocument\n    \nThe first version starts the container and leaves you at the command prompt. You can now compile your document using our `xelatex.sh` helper script, then you `exit` the container. In the second version, you directly provide the command to the container. The container executes it and then directly exits.\n  \nBoth should leave the compiled PDF file in folder `/my/path/to/document/`. If you are not using my pre-defined scripts for building (see below under point 3.1), I recommend doing `chmod 777 myDocument.pdf` after the compilation, to ensure that the produced document can be accessed inside your real (host) system's user, and not just from the Docker container. If you directly provide a single command for execution, the container attempts to heuristically find your produced `pdf` and to set its permissions correctly. \n\nThe `-v sourcepath:destpath` options are optional. They allow you to \"mount\" a folder (`sourcepath`) from your local system into the Docker container, where it becomes available as path `destpath`. We can use this method to allow the LaTeX compiler running inside the container to work on your LaTeX documents by mounting their folder into a folder named `/doc/`, for instance. But we can also mount an external folder with fonts into the Linux font directory structure. For this purpose, please always mount your local font directory into `/usr/share/fonts/external/`. \n\nIf you just want to use (or snoop around in) the image without mounting external folders, you can run this image by using:\n\n    docker run -t -i thomasweise/texlive\n\nAnother example for the use of the syntax for directly passing in a single command for execution is compiling a thesis based on the [USTC thesis template](http://github.com/ustctug/ustcthesis). Such documents can be compiled using `make`, so you could do something like\n\n    docker run -v /path/to/my/thesis/:/doc/ -v /path/to/fonts/:/usr/share/fonts/external/ -t -i thomasweise/texlive make\n\n## 2. Building and Components\n\nThe image has the following components:\n\n- [`TeX Live`](http://www.tug.org/texlive/) version 2015.2016\n- [`ghostscript`](http://ghostscript.com/) version 9.18\n\nYou can build it with\n\n    docker build -t thomasweise/texlive .\n\n## 3. Scripts\n\nWe provide a set of scripts (in `/bin/`) that can be used for compiling LaTeX documents:\n\n### 3.1. Compiler Scripts\n\nUsually, LaTeX compilation means to call the LaTeX compiler program, then BibTeX, then the compiler again, and then some conversion program from the respective compiler output format to PDF. With the compiler scripts, we try to condense these calls into a single program invocation.\n\n- `latex.sh \u003cdocument\u003e` compile the LaTeX `\u003cdocument\u003e` with [LaTeX](http://en.wikipedia.org/wiki/LaTeX) (also do [BibTeX](http://en.wikipedia.org/wiki/BibTeX))\n- `lualatex.sh \u003cdocument\u003e` compile the LaTeX `\u003cdocument\u003e` with [LuaLaTeX](http://en.wikipedia.org/wiki/LuaTeX) (also do [BibTeX](http://en.wikipedia.org/wiki/BibTeX))\n- `pdflatex.sh \u003cdocument\u003e` compile the LaTeX `\u003cdocument\u003e` with [PdfLaTeX](http://en.wikipedia.org/wiki/pdfTeX) (also do [BibTeX](http://en.wikipedia.org/wiki/BibTeX))\n- `xelatex.sh \u003cdocument\u003e` compile the LaTeX `\u003cdocument\u003e` with [XeLaTeX](http://en.wikipedia.org/wiki/XeLaTeX) (also do [BibTeX](http://en.wikipedia.org/wiki/BibTeX))\n- `mintex.sh \u003cdocument\u003e \u003ccompiler1\u003e \u003ccompiler2\u003e ...` allows you to invoke an arbitrary selection of the above compiler scripts to produce the smallest `pdf`. Doing `mintex.sh mydoc latex lualatex xelatex`, for instance, will compile `mydoc.tex` with `latex.sh`, `lualatex.sh`, and `xelatex.sh` and keep the smallest resulting `pdf` file.\n\n### 3.2. Utility Scripts\n\nWe also provide some utility scripts for working with `PDF`, `PS`, and `EPS` files.\n\n- `eps2pdf.sh \u003cdocument\u003e` convert the `EPS` file `\u003cdocument\u003e` to `PDF`\n- `filterPdf.sh \u003cdocument\u003e` transform a document (either in [PostScript](http://en.wikipedia.org/wiki/PostScript)/`PS`, `EPS`, or `PDF` format) to `PDF` and include as many of the fonts used inside the document into the final `PDF`. This allows to produce a `PDF` from a `.ps` file `\u003cdocument\u003e` which should display correctly on as many computers as possible.\n- `sudo` is a pseudo-`sudo` command: Inside a Docker container, we don't need `sudo`. However, if you have a script or something that calls plain `sudo` (without additional arguments) just with a to-be-sudoed command, this script will emulate a `sudo`. By doing nothing.\n- `downscalePdf.sh \u003cdocument\u003e {resolution}` makes a pdf document smaller by downscaling all included images (to the specified resolution).\n- `findNonASCIIChars.sh \u003cdocument\u003e` finds non-ASCII characters in a document. In `.tex` documents, such characters may pose problems.\n\n## 4. License\n\nThis image is licensed under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007, which you can find in file [LICENSE.md](http://github.com/thomasWeise/docker-texlive/blob/master/LICENSE.md). The license applies to the way the image is built, while the software components inside the image are under the respective licenses chosen by their respective copyright holders.\n\n## 5. Contact\n\nIf you have any questions or suggestions, please contact [Thomas Weise](mailto:tweise@hfuu.edu.cn) of the [Institute of Applied Optimization](http://iao.hfuu.edu.cn) of [Hefei University](http://www.hfuu.edu.cn) in Hefei, Anhui, China.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasweise%2Fdocker-texlive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasweise%2Fdocker-texlive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasweise%2Fdocker-texlive/lists"}