[OS X TeX] Leopard Quick Look & TeX

Adam R. Maxwell amaxwell at mac.com
Tue Nov 27 18:39:47 CET 2007


 
On Tuesday, November 27, 2007, at 09:21AM, "Herbert Schulz" <herbs at wideopenwest.com> wrote:
>
>On Nov 27, 2007, at 11:05 AM, Adam R. Maxwell wrote:
>
>>
>> On Tuesday, November 27, 2007, at 08:46AM, "Herbert Schulz" <herbs at wideopenwest.com 
>> > wrote:
>>> Howdy,
>>>
>>> Does anyone know what it would take to adapt Leopard's
>>> Text.qlgenerator so that .tex, .cls, .sty, etc. files can be viewed
>>> via Quick Look? Since they are just text files I'd imagine some  
>>> change
>>> in info.plist would do it; but I don't really know much.
>>
>> If the application claiming those files declares a UTI that conforms  
>> to public.plain-text, the system plugin will handle them.  I wrote a  
>> hack to make this work with text types claimed by TextMate.  ISTR  
>> you're a TeXShop user, so you could hack TeXShop's Info.plist to do  
>> something similar.
>>
>> -- 
>> adam
>
>Howdy,
>
>That's interesting. Could you give me a hint of what the addition to  
>info.plist in TeXShop should look like?

something like this

	<key>UTImportedTypeDeclarations</key>
	<array>
		<dict>
			<key>UTTypeConformsTo</key>
			<array>
				<string>public.plain-text</string>
			</array>
			<key>UTTypeDescription</key>
			<string>TeX document</string>
			<key>UTTypeIconFile</key>
			<string>TeX</string>
			<key>UTTypeIdentifier</key>
			<string>com.macromates.fallback.tex-document</string>
			<key>UTTypeTagSpecification</key>
			<dict>
				<key>public.filename-extension</key>
				<array>
					<string>tex</string>
					<string>sty</string>
					<string>cls</string>
				</array>
			</dict>
		</dict>
     </array>

if the Spotlight importer or other app has UTExportedTypesDeclarations, you'll likely have a conflict; the importer should probably use UTImported and the owning app use UTExported.



More information about the macostex-archives mailing list