What determines the label displayed in the "Kind" column of an OS X finder window and in search box labeled "Kind"? What determines the label displayed in the "Kind" column of an OS X finder window and in search box labeled "Kind"?

For example, I use LaTeX, and all files with the extension .tex are labeled "LaTeX" in the finder Window and I have them set to open with SublimeText.

Did SublimeText set the file "Kind"?

Also, if I want to search for all file of type "LaTeX" the Finder search box only gives me a limited set of options for "Kind", e.g. Application, Archive, Document, etc. Can I change that option box to show "LaTeX".
CFBundleDocumentTypes

To answer your first and second question:

OS X applications are able to register document types with the system. They do so by declaring those document types within the CFBundleDocumentTypes section in the Info.plist file which resides inside the application bundle.

For example, you can find the entry for the LaTeX kind by opening Terminal.app and invoking this command:

$ grep LaTeX -B4 -A7 /Applications/Sublime\ Text\ 2.app/Contents/Info.plist


The resulting XML chunk defines the three-way relationship between the application, the name of the bundle type (aka Kind), and the respective file extensions:

&lt;dict&gt;
    &lt;key&gt;CFBundleTypeRole&lt;/key&gt;
    &lt;string&gt;Editor&lt;/string&gt;
    &lt;key&gt;CFBundleTypeName&lt;/key&gt;
    &lt;string&gt;LaTeX&lt;/string&gt;
    &lt;key&gt;CFBundleTypeExtensions&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;tex&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;CFBundleTypeIconFile&lt;/key&gt;
    &lt;string&gt;TeX&lt;/string&gt;
&lt;/dict&gt;


For more details about document types, see the section CFBundleDocumentTypes in the document Registering the File Types Your App Supports from Apple’s Developer Library.

Spotlight searches

To answer your third question:


  Can I change that option box to show "LaTeX"


Open the drop down box and choose Other. A text box appears; type the name of the file kind you wish to search for, or any substring of it.

If the Other option won’t appear in the drop-down list, you might need to enable the option first by going to System Preferences » Spotlight and ticking the checkbox next to Other.