<div>Two work arounds:</div><div><br></div><div>1. Launch DrRacket from a terminal with  &lt;open /path/to/DrRacket.app&gt;</div><div><br></div><div>2. Run &lt;raco scribble --pdf /path/to/your-scribble-source.scrbl&gt;</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>  &#39;(&quot;/usr/bin&quot;</div><div>    &quot;/bin&quot;</div><div>    &quot;/usr/local/bin&quot;</div><div>    &quot;/opt/local/bin/&quot;))</div><div><br></div><div>(define dot.exe (if (eq? (system-type) &#39;windows) &quot;dot.exe&quot; &quot;dot&quot;))</div>

<div>(define neato.exe (if (eq? (system-type) &#39;windows) &quot;neato.exe&quot; &quot;neato&quot;))</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">&lt;<a href="mailto:david@thejamesriver.com" target="_blank">david@thejamesriver.com</a>&gt;</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 &quot;pdflatex&quot; &quot;../../../sw/bin&quot;)</span><div>

<br></div><div>Doesn&#39;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">&lt;<a href="mailto:vkp@ccs.neu.edu" target="_blank">vkp@ccs.neu.edu</a>&gt;</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&#39; executable<br>
&gt;<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>
&gt; (find-executable-path &quot;pdflatex&quot;)<br>
#f<br>
&gt; (find-executable-path &quot;man&quot;)<br>
#&lt;path:/usr/bin/man&gt;<br>
&gt;<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>