[OS X TeX] TeXShop syntax colouring for other file extensions

Alan Munn amunn at gmx.com
Mon Feb 28 00:26:07 EST 2011


On Feb 28, 2011, at 12:11 AM, Richard Koch wrote:

> Alan,
> 
> 
> On Feb 27, 2011, at 5:23 PM, Alan Munn wrote:
> 
>> Hi is there any way to tell TeXShop which file types to do syntax colouring on?  I've been working on biblatex .cbx and .bbx files and they don't activate the syntax colouring.  Is there a hidden defaults command I can give to add these file types to the list?
>> 
>> Alan
>> 
>> -- 
>> Alan Munn
>> amunn at gmx.com
>> 
> 
> There is indeed a way to tell TeXShop to syntax color files with other extensions. 
> This is set with a hidden preference item called 
> 
> 	OtherTeXExtensions
> 
> This preference item contains an array of additional extensions which will be
> recognized as files that can be syntax colored.
> 
> Apparently this is not documented in the
> "Hidden Preference Items" section of TeXShop Help, but it is explained in
> 
> 	TeXShop Help --> What's New?
> 
> In this long document, the required information is at the bottom of the section
> "TeXShop Changes 2.15 - 2.18"
> 
> I didn't remember this until I looked at the TeXShop Code and found a reference
> to this preference.


Perfect.  Thanks, Dick. The syntax of the `defaults` command seems to have changed since that part was written.

For those who are interested the correct incantation is:

defaults write TeXShop OtherTeXExtensions -array-add "bbx"

to add .bbx files to the list of files TeXShop recognizes.  You need to quit and restart TeXShop for the syntax colouring to work on the new file type.

I'll write up a new help section on this topic and send it to you for the next release.

Alan

-- 
Alan Munn
amunn at gmx.com







More information about the MacOSX-TeX mailing list