texmini 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- texmini-0.2.0/LICENSE +21 -0
- texmini-0.2.0/PKG-INFO +258 -0
- texmini-0.2.0/README.md +236 -0
- texmini-0.2.0/pyproject.toml +36 -0
- texmini-0.2.0/setup.cfg +4 -0
- texmini-0.2.0/src/texmini/__init__.py +3 -0
- texmini-0.2.0/src/texmini/cli.py +1078 -0
- texmini-0.2.0/src/texmini.egg-info/PKG-INFO +258 -0
- texmini-0.2.0/src/texmini.egg-info/SOURCES.txt +13 -0
- texmini-0.2.0/src/texmini.egg-info/dependency_links.txt +1 -0
- texmini-0.2.0/src/texmini.egg-info/entry_points.txt +2 -0
- texmini-0.2.0/src/texmini.egg-info/top_level.txt +1 -0
- texmini-0.2.0/tests/test_benchmarks.py +58 -0
- texmini-0.2.0/tests/test_cli.py +603 -0
- texmini-0.2.0/tests/test_packaging.py +130 -0
texmini-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alex Mill
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
texmini-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: texmini
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Ultra-lean LaTeX command wrapper with bibliography detection and cleanup.
|
|
5
|
+
Author: Alex Mill
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/alexmill/texMini
|
|
8
|
+
Project-URL: Issues, https://github.com/alexmill/texMini/issues
|
|
9
|
+
Project-URL: Repository, https://github.com/alexmill/texMini
|
|
10
|
+
Keywords: latex,tex,latexmk,bibliography
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Text Processing :: Markup :: LaTeX
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# texMini
|
|
24
|
+
|
|
25
|
+
**LaTeX that just works, without managing a full TeX installation.**
|
|
26
|
+
|
|
27
|
+
## Try it now
|
|
28
|
+
|
|
29
|
+
Choose either path. Both run texMini without a separate texMini installation.
|
|
30
|
+
|
|
31
|
+
On macOS or Linux with [uv](https://docs.astral.sh/uv/):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uvx texmini paper.tex
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
With Docker Desktop or Docker Engine:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
docker run --rm -v "${PWD}:/work" ghcr.io/alexmill/texmini:latest paper.tex
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The Docker command works in Bash, zsh, and PowerShell. The image downloads on its first use. Pin `ghcr.io/alexmill/texmini:0.2.0` instead of `:latest` when reproducibility matters.
|
|
44
|
+
|
|
45
|
+
texMini builds existing LaTeX projects with real TeX Live and `latexmk`. On the first run, it downloads a minimal private TinyTeX runtime. When a document needs a package that is not installed, texMini finds the corresponding TeX Live package, installs it, and retries the build.
|
|
46
|
+
|
|
47
|
+
The result is a TeX installation that grows with your documents instead of arriving as a multi-gigabyte desktop distribution. It lives in `~/.texmini`, does not modify the system TeX installation, and can be removed by deleting that directory.
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
paper.tex ──▶ texmini ──▶ install what is missing ──▶ paper.pdf
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
pdfLaTeX, LuaLaTeX, XeLaTeX, Biber, and the wider TeX Live package ecosystem remain available. Existing projects do not need to adopt a new document language or a different TeX engine.
|
|
54
|
+
|
|
55
|
+
## Why texMini
|
|
56
|
+
|
|
57
|
+
A conventional TeX installation offers broad compatibility, but asks you to install and maintain an entire distribution. Tectonic offers an excellent self-contained build experience, but uses its own XeTeX-derived engine and cannot replace every traditional TeX engine and utility. TinyTeX provides the small, portable TeX Live foundation used here, while its most automatic missing-package workflow is normally accessed through R.
|
|
58
|
+
|
|
59
|
+
texMini combines conventional TeX compatibility with a disposable command-line experience:
|
|
60
|
+
|
|
61
|
+
- **Use the project you already have.** Build ordinary `.tex` files with TeX Live and `latexmk`.
|
|
62
|
+
- **Install only what the document needs.** Missing classes, packages, fonts, bibliography styles, and Biber are resolved and installed automatically.
|
|
63
|
+
- **Keep TeX contained.** The managed runtime and its packages stay under `~/.texmini`.
|
|
64
|
+
- **Remove it like ordinary files.** There is no system-wide uninstaller or package database to unwind.
|
|
65
|
+
- **Choose native or containerized execution.** The published Docker image is a ready-to-run, cross-platform option for common documents.
|
|
66
|
+
|
|
67
|
+
## Comparison
|
|
68
|
+
|
|
69
|
+
| System | Existing LaTeX projects | Package handling | Installation and removal | Main compromise |
|
|
70
|
+
| --- | --- | --- | --- | --- |
|
|
71
|
+
| **texMini** | Builds conventional projects with pdfLaTeX, LuaLaTeX, or XeLaTeX | Automatically detects and installs needed TeX Live packages into a private runtime | Run with `uvx` or Docker; delete `~/.texmini` to remove the native runtime | Specialized external tools can require additional setup |
|
|
72
|
+
| [Tectonic](https://tectonic-typesetting.github.io/) | Builds many projects, subject to its XeTeX-derived engine and build model | Downloads support files from a configured bundle | A single executable and a removable cache | It does not provide every engine and utility in conventional TeX Live |
|
|
73
|
+
| [TinyTeX with R](https://yihui.org/tinytex/) | Broad TeX Live compatibility | The R package can detect and install missing packages during compilation | A small, portable TeX Live directory | The automated workflow is coupled to R |
|
|
74
|
+
| **TinyTeX from the shell** | Broad TeX Live compatibility | Packages are managed directly with `tlmgr` | A small, portable TeX Live directory | Compilation and missing-package repair are manual |
|
|
75
|
+
| **TeX Live, MacTeX, or MiKTeX** | Broadest conventional compatibility | Large package sets or distribution-specific package management | A conventional desktop or system installation | More disk usage and distribution administration |
|
|
76
|
+
| [Overleaf](https://www.overleaf.com/) | Builds projects supported by its hosted TeX environment | A large package set is supplied by the service | No local TeX installation | The build environment is remote and controlled by the service |
|
|
77
|
+
| [Typst](https://typst.app/) | LaTeX projects must be rewritten | Uses Typst packages rather than TeX Live packages | A simple executable and package cache | It is a different document language, not a LaTeX compiler |
|
|
78
|
+
|
|
79
|
+
## Native workflow
|
|
80
|
+
|
|
81
|
+
The native managed runtime supports macOS and Linux and requires uv and Perl. TinyTeX uses Perl for `tlmgr` and `latexmk`. Windows users should use the Docker pathway above.
|
|
82
|
+
|
|
83
|
+
Run texMini directly from PyPI:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
uvx texmini paper.tex
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The first compile downloads TinyTeX-0 into `~/.texmini/TinyTeX`, bootstraps the compiler, and installs the packages required by `paper.tex`. Later builds reuse that runtime.
|
|
90
|
+
|
|
91
|
+
For repeated authoring, use the default incremental workflow:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
texmini paper.tex
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
texMini retains LaTeX's auxiliary build state so unchanged builds and partial rebuilds are substantially faster. For a one-shot or CI build that should remove supported auxiliary files after success, use:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
texmini --clean paper.tex
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Install the command for repeated use:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uv tool install texmini
|
|
107
|
+
texmini paper.tex
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
If a directory contains exactly one `.tex` file, the filename is optional:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
texmini
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## What happens during a build
|
|
117
|
+
|
|
118
|
+
Running:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
texmini paper.tex
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
causes texMini to:
|
|
125
|
+
|
|
126
|
+
1. Select `paper.tex`, or find the only `.tex` file in the current directory.
|
|
127
|
+
2. Check the source for required classes, packages, and bibliography tooling.
|
|
128
|
+
3. Install the private TinyTeX runtime if it does not exist.
|
|
129
|
+
4. Compile with managed `latexmk` and pdfLaTeX.
|
|
130
|
+
5. Read a failed build for missing TeX files, resolve their TeX Live packages, and install them together.
|
|
131
|
+
6. Continue installing and retrying while each round discovers a new package, with a 20-round safety ceiling.
|
|
132
|
+
7. Write `paper.pdf` beside the source and retain incremental build state by default.
|
|
133
|
+
|
|
134
|
+
Package mappings are cached in `~/.texmini/package-map.json`. Package installation modifies only texMini's private TinyTeX tree.
|
|
135
|
+
|
|
136
|
+
## Engines and options
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
texmini [install-tinytex] [--engine pdflatex|lualatex|xelatex] [OPTIONS] [document.tex] [refs.bib ...]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Examples:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
texmini paper.tex
|
|
146
|
+
texmini --engine lualatex paper.tex
|
|
147
|
+
texmini --engine xelatex paper.tex
|
|
148
|
+
texmini --clean paper.tex
|
|
149
|
+
texmini --verbose paper.tex
|
|
150
|
+
texmini paper.tex references.bib
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Options:
|
|
154
|
+
|
|
155
|
+
- `--engine ENGINE`: select `pdflatex`, `lualatex`, or `xelatex`.
|
|
156
|
+
- `--clean`: remove supported auxiliary files after a successful build.
|
|
157
|
+
- `--verbose`: show complete TeX, `latexmk`, Biber, and package-manager output.
|
|
158
|
+
- `--no-install`: do not install missing TeX Live packages.
|
|
159
|
+
- `--version`: print the texMini version.
|
|
160
|
+
|
|
161
|
+
Arguments not handled by texMini are passed to managed `latexmk`. Continuous preview mode (`-pvc`) is not supported.
|
|
162
|
+
|
|
163
|
+
Prepare the managed runtime without compiling a document:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
texmini install-tinytex
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Bibliographies
|
|
170
|
+
|
|
171
|
+
texMini detects `\bibliography{...}`, `\addbibresource{...}`, and `biblatex`. Biber is installed automatically when a managed document uses `biblatex`.
|
|
172
|
+
|
|
173
|
+
Explicit bibliography files are checked before compilation:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
texmini paper.tex references.bib
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Build cleanup
|
|
180
|
+
|
|
181
|
+
By default, successful builds retain `.aux`, `.bbl`, `.bcf`, `.fdb_latexmk`, and related state so `latexmk` can avoid unnecessary work on the next invocation.
|
|
182
|
+
|
|
183
|
+
With `--clean`, texMini removes supported auxiliary files after a successful build while preserving `.tex`, `.bib`, `.pdf`, and unrelated files. Failed builds always retain their logs and auxiliary files for diagnosis.
|
|
184
|
+
|
|
185
|
+
## Output and diagnostics
|
|
186
|
+
|
|
187
|
+
Normal builds show short, stable progress messages and suppress successful `tlmgr`, TeX, Metafont, Biber, and `latexmk` transcripts. Warnings that affect the finished document, including unresolved references and missing characters, remain visible.
|
|
188
|
+
|
|
189
|
+
Use `--verbose` to stream complete subprocess output. On failure, the default output shows the primary LaTeX error and source line when available, points to the retained log, and warns when the failed invocation created or changed the PDF.
|
|
190
|
+
|
|
191
|
+
## Docker
|
|
192
|
+
|
|
193
|
+
Docker is the cross-platform, isolated pathway for Docker Desktop and Docker Engine users, including Windows. Compile a document in the current directory with:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
docker run --rm -v "${PWD}:/work" ghcr.io/alexmill/texmini:latest paper.tex
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Use the versioned image for a reproducible invocation:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
docker run --rm -v "${PWD}:/work" ghcr.io/alexmill/texmini:0.2.0 paper.tex
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The image bundles TinyTeX plus packages used by many math, layout, bibliography, hyperlink, color, and TikZ documents. Common documents can therefore build from the downloaded image alone. When networking is available, texMini downloads uncommon TeX Live packages as needed. Those additions are discarded with `--rm`; this is an isolated ready-to-run workflow, not a promise that every possible project compiles offline.
|
|
206
|
+
|
|
207
|
+
On native Linux, the entrypoint writes outputs as the owner of the mounted directory. Explicit Docker `--user` settings remain supported. Docker Desktop handles bind-mount ownership through its virtual machine.
|
|
208
|
+
|
|
209
|
+
## Automation and AI agents
|
|
210
|
+
|
|
211
|
+
texMini is noninteractive and uses stable status lines without spinners or terminal-only formatting. A successful build exits with zero; a failed build returns the underlying nonzero status, retains its log and diagnostic files, and prints the primary error near the end. Use `--verbose` for complete tool transcripts and `--clean` when an automation should remove supported auxiliary files after success.
|
|
212
|
+
|
|
213
|
+
This makes texMini friendly to scripts, CI, and AI coding agents without adding an agent-specific protocol: the same small CLI is used by people and automation.
|
|
214
|
+
|
|
215
|
+
## Compatibility and limitations
|
|
216
|
+
|
|
217
|
+
texMini targets ordinary projects that build with real TeX Live, `latexmk`, and pdfLaTeX, LuaLaTeX, or XeLaTeX. It can plausibly replace the compilation part of an Overleaf workflow, but it is not a collaborative editor or document-hosting service.
|
|
218
|
+
|
|
219
|
+
- Native runtime installation supports macOS and Linux; Windows uses Docker Desktop.
|
|
220
|
+
- Specialized external tools such as glossary generators, Pygments-based syntax highlighting, or project-specific scripts may require additional setup.
|
|
221
|
+
- The managed native runtime grows as packages are installed. It is shared across builds and is not locked independently per project.
|
|
222
|
+
- TeX projects can depend on system fonts, executables, or shell-escape behavior that texMini does not automatically provision.
|
|
223
|
+
|
|
224
|
+
## Environment
|
|
225
|
+
|
|
226
|
+
- `TEXMINI_ENGINE`: default engine; defaults to `pdflatex`.
|
|
227
|
+
- `TEXMINI_CLEAN=true`: remove supported auxiliary files after successful builds.
|
|
228
|
+
- `TEXMINI_AUTO_INSTALL=false`: disable document-driven package installation.
|
|
229
|
+
- `TEXMINI_TINYTEX_ROOT`: managed TinyTeX directory; defaults to `~/.texmini/TinyTeX`.
|
|
230
|
+
- `TEXMINI_TINYTEX_BUNDLE`: release bundle; defaults to `TinyTeX-0`.
|
|
231
|
+
- `TEXMINI_PACKAGE_MAP`: package mapping cache; defaults to `~/.texmini/package-map.json`.
|
|
232
|
+
|
|
233
|
+
## Development
|
|
234
|
+
|
|
235
|
+
Run texMini from the source tree:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
uv run texmini paper.tex
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Run the test suite and validate the distributions:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
uv run python -m unittest discover -s tests -v
|
|
245
|
+
uv build --sdist --wheel
|
|
246
|
+
uvx --from twine==6.2.0 twine check dist/*
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Build and smoke-test Docker:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
docker build -t texmini .
|
|
253
|
+
docker run --rm --network none \
|
|
254
|
+
-v "${PWD}:/work" \
|
|
255
|
+
texmini test.tex
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
TinyTeX bundle benchmark methodology and raw results are in [`benchmarks`](benchmarks).
|
texmini-0.2.0/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# texMini
|
|
2
|
+
|
|
3
|
+
**LaTeX that just works, without managing a full TeX installation.**
|
|
4
|
+
|
|
5
|
+
## Try it now
|
|
6
|
+
|
|
7
|
+
Choose either path. Both run texMini without a separate texMini installation.
|
|
8
|
+
|
|
9
|
+
On macOS or Linux with [uv](https://docs.astral.sh/uv/):
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uvx texmini paper.tex
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
With Docker Desktop or Docker Engine:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
docker run --rm -v "${PWD}:/work" ghcr.io/alexmill/texmini:latest paper.tex
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The Docker command works in Bash, zsh, and PowerShell. The image downloads on its first use. Pin `ghcr.io/alexmill/texmini:0.2.0` instead of `:latest` when reproducibility matters.
|
|
22
|
+
|
|
23
|
+
texMini builds existing LaTeX projects with real TeX Live and `latexmk`. On the first run, it downloads a minimal private TinyTeX runtime. When a document needs a package that is not installed, texMini finds the corresponding TeX Live package, installs it, and retries the build.
|
|
24
|
+
|
|
25
|
+
The result is a TeX installation that grows with your documents instead of arriving as a multi-gigabyte desktop distribution. It lives in `~/.texmini`, does not modify the system TeX installation, and can be removed by deleting that directory.
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
paper.tex ──▶ texmini ──▶ install what is missing ──▶ paper.pdf
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
pdfLaTeX, LuaLaTeX, XeLaTeX, Biber, and the wider TeX Live package ecosystem remain available. Existing projects do not need to adopt a new document language or a different TeX engine.
|
|
32
|
+
|
|
33
|
+
## Why texMini
|
|
34
|
+
|
|
35
|
+
A conventional TeX installation offers broad compatibility, but asks you to install and maintain an entire distribution. Tectonic offers an excellent self-contained build experience, but uses its own XeTeX-derived engine and cannot replace every traditional TeX engine and utility. TinyTeX provides the small, portable TeX Live foundation used here, while its most automatic missing-package workflow is normally accessed through R.
|
|
36
|
+
|
|
37
|
+
texMini combines conventional TeX compatibility with a disposable command-line experience:
|
|
38
|
+
|
|
39
|
+
- **Use the project you already have.** Build ordinary `.tex` files with TeX Live and `latexmk`.
|
|
40
|
+
- **Install only what the document needs.** Missing classes, packages, fonts, bibliography styles, and Biber are resolved and installed automatically.
|
|
41
|
+
- **Keep TeX contained.** The managed runtime and its packages stay under `~/.texmini`.
|
|
42
|
+
- **Remove it like ordinary files.** There is no system-wide uninstaller or package database to unwind.
|
|
43
|
+
- **Choose native or containerized execution.** The published Docker image is a ready-to-run, cross-platform option for common documents.
|
|
44
|
+
|
|
45
|
+
## Comparison
|
|
46
|
+
|
|
47
|
+
| System | Existing LaTeX projects | Package handling | Installation and removal | Main compromise |
|
|
48
|
+
| --- | --- | --- | --- | --- |
|
|
49
|
+
| **texMini** | Builds conventional projects with pdfLaTeX, LuaLaTeX, or XeLaTeX | Automatically detects and installs needed TeX Live packages into a private runtime | Run with `uvx` or Docker; delete `~/.texmini` to remove the native runtime | Specialized external tools can require additional setup |
|
|
50
|
+
| [Tectonic](https://tectonic-typesetting.github.io/) | Builds many projects, subject to its XeTeX-derived engine and build model | Downloads support files from a configured bundle | A single executable and a removable cache | It does not provide every engine and utility in conventional TeX Live |
|
|
51
|
+
| [TinyTeX with R](https://yihui.org/tinytex/) | Broad TeX Live compatibility | The R package can detect and install missing packages during compilation | A small, portable TeX Live directory | The automated workflow is coupled to R |
|
|
52
|
+
| **TinyTeX from the shell** | Broad TeX Live compatibility | Packages are managed directly with `tlmgr` | A small, portable TeX Live directory | Compilation and missing-package repair are manual |
|
|
53
|
+
| **TeX Live, MacTeX, or MiKTeX** | Broadest conventional compatibility | Large package sets or distribution-specific package management | A conventional desktop or system installation | More disk usage and distribution administration |
|
|
54
|
+
| [Overleaf](https://www.overleaf.com/) | Builds projects supported by its hosted TeX environment | A large package set is supplied by the service | No local TeX installation | The build environment is remote and controlled by the service |
|
|
55
|
+
| [Typst](https://typst.app/) | LaTeX projects must be rewritten | Uses Typst packages rather than TeX Live packages | A simple executable and package cache | It is a different document language, not a LaTeX compiler |
|
|
56
|
+
|
|
57
|
+
## Native workflow
|
|
58
|
+
|
|
59
|
+
The native managed runtime supports macOS and Linux and requires uv and Perl. TinyTeX uses Perl for `tlmgr` and `latexmk`. Windows users should use the Docker pathway above.
|
|
60
|
+
|
|
61
|
+
Run texMini directly from PyPI:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
uvx texmini paper.tex
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The first compile downloads TinyTeX-0 into `~/.texmini/TinyTeX`, bootstraps the compiler, and installs the packages required by `paper.tex`. Later builds reuse that runtime.
|
|
68
|
+
|
|
69
|
+
For repeated authoring, use the default incremental workflow:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
texmini paper.tex
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
texMini retains LaTeX's auxiliary build state so unchanged builds and partial rebuilds are substantially faster. For a one-shot or CI build that should remove supported auxiliary files after success, use:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
texmini --clean paper.tex
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Install the command for repeated use:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
uv tool install texmini
|
|
85
|
+
texmini paper.tex
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If a directory contains exactly one `.tex` file, the filename is optional:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
texmini
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## What happens during a build
|
|
95
|
+
|
|
96
|
+
Running:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
texmini paper.tex
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
causes texMini to:
|
|
103
|
+
|
|
104
|
+
1. Select `paper.tex`, or find the only `.tex` file in the current directory.
|
|
105
|
+
2. Check the source for required classes, packages, and bibliography tooling.
|
|
106
|
+
3. Install the private TinyTeX runtime if it does not exist.
|
|
107
|
+
4. Compile with managed `latexmk` and pdfLaTeX.
|
|
108
|
+
5. Read a failed build for missing TeX files, resolve their TeX Live packages, and install them together.
|
|
109
|
+
6. Continue installing and retrying while each round discovers a new package, with a 20-round safety ceiling.
|
|
110
|
+
7. Write `paper.pdf` beside the source and retain incremental build state by default.
|
|
111
|
+
|
|
112
|
+
Package mappings are cached in `~/.texmini/package-map.json`. Package installation modifies only texMini's private TinyTeX tree.
|
|
113
|
+
|
|
114
|
+
## Engines and options
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
texmini [install-tinytex] [--engine pdflatex|lualatex|xelatex] [OPTIONS] [document.tex] [refs.bib ...]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Examples:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
texmini paper.tex
|
|
124
|
+
texmini --engine lualatex paper.tex
|
|
125
|
+
texmini --engine xelatex paper.tex
|
|
126
|
+
texmini --clean paper.tex
|
|
127
|
+
texmini --verbose paper.tex
|
|
128
|
+
texmini paper.tex references.bib
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Options:
|
|
132
|
+
|
|
133
|
+
- `--engine ENGINE`: select `pdflatex`, `lualatex`, or `xelatex`.
|
|
134
|
+
- `--clean`: remove supported auxiliary files after a successful build.
|
|
135
|
+
- `--verbose`: show complete TeX, `latexmk`, Biber, and package-manager output.
|
|
136
|
+
- `--no-install`: do not install missing TeX Live packages.
|
|
137
|
+
- `--version`: print the texMini version.
|
|
138
|
+
|
|
139
|
+
Arguments not handled by texMini are passed to managed `latexmk`. Continuous preview mode (`-pvc`) is not supported.
|
|
140
|
+
|
|
141
|
+
Prepare the managed runtime without compiling a document:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
texmini install-tinytex
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Bibliographies
|
|
148
|
+
|
|
149
|
+
texMini detects `\bibliography{...}`, `\addbibresource{...}`, and `biblatex`. Biber is installed automatically when a managed document uses `biblatex`.
|
|
150
|
+
|
|
151
|
+
Explicit bibliography files are checked before compilation:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
texmini paper.tex references.bib
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Build cleanup
|
|
158
|
+
|
|
159
|
+
By default, successful builds retain `.aux`, `.bbl`, `.bcf`, `.fdb_latexmk`, and related state so `latexmk` can avoid unnecessary work on the next invocation.
|
|
160
|
+
|
|
161
|
+
With `--clean`, texMini removes supported auxiliary files after a successful build while preserving `.tex`, `.bib`, `.pdf`, and unrelated files. Failed builds always retain their logs and auxiliary files for diagnosis.
|
|
162
|
+
|
|
163
|
+
## Output and diagnostics
|
|
164
|
+
|
|
165
|
+
Normal builds show short, stable progress messages and suppress successful `tlmgr`, TeX, Metafont, Biber, and `latexmk` transcripts. Warnings that affect the finished document, including unresolved references and missing characters, remain visible.
|
|
166
|
+
|
|
167
|
+
Use `--verbose` to stream complete subprocess output. On failure, the default output shows the primary LaTeX error and source line when available, points to the retained log, and warns when the failed invocation created or changed the PDF.
|
|
168
|
+
|
|
169
|
+
## Docker
|
|
170
|
+
|
|
171
|
+
Docker is the cross-platform, isolated pathway for Docker Desktop and Docker Engine users, including Windows. Compile a document in the current directory with:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
docker run --rm -v "${PWD}:/work" ghcr.io/alexmill/texmini:latest paper.tex
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Use the versioned image for a reproducible invocation:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
docker run --rm -v "${PWD}:/work" ghcr.io/alexmill/texmini:0.2.0 paper.tex
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The image bundles TinyTeX plus packages used by many math, layout, bibliography, hyperlink, color, and TikZ documents. Common documents can therefore build from the downloaded image alone. When networking is available, texMini downloads uncommon TeX Live packages as needed. Those additions are discarded with `--rm`; this is an isolated ready-to-run workflow, not a promise that every possible project compiles offline.
|
|
184
|
+
|
|
185
|
+
On native Linux, the entrypoint writes outputs as the owner of the mounted directory. Explicit Docker `--user` settings remain supported. Docker Desktop handles bind-mount ownership through its virtual machine.
|
|
186
|
+
|
|
187
|
+
## Automation and AI agents
|
|
188
|
+
|
|
189
|
+
texMini is noninteractive and uses stable status lines without spinners or terminal-only formatting. A successful build exits with zero; a failed build returns the underlying nonzero status, retains its log and diagnostic files, and prints the primary error near the end. Use `--verbose` for complete tool transcripts and `--clean` when an automation should remove supported auxiliary files after success.
|
|
190
|
+
|
|
191
|
+
This makes texMini friendly to scripts, CI, and AI coding agents without adding an agent-specific protocol: the same small CLI is used by people and automation.
|
|
192
|
+
|
|
193
|
+
## Compatibility and limitations
|
|
194
|
+
|
|
195
|
+
texMini targets ordinary projects that build with real TeX Live, `latexmk`, and pdfLaTeX, LuaLaTeX, or XeLaTeX. It can plausibly replace the compilation part of an Overleaf workflow, but it is not a collaborative editor or document-hosting service.
|
|
196
|
+
|
|
197
|
+
- Native runtime installation supports macOS and Linux; Windows uses Docker Desktop.
|
|
198
|
+
- Specialized external tools such as glossary generators, Pygments-based syntax highlighting, or project-specific scripts may require additional setup.
|
|
199
|
+
- The managed native runtime grows as packages are installed. It is shared across builds and is not locked independently per project.
|
|
200
|
+
- TeX projects can depend on system fonts, executables, or shell-escape behavior that texMini does not automatically provision.
|
|
201
|
+
|
|
202
|
+
## Environment
|
|
203
|
+
|
|
204
|
+
- `TEXMINI_ENGINE`: default engine; defaults to `pdflatex`.
|
|
205
|
+
- `TEXMINI_CLEAN=true`: remove supported auxiliary files after successful builds.
|
|
206
|
+
- `TEXMINI_AUTO_INSTALL=false`: disable document-driven package installation.
|
|
207
|
+
- `TEXMINI_TINYTEX_ROOT`: managed TinyTeX directory; defaults to `~/.texmini/TinyTeX`.
|
|
208
|
+
- `TEXMINI_TINYTEX_BUNDLE`: release bundle; defaults to `TinyTeX-0`.
|
|
209
|
+
- `TEXMINI_PACKAGE_MAP`: package mapping cache; defaults to `~/.texmini/package-map.json`.
|
|
210
|
+
|
|
211
|
+
## Development
|
|
212
|
+
|
|
213
|
+
Run texMini from the source tree:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
uv run texmini paper.tex
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Run the test suite and validate the distributions:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
uv run python -m unittest discover -s tests -v
|
|
223
|
+
uv build --sdist --wheel
|
|
224
|
+
uvx --from twine==6.2.0 twine check dist/*
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Build and smoke-test Docker:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
docker build -t texmini .
|
|
231
|
+
docker run --rm --network none \
|
|
232
|
+
-v "${PWD}:/work" \
|
|
233
|
+
texmini test.tex
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
TinyTeX bundle benchmark methodology and raw results are in [`benchmarks`](benchmarks).
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "texmini"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Ultra-lean LaTeX command wrapper with bibliography detection and cleanup."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "Alex Mill" }]
|
|
13
|
+
keywords = ["latex", "tex", "latexmk", "bibliography"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: End Users/Desktop",
|
|
18
|
+
"Operating System :: MacOS",
|
|
19
|
+
"Operating System :: POSIX :: Linux",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Topic :: Text Processing :: Markup :: LaTeX",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
texmini = "texmini.cli:main"
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://github.com/alexmill/texMini"
|
|
29
|
+
Issues = "https://github.com/alexmill/texMini/issues"
|
|
30
|
+
Repository = "https://github.com/alexmill/texMini"
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
where = ["src"]
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.dynamic]
|
|
36
|
+
version = { attr = "texmini.__version__" }
|
texmini-0.2.0/setup.cfg
ADDED