Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

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

share|improve this answer
    
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 1 '12 at 4:53

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.

share|improve this answer
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 1 '12 at 4: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 1 '12 at 4: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 1 '12 at 4: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 1 '12 at 5:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.