Date: Mon, 10 Sep 2001 20:00:01 -0400
Subject: MacOSX-TeX Digest #97 - 09/10/01
From: "TeX on Mac OS X Mailing List" 
To: "TeX on Mac OS X Mailing List" 
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-transfer-encoding: quoted-printable
Sender: 
Precedence: Bulk
List-Software: LetterRip Pro 3.0.7 by Fog City Software, Inc.
List-Subscribe: 
List-Digest: 
List-Unsubscribe: 

MacOSX-TeX Digest #97 - Monday, September 10, 2001

  Towards Alpha/Classic-MacOS X integration.
          by "Philippe Lel=E9dy" 
  Re: [Mac OS X TeX] Towards Alpha/Classic-MacOS X integration.
          by "Jon Guyer" 
  Re: xdvi, TeXShop, and teTeX
          by "David R. Morrison" 


----------------------------------------------------------------------

Subject: Towards Alpha/Classic-MacOS X integration.
From: "Philippe Lel=E9dy" 
Date: Mon, 10 Sep 2001 06:31:35 +0200 (CEST)

I'd like Alpha for input, plain UNIX tetex for engine and MacOS X GUI
applications for displaying results.

I've made some progress in this direction.
I'm able, from Alpha/Classic to trigger both BSD shell scripts and MacOS X
GUI applications, with Alpha Command "sendOpenEvent".

Typesetting with my BSD shell script "pdftex.sh" is triggered from Alpha
by: 

sendOpenEvent -n ScriptGUI "4-MacOSX:Users:phl:workTeX:pdftex.sh" 

which relies on a nice freeware "ScriptGUI" which triggers any shell
script and display the results in an Aqua window.

Displaying the results is done by Alpha Command:

sendOpenEvent -n TeXShop "4-MacOS X:Users:phl:workTeX:work.pdf"

Of course, these app.s have to be running for "sendOpenEvent" to be
effective. These app.s can be launched by

sendOpenEvent -n Finder =
"4-MacOSX:Applications:Rajouts:ScriptGUI:ScriptGUI.app"
and so on.

It's easy to known if they are running thanks to Alpha Command
"processes" which reply with a list of all Mac app (Classic and X).

It's not perfect (the name of the file to be typesetted has to be hard
coded in my shell script "pdftex.sh"), but I'm please to discover that
Alpha/Classic is able to communicate with the 2 other worlds which coexist
under MacOS X.

If I was able to pass arguments to a shell script, I'd write some tcl
procs to wrap previous commands under simple keystroke.

Remark: there are several free Scripting addition that adds to Apple
Scripting Language some primitives like "shell" to trigger an Unix Script,
with arguments, but I don't know how Alpha can trigger AppleScript. I
tried the Alpha Command "dosc" w/o success.

Salutations.
 
-- 


----------------------------------------------------------------------

Subject: Re: [Mac OS X TeX] Towards Alpha/Classic-MacOS X integration.
From: "Jon Guyer" 
Date: Mon, 10 Sep 2001 10:50:22 -0400

At 6:31 AM +0200 9/10/01, iso-8859-15?Q?Philippe_Lel=3DE9dy wrote:

>Remark: there are several free Scripting addition that adds to Apple
>Scripting Language some primitives like "shell" to trigger an Unix =
Script,
>with arguments, but I don't know how Alpha can trigger AppleScript. I
>tried the Alpha Command "dosc" w/o success.

I suspect you did something like this (to use a trivial example)

	dosc -n Finder -s "get disks"

expecting the AppleScript "get disks" to be directed at the Finder. 
Unfortunately, that's not what [dosc] does (and no, it's not clearly 
documented).

By default, [dosc] sends the string supplied with '-s' to the 
specified app as an argument to that app's misc/dosc (DoScript) 
AppleEvent handler. This is useful for communicating with 
applications that are based on some non-AppleScript scripting 
language (like Alpha itself is). The Finder doesn't have a DoScript 
command, so this doesn't work. Your desire to send shell commands is 
actually a perfect application of [dosc], but only if the shell (or 
some intermediary) supports the misc/dosc AppleEvent. If you can 
figure out what AppleEvent is generated when the "shell" AS is 
invoked (see below), you could still use [dosc] with the -k and -e 
flags.

You may need (or want) to send raw AppleEvents, using either 
[AEBuild] or [tclAE::send]. I recommend the latter, but then I wrote 
it. In order to determine what arguments to supply, you'll need to 
cheat by eavesdropping on Script Editor while it sends the message 
you want. I give some instructions for doing all of this at




The yet-to-be-released Alpha 8 allows you to use the Tclapplescript 
package, which would enable you to do what you want, but until then, 
TclAE is the way to go. Also, Alpha 8 on Mac OS X uses the supplied 
eunuchs version of the Tcl library, so you should be able there to 
use [exec] to issue your shell commands directly, although I haven't 
tried (/much/ bigger fish to fry in AlphaX). Neither of these will 
work with Alpha 7 in Classic, though.


Please contact me directly if you need help with implementing this.

-- 

   Jonathan E. Guyer
   

----------------------------------------------------------------------

Subject: Re: xdvi, TeXShop, and teTeX
From: "David R. Morrison" 
Date: Mon, 10 Sep 2001 17:15:15 -0400

Nicholas Riley wrote:

> I tried the Fink
> package of teTeX, but I could never get it to work.

I would be curious to know what problems you had, perhaps I could help.

> So I tried to compile xdvi.  First I tried the Fink package.  It
> doesn't consult kpathsea for path info, seemingly, so that was out.

Thanks for pointing out that fink's xdvi package had a problem.  This has
now been fixed: you will need to update to tetex-1.0-9 and to =
xdvi-22.46-2,
and you can get the new versions in the "unstable" directory in fink's CVS
repository.  (They should be the default versions at the time of the next
fink release in a few weeks.)  The xdvi package now modifies the tetex
configuration files appropriately so that it finds fonts correctly with
kpathsea. 

  -- Dave Morrison

----------------------------------------------------------------------
End of MacOSX-TeX Digest

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