[OS X TeX] using ITeXMac with external editor and preview

Dalyoung haksan at mac.com
Sat Feb 19 00:47:36 EST 2005


> I don't know well about AppleScript.

> However, I understand your scripts as follows:
>    1. In the script
> 		- it checked file name and its directory
> 		- it formulated cmd for the terminal.
> 		- call CompileTeX-engine
>    2. In the CompileTeX-engine, it run the command depends on the input
> argument.
>
> So I just replaced "BBEdit" with "TextWranger" in the AppleScrips and
> recompileed them.
> For xelatex and context, I copied pdflatex script and changed
> "-pdflatex" in "set cmd to ...." to "-xelatex" and "-texexec", and
> added two cases of "xelatex" and "context" to CompileTeX-engine as
> almost same as in pdflatex case.
>
> As you see, I almost do nothing but copying and modifying a few lines.
>
> Your scripts gave me a lot of convenience to handle TeX process from
> the editor.
>
> Thank you again for nice scripts.
>
> Dalyoung
>


> ******************
> tell application "TextWrangler"
> 	set numdocs to the number of text documents
> 	repeat with i from 1 to numdocs
> 		if (modified of text document i) then
> 			save text document i
> 		end if
> 	end repeat
> end tell
> if numdocs > 0 then
> 	tell application "TextWrangler"
> 		set mypath to get file of active document of window 1
> 	end tell
> 	set myHome to do shell script "echo $HOME"
> 	set cmd to myHome & "/bin/CompileTeX-engine" & " -xelatex " & (POSIX
> path of mypath)
> ...
> ...

--------------------- 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 MacOSX-TeX mailing list