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.1.0.tar.gz (52.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.1.0-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tinyleaf-0.1.0.tar.gz
  • Upload date:
  • Size: 52.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.1.0.tar.gz
Algorithm Hash digest
SHA256 a1cffc7373bb92d17644a55f64f216f40546d8984a6abe731c1209dcc1e5e1e2
MD5 1ce347500c09525d28042318031f852d
BLAKE2b-256 0631427ccbf2a89b911c6664c4fc4305c4a61cb4fd9d3efaadcf79e62504c467

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinyleaf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d273f77abfdd6e1c72b5783937bcd921c2f327607a534209f68335bca747899e
MD5 c3ac27c03b0963a0c16fbbc724de3498
BLAKE2b-256 fa5af11e75ff153b71a433f5647ce70c0548b20de2c37a122f6e107764d8dcda

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