[texworks] LaTeXmk issue with Mac OS X Yosemite (new OS)

Guillaume Cabanac guillaume.cabanac at univ-tlse3.fr
Sun Oct 19 19:15:25 CEST 2014


Hi Stefan,

Thanks for your suggestions.

> The paths in the preferences are used by Tw (in addition to $PATH) to
> find the primary typesetting program (in your case: latexmk). It is not
> passed on to the program itself. If the program itself needs additional
> programs, they should be in $PATH (which *should* be passed on to the
> program, but apparently isn't).
> 
> As apparently it isn't, please try sourcing .bashrc and/or .profile
> and/or other relevant files as I pointed out in my other post.

Here is the new "tool" I created (also tried with bash on line 1, same result)

-----------------------------
#!/bin/sh
env
-----------------------------

And the result, with incorrect PATH:

-----------------------------
 SHELL=/bin/bash
TMPDIR=/var/folders/5g/ylwb62s90y9gb1x3fwrzfy9w0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Fa9QpW2bjC/Render
USER=cabanac
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.2BxPnkxiTM/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/cabanac/TMP/latextest
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/cabanac
LOGNAME=cabanac
DISPLAY=/private/tmp/com.apple.launchd.GbHpSYBzYd/org.macosforge.xquartz:0
_=/usr/bin/env
-----------------------------



Then I added the source command on line 2:

-----------------------------
#!/bin/sh
source ~/.bash_profile
env
-----------------------------

The result displays the correct PATH:

-----------------------------
SHELL=/bin/bash
TMPDIR=/var/folders/5g/ylwb62s90y9gb1x3fwrzfy9w0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Fa9QpW2bjC/Render
USER=cabanac
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.2BxPnkxiTM/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/opt/coreutils/libexec/gnubin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin
PWD=/Users/cabanac/TMP/latextest
EDITOR=nano
XPC_FLAGS=0x0
PS1=[\[\033[01;32m\]\W\[\033[00m\]]$ 
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/cabanac
DYLD_LIBRARY_PATH=/opt/oracle
LOGNAME=cabanac
PROMPT_COMMAND=ret=$?; if [ $ret -ne 0 ] ; then echo -en "\033[01;31m$ret\033[00;00m" — ; fi; update_terminal_cwd;
DISPLAY=/private/tmp/com.apple.launchd.GbHpSYBzYd/org.macosforge.xquartz:0
_=/usr/local/opt/coreutils/libexec/gnubin/env
-----------------------------


Conclusion: the PATH does not seem to be passed to the process.

> Does Tw still find latexmk if you remove all paths from the preferences
> (it should, if it picks up $PATH correctly).

When I remove all paths in the GUI under "Paths for TeX and related programs" I get an error dialog:

  "The program latexmk was not found".

* * *

As a workaround, I managed to make LaTeXmk work successfully in TeXworks that way:

   1. put "/usr/texbin" in the GUI under "Paths for TeX and related programs"
   2. sudo ln -s /usr/texbin/pdflatex /usr/bin/pdflatex (as /usr/bin is passed to the process when typesetting)
   3. sudo ln -s /usr/texbin/bibtex /usr/bin/bibtex

... A bit of tinkering that could prevent people from being stuck with this issue... until it gets fixed :-)

Cheers,

Guillaume











More information about the texworks mailing list