Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Having TeXLive installed on my Mac, I frequently need to consult documentation for some of the packages. It seems silly to Google this when I have the PDFs all on my HDD in /usr/local/texlive/2011/texmf-dist/doc , so I want to be able to use Spotlight to search for them. However, I can't get Spotlight to cooperate. I tried

mdimport /usr/local/texlive/2011/texmf-dist/doc

which then does some work, but afterwards doesn't display any results in Spotlight. I've also added the folder in Alfred's search scope to no avail. Any ideas?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Files in /usr/ are scanned by Spotlight but just not included in the normal search results.

AFAIK there's no way to include files treated as system files in the Spotlight menu. But you can include them in Finder:

or create a search filter for searching for system files in Alfred:

or use mdfind:

mdfind -onlyin /usr/local/texlive/2011/texmf-dist/doc "search phrase"
share|improve this answer
    
That works. Thanks! –  Teake Nutma Jul 1 '12 at 15:14
add comment

I know this is not a real solution, but I would move the /usr/local/texlive/2011/texmf-dist/doc directory to /Users/yourusername/Documents/TeXLiveDocs.

share|improve this answer
    
That would do the trick, but I'd rather keep my TeXLive distribution intact and avoid duplicate files. –  Teake Nutma Jul 1 '12 at 13:32
add comment

Try the -f (folder flag) when invoking mdimport:

$ mdimport -f /usr/local/texlive/2011/texmf-dist/doc
share|improve this answer
    
Afaik that flag is for 10.4 and below, and has been deprecated in Leopard and above. –  Teake Nutma Jul 1 '12 at 15:12
    
As per man mdimport: NOTES The -f switch is obsolete in Leopard and beyond.. –  Daniel Beck Jul 14 '12 at 15:49
add comment

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.