Hi Thomas, Thanks for sharing your nice script. You have had a very nice intitiative and I am sure it is going to be very useful for many people.
I did some testing of the script, after having edited some parametrers inside the script. For your information, I am running Mac OS X 10.9.4 on a Mac Book Pro. As a first feedback, I should say that I didn’t know how to create a « service » with an Applescript (shame on me…). Finally I found an application named FastScript which allows to create a shortcut for any Applescript, and then I could run your script on a TeX file. Maybe one could add some indications as to how create a « service » with your script. Strangely the script gives the expected result the first time it is run on a file from within an application such as TeXShop or Smultron, but the second time I call the script, I get a notification saying that something i sgoing on, but then no PDF is created nor a log file. However the update part works fine and it is very handy: maybe this part could be made into a small application with XCode, like the application written by Gerben Wierda in order to install a TeX tree some 10 or 15 years ago. I’ll do some more testing and then let you know. Thanks again: OK On 17 Jul 2014, at 02:19, Thomas Floeren <t...@mac.com> wrote: > Hello, > > Some months ago I wrote a little AppleScript script with one purpose: It > should be a flexible script to launch ConTeXt typesetting, independently of > the text editor I’m using and it should be capable to typeset the Product > file even if I’m currently editing any component file belonging to that > Product file. > > I used it for some time, I improved it, and I shared it with a collegue who > also works with ConText on OSX. We’re still using it, many bugs have been > fixed and some features were added. > > The script proved to be very useful for us and I thought, why not share it > with the other Mac-ConTeXt people? > > > So here it is: > > https://www.wuala.com/tflo/Scripts/Ctx%20Typeset/?key=75QkpizhdpFS > > > As already said, the main purpose of the script is to launch the Ctx > typesetting process (short: Ctx) on a file. > > Regarding the “a file” the script is very configurable and flexible: > > A) It can launch Ctx on a file currently opened in your text editor. It works > with many text editors (BBEdit, MacVim, TextMate, etc.) as long as the editor > is the frontmost process. > > B) It can launch Ctx on the parent Product file of the component file > currently being edited. Defining a “Product file” can either be done > semi-automatically or by hard-definition with two swappable register slots. > > C) If no eligible file is opend in an editor it will launch Ctx on the > currently selected tex file in the Finder. > > > The options added in the course of time are: > > A) Usage of a ConTeXt-Beta or a ConTeXt-Current installation, swappable > B) Typesetting in the non-interactive shell or in the visible terminal > C) Notifications > D) Selection of PDF viewer (Skim, Preview, Adobe, …) > E) Automatically calling the PDF viewer or not > F) Optionally excluding generated PDFs from TM backup > G) luatex or luajitex > H) Beeps or no beeps, and so on > I) Many other things, explained in the Description > > Also some features (“Tools”) have been added: > > A) Purging files including generated PDFs > B) Info on the used Ctx version > C) Updating the Ctx Minimal (Beta or/and Current) and archiving the old one > D) Syntax Check > E) Make formats, listing fonts, other, … > F) Some extras added in the Extras folder (synctex with BBEdit etc.) > G) Much more in the Description > > > Some caveats: > > A) It works only on OS X > > B) The script is designed to work with 10.9 (Mavericks). It should also work > with 10.8 (old notification via 3rdParty is still implemented). > > C) Out of the box it works only with the so called “ConTeXt Minimal > Installation” (aka ConTeXt Standalone). It won’t work with TeXLive > installations or any other kind of excessively screwed-up installations. But > you can go into the script to make it work with anything. > > D) In order to get access to any text editor the script makes use of GUI > scripting: you have to liberate the rights in the corresponding OS > preferences. This may sound risky to you but the code is open so you can > assure yourself of what the script does. > > E) You have to (and you really should!) read the Description that comes with > the script. > > If you are enjoing the script please share it here, if the script is buggy, > or doesn’t work for you at all please let me know too, please. > > Thank you > best wishes > > -- > Thomas > > > > > > > > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________