[OS X TeX] problem with pst-pdf

Peter Dyballa Peter_Dyballa at Web.DE
Mon Nov 14 09:07:20 EST 2005


Am 14.11.2005 um 13:58 schrieb Alain Matthes:

>
> Are you sure ? I think that the pdflatex-Version is: pdfeTeX 3.141592

It's just pdfeTeX. LaTeX would reveal itself as:

	This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) 
(format=pdflatex 2005.10.30)  11 NOV 2005 11:30

Only in the log file! And similarly the other derived formats would 
present themselves.

>
> In my prefs of TexShop, i've  pdflatex --shell-escape  and my choice 
> for the compilation  is LaTeX.

D'accord, that's fine for the usual day job. TeXShop has six different 
panes to set things. One of them is in German titled like 
'Miscelaneous' (already translated to English). Here you can make a 
record for a 'personal script', decide which 'Distiller' or default 
encoding is to be used. Put here ps4pdf as LaTeX programme!

>
> I take the example here : 
> http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput and the run is 
> made with pdflatex.
>
> I suppose that I have the file ps4pdf :
> locate give this :
> /usr/local/teTeX/bin/powerpc-apple-darwin6.8/ps4pdf
> /usr/local/bin/ps4pdf

There you have the problem: two programmes of the same name! Which one 
is to be used? In Terminal 'which ps4pdf' would show the version you 
use on the command line, but TeXShop might be using the other. It all 
depends on the value of the PATH variable which *can* be different for 
different applications (Terminal vs. TeXShop). I'd recommend to rename 
/usr/local/bin/ps4pdf to /usr/local/bin/ps4pdf2 or 
/usr/local/bin/ps4pdftoo.

>
> With the command line :  ps4pdf 
> /Users/ego/Boulot/Work/pst-pdf-example.tex create  a 
> pst-pdf-example.pdf but in ~/ego.

Because your 'working directory', your 'computer desk or working 
place', is this place. You can change the desk/floor in Terminal with 
'cd ~/Boulot/Work <RET>'. (cd stands for Change Directory; pwd, which 
stands for Print Working Directory, reveals where you currently are). 
Then you could invoke 'ps4pdf pst-pdf-example' and the output would be 
in /Users/ego/Boulot/Work.

>
> altermundus:/usr/local/bin ego$ sudo /usr/local/bin/ps4pdf 
> /Users/ego/Boulot/Work/pst-pdf-example

That's nonsense! You own the TeX file, you are in your 'computer 
appartment', no sudo is needed here. It even brings a danger: 
intermediate and output files could now belong to root and be write 
protected from you. Meaning: you neither are allowed to overwrite or 
remove them! Alain, sudo's purpose is *not* to make things work (that's 
definitely your job) but to give you once in a while extra privileges 
to make a change to the file system.

>
> But I prefer to work with Texshop and especially TexTmate and not with 
> the command line.
>
> I try %!TEX TS-program = ps4pdf but it's the same error

I just tried this with your (corrected) example and re-launched TeXShop 
1.41: it does not automagically select ps4pdf in the menu! But it works 
to select ps4pdf by hand once it is made known to TeXShop the way I 
described above. But, before you start to do anything, remove all 
remnants from sudo! Alain, otherwise TeXShop and ps4pdf might fail 
again and no-one would imagine that this is due to an attempt to make 
things work with sudo!

Since you can work in Terminal a bit, try this to rebuild the locate 
database (in this case sudo *is* necessary, because the programme is 
reserved for the superuser and the programme writes into a protected 
area of the disk and file system):

	sudo /usr/libexec/locate.updatedb

Wait the few minutes while your disk is scanned and then do

	locate pst-pdf-example

Next write, now again with sudo because you need to remove all files 
from this 'altermundus: sudo' invocation that you do not own:

	sudo rm <SPACE>

and then copy and paste all lines from locate which describe output 
from a ps4pdf run on a file pst-pdf-example.tex. Type every time after 
a paste action a space. Don't include the TeX source file! Press 
<RETURN> to get rid of it.

And now you can return to your PSTricks problem!


OK! I have just checked TeXShop again whether it actually works to 
process your file. And this piece of software is kidding me! In the 
menu I see my LaTeX default which I thoughtlessly press, of course. And 
TeXShop then surprises me in its console window with:

	/Users/pete/Library/TeXShop/Engines/ps4pdf.engine: running latex 
pst-pdf-example.tex
	/Users/pete/Library/TeXShop/Engines/ps4pdf.engine: running dvips -Ppdf 
-o pst-pdf-example-pics.ps pst-pdf-example.dvi
	/Users/pete/Library/TeXShop/Engines/ps4pdf.engine: running ps2pdf 
-dAutoRotatePages=/None pst-pdf-example-pics.ps Matthes-pics.pdf
	/Users/pete/Library/TeXShop/Engines/ps4pdf.engine: running pdflatex 
pst-pdf-example.tex

So it finds the 'engine' and uses it accordingly! You can create this 
engine too, in Terminal:

	mkdir -p ~/Library/TeXShop/Engines
	ln -s /usr/local/teTeX/bin/powerpc-apple-darwin-current/ps4pdf 
~/Library/TeXShop/Engines/ps4pdf.engine



--
Greetings

   Pete

"They're putting dimes in the hole in my head to see the change in me."

------------------------- 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