[OS X TeX] Spotlight importers
bvoisin at mac.com
Tue May 10 17:21:11 CEST 2005
Yesterday I downloaded LaTeX MDImporter from <http://
yaced.sourceforge.net/> and installed it inside /Library/SpotLight/.
The file ReadMe.rtf in the .pkg bundle says LaTeX.mdimporter can be
put either there, or in ~/Library/Spotlight, or inside an /
Applications/Emacs.app bundle. During the install, the user can
select the location.
Then I ran "mdimport -f /usr/local/teTeX". The motivation was not to
have .tex Emacs files added to the SpotLight database (I don't use
Emacs other than for testing purposes), but to have
all .tex .cls .sty etc. files inside the gwteX directories added to
Alas, even after doing this, searching for \eqalign, defined in
plain.tex, returns only the files plain.tex from my Textures and
OzTeX setups, not the one in gwTeW.
I'm a bit reluctant to edit such low-level file as /.Spotlight-V100/
_rules.plist (as mentioned by Maarten Sneep in another message from
this thread) if that can be avoided.
From another list, it seems the problem is actually different,
namely that the .tex files inside gwTeX are not associated with any
importer (even after installing LaTeX.mdimporter):
> $ mdimport -d1 -f /usr/local/teTeX/share/texmf.tetex/tex/plain/base/
> 2005-05-10 16:50:15.340 mdimport Import '/usr/local/teTeX/
> share/texmf.tetex/tex/plain/base/plain.tex' type
> 'dyn.ah62d4rv4ge81k3p2' no mdimporter
If the file type (in Classic Mac OS Creator/Type resource sense) is
changed to "TEXT", the .tex file is identified as Rich Text, and an
importer is found:
> $ cp /usr/local/teTeX/share/texmf.tetex/tex/plain/base/plain.tex ~/
> $ cd ~/Desktop
> $ /Developer/Tools/SetFile -t "TEXT" plain.tex
> $ mdimport -d1 plain.tex
> 2005-05-05 16:40:17.105 mdimport Import '/Users/brunovoisin/
> Desktop/plain.tex' type 'com.apple.traditional-mac-plain-text'
> using 'file://localhost/System/Library/Spotlight/RichText.mdimporter/'
But even better, as pointed by Will Robertson on another list, would
probably be to assign proper UTIs (the Tiger resurrection/improvement
of Creator/Type resources <http://arstechnica.com/reviews/os/
macosx-10.4.ars/11>) to TeX files. This will happen: people are
brainstorming on it at the TUG level.
Afterwards it should be easier to write Spotlight importers, I imagine.
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives