[OS X TeX] typsetting in TeXShop

jkock jkock at start.no
Tue Jun 13 23:58:21 EDT 2006


> What I don't know how to do is to go to the error line in the 
> TextWrangler window directly from TeXShop's console. Any ideas?
> 
> Thanks!
> 
>                                                   Nestor Aguilera

Hello Nestor,

TeXShop sends the open-source-file-at-error-line instruction to the editor
specified in the unix environment variable TEXEDIT.

So the first question is whether TextWrangler is able to act as TEXEDIT
target.  Alpha, emacs and BBEdit can do this.  For Alpha, the value of
TEXEDIT should be
 
  /Applications/AlphaX/Tools/alphac +%d %s

Since BBEdit is capable as well, there is a fair chance TextWrangler
is too, but I don't know the precise details.

The next question is how to set this environment variable -- this is
nontrivial if it doesn't already work out of the box.  The obvious idea
from a unix viewpoint is just to write it in .profile or in .bashrc, but
unfortunately, in general, GUI applications inherit their environment
variables from the login-window process, which is not a child process of
any of those that read .profile or .bashrc, so it will not respect those
settings.  There is a way to circumvent this by specifying the environment
variables in a certain .plist file.  Then it will be respected by all GUI
applications.  However, Gerben Wierda strongly discourages changing this
file, because some of his own applications are fragile w.r.t. environment
variables and expect certain default settings in order to work.

Ideally, every process should take care of these variables on its own and
set those that are wrong, to make sure that all child processes inherit the
correct value.

Alpha does this.  As soon as it is launched it redefines TEXEDIT to the
value above.  This redefinition is private to Alpha and all its child
processes.  In particular, when in Alpha you press Cmd-T to typeset (with
TeXShop say), TeXShop will be a child process of Alpha and hence inherit
the desired value of TEXEDIT automatically, and know that 'e' in an error
prompt should be directed to Alpha.

TextWrangler should do the same, but I have no idea about how this is done
in TextWrangler.  Of course this is not something the end user should ever
be confronted with, it ought to just work like this out of the box.

Hope this helps.

Cheers,
Joachim.


-------------------------------------------------------------------------
Start.no tilbyr nå raskere bredbånd til lavere pris.
Sjekk http://www.start.no/bredband/ for mer informasjon
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list