ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* For the Mac users: AppleScript to launch ConTeXt in a flexile way
@ 2014-07-17  0:19 Thomas Floeren
  2014-07-17  9:25 ` Hans Hagen
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Thomas Floeren @ 2014-07-17  0:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-09-22 21:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-17  0:19 For the Mac users: AppleScript to launch ConTeXt in a flexile way Thomas Floeren
2014-07-17  9:25 ` Hans Hagen
2014-07-17 17:43   ` Thomas Floeren
2014-07-17 18:24     ` Hans Hagen
2014-07-17 20:47 ` Otared Kavian
2014-07-18  0:59   ` Thomas Floeren
2015-01-18  2:23 ` Thomas Floeren
2015-03-23 16:54 ` Thomas Floeren
2015-03-29 16:36 ` Thomas Floeren
2015-03-29 23:36   ` John Haltiwanger
2015-03-30 18:11     ` Thomas Floeren
2015-04-09  2:40 ` Thomas Floeren
2015-04-09 19:39   ` Otared Kavian
2015-04-09 22:32     ` Thomas Floeren
2015-04-10  9:35       ` Otared Kavian
2015-04-10 13:18         ` Thomas Floeren
2016-03-24  4:13 ` Thomas Floeren
2016-03-24  5:46   ` Jaroslav Hajtmar
2016-09-22 21:32   ` Tom
2016-09-22 21:38     ` Tom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).