[OS X TeX] Support for AppleScript please
Steffen Wolfrum
macosx-tex at st.estfiles.de
Mon Dec 6 10:46:56 EST 2004
Hi Mark,
Mark Smith <mark at bbprojects.net> wrote:
> Steffen Wolfrum wrote:
>
> >Hi,
> >
> >I would like to write a set of search/replace commands as a makro in
> >TeXShop.
> >Maybe someone could help me getting started with AppleScript?
>
> 0.02...
>
> Have you considered using a more robust editor or a CLI tool for this task ? Either will be easier, much faster and potentially more powerful/informative/flexible than any easily coded pure AppleScript solution. If you don't want to consider a more powerful editor like BBEdit or Emacs or a.n. other, somebody might be able to provide you with some shell scripts which run regex find/replace (which you could then call from within one or more AppleScripts if you wished), but a pure AppleScript solution to be run exclusively in TeXShop doesn't seem like a particularly good idea to me...
>
> ...a (very) quick look at TeXShop's dictionary suggests that TeXShop does not have any special classes or events outside of the standard suite that are going to help you much with this. You will end up with a long-winded and slow script solution for a task that is much easier to accomplish elsewhere. So, unless you are absolutely set on using TeXShop for find/replace, I would suggest handing this off to another app.
>
> (If you are set on using TeXShop, you could always consider using UI Scripting to access TeXShop's (Cocoa's) find/replace features, but I personally don't think this is an advantageous approach.)
Actually I *did* use another editor: AlphaX/TK. There I got used to what Alpha calls "filters" - lists of (regex) find/replace operations that can be edited by the user. So for "cleaning" the rtf2latex2e output and editing a TeX book I wrote filters with about 20 to 50 find/replace operations. Obviously this is a quite unique feature for editors?!
But currently I am experimenting with a rtf->xml->tex workflow. And editing a "raw" xml file (coming from OpenOffice's sxw format) is impossible in Alpha: OSX's rainbow ball is turning and turning and doesn't stop anymore. That's why I looking for an alternative and came to TeXShop's editor.
But if someone knows another way on how to work with "filters" (regex find/replace collections), please tell.
Thank you,
Steffen
--------------------- 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