8

I am searching for a particular LaTeX input file, and have not been able to find it in the repositories.

I am fairly certain that the repositories can be searched by contents because the following command (searching for the LaTeX input file amsmath.sty) is successful:

# apt-cache search amsmath
texlive-latex-base - TeX Live: Basic LaTeX packages
texlive-doc-it - TeX Live: Italian documentation
texlive-latex-extra - TeX Live: LaTeX supplementary packages
texlive-math-extra - TeX Live: Advanced math typesetting

The particular TeX input file I am searching for returns no results (apt-cache search breqn). Can I assume that breqn.sty is not present in any packages in the repositories, and thus seek it out through other means (e.g., CTAN)? Or might there be another way to search through package contents?

Jorge Castro
  • 71,754
user001
  • 674

2 Answers2

9

You can use apt-file to search for files within packages

sudo apt-get install apt-file

# Update database
sudo apt-file update

# Search for files
apt-file search foo

# or in your case
apt-file search breqn.sty

I get texlive-latex3: /usr/share/texmf-texlive/tex/latex/mh/breqn.sty , so ...

sudo apt-get install texlive-latex3

See also http://www.debuntu.org/how-to-find-missing-packages-with-apt-file

Panther
  • 102,067
  • Thanks for mentioning apt-file update. I had thought that apt-get update would have applied to apt-file as well, but this turned out not to be the case. – user001 Feb 01 '12 at 04:53
2

You're looking for texlive-latex3. I found this out by installing apt-file Install apt-file and using it like so:

apt-file update
apt-file search breqn.sty
texlive-latex3: /usr/share/texmf-texlive/tex/latex/mh/breqn.sty

Which gives me the package name and the file.

Jorge Castro
  • 71,754
  • 1
    @user001 This is a site about Ubuntu not debian, you need to ask your question on unix.stackexchange.com if it's about Debian. – Jorge Castro Feb 01 '12 at 04:54
  • 1
    Actually, nevermind, it worked. I needed to run apt-file update as @bodhi-zazen pointed out. I thought apt-get update would be sufficient, but I guess they maintain separate package caches. I knew in this case the results would be equally useful to ubuntu and debian users, so that's why I posted it. I use both. – user001 Feb 01 '12 at 04:57
  • 1
    @user001 When I installed it on mine it prompted me to update it automatically, I've updated my answer to be sure though. – Jorge Castro Feb 01 '12 at 04:58
  • Thanks. It turned out I already had apt-file installed on my system without realizing it, so that's why I wasn't prompted. I probably hadn't run apt-file update in a while. – user001 Feb 01 '12 at 05:00