[OS X TeX] small trick on the command line
Axel E.Retif
axretif at igo.com.mx
Tue Feb 8 21:16:59 CET 2005
On Feb 8, 2005, at 8:04 AM, Thomas A.Schmitz wrote:
> This is just a very small trick I wanted to share: I have been mucking
> with lots of encodings and font descriptions lately, and I constantly
> needed to find and open files in the different texmf.something trees.
> Typing those long paths in the Terminal or navigating to these files
> in the Finder proved pretty irritating after a while. So I began to
> type
>
> open -a emacs `kpsewhich texnansi.enc`
>
> Which means: let kpsewhich look for the file in question; it will spit
> out the complete path, then the "open -a emacs" command will take this
> path as an argument (the two ` around the kpsewhich are "backticks,"
> that's important). Of course, replace "emacs" with another application
> of your choice, or use "edit" to open the file in Textwrangler etc. If
> you want to speed up things, you could define an alias (if you're
> using tcsh) or function (bash or zsh) like so:
>
> texopen () { open -a emacs `kpsewhich $@`; }
>
> If you put this line into your .bashrc or .zshrc (and run "source
> .bashrc"), you'll have a command "texopen" that will take one or more
> filenames as an argument, locate them with kpsewhich and open them in
> emacs.
>
> Best
>
> Thomas
Thank you! As you say, to open in TextWrangler (2.0) is as easy as
edit `kpsewhich txfonts.sty`
(bbedit `kpsewhich txfonts.sty` for BBEdit)
Thank you again
Axel
--------------------- 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
mailing list