latex-service

Flask-based webserver: compiles LaTeX code and returns a PDF file.

https://github.com/centrefordigitalhumanities/latex-service

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Flask-based webserver: compiles LaTeX code and returns a PDF file.

Basic Info
  • Host: GitHub
  • Owner: CentreForDigitalHumanities
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: develop
  • Homepage:
  • Size: 14.6 KB
Statistics
  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Created almost 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

DOI License

LaTeX Service

LaTeX Service contains everything needed to create a small containerised Flask server with a latexmk and texlive installation. It is used in combination with Spindle Server as a dependency of ParsePort.

Contents

This repository uses texlive-latex-extra, which includes an extensive set of additional packages needed for the ParsePort. There are, however, several other texlive packages out there. (An overview and discussion can be found here.) These packages vary greatly in size and a choice for one or another could drastically impact the size of the image.

Prerequisites

A host machine with Docker installed.

Usage

  1. Build an image with docker build -t latex-service:latest .

  2. Run a container and expose a port with docker run -d -p 32769:5000 --name latex-service latex-service

  3. Send a request with a .tex string as its body to 5000.

  4. The response should contain the PDF in byte string format.

Clean up

The LaTeX compiler creates auxiliary files with a uniquely created ID in the name, which are not automatically removed. For production use, it is recommended that you periodically clean up these files. You can do this by running docker exec -it latex-service /bin/bash and then running latexmk -C (for the auxiliary files) followed by rm *.tex for the source files. If you have cron on the server, you may want to add the job in Crontab, which performs this cleanup once a day. Make sure to change the name of the container name in the command above if it is named differently on your system.

Licence

LaTeX Service is shared under a BSD 3-Clause licence. See LICENSE for more information.

Citation

If you wish to cite this repository, please use the metadata provided in our CITATION.cff file.

Contact

For questions, small feature suggestions, and bug reports, feel free to create an issue. If you do not have a Github account, you can also contact the Centre for Digital Humanities.

Owner

  • Name: Centre for Digital Humanities
  • Login: CentreForDigitalHumanities
  • Kind: organization
  • Email: cdh@uu.nl
  • Location: Netherlands

Interdisciplinary centre for research and education in computational and data-driven methods in the humanities.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: LaTeX Service
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Konstantinos
    family-names: Kogkalidis
    email: kokos.kogkalidis@aalto.fi
    orcid: 'https://orcid.org/0009-0008-1535-9717'
  - given-names: Michael
    family-names: Moortgat
    email: m.j.moortgat@uu.nl
    affiliation: Utrecht University Institute for Language Sciences
    orcid: 'https://orcid.org/0000-0003-3568-9920'
  - given-names: Ben
    family-names: Bonfil
    email: b.bonfil@uu.nl
    affiliation: Utrecht University Centre for Digital Humanities
  - given-names: Alexander
    family-names: Vertegaal
    email: a.j.j.vertegaal@uu.nl
    affiliation: Utrecht University Centre for Digital Humanities
    orcid: 'https://orcid.org/0000-0002-5182-6801'
  - given-names: Tijmen C.
    family-names: Baarda
    email: t.c.baarda@uu.nl
    affiliation: Utrecht University Centre for Digital Humanities
    orcid: 'https://orcid.org/0000-0002-2577-4948'
identifiers:
  - type: doi
    value: 10.5281/zenodo.10571417
repository-code: 'https://github.com/UUDigitalHumanitieslab/latex-service'
abstract: >-
  Flask-based webserver: compiles LaTeX code and returns a
  PDF file.
keywords:
  - latex
  - pdf generation
license: BSD-3-Clause
commit: f70694d4d965cbfb1c974900c62abd42d926beb7
version: 0.3.0
date-released: '2025-05-01'

GitHub Events

Total
  • Release event: 1
  • Member event: 1
  • Push event: 3
  • Create event: 1
Last Year
  • Release event: 1
  • Member event: 1
  • Push event: 3
  • Create event: 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 14 days
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • XanderVertegaal (3)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

Dockerfile docker
  • python 3.10.12-bookworm build
requirements.txt pypi
  • flask ==2.3.2