[OS X TeX] small trick on the command line
Bernhard Barkow
bb at creativeeyes.at
Tue Feb 8 22:39:43 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just an addition:
the way I got the alias to work in tcsh (after some trial and error) is
alias texopen open -a emacs '`kpsewhich \!^`'
in .tcshrc. Maybe some users not very experienced with the tcsh details
might find that useful (like me, for example...).
Thanks for this great tip,
Bernhard
On 8. Feb 2005, at 21:16, Axel E.Retif wrote:
> 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>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
iD8DBQFCCTGkqJ8JxFkhAg0RAkQ8AJ9j46BrS4Y68hzW7d0xs0tgZZGq8ACgvj13
uesr7Afw6oHaZlvG7DqaxSg=
=TRc7
-----END PGP SIGNATURE-----
--------------------- 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