From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88149 Path: news.gmane.org!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: For the Mac users: AppleScript to launch ConTeXt in a flexile way Date: Thu, 17 Jul 2014 22:47:44 +0200 Message-ID: <5A17587B-26C2-4AE5-9EEA-81A74E99AF1E@gmail.com> References: <4989D925-CC9A-4509-8B81-37921B178E77@mac.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1405630099 8280 80.91.229.3 (17 Jul 2014 20:48:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2014 20:48:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 17 22:48:15 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X7sb8-0007xC-Hk for gctc-ntg-context-518@m.gmane.org; Thu, 17 Jul 2014 22:48:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id ACABA1022D for ; Thu, 17 Jul 2014 22:48:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SVDBrkzrGlii for ; Thu, 17 Jul 2014 22:48:13 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D9ABA10221 for ; Thu, 17 Jul 2014 22:48:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A83A101E2 for ; Thu, 17 Jul 2014 22:47:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZHgfGGlFCcyQ for ; Thu, 17 Jul 2014 22:47:48 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id F3385101E1 for ; Thu, 17 Jul 2014 22:47:47 +0200 (CEST) Original-Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s6HKlhAI010479 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 17 Jul 2014 22:47:44 +0200 Original-Received: by mail-wg0-f44.google.com with SMTP id m15so2577847wgh.3 for ; Thu, 17 Jul 2014 13:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=ZTzgxDWdZ8iYpWIjjCKxC80S8vnJ+Uj4HAfHAG5jrJg=; b=t3uCtZkhySDg81TYDBsGeCxQj7D8uCmK7/8W3kl53JFLrR48jUxXdcOgTT9pS9Egfu PAF0uBcsNICI1M09eWNvpPFfHtjpcKqLsIOsE/jhJZEIY7uTttD7gyFUV+RpW2ODLTpm 1hGdlG+RJhg0FK8QEnj/VVgwjmv/oPdNCZKJMUpfULpdm80j/SCDvHFV4r98LLfZBsQ7 b/eBsa+sk8RTf4kvYSaU4fJhvUgcO1HGBXeTz+52vVJgK+pcPYamXeaBPKmJ2aspkpoE rqE8BfrzVAQl7hzrlup7XCLUwa7JoCy7PsS6e+qIcxmkGPZLWKf6ykBCEuq8vPOZ4K+j mfOw== X-Received: by 10.180.80.133 with SMTP id r5mr25226222wix.62.1405630066854; Thu, 17 Jul 2014 13:47:46 -0700 (PDT) Original-Received: from [192.168.0.20] (seg75-6-82-236-32-4.fbx.proxad.net. [82.236.32.4]) by mx.google.com with ESMTPSA id n2sm8705449wjf.40.2014.07.17.13.47.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jul 2014 13:47:45 -0700 (PDT) In-Reply-To: <4989D925-CC9A-4509-8B81-37921B178E77@mac.com> X-Mailer: Apple Mail (2.1878.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::22c; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07MrwLIjC - 8733ccff3d5c - 20140717 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88149 Archived-At: Hi Thomas, Thanks for sharing your nice script. You have had a very nice intitiative a= nd 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 insi= de 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=92t know how to create a =AB = service =BB with an Applescript (shame on me=85). Finally I found an applic= ation named FastScript which allows to create a shortcut for any Applescrip= t, and then I could run your script on a TeX file. Maybe one could add some= indications as to how create a =AB service =BB 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 seco= nd time I call the script, I get a notification saying that something i sgo= ing 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 co= uld be made into a small application with XCode, like the application writt= en by Gerben Wierda in order to install a TeX tree some 10 or 15 years ago. = I=92ll do some more testing and then let you know. Thanks again: OK On 17 Jul 2014, at 02:19, Thomas Floeren 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=92m using and it should be capable to typeset the Produc= t file even if I=92m 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 w= ho also works with ConText on OSX. We=92re still using it, many bugs have b= een fixed and some features were added. > = > The script proved to be very useful for us and I thought, why not share i= t with the other Mac-ConTeXt people? > = > = > So here it is: > = > https://www.wuala.com/tflo/Scripts/Ctx%20Typeset/?key=3D75QkpizhdpFS > = > = > As already said, the main purpose of the script is to launch the Ctx type= setting process (short: Ctx) on a file. > = > Regarding the =93a file=94 the script is very configurable and flexible: > = > A) It can launch Ctx on a file currently opened in your text editor. It w= orks 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 cur= rently being edited. Defining a =93Product file=94 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 cu= rrently 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, =85) > 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 (=93Tools=94) 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 o= ne > D) Syntax Check > E) Make formats, listing fonts, other, =85 > 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 w= ork with 10.8 (old notification via 3rdParty is still implemented). > = > C) Out of the box it works only with the so called =93ConTeXt Minimal Ins= tallation=94 (aka ConTeXt Standalone). It won=92t work with TeXLive install= ations or any other kind of excessively screwed-up installations. But you c= an 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 preferen= ces. This may sound risky to you but the code is open so you can assure you= rself of what the script does. > = > E) You have to (and you really should!) read the Description that comes w= ith the script. > = > If you are enjoing the script please share it here, if the script is bugg= y, or doesn=92t 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-co= ntext > 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 t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________