[OS X TeX] Re: Why does TeXShop run with COMMAND_MODE set to legacy and not unix2003?
ramonf at hawaii.edu
Wed Jun 2 19:42:50 CEST 2010
So the reason is so that TeXShop be compatible with OS X 10.4. So when
developing engines (say in bash) set COMMAND_MODE=legacy at the top so that
your engine behaves like it would in TeXShop.
Macros where you use "do shell script" are trickier. If on OS X 10.5 or
greater you run the following code from the Applescript Editor
tell application "TeXShop" to display dialog (do shell script "echo
you will get a dialog saying "unix2003", but if you paste it in a TeXShop
macro (in the Macros menu) and run it you will get a dialog saying "legacy".
The fix is to add "COMMAND_MODE=legacy;" at the beginning of any "do shell
script" statement, in our example
tell application "TeXShop" to display dialog (do shell script
"COMMAND_MODE=legacy; echo $COMMAND_MODE")
The commands whose behavior has changed are: awk, echo in bash, exit, chown,
cp, crontab, date, df, du, ex, vi, view, vim, file, grep, join, less, more,
ls, mkfifo, mv, pr, ps, sed, sort, stty, uudecode, uuencode, who and xargs.
Mahalo for you patience,
View this message in context: http://macosx-tex.576846.n2.nabble.com/Why-does-TeXShop-run-with-COMMAND-MODE-set-to-legacy-and-not-unix2003-tp5129001p5131809.html
Sent from the MacOSX-TeX mailing list archive at Nabble.com.
More information about the macostex-archives