4

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?

3 Answers 3

2

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"
0
1

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.

2
  • 1
    That would do the trick, but I'd rather keep my TeXLive distribution intact and avoid duplicate files. Jul 1, 2012 at 13:32
  • could it be sufficient to create a symlink to the directory somewhere else and let spotlight index the linked "directory"?? Jan 8, 2015 at 3:00
0

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

$ mdimport -f /usr/local/texlive/2011/texmf-dist/doc
2
  • 1
    Afaik that flag is for 10.4 and below, and has been deprecated in Leopard and above. Jul 1, 2012 at 15:12
  • As per man mdimport: NOTES The -f switch is obsolete in Leopard and beyond..
    – Daniel Beck
    Jul 14, 2012 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .