[texworks] New version 302/303
Jonathan Kew
jfkthame at googlemail.com
Fri Jun 5 01:42:00 CEST 2009
On 4 Jun 2009, at 19:29, T T wrote:
> On 04/06/2009, Jonathan Kew <jfkthame at googlemail.com> wrote:
>> As for adding the PATH, I don't think this should be necessary
>> anyway,
>> as the current $PATH is supposed to be searched automatically in
>> addition to the explicitly-listed binary paths. (See
>> TeXDocument::typeset(). It first prepends the TeXworks binpaths to
>> the
>> PATH in the environment, and then uses the new PATH to actually look
>> for the tools, as well as passing this modified PATH to the tool that
>> gets executed.)
>
> I looked through the code of TeXDocument::typeset() and indeed the
> PATH should be searched as you describe even without explicitly adding
> it. However, I just tested this (rev.295) and tools are found on PATH
> *only* if binpaths setting in prefrences dialog is not empty (it can
> be any junk, like temp dir). I have no idea why this happens, I don't
> see anything in the code that could cause this.
This is really strange, and I have not been able to reproduce this on
OS X or Linux.
One issue to watch out for is that the PATH setting texworks sees may
not be the same as the PATH you see in a terminal window -- at least
on OS X and Linux, this depends how texworks is launched and how the
PATH for shell windows is configured. On OS X, for example, texworks
three different environments depending whether it is launched from the
Xcode IDE (during development), from the Finder (the usual end-user
scenario), or from a Terminal command line. Only in the last of these
cases does it inherit the same PATH as my usual bash shell.
I have just modified the processing of binpaths in
TeXDocument::typeset(), and in particular I have enhanced the error
message if the tool is not found so that it now lists the paths that
were actually searched. So this way you'll more easily be able to see
where it is really looking, once the defaults or Preference settings
are taken into account, together with the current PATH. Maybe this
will help clarify what's going on.
JK
More information about the texworks
mailing list