ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Thomas Floeren <thfl@mac.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: For the Mac users: AppleScript to launch ConTeXt	in a flexile way
Date: Fri, 18 Jul 2014 02:59:59 +0200	[thread overview]
Message-ID: <03021EF1-0EC8-48AB-B651-47C5748B71A1@mac.com> (raw)
In-Reply-To: <5A17587B-26C2-4AE5-9EEA-81A74E99AF1E@gmail.com>



On 17 Jul 2014, at 22:47, Otared Kavian <otared@gmail.com> wrote:

> 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
> 

Hi,

thanks for your feedback!

> after having edited some parametrers inside the script.

Basically there should be no need to edit parameters in the script to make it run (except rare cases like strange ctx install locations). The script for example is (or should be) capable to find the "setuptex" files of your Ctx Minimals automatically on first launch. Most other parameters are configurable from the main options screen, that appears when you launch the script with the ctrl-key down. What was it that you had to edit in the script?

> I am running Mac OS X 10.9.4

That should be fine. Same version here.

> I didn’t know how to create a « service » with an Applescript

No need to do this. In the Extras folder you'll find some premade service workflows to launch the script. In the description I tried to explain how to install the services and how to assign hotkeys ("Installation for usage with hotkey and modifier keys" > "Service workflows"). Did you see this?

The current version of the script has a rather long delay of 0.6 seconds, that means it isn't even necessary to install a service for each modifier key combination. You can launch the script with just your standard hotkey and then (up to 0.6s afterwards) hold down the desired modifier key, if needed. For example you launch the script with cmd-F7 and then you quickly hold down ctrl in order to open the main options screen.

> I get a notification saying that something i sgoing on, but then no PDF is created nor a log file.

What does the notification say? 

You can try to pass the typesetting to the terminal (by default is is executed in the non-interactive (non visible) shell). To do this you can either mark the setting in the main options screen ("Run Typesetting in Terminal") or hold down opt-shift while (or quickly after) launching the script. Maybe this way it becomes more obvious what is going wrong.

> However the update part works fine and it is very handy: maybe this part could be made into a small application with Xcode

Well, this is one of the easier parts of the script. It would probably be overkill to rewrite this as Cocoa app, especially because it won't benefit from being native (the time-consuming processes in that part are archiving, download and making formats). However, I just started learning Swift, so maybe it would be a good exercise ;-)

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
___________________________________________________________________________________


  reply	other threads:[~2014-07-18  0:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17  0:19 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03021EF1-0EC8-48AB-B651-47C5748B71A1@mac.com \
    --to=thfl@mac.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).