Skip to content

A cli tool for finding texlive packages from style file names

License

Notifications You must be signed in to change notification settings

jpfairbanks/tlmgrlookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tlmgrlookup

A cli tool for finding texlive packages from filenames

Motivating example

Have you ever seen a latex error complaining about some style file missing?

Suppose you compiled this latex document:

\documentclass[ignorenonframetext]{article}
\usepackage{xintfrac}

\begin{document}

Hello evince!

\end{document}

When you compile this document you will get this error: ERROR: LaTeX Error: File xintfrac.sty' not found.Suppose you wanted to installxintfrac, you would run tlmgr install xinitfrac`, but then you would get the following totally frustrating error message:

$ sudo tlmgr install xintfrac
tlmgr: package repository http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet (verified)
tlmgr install: package xintfrac not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: An error has occurred. See above messages. Exiting.```

Thanks `tlmgr`, but what is the package that provides `xintfrac`?

tlmgrlookup to the rescue!

```sh
 $ tlmgrlookup xintfrac
Looking up latex package: xintfrac
Result: 337	tex/generic/xint/xintfrac.sty	xint
To install this package run:

	 sudo tlmgr install xint

Now we know exactly which package to install and the tlmgr command to install it.

Installation

go get github.com/jpfairbanks/tlmgrlookup
cd $GOPATH/github.com/jpfairbanks/tlmgrlookup
go install .

Usage

To use this package you just provide $ tlmgrlookup filename.sty

Example:

$ tlmgrlookup readprov.sty
Looking up latex package: readprov.sty
Result: 1892	tex/latex/fileinfo/readprov.sty	fileinfo
To install this package run:

	 sudo tlmgr install fileinfo$ ./tlmgrlookup readprov.sty

Updating the Manifest

This package ships a list of files that are installed in the texlive-all distribution. The list is generated by the assemble bash script from sources in the arch and ubuntu package managers. In order to update these lists you can update the files arch.txt and ubuntu.txt and then run go generate. Additional sources can be added to the assemble script.

  1. Arch: https://www.archlinux.org/packages/extra/any/texlive-latexextra/files/
  2. Ubuntu:https://packages.ubuntu.com/trusty/all/texlive-latex-extra/filelist

LICENSE

This software is licensed under the AGPL.

About

A cli tool for finding texlive packages from style file names

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages