<div>Two work arounds:</div><div><br></div><div>1. Launch DrRacket from a terminal with <open /path/to/DrRacket.app></div><div><br></div><div>2. Run <raco scribble --pdf /path/to/your-scribble-source.scrbl></div>
<div><br></div><div>======================</div><div><br></div><div>This fragment from racket/collects/redex/private/dot.rkt succinctly describes the problem and a hard-coded</div><div>solution to the root problem:</div>
<div>
<br></div><div>;; these paths are explicitly checked (when find-executable-path</div><div>;; fails) because starting drracket from the finder (or the dock) </div><div>;; under mac os x generally does not get the path right.</div>
<div>(define dot-paths </div><div> '("/usr/bin"</div><div> "/bin"</div><div> "/usr/local/bin"</div><div> "/opt/local/bin/"))</div><div><br></div><div>(define dot.exe (if (eq? (system-type) 'windows) "dot.exe" "dot"))</div>
<div>(define neato.exe (if (eq? (system-type) 'windows) "neato.exe" "neato"))</div><div><br></div><div>(define (find-dot [neato? #f])</div><div> (cond</div><div> [(and (find-executable-path dot.exe)</div>
<div> (find-executable-path neato.exe))</div><div> (if neato?</div><div> (find-executable-path neato.exe)</div><div> (find-executable-path dot.exe))]</div><div> [else</div><div> (ormap (λ (x) (and (file-exists? (build-path x dot.exe))</div>
<div> (file-exists? (build-path x neato.exe))</div><div> (build-path x (if neato? neato.exe dot.exe))))</div><div> dot-paths)]))</div><div><br></div><div>==========================</div>
<div><br></div><div>To see the problem download:</div><div><br></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"><a href="http://hayne.net/MacDev/AppleScript/" target="_blank">http://hayne.net/MacDev/AppleScript/</a><b>showEnvVars</b>.applescript</span></div>
<div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"><br></span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif">Using the applescript editor </span></div>
<div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"><br></span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif">1. save it as a gui app</span></div>
<div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"><br></span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif">2. open it from the finder or dock</span></div>
<div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"> and open it in a terminal shell using the open command</span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"><br>
</span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif">3, compare the PATH envvar in the two cases</span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif"><br>
</span></div><div><span style="color:rgb(0,153,51);line-height:15px;font-family:arial,sans-serif">==========================================</span></div><br><div class="gmail_quote">On Wed, Jun 6, 2012 at 3:40 PM, David Janke <span dir="ltr"><<a href="mailto:david@thejamesriver.com" target="_blank">david@thejamesriver.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>You can always try including the relative path. Something like:</div><span>(find-executable-path "pdflatex" "../../../sw/bin")</span><div>
<br></div><div>Doesn't OS X have a .profile? Maybe try defining the path there instead of in .bashrc?</div><div><div>
<br><div class="gmail_quote">On Wed, Jun 6, 2012 at 2:40 PM, Viera Proulx <span dir="ltr"><<a href="mailto:vkp@ccs.neu.edu" target="_blank">vkp@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am starting to play with scribble and have tried to generate a pdf document from the scribble source. The conversion to html worked fine.<br>
<br>
When I hit the Scribble to PDF button I got:<br>
<br>
Welcome to DrRacket, version 5.2.1 [3m].<br>
Language: scribble/manual; memory limit: 128 MB.<br>
scribble: loading xref<br>
scribble: rendering<br>
. . ../../../../../../../Applications/Racket/collects/scribble/private/run-pdflatex.rkt:7:0: run-pdflatex: could not find a `pdflatex' executable<br>
><br>
<br>
So I looked for run-pdflatex.rkt and opened that and ran it - successfully. I am working on a Mac OS 1.6.8 - so I wondered whether pdflatex exists on it. Running in the Terminal, I tried:<br>
<br>
vkp$ which pdflatex<br>
/sw/bin/pdflatex<br>
vkp$ which man<br>
/usr/bin/man<br>
<br>
so, the command is there. I checked my .bashrc and /sw/bin is in the PATH:<br>
<br>
PATH=/bin:/usr/bin:/usr/vkp/bin:/usr/local/bin:/sw/bin:/Applications/Racket/bin:/usr/bin/ant/bin:/Applications/android-sdk-mac_86/tools:$PATH<br>
<br>
<br>
Then I tried in the Interactions for the run-pdflatex.rkt<br>
<br>
Welcome to DrRacket, version 5.2.1 [3m].<br>
Language: scheme/base; memory limit: 128 MB.<br>
> (find-executable-path "pdflatex")<br>
#f<br>
> (find-executable-path "man")<br>
#<path:/usr/bin/man><br>
><br>
<br>
So - I have no idea why the path to pdflatex is not found. Any help is appreciated.<br>
<br>
-- Viera<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br>
</div></div><br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br>