[OS X TeX] Applescript-tcl dictionary, wishlist

Claus Gerhardt gerhardt at math.uni-heidelberg.de
Fri Jan 7 02:51:33 CET 2005


The command below works without  problem. You must use the braces.
In my first find/replace formula I put them in the findText, etc., but 
Joachim suggested to put the braces in the DoScript context.

set findText to "$sin(x)$"
set replaceString to "the sine of $x$"

tell application "AlphaX"
	DoScript "eval replaceText " & "[search -r 0  " & "{" & findText & "}" 
& " " & "[minPos]]" & " " & "{" & "{" & replaceString & "}" & "}"
end tell

Claus

On Jan 7, 2005, at 1:08, Jon Guyer wrote:

>
> On Jan 6, 2005, at 4:36 PM, Claus Gerhardt wrote:
>
>> The problem is not so much foolish file content but foolish users - I 
>> am not thinking of you Jon.
>
> Never make the mistake of underestimating my foolishness!
>
>> In the example below simply use
>>
>>> set findText to "sin(x)"
>>> set replaceText to "cos(x)"
>>
>> and all is well.
>
> How about
>
> set findText to "$sin(x)$"
> set replaceText to "the sine of $x$"
>
> then?
>
> --------------------- 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>
>
>

--------------------- 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