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?

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"
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.

  • 1
    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
  • could it be sufficient to create a symlink to the directory somewhere else and let spotlight index the linked "directory"?? – MostlyHarmless Jan 8 '15 at 3:00
0

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

$ mdimport -f /usr/local/texlive/2011/texmf-dist/doc
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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