Metadata-Version: 2.4
Name: nantex
Version: 0.1.0
Summary: LaTeX-to-PDF CLI with browser live preview — no local LaTeX install needed
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Requires-Dist: requests>=2.34.2
Requires-Dist: rich>=15.0.0
Requires-Dist: typer>=0.25.1
Requires-Dist: watchdog>=6.0.0
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/Forge41/nantex
Project-URL: Repository, https://github.com/Forge41/nantex
Description-Content-Type: text/markdown

# nantex

LaTeX-to-PDF live preview in your browser — no local LaTeX install needed.

Write `.tex`, save, see the result. That's it.

## How it works

`nantex` watches your `.tex` file, compiles it via the [latex-on-http](https://github.com/YtoTech/latex-on-http) public API, and serves the result through a local HTTP server with automatic browser refresh via Server-Sent Events. No Overleaf tab switching. No Skim install. Just your editor and a browser.

## Install

```bash
# via uv (recommended)
uv tool install nantex

# zero-install run
uvx nantex main.tex

# via pip
pip install nantex
```

## Usage

```bash
nantex main.tex                      # watch mode, opens http://localhost:7474
nantex main.tex --once               # compile once and exit
nantex main.tex --port 8080          # custom port
nantex main.tex --compiler xelatex  # use xelatex instead of pdflatex
nantex main.tex --output ~/out.pdf  # custom output path
nantex main.tex --api https://...   # self-hosted latex-on-http instance
```

## Flags

| Flag | Default | Description |
|------|---------|-------------|
| `--compiler` | `pdflatex` | LaTeX compiler (`pdflatex`, `xelatex`, `lualatex`) |
| `--api` | `https://latex.ytotech.com/builds/sync` | Compile API endpoint |
| `--output` | `<file>.pdf` | Output PDF path |
| `--port` | `7474` | Preview server port |
| `--once` | off | Compile once and exit (no watch loop) |

## Privacy

Your `.tex` file content is sent to the configured API endpoint on every compile. For sensitive documents, run a self-hosted [latex-on-http](https://github.com/YtoTech/latex-on-http) instance and point `--api` at it.

## Limitations

- Single-file only — `\input{}` / `\include{}` is not supported in v1.
- Requires internet access to the compile API (or a self-hosted instance).

## Publishing

```bash
uv build
uv publish  # set UV_PUBLISH_TOKEN or use OIDC Trusted Publisher
```

## License

MIT