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.2.0.tar.gz (59.9 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.2.0-py3-none-any.whl (61.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tinyleaf-0.2.0.tar.gz
Algorithm Hash digest
SHA256 30c35cce6f6e67ca35a989668e4d2fe8922ddf6e10bd495c0b46094e125e4073
MD5 f1aef2ea950818649f43a4784ff8f444
BLAKE2b-256 9e92c227dad4202187700673ee57a3f16651a3dbaa455fbe0a9195615daed3e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyleaf-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 61.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d5e86ced001270cecf15ce243e25416db707ee317792d2f50aa94c458b40785
MD5 17274230cbac05d3fbe66f5c538d101f
BLAKE2b-256 0a9b6fc40238b48a7c5f6692ef0d9aaca3b5e35389f374799d22b6936ce8f7c3

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