[OS X TeX] pstricks, ps4pdf, pdflatex and AlphaX -- my solution

Michael Hoppe mh at michael-hoppe.de
Fri Nov 19 10:35:39 CET 2004


Dear TeXers,

here's my solution to get pstricks integrated in pdflatex.  First get 
ps4pf and tetexComm.tcl from Joachim Kock and install both.

     We (ab)use the switch usedvipdfm for our purpose.  For that, open 
tetexComm.tcl in Alpha and locate the lines

if { $TeXCmodeVars(usedvipdfm) } {
	set cmd "echo \r ; dvipdfm $texRun(jobName) 2>&1"
}

Change them as follows:

if { $TeXCmodeVars(usedvipdfm) } {
	#set cmd "echo \r ; dvipdfm $texRun(jobName) 2>&1"
	set cmd "echo \r ; dvips -Ppdf -o $texRun(jobName)-pics.ps 
$texRun(jobName).dvi 2>&1 ; \
	  echo \r ; ps2pdf $texRun(jobName)-pics.ps 
$texRun(jobName)-pics.pdf ; \
	echo \r ; pdflatex $texRun(jobName).tex"

Save tetexComm.tcl and restart Alpha and set the switch usedvipdfm in 
the prefs for TeXC.

     Next thing to do is to wrap all the pstricks-stuff in PSforPDF{} 
as described in the ps4pdf manual.  Write

     %&latex

in the first line of your document and then run the script via 
Command-Shift-R.  In this step all the pictures get converted.  This 
production step is only needed once to convert the pictures, so after 
this production change

     %&latex

in

     %&pdflatex

and tex your document as usual.  Repeat the production of the 
pictures (i.e., change %&pdflatex in %&latex again,) only if you've 
created new pspictures or the like.  Happy texing,

Michael

NB: Be sure to load microtype before the ps-stuff.

-- 
-= Michael Hoppe <www.michael-hoppe.de>, <mh at michael-hoppe.de> =-----
-= Key fingerprint = 74 FD 0A E3 8B 2A 79 82 25 D0 AD 2B 75 6A AE 63
-= PGP public key ID 0xE0A5731D  =-----------------------------------
--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list