[texhax] Converting LaTeX files into MS Word

Joel Salomon joelcsalomon at gmail.com
Wed Nov 22 20:46:27 CET 2006


> > I have a little script I wrote for use with pstricks that takes a minimal
> > TeX file --- I had one pstricks image, but you can put a single equation in
> > instead --- and produces an embeddable pdf.
>
> I've been lurking on this thread...Such a script would be extremely handy,
> if you were willing to share!

Here is figtex.cmd:
	latex %1.tex
	dvips -E %1.dvi -o %1.ps
	epstool --copy --bbox %1.ps %1.eps
	epstopdf %1.eps
It should be easily modifiable to other systems.  You'll need
ghostscript and epstool (I recommend ghostview as well); dvips and
epstopdf come with MiKTeX.  I have a fuller version at home with some
error checking, but this should do for the nonce.
	
The LaTeX source file should use \pagestyle{empty} and have a single
object (figure, equation, table, &c.) in the document.  For example:
	\documentclass{minimal}
	\usepackage{pstricks}
	\usepackage{pst-3dplot}
	\begin{document}
	\pagestyle{empty}
	\psset{Alpha=30,Beta=15,RotY=-90}
	\begin{pspicture}(-4,-4)(4,4)\psgrid
		\pstThreeDCoor[drawing=true,
			xMin=-4,xMax=4,%
			yMin=-4,yMax=4,%
			zMin=-4,zMax=4]
		\pstThreeDDot(1,1,0)
	\end{pspicture}
	\end{document}
You might use \documentclass{article} rathe than {minimal} if there's
an issue with loading packages.

Hope this helps,
--Joel
-------------- next part --------------
latex %1.tex
dvips -E %1.dvi -o %1.ps
epstool --copy --bbox %1.ps %1.eps
epstopdf %1.eps


More information about the texhax mailing list