[Mac OS X TeX] opening .tex files under OS X?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

David Firth


<x-flowed>Is there some simple way to tell OS X to open any double-clicked file
whose name is something.tex with a specified application (say BBEdit,
or TeXshop, or whatever)?

I have lots of old files made with Alpha, Textures, ..., and when I
double-click on one of them I don't really want Classic to start up.
Now that we seem to be firmly in the world of filenames with a dot in
them, surely there's some way to exploit what comes after the dot?
Probably it's obvious, just not to me...

Cheers -- David

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

Jon Guyer


<x-flowed>At 11:33 AM +0100 6/21/01, David Firth wrote:
>Is there some simple way to tell OS X to open any double-clicked
>file whose name is something.tex with a specified application (say
>BBEdit, or TeXshop, or whatever)?


File->Show Info->Application

--

   Jonathan E. Guyer
   <http://www.his.com/jguyer/>

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

michael murray-6


<x-flowed>>At 11:33 AM +0100 6/21/01, David Firth wrote:

>>Is there some simple way to tell OS X to open any double-clicked
>>file whose name is something.tex with a specified application (say
>>BBEdit, or TeXshop, or whatever)?
>
>
>File->Show Info->Application
>
>--
>
>   Jonathan E. Guyer
>   <http://www.his.com/jguyer/>
>

But this is setting it file by file unless I am missing the point. Is there
a way of telling it anything ending in .tex goes to TeXShop or BBEdit or
whatever ?  It seems to me that MacOSX does this sometimes with files
I download but I am not sure how you set it up.

I guess one could write an applescript to do this assuming that
particular command is applelscriptable.


Michael
--
_________________________________________________________
Assoc/Prof Michael Murray                                                  
Department of Pure Mathematics       Fax: 61+ 8 8303
3696                                      
University of Adelaide             Phone: 61+ 8 8303 4174      
Australia  5005      Email: [hidden email]            
Home Page: http://www.maths.adelaide.edu.au/pure/mmurray
PGP public key:
http://www.maths.adelaide.edu.au/pure/mmurray/pgp.txt
_________________________________________________________


   



-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

Jon Guyer


<x-flowed>At 12:25 AM +0930 6/22/01, Michael Murray wrote:

>But this is setting it file by file unless I am missing the point. Is there
>a way of telling it anything ending in .tex goes to TeXShop or BBEdit or
>whatever ?  It seems to me that MacOSX does this sometimes with files
>I download but I am not sure how you set it up.

The second radio button is "The generic application for documents of
this type". The button at the bottom says "Change Application...".
No, it's not always active, and no it doesn't always work even when
it is active, but hey, what do you expect from a hacked-together demo?

--

   Jonathan E. Guyer
   <http://www.his.com/jguyer/>

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

bruno voisin-6
In reply to this post by michael murray-6


<x-flowed>As far as I understand, OS X uses the extension (.tex here) to associate
a file with an application only when the file has empty creator and type
fields: otherwise it uses these (pre-X) fields to associate the files
with a Classic application. Clear these fields, and your .tex file will
magically get a TeXShop icon. (Does anybody know how Pepper does its
magic cf. [Mac OS X TeX] Pepper burnt me :-)?)

There used to be Classic utilities allowing to change the type/ creator
fields of groups of files and folders, sometimes it was even possible to
apply the change only to a selection of files within these groups, based
on search criteria.

I don't remember what these utilities were. As for me, I still use a
small (16 K) drag-and-drop utility called ctc 1.5, available on sumex
circa 1993, allowing the change of creator/type/EOLs (by Brian Bechtel).

By the way, I noticed that all the files I imported from my pre-OS X
directories are owned by "root", while all the files I created after
installing OS X are owned by "[my username]" (well, I also happen to be
root, but not necessarily anybody is :). Does anybody know how to change
this without having to Terminal then chmod?

Is there also a possibility of having .sty .cls .ltx etc. files opened
by TeXShop, not just .tex files?

Bruno Voisin

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

Berndt Farwer
In reply to this post by michael murray-6


<x-flowed>
On Thursday, June 21, 2001, at 04:55 , Michael Murray wrote:
> But this is setting it file by file unless I am missing the point. Is
> there
> a way of telling it anything ending in .tex goes to TeXShop or BBEdit or
> whatever ?  It seems to me that MacOSX does this sometimes with files
> I download but I am not sure how you set it up.
>
> I guess one could write an applescript to do this assuming that
> particular command is applelscriptable.

... you can however open the File>Show Info window and select a bunch of
files (this is reflected in the top line "x items are selected") and
change the preferred application for all of these.

Berndt Farwer
([hidden email])


-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

Christian Swinehart
In reply to this post by bruno voisin-6


<x-flowed>On Thursday, June 21, 2001, at 11:50 AM, Bruno Voisin wrote:
> There used to be Classic utilities allowing to change the type/ creator
> fields of groups of files and folders, sometimes it was even possible
> to apply the change only to a selection of files within these groups,
> based on search criteria.

There are two command line tools for reading and setting Creator/Type
codes that are included with the developer tools: GetFileInfo and
SetFile.

For example if you wanted to set the file dissertation.tex to open with
BBEdit, type:
      /Developer/Tools/SetFile -c "R*ch" -t "TEXT" dissertation.tex
where the "-c" and "-t" are the switches for creator and type
respectively.

I forget whether you "clear" the fields by setting them to "????" or "".
In any case, you can at least batch apply the changes to whichever files
you want to change (e.g., *.tex).

Christian


-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] opening .tex files under OS X?

David Firth


<x-flowed>Thanks to all who replied on my question yesterday.

The solutions suggested were all "active" ones, in the sense that
something has to be done to a file (or group of files) to make them
open with a particular application.  I wasn't aware of the tools
described by Christian Swinehart,

>There are two command line tools for reading and setting
>Creator/Type codes that are included with the developer tools:
>GetFileInfo and SetFile.
>
>For example if you wanted to set the file dissertation.tex to open
>with BBEdit, type:
>      /Developer/Tools/SetFile -c "R*ch" -t "TEXT" dissertation.tex
where the "-c" and "-t" are the switches for creator and type respectively.

which could presumably be applied recursively to apply to all files
in a folder or hierarchy of folders.  A more "Mac-like" alternative
that I know of for doing the same job, and which works well, is
FileTyper (http://www.ugcs.caltech.edu/~dazuma/filetyper/), and more
specifically its "autotyper" facility which allows a folder to be
dropped and all .tex files within it (and its children) to have their
type and creator set appropriately.

But I had in mind (I'm ashamed to say) something more like the way
Windows manages such things: ie, the OS maintains a register of
filename extensions (such as .tex) and corresponding actions for use
when they are double-clicked.  Then, if a colleague sends me a .tex
file, it would just open with my preferred application without my
having to do anything to it.

I suppose ways of managing such things will emerge as OS X matures...

David


-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>