.TH TLPKGASSIST 1 "2026-11-28" "texlive-pkgassist 0.1.2" "TeX Live tools" .SH NAME tlpkgassist \- compile a LaTeX document and install missing TeX Live packages .SH SYNOPSIS .B tlpkgassist .RI [ options ] .I document.tex .SH DESCRIPTION Run the selected LaTeX engine in the current directory. When the engine reports a missing runtime file, look up its provider in the configured TeX Live repository, install a uniquely identified package with tlmgr, and retry the build. Downloading packages requires access to a repository matching the installed TeX Live release. .SH OPTIONS .TP .BI \-\-engine " name" Select pdflatex (the default), xelatex, lualatex, or latex. .TP .BI \-\-tree " system|user|auto" Select where new packages are installed. The default, auto, tries the system tree first and can retry a package installation in the personal tree when tlmgr reports a read-only system tree. User mode installs relocatable packages and initializes the personal tree when needed. System mode keeps the system tree as the installation target. On Windows it can request UAC authorization for the install command. .TP .B \-\-usermode Equivalent to \fB\-\-tree user\fR. .TP .B \-\-preflight Check explicit class and package declarations in the main document's preamble and batch the missing packages before starting the engine. .TP .B \-\-latexmk Use latexmk to handle bibliography tools and repeated compilation. .TP .BI \-\-font " family=package" Install the specified TeX Live package if fontspec reports the family missing. This option may be repeated. .TP .BI \-\-require\-tool " command=package" Check for the command on PATH before building. If it is missing, attempt to install the specified package. In user mode, external tools must already be available. This option may be repeated. .TP .BR \-h ", " \-\-help Display usage information and exit. .TP .B \-\-version Print the package version and exit. .SH ENVIRONMENT .TP .B TEXMFHOME Personal TeX tree used for user-mode installations. .SH EXAMPLES Build a document with XeLaTeX and install missing packages in the personal tree. .PP .nf tlpkgassist \-\-engine xelatex \-\-tree user \-\-preflight thesis.tex .fi .SH EXIT STATUS Zero on success. A nonzero status indicates an invalid invocation, a compilation error, or a failure to resolve or install a dependency. .SH AUTHOR Ruilin Mao. .SH SEE ALSO .BR tlmgr (1), .BR latexmk (1), .BR kpsewhich (1)