Skip to main content

Lightweight web-based LaTeX editor powered by TeX Live

Project description

tinyleaf

中文版

Lightweight, zero-dependency web-based LaTeX editor. Powered by TeX Live Docker images.

Features

  • CLI-firstpip install tinyleaf && tinyleaf /path to start editing
  • Two modes — Single project or multi-project with registry (~/.config/tinyleaf/projects.json)
  • Two compilation backends — Local latexmk (default) or Docker
  • CodeMirror 6 editor with LaTeX syntax highlighting
  • PDF.js preview with live reload after compilation
  • SSE real-time compilation log streaming
  • Git integration — auto-detect .git, commit/push from UI
  • Zero Python dependencies — stdlib only (http.server + threading + subprocess)
  • 7 themes with dark/light toggle
  • i18n — English and Chinese

Quick Start

pip install tinyleaf

# Single project mode (local compilation)
tinyleaf /path/to/my-thesis

# Single project mode (Docker compilation)
tinyleaf /path/to/my-thesis --docker

# Multi-project mode (registry)
tinyleaf

Usage

usage: tinyleaf [-h] [--projects-dir DIR] [--config-dir DIR] [--docker]
                [--image IMAGE] [--port PORT] [--host HOST] [--no-browser]
                [project_path]

positional arguments:
  project_path          Single project directory to open

options:
  --config-dir DIR      Config directory for project registry
                        (default: ~/.config/tinyleaf)
  --projects-dir DIR    Legacy: migrate subdirs into registry
  --docker              Use Docker for compilation (default: local latexmk)
  --image IMAGE         Docker image to use (default: oaklight/texlive:latest)
  --port PORT           Server port (default: 8080)
  --host HOST           Server host (default: 127.0.0.1)
  --no-browser          Don't auto-open browser on start

Multi-Project Registry

When launched without a project_path, tinyleaf enters multi-project mode. Projects are tracked in ~/.config/tinyleaf/projects.json — each entry maps a name to an absolute path anywhere on the filesystem.

From the project page you can:

  • Open Folder — browse the server filesystem and register an existing directory
  • New Project — create a new project at a chosen location
  • Remove — unregister a project (optionally delete files)

Keyboard Shortcuts

Shortcut Action
Ctrl+S Save current file
Ctrl+Enter Compile
Ctrl+Shift+C Git commit
Ctrl+Shift+P Git push

Docker Compose

For a self-contained setup with Docker compilation:

docker compose up

This starts the web editor on http://localhost:8080 with a persistent TeX Live container for compilation.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinyleaf-0.3.0.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinyleaf-0.3.0-py3-none-any.whl (62.9 kB view details)

Uploaded Python 3

File details

Details for the file tinyleaf-0.3.0.tar.gz.

File metadata

  • Download URL: tinyleaf-0.3.0.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tinyleaf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 381a0ed6dd8f3f06785f02ae9901615a1b8c8b794abe54f1dc8303dff73ea7a1
MD5 c980ab373118b757b8d11d1d8bbb1c9f
BLAKE2b-256 c5e89927c1a7c8c752df19397ce56fad93de6bb05e157380bdd3725ab2863501

See more details on using hashes here.

File details

Details for the file tinyleaf-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: tinyleaf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 62.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for tinyleaf-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e04bc7ae1b28ff60723c5be6a149db4c4cdee757ab4017b7b162f27504d839eb
MD5 6633675e1bff49bff4f735e848a6bb8b
BLAKE2b-256 1aea71203b5057441219696af35dfc6d1c25072078009a5388e8978c4c51e5c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page