From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88144 Path: news.gmane.org!not-for-mail From: Thomas Floeren Newsgroups: gmane.comp.tex.context Subject: For the Mac users: AppleScript to launch ConTeXt in a flexile way Date: Thu, 17 Jul 2014 02:19:39 +0200 Message-ID: <4989D925-CC9A-4509-8B81-37921B178E77@mac.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1405556448 32352 80.91.229.3 (17 Jul 2014 00:20:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2014 00:20:48 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 17 02:20:43 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 1X7ZRC-0003Ok-M6 for gctc-ntg-context-518@m.gmane.org; Thu, 17 Jul 2014 02:20:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0BB291027E for ; Thu, 17 Jul 2014 02:20:42 +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 PKsLSwRRwrpP for ; Thu, 17 Jul 2014 02:20:41 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0AC3A10221 for ; Thu, 17 Jul 2014 02:20:33 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 570B9101E6 for ; Thu, 17 Jul 2014 02:20:29 +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 Ypft3cd4ePNR for ; Thu, 17 Jul 2014 02:20:25 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id E0E5D101E3 for ; Thu, 17 Jul 2014 02:20:24 +0200 (CEST) Original-Received: from nk11p04mm-asmtp001.mac.com (nk11p04mm-asmtp001.mac.com [17.158.236.236]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s6H0KJPO004998 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Thu, 17 Jul 2014 02:20:21 +0200 Original-Received: from paulina.fritz.box (p5499C9D8.dip0.t-ipconnect.de [84.153.201.216]) by nk11p04mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-27.10(7.0.4.27.9) 64bit (built Jun 6 2014)) with ESMTPSA id <0N8T00A47Y8SLX30@nk11p04mm-asmtp001.mac.com> for ntg-context@ntg.nl; Thu, 17 Jul 2014 00:19:42 +0000 (GMT) X-Mailer: Apple Mail (2.1878.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.14,0.0.0000 definitions=2014-07-16_08:2014-07-16,2014-07-16,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1407170003 X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=17.158.236.236; country=US; region=California; city=Cupertino; latitude=37.3042; longitude=-122.0946; http://maps.google.com/maps?q=37.3042,-122.0946&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03Mrckk6I - 5757e02e5698 - 20140717 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:88144 Archived-At: Hello, Some months ago I wrote a little AppleScript script with one purpose: It sh= ould be a flexible script to launch ConTeXt typesetting, independently of t= he text editor I=92m using and it should be capable to typeset the Product = file even if I=92m currently editing any component file belonging to that P= roduct 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=92re still using it, many bugs have bee= n 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=3D75QkpizhdpFS As already said, the main purpose of the script is to launch the Ctx typese= tting 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 wor= ks with many text editors (BBEdit, MacVim, TextMate, etc.) as long as the e= ditor is the frontmost process. B) It can launch Ctx on the parent Product file of the component file curre= ntly being edited. Defining a =93Product file=94 can either be done semi-au= tomatically 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 curr= ently 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 one 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 wor= k with 10.8 (old notification via 3rdParty is still implemented). C) Out of the box it works only with the so called =93ConTeXt Minimal Insta= llation=94 (aka ConTeXt Standalone). It won=92t work with TeXLive installat= ions 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 sc= ripting: you have to liberate the rights in the corresponding OS preference= s. This may sound risky to you but the code is open so you can assure yours= elf of what the script does. E) You have to (and you really should!) read the Description that comes wit= h the script. If you are enjoing the script please share it here, if the script is buggy,= 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 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 ___________________________________________________________________________= ________