CTAN Comprehensive TeX Archive Network

Directory support/texlive-pkgassist

README.md

texlive-pkgassist

Version 0.1.2 · Maintained by Ruilin Mao · MIT License

Compile a document and install the Live packages that supply its missing files. For example, when reports a missing subcaption.sty, the script asks tlmgr which package provides it, installs caption, and retries the build.

Quick start

Unpack the release and add the directory containing tlpkgassist, tlpkgassist.cmd, and texlive-pkgassist.lua to your PATH. Keep the launchers alongside the Lua script. From your document's project directory, run:

tlpkgassist main.tex
tlpkgassist --tree user --preflight main.tex

You can also run texlua /path/to/texlive-pkgassist.lua main.tex directly.

Use texlua, tlmgr, and your engine from the same upstream Live installation on Windows or Linux, or from Mac on macOS. Package downloads use the configured Live repository. It must match the year of the local installation.

  • --tree user installs relocatable packages under TEXMFHOME. The script initializes the user tree as needed.
  • --tree system installs into the selected Live installation. On Windows, a recognized read-only installation error triggers a UAC request for the package installation. Compilation continues with the original process privileges.
  • --tree auto (default) tries the system tree first and can retry a package installation in the user tree.
  • --preflight checks explicit declarations in the main preamble and batches missing packages before starting the engine.
  • --latexmk delegates multiple passes and bibliography processing to latexmk.

For a command reference, run man tlpkgassist after the man page is installed, or man -l ./tlpkgassist.1 with GNU man from the unpacked directory.

See the user manual for engine choices, external tools, font mappings and troubleshooting. Chinese instructions are available in README-zh.md.

Copyright (c) 2026 Ruilin Mao. The script, tests and documentation are distributed under the MIT License.

Download the contents of this package in one zip archive (130.1k).

live-pkgassist – Install missing Live packages while compiling documents

texlive-pkgassist is a command-line tool for compiling documents with Live. When the engine reports a missing file, the tool uses tlmgr to find and install the package that provides it, then retries the build. An optional preflight scan installs the missing packages declared in the preamble of the main document in one batch.

Packages can be installed in the system or the user tree; latexmk can be used for builds that need biber or several runs. The tool runs with texlua, so no further interpreter is needed.

A similar tool, written in Python, is texliveonfly.

Packagelive-pkgassist
Bug tracker
Repository
Version0.1.2
LicensesMIT License
Copyright2026 Ruilin Mao
MaintainerRuilin Mao
TopicsInstall management
Compilation
See alsotexliveonfly
...
Guest Book Sitemap Contact Contact Author