AlphaX, teTeXcomm, pstricks and microtype revisited, was:[OS X TeX] Re: pdflatex with dvi-output

Michael Hoppe mh at
Fri Nov 11 06:36:29 EST 2005

Dear Robert,

>Let me explain

Thank you very much, but I know about those facts already.  A year ago I wrote:

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) 
$texRun(jobName).dvi 2>&1 ; \
	  echo \r ; ps2pdf $texRun(jobName) 
$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


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




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,


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


But this solution didn't work in the latest release of gwtex -- for 
whatever reason, I don't know yet.  So I was looking for a 
command-line-like solution, but I've found a very better one, which 
is working in all environments.

     The usual way to have pst-pdf working is:

     latex file.tex
     ps2pdf file-pics.pdf
     (pdf)latex file.tex

In the first latex-run a file (named is automagically 
produced which contains all the pstricks-images.  This first step 
*must* be done by latex, not pdflatex.  But to achieve all the 
benefits of microtyping, pdflatex is neccessary.  Lokks like a catch 
22, but here's the solution with the packacke ifpdf.

\documentclass{whatever you like}

%Now load your other stuff, esp. pstricks and the insert:

\usepackage[whatever options]{microtype}

All will run smoothly.

-= Michael Hoppe <>, <mh at> =-----
-= 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:
          & FAQ:
List Archive:

More information about the MacOSX-TeX mailing list